From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 07:52:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D80025A3; Sun, 26 Apr 2015 07:52:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C190D14A3; Sun, 26 Apr 2015 07:52:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3Q7qieM063842; Sun, 26 Apr 2015 07:52:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3Q7qi0s063835; Sun, 26 Apr 2015 07:52:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504260752.t3Q7qi0s063835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 07:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281994 - in head: . share/doc/usd share/doc/usd/10.exref share/doc/usd/10.exref/exref share/doc/usd/10.exref/summary share/doc/usd/11.vitut share/doc/usd/12.vi share/doc/usd/12.vi/summ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 07:52:45 -0000 Author: bapt Date: Sun Apr 26 07:52:43 2015 New Revision: 281994 URL: https://svnweb.freebsd.org/changeset/base/281994 Log: Reincorporate documentation lost with update to nvi 2.1.3 Added: head/share/doc/usd/10.exref/ - copied from r281378, head/share/doc/usd/10.exref/ - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/exref/ex.rm - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/exref/ex.summary head/share/doc/usd/11.vitut/ - copied from r281378, head/share/doc/usd/11.vitut/ - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/edit/edittut.ms head/share/doc/usd/12.vi/ - copied from r281378, head/share/doc/usd/12.vi/ - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vitut/vi.summary - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vitut/vi.in - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vitut/vi.apwh.ms head/share/doc/usd/13.viref/ - copied from r281378, head/share/doc/usd/13.viref/ - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/ex.cmd.roff - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/ref.so - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/set.opt.roff - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/vi.cmd.roff - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/vi.ref Directory Properties: head/share/doc/usd/10.exref/exref/ex.rm (props changed) head/share/doc/usd/10.exref/summary/ex.summary (props changed) head/share/doc/usd/11.vitut/edittut.ms (props changed) head/share/doc/usd/12.vi/summary/vi.summary (props changed) head/share/doc/usd/12.vi/vi/vi.in (props changed) head/share/doc/usd/12.vi/viapwh/vi.apwh.ms (props changed) head/share/doc/usd/13.viref/ex.cmd.roff (props changed) head/share/doc/usd/13.viref/ref.so (props changed) head/share/doc/usd/13.viref/set.opt.roff (props changed) head/share/doc/usd/13.viref/vi.cmd.roff (props changed) head/share/doc/usd/13.viref/vi.ref (props changed) Modified: head/ObsoleteFiles.inc head/share/doc/usd/10.exref/Makefile.inc head/share/doc/usd/11.vitut/Makefile head/share/doc/usd/12.vi/Makefile.inc head/share/doc/usd/13.viref/Makefile head/share/doc/usd/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Apr 26 06:52:19 2015 (r281993) +++ head/ObsoleteFiles.inc Sun Apr 26 07:52:43 2015 (r281994) @@ -56,18 +56,6 @@ OLD_FILES+=usr/include/altq/altq_rmclass OLD_FILES+=usr/include/altq/altq_cbq.h OLD_FILES+=usr/include/altq/altq_rio.h OLD_DIRS+=usr/include/altq -# 20150410 -OLD_FILES+=usr/share/doc/usd/10.exref/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/10.exref/summary.ascii.gz -OLD_DIRS+=usr/share/doc/usd/10.exref -OLD_FILES+=usr/share/doc/usd/11.edit/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/11.edit -OLD_FILES+=usr/share/doc/usd/12.vi/paper.ascii.gz -OLD_FILES+=usr/share/doc/usd/12.vi/summary.ascii.gz -OLD_FILES+=usr/share/doc/usd/12.vi/viapwh.ascii.gz -OLD_DIRS+=usr/share/doc/usd/12.vi -OLD_FILES+=usr/share/doc/usd/13.viref/paper.ascii.gz -OLD_DIRS+=usr/share/doc/usd/13.viref # 20150329 .if ${TARGET_ARCH} == "arm" OLD_FILES+=usr/include/bootconfig.h Modified: head/share/doc/usd/10.exref/Makefile.inc ============================================================================== --- head/share/doc/usd/10.exref/Makefile.inc Fri Apr 10 19:04:39 2015 (r281378) +++ head/share/doc/usd/10.exref/Makefile.inc Sun Apr 26 07:52:43 2015 (r281994) @@ -2,4 +2,3 @@ VOLUME= usd/10.exref MACROS= -ms -SRCDIR= ${.CURDIR}/../../../../../contrib/nvi/docs/USD.doc/exref Copied: head/share/doc/usd/10.exref/exref/ex.rm (from r281372, head/contrib/nvi/docs/USD.doc/exref/ex.rm) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/usd/10.exref/exref/ex.rm Sun Apr 26 07:52:43 2015 (r281994, copy of r281372, head/contrib/nvi/docs/USD.doc/exref/ex.rm) @@ -0,0 +1,2213 @@ +.\" Copyright (c) 1980, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)ex.rm 8.5 (Berkeley) 8/18/96 +.\" +.nr LL 6.5i +.nr FL 6.5i +.EH 'USD:12-%''Ex Reference Manual' +.OH 'Ex Reference Manual''USD:12-%' +.nr )P 0 +.de ZP +.nr pd \\n()P +.nr )P 0 +.if \\n(.$=0 .IP +.if \\n(.$=1 .IP "\\$1" +.if \\n(.$>=2 .IP "\\$1" "\\$2" +.nr )P \\n(pd +.rm pd +.. +.de LC +.br +.sp .1i +.ne 4 +.LP +.ta 4.0i +.. +.bd S B 3 +.\".RP +.TL +Ex Reference Manual +.br +Version 3.7 +.AU +William Joy +.AU +Mark Horton +.AI +Computer Science Division +Department of Electrical Engineering and Computer Science +University of California, Berkeley +Berkeley, Ca. 94720 +.AB +.I Ex +a line oriented text editor, which supports both command and display +oriented editing. +This reference manual describes the command oriented part of +.I ex; +the display editing features of +.I ex +are described in +.I "An Introduction to Display Editing with Vi." +Other documents about the editor include the introduction +.I "Edit: A tutorial", +the +.I "Ex/edit Command Summary", +and a +.I "Vi Quick Reference" +card. +.AE +.NH 1 +Starting ex +.PP +.FS +The financial support of an \s-2IBM\s0 Graduate Fellowship and the National +Science Foundation under grants MCS74-07644-A03 and MCS78-07291 is gratefully +acknowledged. +.FE +Each instance of the editor has a set of options, +which can be set to tailor it to your liking. +The command +.I edit +invokes a version of +.I ex +designed for more casual or beginning +users by changing the default settings of some of these options. +To simplify the description which follows we +assume the default settings of the options. +.PP +When invoked, +.I ex +determines the terminal type from the \s-2TERM\s0 variable in the environment. +It there is a \s-2TERMCAP\s0 variable in the environment, and the type +of the terminal described there matches the \s-2TERM\s0 variable, +then that description +is used. Also if the \s-2TERMCAP\s0 variable contains a pathname (beginning +with a \fB/\fR) then the editor will seek the description of the terminal +in that file (rather than the default /etc/termcap). +If there is a variable \s-2EXINIT\s0 in the environment, then the editor +will execute the commands in that variable, +otherwise if there is a file +.I \&.exrc +in your \s-2HOME\s0 directory +.I ex +reads commands from that file, simulating a +.I source +command. +Option setting commands placed in +\s-2EXINIT\s0 or +.I \&.exrc +will be executed before each editor session. +.PP +A command to enter +.I ex +has the following prototype:\(dg +.FS +\(dg Brackets `[' `]' surround optional parameters here. +.FE +.DS +\fBex\fP [ \fB\-\fP ] [ \fB\-v\fP ] [ \fB\-t\fP \fItag\fP ] [ \fB\-r\fP ] [ \fB\-l\fP ] [ \fB\-w\fP\fIn\fP ] [ \fB\-x\fP ] [ \fB\-R\fP ] [ \fB+\fP\fIcommand\fP ] name ... +.DE +The most common case edits a single file with no options, i.e.: +.DS +\fBex\fR name +.DE +The +.B \- +command line option +option suppresses all interactive-user feedback +and is useful in processing editor scripts in command files. +The +.B \-v +option is equivalent to using +.I vi +rather than +.I ex. +The +.B \-t +option is equivalent to an initial +.I tag +command, editing the file containing the +.I tag +and positioning the editor at its definition. +The +.B \-r +option is used in recovering after an editor or system crash, +retrieving the last saved version of the named file or, +if no file is specified, +typing a list of saved files. +The +.B \-l +option sets up for editing \s-2LISP\s0, setting the +.I showmatch +and +.I lisp +options. +The +.B \-w +option sets the default window size to +.I n, +and is useful on dialups to start in small windows. +The +.B \-x +option causes +.I ex +to prompt for a +.I key , +which is used to encrypt and decrypt the contents of the file, +which should already be encrypted using the same key, +see +.I crypt (1). +The +.B \-R +option sets the +.I readonly +option at the start. +.I Name +arguments indicate files to be edited. +An argument of the form +\fB+\fIcommand\fR +indicates that the editor should begin by executing the specified command. +If +.I command +is omitted, then it defaults to ``$'', positioning the editor at the last +line of the first file initially. Other useful commands here are scanning +patterns of the form ``/pat'' or line numbers, e.g. ``+100'' starting +at line 100. +.NH 1 +File manipulation +.NH 2 +Current file +.PP +.I Ex +is normally editing the contents of a single file, +whose name is recorded in the +.I current +file name. +.I Ex +performs all editing actions in a buffer +(actually a temporary file) +into which the text of the file is initially read. +Changes made to the buffer have no effect on the file being +edited unless and until the buffer contents are written out to the +file with a +.I write +command. +After the buffer contents are written, +the previous contents of the written file are no longer accessible. +When a file is edited, +its name becomes the current file name, +and its contents are read into the buffer. +.PP +The current file is almost always considered to be +.I edited. +This means that the contents of the buffer are logically +connected with the current file name, +so that writing the current buffer contents onto that file, +even if it exists, +is a reasonable action. +If the current file is not +.I edited +then +.I ex +will not normally write on it if it already exists.* +.FS +* The +.I file +command will say ``[Not edited]'' if the current file is not considered +edited. +.FE +.NH 2 +Alternate file +.PP +Each time a new value is given to the current file name, +the previous current file name is saved as the +.I alternate +file name. +Similarly if a file is mentioned but does not become the current file, +it is saved as the alternate file name. +.NH 2 +Filename expansion +.PP +Filenames within the editor may be specified using the normal +shell expansion conventions. +In addition, +the character `%' in filenames is replaced by the +.I current +file name and the character +`#' by the +.I alternate +file name.\(dg +.FS +\(dg This makes it easy to deal alternately with +two files and eliminates the need for retyping the +name supplied on an +.I edit +command after a +.I "No write since last change" +diagnostic is received. +.FE +.NH 2 +Multiple files and named buffers +.PP +If more than one file is given on the command line, +then the first file is edited as described above. +The remaining arguments are placed with the first file in the +.I "argument list." +The current argument list may be displayed with the +.I args +command. +The next file in the argument list may be edited with the +.I next +command. +The argument list may also be respecified by specifying +a list of names to the +.I next +command. +These names are expanded, +the resulting list of names becomes the new argument list, +and +.I ex +edits the first file on the list. +.PP +For saving blocks of text while editing, and especially when editing +more than one file, +.I ex +has a group of named buffers. +These are similar to the normal buffer, except that only a limited number +of operations are available on them. +The buffers have names +.I a +through +.I z.\(dd +.FS +\(dd It is also possible to refer to +.I A +through +.I Z; +the upper case buffers are the same as the lower but commands +append to named buffers rather than replacing +if upper case names are used. +.FE +.NH 2 +Read only +.PP +It is possible to use +.I ex +in +.I "read only" +mode to look at files that you have no intention of modifying. +This mode protects you from accidently overwriting the file. +Read only mode is on when the +.I readonly +option is set. +It can be turned on with the +.B \-R +command line option, +by the +.I view +command line invocation, +or by setting the +.I readonly +option. +It can be cleared by setting +.I noreadonly . +It is possible to write, even while in read only mode, by indicating +that you really know what you are doing. +You can write to a different file, or can use the ! form of write, +even while in read only mode. +.NH 1 +Exceptional Conditions +.NH 2 +Errors and interrupts +.PP +When errors occur +.I ex +(optionally) rings the terminal bell and, in any case, prints an error +diagnostic. If the primary input is from a file, editor processing +will terminate. If an interrupt signal is received, +.I ex +prints ``Interrupt'' and returns to its command level. If the primary +input is a file, then +.I ex +will exit when this occurs. +.NH 2 +Recovering from hangups and crashes +.PP +If a hangup signal is received and the buffer has been modified since +it was last written out, or if the system crashes, either the editor +(in the first case) or the system (after it reboots in the second) will +attempt to preserve the buffer. The next time you log in you should be +able to recover the work you were doing, losing at most a few lines of +changes from the last point before the hangup or editor crash. To +recover a file you can use the +.B \-r +option. If you were editing the file +.I resume, +then you should change +to the directory where you were when the crash occurred, giving the command +.DS +\fBex \-r\fP\fI resume\fP +.DE +After checking that the retrieved file is indeed ok, you can +.I write +it over the previous contents of that file. +.PP +You will normally get mail from the system telling you when a file has +been saved after a crash. The command +.DS +\fBex\fP \-\fBr\fP +.DE +will print a list of the files which have been saved for you. +(In the case of a hangup, +the file will not appear in the list, +although it can be recovered.) +.NH 1 +Editing modes +.PP +.I Ex +has five distinct modes. The primary mode is +.I command +mode. Commands are entered in command mode when a `:' prompt is +present, and are executed each time a complete line is sent. In +.I "text input" +mode +.I ex +gathers input lines and places them in the file. The +.I append, +.I insert, +and +.I change +commands use text input mode. +No prompt is printed when you are in text input mode. +This mode is left by typing a `.' alone at the beginning of a line, and +.I command +mode resumes. +.PP +The last three modes are +.I open +and +.I visual +modes, entered by the commands of the same name, and, within open and +visual modes +.I "text insertion" +mode. +.I Open +and +.I visual +modes allow local editing operations to be performed on the text in the +file. The +.I open +command displays one line at a time on any terminal while +.I visual +works on \s-2CRT\s0 terminals with random positioning cursors, using the +screen as a (single) window for file editing changes. +These modes are described (only) in +.I "An Introduction to Display Editing with Vi." +.NH +Command structure +.PP +Most command names are English words, +and initial prefixes of the words are acceptable abbreviations. +The ambiguity of abbreviations is resolved in favor of the more commonly +used commands.* +.FS +* As an example, the command +.I substitute +can be abbreviated `s' +while the shortest available abbreviation for the +.I set +command is `se'. +.FE +.NH 2 +Command parameters +.PP +Most commands accept prefix addresses specifying the lines in the file +upon which they are to have effect. +The forms of these addresses will be discussed below. +A number of commands also may take a trailing +.I count +specifying the number of lines to be involved in the command.\(dg +.FS +\(dg Counts are rounded down if necessary. +.FE +Thus the command ``10p'' will print the tenth line in the buffer while +``delete 5'' will delete five lines from the buffer, +starting with the current line. +.PP +Some commands take other information or parameters, +this information always being given after the command name.\(dd +.FS +\(dd Examples would be option names in a +.I set +command i.e. ``set number'', +a file name in an +.I edit +command, +a regular expression in a +.I substitute +command, +or a target address for a +.I copy +command, i.e. ``1,5 copy 25''. +.FE +.NH 2 +Command variants +.PP +A number of commands have two distinct variants. +The variant form of the command is invoked by placing an +`!' immediately after the command name. +Some of the default variants may be controlled by options; +in this case, the `!' serves to toggle the default. +.NH 2 +Flags after commands +.PP +The characters `#', `p' and `l' may be placed after many commands.** +.FS +** +A `p' or `l' must be preceded by a blank or tab +except in the single special case `dp'. +.FE +In this case, the command abbreviated by these characters +is executed after the command completes. +Since +.I ex +normally prints the new current line after each change, `p' is rarely necessary. +Any number of `+' or `\-' characters may also be given with these flags. +If they appear, the specified offset is applied to the current line +value before the printing command is executed. +.NH 2 +Comments +.PP +It is possible to give editor commands which are ignored. +This is useful when making complex editor scripts +for which comments are desired. +The comment character is the double quote: ". +Any command line beginning with " is ignored. +Comments beginning with " may also be placed at the ends +of commands, except in cases where they could be confused as part +of text (shell escapes and the substitute and map commands). +.NH 2 +Multiple commands per line +.PP +More than one command may be placed on a line by separating each pair +of commands by a `|' character. +However the +.I global +commands, +comments, +and the shell escape `!' +must be the last command on a line, as they are not terminated by a `|'. +.NH 2 +Reporting large changes +.PP +Most commands which change the contents of the editor buffer give +feedback if the scope of the change exceeds a threshold given by the +.I report +option. +This feedback helps to detect undesirably large changes so that they may +be quickly and easily reversed with an +.I undo. +After commands with more global effect such as +.I global +or +.I visual, +you will be informed if the net change in the number of lines +in the buffer during this command exceeds this threshold. +.NH 1 +Command addressing +.NH 2 +Addressing primitives +.IP \fB.\fR 20 +The current line. +Most commands leave the current line as the last line which they affect. +The default address for most commands is the current line, +thus `\fB.\fR' is rarely used alone as an address. +.IP \fIn\fR 20 +The \fIn\fRth line in the editor's buffer, lines being numbered +sequentially from 1. +.IP \fB$\fR 20 +The last line in the buffer. +.IP \fB%\fR 20 +An abbreviation for ``1,$'', the entire buffer. +.IP \fI+n\fR\ \fI\-n\fR 20 +An offset relative to the current buffer line.\(dg +.FS +\(dg +The forms `.+3' `+3' and `+++' are all equivalent; +if the current line is line 100 they all address line 103. +.FE +.IP \fB/\fIpat\fR\fB/\fR\ \fB?\fIpat\fR\fB?\fR 20 +Scan forward and backward respectively for a line containing \fIpat\fR, a +regular expression (as defined below). The scans normally wrap around the end +of the buffer. +If all that is desired is to print the next line containing \fIpat\fR, then +the trailing \fB/\fR or \fB?\fR may be omitted. +If \fIpat\fP is omitted or explicitly empty, then the last +regular expression specified is located.\(dd +.FS +\(dd The forms \fB\e/\fP and \fB\e?\fP scan +using the last regular expression used in a scan; after a substitute +\fB//\fP and \fB??\fP would scan using the substitute's regular expression. +.FE +.IP \fB\(aa\(aa\fP\ \fB\(aa\fP\fIx\fP 20 +Before each non-relative motion of the current line `\fB.\fP', +the previous current line is marked with a tag, subsequently referred to as +`\(aa\(aa'. +This makes it easy to refer or return to this previous context. +Marks may also be established by the +.I mark +command, using single lower case letters +.I x +and the marked lines referred to as +`\(aa\fIx\fR'. +.NH 2 +Combining addressing primitives +.PP +Addresses to commands consist of a series of addressing primitives, +separated by `,' or `;'. +Such address lists are evaluated left-to-right. +When addresses are separated by `;' the current line `\fB.\fR' +is set to the value of the previous addressing expression +before the next address is interpreted. +If more addresses are given than the command requires, +then all but the last one or two are ignored. +If the command takes two addresses, the first addressed line must +precede the second in the buffer.\(dg +.FS +\(dg Null address specifications are permitted in a list of addresses, +the default in this case is the current line `.'; +thus `,100' is equivalent to `\fB.\fR,100'. +It is an error to give a prefix address to a command which expects none. +.FE +.NH 1 +Command descriptions +.PP +The following form is a prototype for all +.I ex +commands: +.DS +\fIaddress\fR \fBcommand\fR \fI! parameters count flags\fR +.DE +All parts are optional; the degenerate case is the empty command which prints +the next line in the file. For sanity with use from within +.I visual +mode, +.I ex +ignores a ``:'' preceding any command. +.PP +In the following command descriptions, the +default addresses are shown in parentheses, +which are +.I not, +however, +part of the command. +.LC +\fBabbreviate\fR \fIword rhs\fP abbr: \fBab\fP +.ZP +Add the named abbreviation to the current list. +When in input mode in visual, if +.I word +is typed as a complete word, it will be changed to +.I rhs . +.LC +( \fB.\fR ) \fBappend\fR abbr: \fBa\fR +.br +\fItext\fR +.br +\&\fB.\fR +.ZP +Reads the input text and places it after the specified line. +After the command, `\fB.\fR' +addresses the last line input or the +specified line if no lines were input. +If address `0' is given, +text is placed at the beginning of the buffer. +.LC +\fBa!\fR +.br +\fItext\fR +.br +\&\fB.\fR +.ZP +The variant flag to +.I append +toggles the setting for the +.I autoindent +option during the input of +.I text. +.LC +\fBargs\fR +.ZP +The members of the argument list are printed, with the current argument +delimited by `[' and `]'. +.ig +.PP +\fBcd\fR \fIdirectory\fR +.ZP +The +.I cd +command is a synonym for +.I chdir. +.. +.LC +( \fB.\fP , \fB.\fP ) \fBchange\fP \fIcount\fP abbr: \fBc\fP +.br +\fItext\fP +.br +\&\fB.\fP +.ZP +Replaces the specified lines with the input \fItext\fP. +The current line becomes the last line input; +if no lines were input it is left as for a +\fIdelete\fP. +.LC +\fBc!\fP +.br +\fItext\fP +.br +\&\fB.\fP +.ZP +The variant toggles +.I autoindent +during the +.I change. +.ig +.LC +\fBchdir\fR \fIdirectory\fR +.ZP +The specified \fIdirectory\fR becomes the current directory. +If no directory is specified, the current value of the +.I home +option is used as the target directory. +After a +.I chdir +the current file is not considered to have been +edited so that write restrictions on pre-existing files apply. +.. +.LC +( \fB.\fP , \fB.\fP )\|\fBcopy\fP \fIaddr\fP \fIflags\fP abbr: \fBco\fP +.ZP +A +.I copy +of the specified lines is placed after +.I addr, +which may be `0'. +The current line +`\fB.\fR' +addresses the last line of the copy. +The command +.I t +is a synonym for +.I copy. +.LC +( \fB.\fR , \fB.\fR )\|\fBdelete\fR \fIbuffer\fR \fIcount\fR \fIflags\fR abbr: \fBd\fR +.ZP +Removes the specified lines from the buffer. +The line after the last line deleted becomes the current line; +if the lines deleted were originally at the end, +the new last line becomes the current line. +If a named +.I buffer +is specified by giving a letter, +then the specified lines are saved in that buffer, +or appended to it if an upper case letter is used. +.LC +\fBedit\fR \fIfile\fR abbr: \fBe\fR +.br +\fBex\fR \fIfile\fR +.ZP +Used to begin an editing session on a new file. +The editor +first checks to see if the buffer has been modified since the last +.I write +command was issued. +If it has been, +a warning is issued and the +command is aborted. +The +command otherwise deletes the entire contents of the editor buffer, +makes the named file the current file and prints the new filename. +After insuring that this file is sensible\(dg +.FS +\(dg I.e., that it is not a binary file such as a directory, +a block or character special file other than +.I /dev/tty, +a terminal, +or a binary or executable file +(as indicated by the first word). +.FE +the editor reads the file into its buffer. +.IP +If the read of the file completes without error, +the number of lines and characters read is typed. +If there were any non-\s-2ASCII\s0 characters +in the file they are stripped of their non-\s-2ASCII\s0 +high bits, +and any null characters in the file are discarded. +If none of these errors occurred, the file is considered +.I edited. +If the last line of the input file is missing the trailing +newline character, it will be supplied and a complaint will be issued. +This command leaves the current line `\fB.\fR' at the last line read.\(dd +.FS +\(dd If executed from within +.I open +or +.I visual, +the current line is initially the first line of the file. +.FE +.LC +\fBe!\fR \fIfile\fR +.ZP +The variant form suppresses the complaint about modifications having +been made and not written from the editor buffer, thus +discarding all changes which have been made before editing the new file. +.LC +\fBe\fR \fB+\fIn\fR \fIfile\fR +.ZP +Causes the editor to begin at line +.I n +rather than at the last line; +\fIn\fR may also be an editor command containing no spaces, e.g.: ``+/pat''. +.LC +\fBfile\fR abbr: \fBf\fR +.ZP +Prints the current file name, +whether it has been `[Modified]' since the last +.I write +command, +whether it is +.I "read only" , +the current line, +the number of lines in the buffer, +and the percentage of the way through the buffer of the current line.* +.FS +* In the rare case that the current file is `[Not edited]' this is +noted also; in this case you have to use the form \fBw!\fR to write to +the file, since the editor is not sure that a \fBwrite\fR will not +destroy a file unrelated to the current contents of the buffer. +.FE +.LC +\fBfile\fR \fIfile\fR +.ZP +The current file name is changed to +.I file +which is considered +`[Not edited]'. +.LC +( 1 , $ ) \fBglobal\fR /\fIpat\|\fR/ \fIcmds\fR abbr: \fBg\fR +.ZP +First marks each line among those specified which matches +the given regular expression. +Then the given command list is executed with `\fB.\fR' initially +set to each marked line. +.IP +The command list consists of the remaining commands on the current +input line and may continue to multiple lines by ending all but the +last such line with a `\e'. +If +.I cmds +(and possibly the trailing \fB/\fR delimiter) is omitted, each line matching +.I pat +is printed. +.I Append, +.I insert, +and +.I change +commands and associated input are permitted; +the `\fB.\fR' terminating input may be omitted if it would be on the +last line of the command list. +.I Open +and +.I visual +commands are permitted in the command list and take input from the terminal. +.IP +The +.I global +command itself may not appear in +.I cmds. +The +.I undo +command is also not permitted there, +as +.I undo +instead can be used to reverse the entire +.I global +command. +The options +.I autoprint +and +.I autoindent +are inhibited during a +.I global, +(and possibly the trailing \fB/\fR delimiter) and the value of the +.I report +option is temporarily infinite, +in deference to a \fIreport\fR for the entire global. +Finally, the context mark `\'\'' is set to the value of +`.' before the global command begins and is not changed during a global +command, +except perhaps by an +.I open +or +.I visual +within the +.I global. +.LC +\fBg!\fR \fB/\fIpat\fB/\fR \fIcmds\fR abbr: \fBv\fR +.IP +The variant form of \fIglobal\fR runs \fIcmds\fR at each line not matching +\fIpat\fR. +.LC +( \fB.\fR )\|\fBinsert\fR abbr: \fBi\fR +.br +\fItext\fR +.br +\&\fB.\fR +.ZP +Places the given text before the specified line. +The current line is left at the last line input; +if there were none input it is left at the line before the addressed line. +This command differs from +.I append +only in the placement of text. +.KS +.LC +\fBi!\fR +.br +\fItext\fR +.br +\&\fB.\fR +.ZP +The variant toggles +.I autoindent +during the +.I insert. +.KE +.LC +( \fB.\fR , \fB.\fR+1 ) \fBjoin\fR \fIcount\fR \fIflags\fR abbr: \fBj\fR +.ZP +Places the text from a specified range of lines +together on one line. +White space is adjusted at each junction to provide at least +one blank character, two if there was a `\fB.\fR' at the end of the line, +or none if the first following character is a `)'. +If there is already white space at the end of the line, +then the white space at the start of the next line will be discarded. +.LC +\fBj!\fR +.ZP +The variant causes a simpler +.I join +with no white space processing; the characters in the lines are simply +concatenated. +.LC +( \fB.\fR ) \fBk\fR \fIx\fR +.ZP +The +.I k +command is a synonym for +.I mark. +It does not require a blank or tab before the following letter. +.LC +( \fB.\fR , \fB.\fR ) \fBlist\fR \fIcount\fR \fIflags\fR +.ZP +Prints the specified lines in a more unambiguous way: +tabs are printed as `^I' +and the end of each line is marked with a trailing `$'. +The current line is left at the last line printed. +.LC +\fBmap\fR \fIlhs\fR \fIrhs\fR +.ZP +The +.I map +command is used to define macros for use in +.I visual +mode. +.I Lhs +should be a single character, or the sequence ``#n'', for n a digit, +referring to function key \fIn\fR. When this character or function key +is typed in +.I visual +mode, it will be as though the corresponding \fIrhs\fR had been typed. +On terminals without function keys, you can type ``#n''. +See section 6.9 of the ``Introduction to Display Editing with Vi'' +for more details. +.LC +( \fB.\fR ) \fBmark\fR \fIx\fR +.ZP +Gives the specified line mark +.I x, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 09:25:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C1C6E4E; Sun, 26 Apr 2015 09:25:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A9BA1D13; Sun, 26 Apr 2015 09:25:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3Q9PjQ5008518; Sun, 26 Apr 2015 09:25:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3Q9PjKU008517; Sun, 26 Apr 2015 09:25:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504260925.t3Q9PjKU008517@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 09:25:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281995 - head/lib/libedit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 09:25:45 -0000 Author: bapt Date: Sun Apr 26 09:25:44 2015 New Revision: 281995 URL: https://svnweb.freebsd.org/changeset/base/281995 Log: Do not modify locales Modified: head/lib/libedit/el.c Modified: head/lib/libedit/el.c ============================================================================== --- head/lib/libedit/el.c Sun Apr 26 07:52:43 2015 (r281994) +++ head/lib/libedit/el.c Sun Apr 26 09:25:44 2015 (r281995) @@ -96,7 +96,7 @@ el_init_fd(const char *prog, FILE *fin, */ el->el_flags = 0; #ifdef WIDECHAR - if (setlocale(LC_CTYPE, "") != NULL) { + if (setlocale(LC_CTYPE, NULL) != NULL) { if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) el->el_flags |= CHARSET_IS_UTF8; } From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 09:47:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E7FE8B4; Sun, 26 Apr 2015 09:47:41 +0000 (UTC) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 39D471F45; Sun, 26 Apr 2015 09:47:41 +0000 (UTC) Received: by pabtp1 with SMTP id tp1so96529765pab.2; Sun, 26 Apr 2015 02:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=2jiO5WOKvkgH7YXd9jTYjZJRn09PnfSAzx48AFE/8xQ=; b=vN4joQdUz+UIbMlUXHZWKVC/0cLg4kTG//XDc/HOLlNT+kLd/MHURwbxOkXeN+ryza ADWdf+0vOv06AWCbFSxZ3Y3AIzKYuYy0fX+P/lB+DLT1XnRLMf9JIPUPEXQ+snCWh6l/ FH8REtUn72gG2DDaqXGaefJv9Au4h+2DY9L2gfIWKzV8rPkfJ4Kx+t2znJQOz5P20HyZ yI8o+tvyc63E2C9kYg6WiT/PyoWfK3AqzpjPU+9aILAcc656qdjdlS8x3BFOFD9qbEvY XCU6XFfCThAHaBKPTFeJyzUy48zl1IIQGmDv/gXNmulL2DTP12XqwVbEEv7+NGrEBdIH BhWA== X-Received: by 10.66.242.79 with SMTP id wo15mr12696754pac.6.1430041660587; Sun, 26 Apr 2015 02:47:40 -0700 (PDT) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id sm7sm16185581pac.45.2015.04.26.02.47.39 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Apr 2015 02:47:39 -0700 (PDT) References: <201504260752.t3Q7qi0s063835@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201504260752.t3Q7qi0s063835@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: svn commit: r281994 - in head: . share/doc/usd share/doc/usd/10.exref share/doc/usd/10.exref/exref share/doc/usd/10.exref/summary share/doc/usd/11.vitut share/doc/usd/12.vi share/doc/usd/12.vi/summ... Date: Sun, 26 Apr 2015 02:47:37 -0700 To: Baptiste Daroussin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 09:47:41 -0000 This broke the build ;/.. > On Apr 26, 2015, at 00:52, Baptiste Daroussin wrote: >=20 > Author: bapt > Date: Sun Apr 26 07:52:43 2015 > New Revision: 281994 > URL: https://svnweb.freebsd.org/changeset/base/281994 >=20 > Log: > Reincorporate documentation lost with update to nvi 2.1.3 >=20 > Added: > head/share/doc/usd/10.exref/ > - copied from r281378, head/share/doc/usd/10.exref/ > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/exref/e= x.rm > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/exref/e= x.summary > head/share/doc/usd/11.vitut/ > - copied from r281378, head/share/doc/usd/11.vitut/ > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/edit/ed= ittut.ms > head/share/doc/usd/12.vi/ > - copied from r281378, head/share/doc/usd/12.vi/ > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vitut/v= i.summary > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vitut/v= i.in > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vitut/v= i.apwh.ms > head/share/doc/usd/13.viref/ > - copied from r281378, head/share/doc/usd/13.viref/ > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/= ex.cmd.roff > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/= ref.so > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/= set.opt.roff > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/= vi.cmd.roff > - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vi.ref/= vi.ref > Directory Properties: > head/share/doc/usd/10.exref/exref/ex.rm (props changed) > head/share/doc/usd/10.exref/summary/ex.summary (props changed) > head/share/doc/usd/11.vitut/edittut.ms (props changed) > head/share/doc/usd/12.vi/summary/vi.summary (props changed) > head/share/doc/usd/12.vi/vi/vi.in (props changed) > head/share/doc/usd/12.vi/viapwh/vi.apwh.ms (props changed) > head/share/doc/usd/13.viref/ex.cmd.roff (props changed) > head/share/doc/usd/13.viref/ref.so (props changed) > head/share/doc/usd/13.viref/set.opt.roff (props changed) > head/share/doc/usd/13.viref/vi.cmd.roff (props changed) > head/share/doc/usd/13.viref/vi.ref (props changed) > Modified: > head/ObsoleteFiles.inc > head/share/doc/usd/10.exref/Makefile.inc > head/share/doc/usd/11.vitut/Makefile > head/share/doc/usd/12.vi/Makefile.inc > head/share/doc/usd/13.viref/Makefile > head/share/doc/usd/Makefile >=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 Sun Apr 26 06:52:19 2015 (r281993) > +++ head/ObsoleteFiles.inc Sun Apr 26 07:52:43 2015 (r281994) > @@ -56,18 +56,6 @@ OLD_FILES+=3Dusr/include/altq/altq_rmclass > OLD_FILES+=3Dusr/include/altq/altq_cbq.h > OLD_FILES+=3Dusr/include/altq/altq_rio.h > OLD_DIRS+=3Dusr/include/altq > -# 20150410 > -OLD_FILES+=3Dusr/share/doc/usd/10.exref/paper.ascii.gz > -OLD_FILES+=3Dusr/share/doc/usd/10.exref/summary.ascii.gz > -OLD_DIRS+=3Dusr/share/doc/usd/10.exref > -OLD_FILES+=3Dusr/share/doc/usd/11.edit/paper.ascii.gz > -OLD_DIRS+=3Dusr/share/doc/usd/11.edit > -OLD_FILES+=3Dusr/share/doc/usd/12.vi/paper.ascii.gz > -OLD_FILES+=3Dusr/share/doc/usd/12.vi/summary.ascii.gz > -OLD_FILES+=3Dusr/share/doc/usd/12.vi/viapwh.ascii.gz > -OLD_DIRS+=3Dusr/share/doc/usd/12.vi > -OLD_FILES+=3Dusr/share/doc/usd/13.viref/paper.ascii.gz > -OLD_DIRS+=3Dusr/share/doc/usd/13.viref > # 20150329 > .if ${TARGET_ARCH} =3D=3D "arm" > OLD_FILES+=3Dusr/include/bootconfig.h >=20 > Modified: head/share/doc/usd/10.exref/Makefile.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/share/doc/usd/10.exref/Makefile.inc Fri Apr 10 19:04:39 2015 = (r281378) > +++ head/share/doc/usd/10.exref/Makefile.inc Sun Apr 26 07:52:43 2015 = (r281994) > @@ -2,4 +2,3 @@ >=20 > VOLUME=3D usd/10.exref > MACROS=3D -ms > -SRCDIR=3D ${.CURDIR}/../../../../../contrib/nvi/docs/USD.doc/exref >=20 > Copied: head/share/doc/usd/10.exref/exref/ex.rm (from r281372, head/contri= b/nvi/docs/USD.doc/exref/ex.rm) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=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/share/doc/usd/10.exref/exref/ex.rm Sun Apr 26 07:52:43 2015 = (r281994, copy of r281372, head/contrib/nvi/docs/USD.doc/exref/ex.rm) > @@ -0,0 +1,2213 @@ > +.\" Copyright (c) 1980, 1993 > +.\" The Regents of the University of California. All rights reserved.= > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in th= e > +.\" documentation and/or other materials provided with the distributio= n. > +.\" 3. All advertising materials mentioning features or use of this softw= are > +.\" 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 contributo= rs > +.\" may be used to endorse or promote products derived from this softw= are > +.\" without specific prior written permission. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' A= ND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE= > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PU= RPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIA= BLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUE= NTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOO= DS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)= > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S= TRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY= WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O= F > +.\" SUCH DAMAGE. > +.\" > +.\" @(#)ex.rm 8.5 (Berkeley) 8/18/96 > +.\" > +.nr LL 6.5i > +.nr FL 6.5i > +.EH 'USD:12-%''Ex Reference Manual' > +.OH 'Ex Reference Manual''USD:12-%' > +.nr )P 0 > +.de ZP > +.nr pd \\n()P > +.nr )P 0 > +.if \\n(.$=3D0 .IP > +.if \\n(.$=3D1 .IP "\\$1" > +.if \\n(.$>=3D2 .IP "\\$1" "\\$2" > +.nr )P \\n(pd > +.rm pd > +.. > +.de LC > +.br > +.sp .1i > +.ne 4 > +.LP > +.ta 4.0i > +.. > +.bd S B 3 > +.\".RP > +.TL > +Ex Reference Manual > +.br > +Version 3.7 > +.AU > +William Joy > +.AU > +Mark Horton > +.AI > +Computer Science Division > +Department of Electrical Engineering and Computer Science > +University of California, Berkeley > +Berkeley, Ca. 94720 > +.AB > +.I Ex > +a line oriented text editor, which supports both command and display > +oriented editing. > +This reference manual describes the command oriented part of > +.I ex; > +the display editing features of > +.I ex > +are described in > +.I "An Introduction to Display Editing with Vi." > +Other documents about the editor include the introduction > +.I "Edit: A tutorial", > +the > +.I "Ex/edit Command Summary", > +and a > +.I "Vi Quick Reference" > +card. > +.AE > +.NH 1 > +Starting ex > +.PP > +.FS > +The financial support of an \s-2IBM\s0 Graduate Fellowship and the Nation= al > +Science Foundation under grants MCS74-07644-A03 and MCS78-07291 is gratef= ully > +acknowledged. > +.FE > +Each instance of the editor has a set of options, > +which can be set to tailor it to your liking. > +The command > +.I edit > +invokes a version of > +.I ex > +designed for more casual or beginning > +users by changing the default settings of some of these options. > +To simplify the description which follows we > +assume the default settings of the options. > +.PP > +When invoked, > +.I ex > +determines the terminal type from the \s-2TERM\s0 variable in the environ= ment. > +It there is a \s-2TERMCAP\s0 variable in the environment, and the type > +of the terminal described there matches the \s-2TERM\s0 variable, > +then that description > +is used. Also if the \s-2TERMCAP\s0 variable contains a pathname (beginn= ing > +with a \fB/\fR) then the editor will seek the description of the terminal= > +in that file (rather than the default /etc/termcap). > +If there is a variable \s-2EXINIT\s0 in the environment, then the editor > +will execute the commands in that variable, > +otherwise if there is a file > +.I \&.exrc > +in your \s-2HOME\s0 directory > +.I ex > +reads commands from that file, simulating a > +.I source > +command. > +Option setting commands placed in > +\s-2EXINIT\s0 or > +.I \&.exrc > +will be executed before each editor session. > +.PP > +A command to enter > +.I ex > +has the following prototype:\(dg > +.FS > +\(dg Brackets `[' `]' surround optional parameters here. > +.FE > +.DS > +\fBex\fP [ \fB\-\fP ] [ \fB\-v\fP ] [ \fB\-t\fP \fItag\fP ] [ \fB\-r\fP ]= [ \fB\-l\fP ] [ \fB\-w\fP\fIn\fP ] [ \fB\-x\fP ] [ \fB\-R\fP ] [ \fB+\fP\fI= command\fP ] name ... > +.DE > +The most common case edits a single file with no options, i.e.: > +.DS > +\fBex\fR name > +.DE > +The > +.B \- > +command line option > +option suppresses all interactive-user feedback > +and is useful in processing editor scripts in command files. > +The > +.B \-v > +option is equivalent to using > +.I vi > +rather than > +.I ex. > +The > +.B \-t > +option is equivalent to an initial > +.I tag > +command, editing the file containing the > +.I tag > +and positioning the editor at its definition. > +The > +.B \-r > +option is used in recovering after an editor or system crash, > +retrieving the last saved version of the named file or, > +if no file is specified, > +typing a list of saved files. > +The > +.B \-l > +option sets up for editing \s-2LISP\s0, setting the > +.I showmatch > +and > +.I lisp > +options. > +The > +.B \-w > +option sets the default window size to > +.I n, > +and is useful on dialups to start in small windows. > +The > +.B \-x > +option causes > +.I ex > +to prompt for a > +.I key , > +which is used to encrypt and decrypt the contents of the file, > +which should already be encrypted using the same key, > +see > +.I crypt (1). > +The > +.B \-R > +option sets the > +.I readonly > +option at the start. > +.I Name > +arguments indicate files to be edited. > +An argument of the form > +\fB+\fIcommand\fR > +indicates that the editor should begin by executing the specified command= . > +If > +.I command > +is omitted, then it defaults to ``$'', positioning the editor at the last= > +line of the first file initially. Other useful commands here are scannin= g > +patterns of the form ``/pat'' or line numbers, e.g. ``+100'' starting > +at line 100. > +.NH 1 > +File manipulation > +.NH 2 > +Current file > +.PP > +.I Ex > +is normally editing the contents of a single file, > +whose name is recorded in the > +.I current > +file name. > +.I Ex > +performs all editing actions in a buffer > +(actually a temporary file) > +into which the text of the file is initially read. > +Changes made to the buffer have no effect on the file being > +edited unless and until the buffer contents are written out to the > +file with a > +.I write > +command. > +After the buffer contents are written, > +the previous contents of the written file are no longer accessible. > +When a file is edited, > +its name becomes the current file name, > +and its contents are read into the buffer. > +.PP > +The current file is almost always considered to be > +.I edited. > +This means that the contents of the buffer are logically > +connected with the current file name, > +so that writing the current buffer contents onto that file, > +even if it exists, > +is a reasonable action. > +If the current file is not=20 > +.I edited > +then > +.I ex > +will not normally write on it if it already exists.* > +.FS > +* The > +.I file > +command will say ``[Not edited]'' if the current file is not considered > +edited. > +.FE > +.NH 2 > +Alternate file > +.PP > +Each time a new value is given to the current file name, > +the previous current file name is saved as the > +.I alternate > +file name. > +Similarly if a file is mentioned but does not become the current file, > +it is saved as the alternate file name. > +.NH 2 > +Filename expansion > +.PP > +Filenames within the editor may be specified using the normal > +shell expansion conventions. > +In addition, > +the character `%' in filenames is replaced by the > +.I current > +file name and the character > +`#' by the > +.I alternate > +file name.\(dg > +.FS > +\(dg This makes it easy to deal alternately with > +two files and eliminates the need for retyping the > +name supplied on an > +.I edit > +command after a=20 > +.I "No write since last change" > +diagnostic is received. > +.FE > +.NH 2 > +Multiple files and named buffers > +.PP > +If more than one file is given on the command line, > +then the first file is edited as described above. > +The remaining arguments are placed with the first file in the > +.I "argument list." > +The current argument list may be displayed with the > +.I args > +command. > +The next file in the argument list may be edited with the > +.I next > +command. > +The argument list may also be respecified by specifying > +a list of names to the > +.I next > +command. > +These names are expanded, > +the resulting list of names becomes the new argument list, > +and > +.I ex > +edits the first file on the list. > +.PP > +For saving blocks of text while editing, and especially when editing > +more than one file, > +.I ex > +has a group of named buffers. > +These are similar to the normal buffer, except that only a limited number= > +of operations are available on them. > +The buffers have names > +.I a > +through > +.I z.\(dd > +.FS > +\(dd It is also possible to refer to > +.I A > +through > +.I Z; > +the upper case buffers are the same as the lower but commands > +append to named buffers rather than replacing > +if upper case names are used. > +.FE > +.NH 2 > +Read only > +.PP > +It is possible to use > +.I ex > +in > +.I "read only" > +mode to look at files that you have no intention of modifying. > +This mode protects you from accidently overwriting the file. > +Read only mode is on when the > +.I readonly > +option is set. > +It can be turned on with the > +.B \-R > +command line option, > +by the > +.I view > +command line invocation, > +or by setting the > +.I readonly > +option. > +It can be cleared by setting > +.I noreadonly . > +It is possible to write, even while in read only mode, by indicating > +that you really know what you are doing. > +You can write to a different file, or can use the ! form of write, > +even while in read only mode. > +.NH 1 > +Exceptional Conditions > +.NH 2 > +Errors and interrupts > +.PP > +When errors occur > +.I ex > +(optionally) rings the terminal bell and, in any case, prints an error > +diagnostic. If the primary input is from a file, editor processing > +will terminate. If an interrupt signal is received, > +.I ex > +prints ``Interrupt'' and returns to its command level. If the primary > +input is a file, then > +.I ex > +will exit when this occurs. > +.NH 2 > +Recovering from hangups and crashes > +.PP > +If a hangup signal is received and the buffer has been modified since > +it was last written out, or if the system crashes, either the editor > +(in the first case) or the system (after it reboots in the second) will > +attempt to preserve the buffer. The next time you log in you should be > +able to recover the work you were doing, losing at most a few lines of > +changes from the last point before the hangup or editor crash. To > +recover a file you can use the > +.B \-r > +option. If you were editing the file > +.I resume, > +then you should change > +to the directory where you were when the crash occurred, giving the comma= nd > +.DS > +\fBex \-r\fP\fI resume\fP > +.DE > +After checking that the retrieved file is indeed ok, you can > +.I write > +it over the previous contents of that file. > +.PP > +You will normally get mail from the system telling you when a file has > +been saved after a crash. The command > +.DS > +\fBex\fP \-\fBr\fP > +.DE > +will print a list of the files which have been saved for you. > +(In the case of a hangup, > +the file will not appear in the list, > +although it can be recovered.) > +.NH 1 > +Editing modes > +.PP > +.I Ex > +has five distinct modes. The primary mode is > +.I command > +mode. Commands are entered in command mode when a `:' prompt is > +present, and are executed each time a complete line is sent. In > +.I "text input" > +mode > +.I ex > +gathers input lines and places them in the file. The > +.I append, > +.I insert, > +and > +.I change > +commands use text input mode. > +No prompt is printed when you are in text input mode. > +This mode is left by typing a `.' alone at the beginning of a line, and > +.I command > +mode resumes. > +.PP > +The last three modes are > +.I open > +and > +.I visual > +modes, entered by the commands of the same name, and, within open and > +visual modes > +.I "text insertion" > +mode. > +.I Open > +and > +.I visual > +modes allow local editing operations to be performed on the text in the > +file. The > +.I open > +command displays one line at a time on any terminal while > +.I visual > +works on \s-2CRT\s0 terminals with random positioning cursors, using the > +screen as a (single) window for file editing changes. > +These modes are described (only) in > +.I "An Introduction to Display Editing with Vi." > +.NH=20 > +Command structure > +.PP > +Most command names are English words, > +and initial prefixes of the words are acceptable abbreviations. > +The ambiguity of abbreviations is resolved in favor of the more commonly > +used commands.* > +.FS > +* As an example, the command=20 > +.I substitute > +can be abbreviated `s' > +while the shortest available abbreviation for the=20 > +.I set > +command is `se'. > +.FE > +.NH 2 > +Command parameters > +.PP > +Most commands accept prefix addresses specifying the lines in the file > +upon which they are to have effect. > +The forms of these addresses will be discussed below. > +A number of commands also may take a trailing > +.I count > +specifying the number of lines to be involved in the command.\(dg > +.FS > +\(dg Counts are rounded down if necessary. > +.FE > +Thus the command ``10p'' will print the tenth line in the buffer while > +``delete 5'' will delete five lines from the buffer, > +starting with the current line. > +.PP > +Some commands take other information or parameters, > +this information always being given after the command name.\(dd > +.FS > +\(dd Examples would be option names in a > +.I set > +command i.e. ``set number'', > +a file name in an > +.I edit > +command, > +a regular expression in a > +.I substitute > +command, > +or a target address for a > +.I copy > +command, i.e. ``1,5 copy 25''. > +.FE > +.NH 2 > +Command variants > +.PP > +A number of commands have two distinct variants. > +The variant form of the command is invoked by placing an > +`!' immediately after the command name. > +Some of the default variants may be controlled by options; > +in this case, the `!' serves to toggle the default. > +.NH 2 > +Flags after commands > +.PP > +The characters `#', `p' and `l' may be placed after many commands.** > +.FS > +** > +A `p' or `l' must be preceded by a blank or tab > +except in the single special case `dp'. > +.FE > +In this case, the command abbreviated by these characters > +is executed after the command completes. > +Since > +.I ex > +normally prints the new current line after each change, `p' is rarely nec= essary. > +Any number of `+' or `\-' characters may also be given with these flags. > +If they appear, the specified offset is applied to the current line > +value before the printing command is executed. > +.NH 2 > +Comments > +.PP > +It is possible to give editor commands which are ignored. > +This is useful when making complex editor scripts > +for which comments are desired. > +The comment character is the double quote: ". > +Any command line beginning with " is ignored. > +Comments beginning with " may also be placed at the ends > +of commands, except in cases where they could be confused as part > +of text (shell escapes and the substitute and map commands). > +.NH 2 > +Multiple commands per line > +.PP > +More than one command may be placed on a line by separating each pair > +of commands by a `|' character. > +However the > +.I global > +commands, > +comments, > +and the shell escape `!' > +must be the last command on a line, as they are not terminated by a `|'. > +.NH 2 > +Reporting large changes > +.PP > +Most commands which change the contents of the editor buffer give > +feedback if the scope of the change exceeds a threshold given by the > +.I report > +option. > +This feedback helps to detect undesirably large changes so that they may > +be quickly and easily reversed with an > +.I undo. > +After commands with more global effect such as > +.I global > +or > +.I visual, > +you will be informed if the net change in the number of lines > +in the buffer during this command exceeds this threshold. > +.NH 1 > +Command addressing > +.NH 2 > +Addressing primitives > +.IP \fB.\fR 20 > +The current line. > +Most commands leave the current line as the last line which they affect. > +The default address for most commands is the current line, > +thus `\fB.\fR' is rarely used alone as an address. > +.IP \fIn\fR 20 > +The \fIn\fRth line in the editor's buffer, lines being numbered > +sequentially from 1. > +.IP \fB$\fR 20 > +The last line in the buffer. > +.IP \fB%\fR 20 > +An abbreviation for ``1,$'', the entire buffer. > +.IP \fI+n\fR\ \fI\-n\fR 20 > +An offset relative to the current buffer line.\(dg > +.FS > +\(dg > +The forms `.+3' `+3' and `+++' are all equivalent; > +if the current line is line 100 they all address line 103. > +.FE > +.IP \fB/\fIpat\fR\fB/\fR\ \fB?\fIpat\fR\fB?\fR 20 > +Scan forward and backward respectively for a line containing \fIpat\fR, a= > +regular expression (as defined below). The scans normally wrap around th= e end > +of the buffer. > +If all that is desired is to print the next line containing \fIpat\fR, th= en > +the trailing \fB/\fR or \fB?\fR may be omitted. > +If \fIpat\fP is omitted or explicitly empty, then the last > +regular expression specified is located.\(dd > +.FS > +\(dd The forms \fB\e/\fP and \fB\e?\fP scan > +using the last regular expression used in a scan; after a substitute > +\fB//\fP and \fB??\fP would scan using the substitute's regular expressio= n. > +.FE > +.IP \fB\(aa\(aa\fP\ \fB\(aa\fP\fIx\fP 20 > +Before each non-relative motion of the current line `\fB.\fP', > +the previous current line is marked with a tag, subsequently referred to a= s > +`\(aa\(aa'. > +This makes it easy to refer or return to this previous context. > +Marks may also be established by the > +.I mark > +command, using single lower case letters > +.I x > +and the marked lines referred to as > +`\(aa\fIx\fR'. > +.NH 2 > +Combining addressing primitives > +.PP > +Addresses to commands consist of a series of addressing primitives, > +separated by `,' or `;'. > +Such address lists are evaluated left-to-right. > +When addresses are separated by `;' the current line `\fB.\fR' > +is set to the value of the previous addressing expression > +before the next address is interpreted. > +If more addresses are given than the command requires, > +then all but the last one or two are ignored. > +If the command takes two addresses, the first addressed line must > +precede the second in the buffer.\(dg > +.FS > +\(dg Null address specifications are permitted in a list of addresses, > +the default in this case is the current line `.'; > +thus `,100' is equivalent to `\fB.\fR,100'. > +It is an error to give a prefix address to a command which expects none. > +.FE > +.NH 1 > +Command descriptions > +.PP > +The following form is a prototype for all > +.I ex > +commands: > +.DS > +\fIaddress\fR \fBcommand\fR \fI! parameters count flags\fR > +.DE > +All parts are optional; the degenerate case is the empty command which pr= ints > +the next line in the file. For sanity with use from within > +.I visual > +mode, > +.I ex > +ignores a ``:'' preceding any command. > +.PP > +In the following command descriptions, the > +default addresses are shown in parentheses, > +which are > +.I not, > +however, > +part of the command. > +.LC > +\fBabbreviate\fR \fIword rhs\fP abbr: \fBab\fP > +.ZP > +Add the named abbreviation to the current list. > +When in input mode in visual, if > +.I word > +is typed as a complete word, it will be changed to > +.I rhs . > +.LC > +( \fB.\fR ) \fBappend\fR abbr: \fBa\fR > +.br > +\fItext\fR > +.br > +\&\fB.\fR > +.ZP > +Reads the input text and places it after the specified line. > +After the command, `\fB.\fR' > +addresses the last line input or the > +specified line if no lines were input. > +If address `0' is given, > +text is placed at the beginning of the buffer. > +.LC > +\fBa!\fR > +.br > +\fItext\fR > +.br > +\&\fB.\fR > +.ZP > +The variant flag to > +.I append > +toggles the setting for the > +.I autoindent > +option during the input of > +.I text. > +.LC > +\fBargs\fR > +.ZP > +The members of the argument list are printed, with the current argument > +delimited by `[' and `]'. > +.ig > +.PP > +\fBcd\fR \fIdirectory\fR > +.ZP > +The > +.I cd > +command is a synonym for > +.I chdir. > +.. > +.LC > +( \fB.\fP , \fB.\fP ) \fBchange\fP \fIcount\fP abbr: \fBc\fP > +.br > +\fItext\fP > +.br > +\&\fB.\fP > +.ZP > +Replaces the specified lines with the input \fItext\fP. > +The current line becomes the last line input; > +if no lines were input it is left as for a > +\fIdelete\fP. > +.LC > +\fBc!\fP > +.br > +\fItext\fP > +.br > +\&\fB.\fP > +.ZP > +The variant toggles > +.I autoindent > +during the > +.I change. > +.ig > +.LC > +\fBchdir\fR \fIdirectory\fR > +.ZP > +The specified \fIdirectory\fR becomes the current directory. > +If no directory is specified, the current value of the > +.I home > +option is used as the target directory. > +After a > +.I chdir > +the current file is not considered to have been > +edited so that write restrictions on pre-existing files apply. > +.. > +.LC > +( \fB.\fP , \fB.\fP )\|\fBcopy\fP \fIaddr\fP \fIflags\fP abbr: \fBco\f= P > +.ZP > +A > +.I copy > +of the specified lines is placed after > +.I addr, > +which may be `0'. > +The current line > +`\fB.\fR' > +addresses the last line of the copy. > +The command > +.I t > +is a synonym for > +.I copy. > +.LC > +( \fB.\fR , \fB.\fR )\|\fBdelete\fR \fIbuffer\fR \fIcount\fR \fIflags\fR = abbr: \fBd\fR > +.ZP > +Removes the specified lines from the buffer. > +The line after the last line deleted becomes the current line; > +if the lines deleted were originally at the end, > +the new last line becomes the current line. > +If a named > +.I buffer > +is specified by giving a letter, > +then the specified lines are saved in that buffer, > +or appended to it if an upper case letter is used. > +.LC > +\fBedit\fR \fIfile\fR abbr: \fBe\fR > +.br > +\fBex\fR \fIfile\fR > +.ZP > +Used to begin an editing session on a new file. > +The editor > +first checks to see if the buffer has been modified since the last > +.I write > +command was issued. > +If it has been, > +a warning is issued and the > +command is aborted. > +The > +command otherwise deletes the entire contents of the editor buffer, > +makes the named file the current file and prints the new filename. > +After insuring that this file is sensible\(dg > +.FS > +\(dg I.e., that it is not a binary file such as a directory, > +a block or character special file other than > +.I /dev/tty, > +a terminal, > +or a binary or executable file > +(as indicated by the first word). > +.FE > +the editor reads the file into its buffer. > +.IP > +If the read of the file completes without error, > +the number of lines and characters read is typed. > +If there were any non-\s-2ASCII\s0 characters > +in the file they are stripped of their non-\s-2ASCII\s0 > +high bits, > +and any null characters in the file are discarded. > +If none of these errors occurred, the file is considered > +.I edited. > +If the last line of the input file is missing the trailing > +newline character, it will be supplied and a complaint will be issued. > +This command leaves the current line `\fB.\fR' at the last line read.\(dd= > +.FS > +\(dd If executed from within > +.I open > +or > +.I visual, > +the current line is initially the first line of the file. > +.FE > +.LC > +\fBe!\fR \fIfile\fR > +.ZP > +The variant form suppresses the complaint about modifications having > +been made and not written from the editor buffer, thus > +discarding all changes which have been made before editing the new file. > +.LC > +\fBe\fR \fB+\fIn\fR \fIfile\fR > +.ZP > +Causes the editor to begin at line > +.I n > +rather than at the last line; > +\fIn\fR may also be an editor command containing no spaces, e.g.: ``+/pat= ''. > +.LC > +\fBfile\fR abbr: \fBf\fR > +.ZP > +Prints the current file name, > +whether it has been `[Modified]' since the last > +.I write=20 > +command, > +whether it is > +.I "read only" , > +the current line, > +the number of lines in the buffer, > +and the percentage of the way through the buffer of the current line.* > +.FS > +* In the rare case that the current file is `[Not edited]' this is > +noted also; in this case you have to use the form \fBw!\fR to write to > +the file, since the editor is not sure that a \fBwrite\fR will not > +destroy a file unrelated to the current contents of the buffer. > +.FE > +.LC > +\fBfile\fR \fIfile\fR > +.ZP > +The current file name is changed to > +.I file > +which is considered=20 > +`[Not edited]'. > +.LC > +( 1 , $ ) \fBglobal\fR /\fIpat\|\fR/ \fIcmds\fR abbr: \fBg\fR > +.ZP > +First marks each line among those specified which matches > +the given regular expression. > +Then the given command list is executed with `\fB.\fR' initially > +set to each marked line. > +.IP > +The command list consists of the remaining commands on the current > +input line and may continue to multiple lines by ending all but the > +last such line with a `\e'. > +If > +.I cmds > +(and possibly the trailing \fB/\fR delimiter) is omitted, each line match= ing > +.I pat > +is printed. > +.I Append, > +.I insert, > +and > +.I change > +commands and associated input are permitted; > +the `\fB.\fR' terminating input may be omitted if it would be on the > +last line of the command list. > +.I Open > +and > +.I visual > +commands are permitted in the command list and take input from the termin= al. > +.IP > +The > +.I global > +command itself may not appear in > +.I cmds. > +The > +.I undo > +command is also not permitted there, > +as > +.I undo > +instead can be used to reverse the entire > +.I global > +command. > +The options > +.I autoprint > +and > +.I autoindent > +are inhibited during a > +.I global, > +(and possibly the trailing \fB/\fR delimiter) and the value of the > +.I report > +option is temporarily infinite, > +in deference to a \fIreport\fR for the entire global. > +Finally, the context mark `\'\'' is set to the value of > +`.' before the global command begins and is not changed during a global > +command, > +except perhaps by an > +.I open > +or > +.I visual > +within the > +.I global. > +.LC > +\fBg!\fR \fB/\fIpat\fB/\fR \fIcmds\fR abbr: \fBv\fR > +.IP > +The variant form of \fIglobal\fR runs \fIcmds\fR at each line not matchin= g > +\fIpat\fR. > +.LC > +( \fB.\fR )\|\fBinsert\fR abbr: \fBi\fR > +.br > +\fItext\fR > +.br > +\&\fB.\fR > +.ZP > +Places the given text before the specified line. > +The current line is left at the last line input; > +if there were none input it is left at the line before the addressed line= . > +This command differs from > +.I append > +only in the placement of text. > +.KS > +.LC > +\fBi!\fR > +.br > +\fItext\fR > +.br > +\&\fB.\fR > +.ZP > +The variant toggles > +.I autoindent > +during the > +.I insert. > +.KE > +.LC > +( \fB.\fR , \fB.\fR+1 ) \fBjoin\fR \fIcount\fR \fIflags\fR abbr: \fBj\= fR > +.ZP > +Places the text from a specified range of lines > +together on one line. > +White space is adjusted at each junction to provide at least > +one blank character, two if there was a `\fB.\fR' at the end of the line,= > +or none if the first following character is a `)'. > +If there is already white space at the end of the line, > +then the white space at the start of the next line will be discarded. > +.LC > +\fBj!\fR > +.ZP > +The variant causes a simpler > +.I join > +with no white space processing; the characters in the lines are simply > +concatenated. > +.LC > +( \fB.\fR ) \fBk\fR \fIx\fR > +.ZP > +The > +.I k > +command is a synonym for > +.I mark. > +It does not require a blank or tab before the following letter. > +.LC > +( \fB.\fR , \fB.\fR ) \fBlist\fR \fIcount\fR \fIflags\fR > +.ZP > +Prints the specified lines in a more unambiguous way: > +tabs are printed as `^I' > +and the end of each line is marked with a trailing `$'. > +The current line is left at the last line printed. > +.LC > +\fBmap\fR \fIlhs\fR \fIrhs\fR > +.ZP > +The > +.I map > +command is used to define macros for use in > +.I visual > +mode. > +.I Lhs > +should be a single character, or the sequence ``#n'', for n a digit, > +referring to function key \fIn\fR. When this character or function key > +is typed in > +.I visual > +mode, it will be as though the corresponding \fIrhs\fR had been typed. > +On terminals without function keys, you can type ``#n''. > +See section 6.9 of the ``Introduction to Display Editing with Vi'' > +for more details. > +.LC > +( \fB.\fR ) \fBmark\fR \fIx\fR > +.ZP > +Gives the specified line mark > +.I x, >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >=20 From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 09:49:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11B71A0C; Sun, 26 Apr 2015 09:49:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F22821F56; Sun, 26 Apr 2015 09:49:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3Q9nvKI019670; Sun, 26 Apr 2015 09:49:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3Q9nvBD019669; Sun, 26 Apr 2015 09:49:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504260949.t3Q9nvBD019669@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 09:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281996 - head/share/doc/usd/12.vi/vi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 09:49:58 -0000 Author: bapt Date: Sun Apr 26 09:49:57 2015 New Revision: 281996 URL: https://svnweb.freebsd.org/changeset/base/281996 Log: Add a forgotten vi.chars Reported by: ngie Added: - copied unchanged from r281372, head/contrib/nvi/docs/USD.doc/vitut/vi.chars Directory Properties: head/share/doc/usd/12.vi/vi/vi.chars (props changed) Copied: head/share/doc/usd/12.vi/vi/vi.chars (from r281372, head/contrib/nvi/docs/USD.doc/vitut/vi.chars) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/doc/usd/12.vi/vi/vi.chars Sun Apr 26 09:49:57 2015 (r281996, copy of r281372, head/contrib/nvi/docs/USD.doc/vitut/vi.chars) @@ -0,0 +1,645 @@ +.\" Copyright (c) 1980, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)vi.chars 8.3 (Berkeley) 6/27/96 +.\" +.bd S 3 +.pn 21 +.de iP +.IP "\fB\\$1\fR" \\$2 +.. +.SH +Appendix: character functions +.PP +This appendix gives the uses the editor makes of each character. The +characters are presented in their order in the \s-2ASCII\s0 character +set: Control characters come first, then most special characters, then +the digits, upper and then lower case characters. +.PP +For each character we tell a meaning it has as a command and any meaning it +has during an insert. +If it has only meaning as a command, then only this is discussed. +Section numbers in parentheses indicate where the character is discussed; +a `f' after the section number means that the character is mentioned +in a footnote. +.iP "^@" 15 +Not a command character. +If typed as the first character of an insertion it is replaced with the +last text inserted, and the insert terminates. Only 128 characters are +saved from the last insert; if more characters were inserted the mechanism +is not available. +A \fB^@\fR cannot be part of the file due to the editor implementation +(7.5f). +.iP "^A" 15 +Unused. +.iP "^B" 15 +Backward window. +A count specifies repetition. +Two lines of continuity are kept if possible (2.1, 6.1, 7.2). +.iP "^C" 15 +Unused. +.iP "^D" 15 +As a command, scrolls down a half-window of text. +A count gives the number of (logical) lines to scroll, and is remembered +for future \fB^D\fR and \fB^U\fR commands (2.1, 7.2). +During an insert, backtabs over \fIautoindent\fR white space at the beginning +of a line (6.6, 7.5); this white space cannot be backspaced over. +.iP "^E" 15 +Exposes one more line below the current screen in the file, leaving +the cursor where it is if possible. +(Version 3 only.) +.iP "^F" 15 +Forward window. A count specifies repetition. +Two lines of continuity are kept if possible (2.1, 6.1, 7.2). +.iP "^G" 15 +Equivalent to \fB:f\fR\s-2CR\s0, printing the current file, whether +it has been modified, the current line number and the number of lines +in the file, and the percentage of the way through the file that you +are. +.iP "^H (\fR\s-2BS\s0\fP)" 15 +Same as +.B "left arrow" . +(See +.B h ). +During an insert, eliminates the last input character, backing over it +but not erasing it; it remains so you can see what you typed if you +wish to type something only slightly different (3.1, 7.5). +.iP "^I\ (\fR\s-2TAB\s0\fP)" 15 +Not a command character. +When inserted it prints as some +number of spaces. +When the cursor is at a tab character it rests at the last of the spaces +which represent the tab. +The spacing of tabstops is controlled by the \fItabstop\fR option (4.1, 6.6). +.iP "^J\ (\fR\s-2LF\s0\fP)" 15 +Same as +.B "down arrow" +(see +.B j ). +.iP "^K" 15 +Unused. +.iP "^L" 15 +The \s-2ASCII\s0 formfeed character, this causes the screen to be cleared +and redrawn. This is useful after a transmission error, if characters +typed by a program other than the editor scramble the screen, +or after output is stopped by an interrupt (5.4, 7.2f). +.ne 1i +.iP "^M\ (\fR\s-2CR\s0\fP)" 15 +A carriage return advances to the next line, at the first non-white position +in the line. Given a count, it advances that many lines (2.3). +During an insert, a \s-2CR\s0 causes the insert to continue onto +another line (3.1). +.iP "^N" 15 +Same as +.B "down arrow" +(see +.B j ). +.iP "^O" 15 +Unused. +.iP "^P" 15 +Same as +.B "up arrow" +(see +.B k ). +.iP "^Q" 15 +Not a command character. +In input mode, +.B ^Q +quotes the next character, the same as +.B ^V , +except that some teletype drivers will eat the +.B ^Q +so that the editor never sees it. +.iP "^R" 15 +Redraws the current screen, eliminating logical lines not corresponding +to physical lines (lines with only a single @ character on them). +On hardcopy terminals in \fIopen\fR mode, retypes the current line +(5.4, 7.2, 7.8). +.iP "^S" 15 +Unused. Some teletype drivers use +.B ^S +to suspend output until +.B ^Q is pressed. +.iP "^T" 15 +Not a command character. +During an insert, with \fIautoindent\fR set and at the beginning of the +line, inserts \fIshiftwidth\fR white space. +.iP "^U" 15 +Scrolls the screen up, inverting \fB^D\fR which scrolls down. Counts work as +they do for \fB^D\fR, and the previous scroll amount is common to both. +On a dumb terminal, \fB^U\fR will often necessitate clearing and redrawing +the screen further back in the file (2.1, 7.2). +.iP "^V" 15 +Not a command character. +In input mode, quotes the next character so that it is possible +to insert non-printing and special characters into the file (4.2, 7.5). +.iP "^W" 15 +Not a command character. +During an insert, backs up as \fBb\fR would in command mode; the deleted +characters remain on the display (see \fB^H\fR) (7.5). +.iP "^X" 15 +Unused. +.iP "^Y" 15 +Exposes one more line above the current screen, leaving the cursor where +it is if possible. (No mnemonic value for this key; however, it is next +to \fB^U\fR which scrolls up a bunch.) +(Version 3 only.) +.iP "^Z" 15 +If supported by the Unix system, +stops the editor, exiting to the top level shell. +Same as \fB:stop\fP\s-2CR\s0. +Otherwise, unused. +.iP "^[\ (\fR\s-2ESC\s0\fP)" 15 +Cancels a partially formed command, such as a \fBz\fR when no following +character has yet been given; terminates inputs on the last line (read +by commands such as \fB: /\fR and \fB?\fR); ends insertions of new text +into the buffer. +If an \s-2ESC\s0 is given when quiescent in command state, the editor +rings the bell or flashes the screen. You can thus hit \s-2ESC\s0 if +you don't know what is happening till the editor rings the bell. +If you don't know if you are in insert mode you can type \s-2ESC\s0\fBa\fR, +and then material to be input; the material will be inserted correctly +whether or not you were in insert mode when you started (1.5, 3.1, 7.5). +.iP "^\e" 15 +Unused. +.iP "^]" 15 +Searches for the word which is after the cursor as a tag. Equivalent +to typing \fB:ta\fR, this word, and then a \s-2CR\s0. +Mnemonically, this command is ``go right to'' (7.3). +.iP "^\(ua" 15 +Equivalent to \fB:e #\fR\s-2CR\s0, returning to the previous position +in the last edited file, or editing a file which you specified if you +got a `No write since last change diagnostic' and do not want to have +to type the file name again (7.3). +(You have to do a \fB:w\fR before \fB^\(ua\fR +will work in this case. If you do not wish to write the file you should +do \fB:e!\ #\fR\s-2CR\s0 instead.) +.iP "^_" 15 +Unused. +Reserved as the command character for the +Tektronix 4025 and 4027 terminal. +.iP "\fR\s-2SPACE\s0\fP" 15 +Same as +.B "right arrow" +(see +.B l ). +.iP "!" 15 +An operator, which processes lines from the buffer with reformatting commands. +Follow \fB!\fR with the object to be processed, and then the command name +terminated by \s-2CR\s0. Doubling \fB!\fR and preceding it by a count +causes count lines to be filtered; otherwise the count +is passed on to the object after the \fB!\fR. Thus \fB2!}\fR\fIfmt\fR\s-2CR\s0 +reformats the next two paragraphs by running them through the program +\fIfmt\fR. If you are working on \s-2LISP\s0, +the command \fB!%\fR\fIgrind\fR\s-2CR\s0,* +.FS +*Both +.I fmt +and +.I grind +are Berkeley programs and may not be present at all installations. +.FE +given at the beginning of a +function, will run the text of the function through the \s-2LISP\s0 grinder +(6.7, 7.3). +To read a file or the output of a command into the buffer use \fB:r\fR (7.3). +To simply execute a command use \fB:!\fR (7.3). +.tr " +.iP  15 +Precedes a named buffer specification. There are named buffers \fB1\-9\fR +used for saving deleted text and named buffers \fBa\-z\fR into which you can +place text (4.3, 6.3) +.tr  +.iP "#" 15 +The macro character which, when followed by a number, will substitute +for a function key on terminals without function keys (6.9). +In input mode, +if this is your erase character, it will delete the last character +you typed in input mode, and must be preceded with a \fB\e\fR to insert +it, since it normally backs over the last input character you gave. +.iP "$" 15 +Moves to the end of the current line. If you \fB:se list\fR\s-2CR\s0, +then the end of each line will be shown by printing a \fB$\fR after the +end of the displayed text in the line. Given a count, advances to the +count'th following end of line; thus \fB2$\fR advances to the end of the +following line. +.iP "%" 15 +Moves to the parenthesis or brace \fB{ }\fR which balances the parenthesis +or brace at the current cursor position. +.iP "&" 15 +A synonym for \fB:&\fR\s-2CR\s0, by analogy with the +.I ex +.B & +command. +.iP "\(aa" 15 +When followed by a \fB\(aa\fR returns to the previous context at the +beginning of a line. The previous context is set whenever the current +line is moved in a non-relative way. +When followed by a letter \fBa\fR\-\fBz\fR, returns to the line which +was marked with this letter with a \fBm\fR command, at the first non-white +character in the line. (2.2, 5.3). +When used with an operator such as \fBd\fR, the operation takes place +over complete lines; if you use \fB\(ga\fR, the operation takes place +from the exact marked place to the current cursor position within the +line. +.iP "(" 15 +Retreats to the beginning of a +sentence, or to the beginning of a \s-2LISP\s0 s-expression +if the \fIlisp\fR option is set. +A sentence ends at a \fB. !\fR or \fB?\fR which is followed by either +the end of a line or by two spaces. Any number of closing \fB) ] "\fR +and \fB\(aa\fR characters may appear after the \fB. !\fR or \fB?\fR, +and before the spaces or end of line. Sentences also begin +at paragraph and section boundaries +(see \fB{\fR and \fB[[\fR below). +A count advances that many sentences (4.2, 6.8). +.iP ")" 15 +Advances to the beginning of a sentence. +A count repeats the effect. +See \fB(\fR above for the definition of a sentence (4.2, 6.8). +.iP "*" 15 +Unused. +.iP "+" 15 +Same as \s-2CR\s0 when used as a command. +.iP "," 15 +Reverse of the last \fBf F t\fR or \fBT\fR command, looking the other way +in the current line. Especially useful after hitting too many \fB;\fR +characters. A count repeats the search. +.iP "\-" 15 +Retreats to the previous line at the first non-white character. +This is the inverse of \fB+\fR and \s-2RETURN\s0. +If the line moved to is not on the screen, the screen is scrolled, or +cleared and redrawn if this is not possible. +If a large amount of scrolling would be required the screen is also cleared +and redrawn, with the current line at the center (2.3). +.iP "\&." 15 +Repeats the last command which changed the buffer. Especially useful +when deleting words or lines; you can delete some words/lines and then +hit \fB.\fR to delete more and more words/lines. +Given a count, it passes it on to the command being repeated. Thus after +a \fB2dw\fR, \fB3.\fR deletes three words (3.3, 6.3, 7.2, 7.4). +.iP "/" 15 +Reads a string from the last line on the screen, and scans forward for +the next occurrence of this string. The normal input editing sequences may +be used during the input on the bottom line; an returns to command state +without ever searching. +The search begins when you hit \s-2CR\s0 to terminate the pattern; +the cursor moves to the beginning of the last line to indicate that the search +is in progress; the search may then +be terminated with a \s-2DEL\s0 or \s-2RUB\s0, or by backspacing when +at the beginning of the bottom line, returning the cursor to +its initial position. +Searches normally wrap end-around to find a string +anywhere in the buffer. +.IP +When used with an operator the enclosed region is normally affected. +By mentioning an +offset from the line matched by the pattern you can force whole lines +to be affected. To do this give a pattern with a closing +a closing \fB/\fR and then an offset \fB+\fR\fIn\fR or \fB\-\fR\fIn\fR. +.IP +To include the character \fB/\fR in the search string, you must escape +it with a preceding \fB\e\fR. +A \fB\(ua\fR at the beginning of the pattern forces the match to occur +at the beginning of a line only; this speeds the search. A \fB$\fR at +the end of the pattern forces the match to occur at the end of a line +only. +More extended pattern matching is available, see section 7.4; +unless you set \fBnomagic\fR in your \fI\&.exrc\fR file you will have +to preceed the characters \fB. [ *\fR and \fB~\fR in the search pattern +with a \fB\e\fR to get them to work as you would naively expect (1.5, 2,2, +6.1, 7.2, 7.4). +.iP "0" 15 +Moves to the first character on the current line. +Also used, in forming numbers, after an initial \fB1\fR\-\fB9\fR. +.iP "1\-9" 15 +Used to form numeric arguments to commands (2.3, 7.2). +.iP ":" 15 +A prefix to a set of commands for file and option manipulation and escapes +to the system. Input is given on the bottom line and terminated with +an \s-2CR\s0, and the command then executed. You can return to where +you were by hitting \s-2DEL\s0 or \s-2RUB\s0 if you hit \fB:\fR accidentally +(see primarily 6.2 and 7.3). +.iP ";" 15 +Repeats the last single character find which used \fBf F t\fR or \fBT\fR. +A count iterates the basic scan (4.1). +.iP "<" 15 +An operator which shifts lines left one \fIshiftwidth\fR, normally 8 +spaces. Like all operators, affects lines when repeated, as in +\fB<<\fR. Counts are passed through to the basic object, thus \fB3<<\fR +shifts three lines (6.6, 7.2). +.iP "=" 15 +Reindents line for \s-2LISP\s0, as though they were typed in with \fIlisp\fR +and \fIautoindent\fR set (6.8). +.iP ">" 15 +An operator which shifts lines right one \fIshiftwidth\fR, normally 8 +spaces. Affects lines when repeated as in \fB>>\fR. Counts repeat the +basic object (6.6, 7.2). +.iP "?" 15 +Scans backwards, the opposite of \fB/\fR. See the \fB/\fR description +above for details on scanning (2.2, 6.1, 7.4). +.iP "@" 15 +A macro character (6.9). If this is your kill character, you must escape it with a \e +to type it in during input mode, as it normally backs over the input you +have given on the current line (3.1, 3.4, 7.5). +.iP "A" 15 +Appends at the end of line, a synonym for \fB$a\fR (7.2). +.iP "B" 15 +Backs up a word, where words are composed of non-blank sequences, placing +the cursor at the beginning of the word. A count repeats the effect +(2.4). +.iP "C" 15 +Changes the rest of the text on the current line; a synonym for \fBc$\fR. +.iP "D" 15 +Deletes the rest of the text on the current line; a synonym for \fBd$\fR. +.iP "E" 15 +Moves forward to the end of a word, defined as blanks and non-blanks, +like \fBB\fR and \fBW\fR. A count repeats the effect. +.iP "F" 15 +Finds a single following character, backwards in the current line. +A count repeats this search that many times (4.1). +.iP "G" 15 +Goes to the line number given as preceding argument, or the end of the +file if no preceding count is given. The screen is redrawn with the +new current line in the center if necessary (7.2). +.iP "H" 15 +.B "Home arrow" . +Homes the cursor to the top line on the screen. If a count is given, +then the cursor is moved to the count'th line on the screen. +In any case the cursor is moved to the first non-white character on the +line. If used as the target of an operator, full lines are affected +(2.3, 3.2). +.iP "I" 15 +Inserts at the beginning of a line; a synonym for \fB\(uai\fR. +.iP "J" 15 +Joins together lines, supplying appropriate white space: one space between +words, two spaces after a \fB.\fR, and no spaces at all if the first +character of the joined on line is \fB)\fR. A count causes that many +lines to be joined rather than the default two (6.5, 7.1f). +.iP "K" 15 +Unused. +.iP "L" 15 +Moves the cursor to the first non-white character of the last line on +the screen. With a count, to the first non-white of the count'th line +from the bottom. Operators affect whole lines when used with \fBL\fR +(2.3). +.iP "M" 15 +Moves the cursor to the middle line on the screen, at the first non-white +position on the line (2.3). +.iP "N" 15 +Scans for the next match of the last pattern given to +\fB/\fR or \fB?\fR, but in the reverse direction; this is the reverse +of \fBn\fR. +.iP "O" 15 +Opens a new line above the current line and inputs text there up to an +\s-2ESC\s0. A count can be used on dumb terminals to specify a number +of lines to be opened; this is generally obsolete, as the \fIslowopen\fR +option works better (3.1). +.iP "P" 15 +Puts the last deleted text back before/above the cursor. The text goes +back as whole lines above the cursor if it was deleted as whole lines. +Otherwise the text is inserted between the characters before and at the +cursor. May be preceded by a named buffer specification \fB"\fR\fIx\fR +to retrieve the contents of the buffer; buffers \fB1\fR\-\fB9\fR contain +deleted material, buffers \fBa\fR\-\fBz\fR are available for general +use (6.3). +.iP "Q" 15 +Quits from \fIvi\fR to \fIex\fR command mode. In this mode, whole lines +form commands, ending with a \s-2RETURN\s0. You can give all the \fB:\fR +commands; the editor supplies the \fB:\fR as a prompt (7.7). +.iP "R" 15 +Replaces characters on the screen with characters you type (overlay fashion). +Terminates with an \s-2ESC\s0. +.iP "S" 15 +Changes whole lines, a synonym for \fBcc\fR. A count substitutes for +that many lines. The lines are saved in the numeric buffers, and erased +on the screen before the substitution begins. +.iP "T" 15 +Takes a single following character, locates the character before the +cursor in the current line, and places the cursor just after that character. +A count repeats the effect. Most useful with operators such as \fBd\fR +(4.1). +.iP "U" 15 +Restores the current line to its state before you started changing it +(3.5). +.iP "V" 15 +Unused. +.iP "W" 15 +Moves forward to the beginning of a word in the current line, +where words are defined as sequences of blank/non-blank characters. +A count repeats the effect (2.4). +.iP "X" 15 +Deletes the character before the cursor. A count repeats the effect, +but only characters on the current line are deleted. +.iP "Y" 15 +Yanks a copy of the current line into the unnamed buffer, to be put back +by a later \fBp\fR or \fBP\fR; a very useful synonym for \fByy\fR. +A count yanks that many lines. May be preceded by a buffer name to put +lines in that buffer (7.4). +.iP "ZZ" 15 +Exits the editor. +(Same as \fB:x\fP\s-2CR\s0.) +If any changes have been made, the buffer is written out to the current file. +Then the editor quits. +.iP "[[" 15 +Backs up to the previous section boundary. A section begins at each +macro in the \fIsections\fR option, +normally a `.NH' or `.SH' and also at lines which which start +with a formfeed \fB^L\fR. Lines beginning with \fB{\fR also stop \fB[[\fR; +this makes it useful for looking backwards, a function at a time, in C +programs. If the option \fIlisp\fR is set, stops at each \fB(\fR at the +beginning of a line, and is thus useful for moving backwards at the top +level \s-2LISP\s0 objects. (4.2, 6.1, 6.6, 7.2). +.iP "\e" 15 +Unused. +.iP "]]" 15 +Forward to a section boundary, see \fB[[\fR for a definition (4.2, 6.1, +6.6, 7.2). +.iP "\(ua" 15 +Moves to the first non-white position on the current line (4.4). +.iP "_" 15 +Unused. +.iP "\(ga" 15 +When followed by a \fB\(ga\fR returns to the previous context. +The previous context is set whenever the current +line is moved in a non-relative way. +When followed by a letter \fBa\fR\-\fBz\fR, returns to the position which +was marked with this letter with a \fBm\fR command. +When used with an operator such as \fBd\fR, the operation takes place +from the exact marked place to the current position within the line; +if you use \fB\(aa\fR, the operation takes place over complete lines +(2.2, 5.3). +.iP "a" 15 +Appends arbitrary text after the current cursor position; the insert +can continue onto multiple lines by using \s-2RETURN\s0 within the insert. +A count causes the inserted text to be replicated, but only if the inserted +text is all on one line. +The insertion terminates with an \s-2ESC\s0 (3.1, 7.2). +.iP "b" 15 +Backs up to the beginning of a word in the current line. A word is a +sequence of alphanumerics, or a sequence of special characters. +A count repeats the effect (2.4). +.iP "c" 15 +An operator which changes the following object, replacing it with the +following input text up to an \s-2ESC\s0. If more than part of a single +line is affected, the text which is changed away is saved in the numeric named +buffers. If only part of the current line is affected, then the last +character to be changed away is marked with a \fB$\fR. +A count causes that many objects to be affected, thus both +\fB3c)\fR and \fBc3)\fR change the following three sentences (7.4). +.iP "d" 15 +An operator which deletes the following object. If more than part of +a line is affected, the text is saved in the numeric buffers. +A count causes that many objects to be affected; thus \fB3dw\fR is the +same as \fBd3w\fR (3.3, 3.4, 4.1, 7.4). +.iP "e" 15 +Advances to the end of the next word, defined as for \fBb\fR and \fBw\fR. +A count repeats the effect (2.4, 3.1). +.iP "f" 15 +Finds the first instance of the next character following the cursor on +the current line. A count repeats the find (4.1). +.iP "g" 15 +Unused. +.sp +Arrow keys +.B h , +.B j , +.B k , +.B l , +and +.B H . +.iP "h" 15 +.B "Left arrow" . +Moves the cursor one character to the left. +Like the other arrow keys, either +.B h , +the +.B "left arrow" +key, or one of the synonyms (\fB^H\fP) has the same effect. +On v2 editors, arrow keys on certain kinds of terminals +(those which send escape sequences, such as vt52, c100, or hp) +cannot be used. +A count repeats the effect (3.1, 7.5). +.iP "i" 15 +Inserts text before the cursor, otherwise like \fBa\fR (7.2). +.iP "j" 15 +.B "Down arrow" . +Moves the cursor one line down in the same column. +If the position does not exist, +.I vi +comes as close as possible to the same column. +Synonyms include +.B ^J +(linefeed) and +.B ^N . +.iP "k" 15 +.B "Up arrow" . +Moves the cursor one line up. +.B ^P +is a synonym. +.iP "l" 15 +.B "Right arrow" . +Moves the cursor one character to the right. +\s-2SPACE\s0 is a synonym. +.iP "m" 15 +Marks the current position of the cursor in the mark register which is +specified by the next character \fBa\fR\-\fBz\fR. Return to this position +or use with an operator using \fB\(ga\fR or \fB\(aa\fR (5.3). +.iP "n" 15 +Repeats the last \fB/\fR or \fB?\fR scanning commands (2.2). +.iP "o" 15 +Opens new lines below the current line; otherwise like \fBO\fR (3.1). +.iP "p" 15 +Puts text after/below the cursor; otherwise like \fBP\fR (6.3). +.iP "q" 15 +Unused. +.iP "r" 15 +Replaces the single character at the cursor with a single character you +type. The new character may be a \s-2RETURN\s0; this is the easiest +way to split lines. A count replaces each of the following count characters +with the single character given; see \fBR\fR above which is the more +usually useful iteration of \fBr\fR (3.2). +.iP "s" 15 +Changes the single character under the cursor to the text which follows +up to an \s-2ESC\s0; given a count, that many characters from the current +line are changed. The last character to be changed is marked with \fB$\fR +as in \fBc\fR (3.2). +.iP "t" 15 +Advances the cursor upto the character before the next character typed. +Most useful with operators such as \fBd\fR and \fBc\fR to delete the +characters up to a following character. You can use \fB.\fR to delete +more if this doesn't delete enough the first time (4.1). +.iP "u" 15 +Undoes the last change made to the current buffer. If repeated, will +alternate between these two states, thus is its own inverse. When used +after an insert which inserted text on more than one line, the lines are +saved in the numeric named buffers (3.5). +.iP "v" 15 +Unused. +.iP "w" 15 +Advances to the beginning of the next word, as defined by \fBb\fR (2.4). +.iP "x" 15 +Deletes the single character under the cursor. With a count deletes +deletes that many characters forward from the cursor position, but only +on the current line (6.5). +.iP "y" 15 +An operator, yanks the following object into the unnamed temporary buffer. +If preceded by a named buffer specification, \fB"\fR\fIx\fR, the text +is placed in that buffer also. Text can be recovered by a later \fBp\fR +or \fBP\fR (7.4). +.iP "z" 15 +Redraws the screen with the current line placed as specified by the following +character: \s-2RETURN\s0 specifies the top of the screen, \fB.\fR the +center of the screen, and \fB\-\fR at the bottom of the screen. +A count may be given after the \fBz\fR and before the following character +to specify the new screen size for the redraw. +A count before the \fBz\fR gives the number of the line to place in the +center of the screen instead of the default current line. (5.4) +.iP "{" 15 +Retreats to the beginning of the beginning of the preceding paragraph. +A paragraph begins at each macro in the \fIparagraphs\fR option, normally +`.IP', `.LP', `.PP', `.QP' and `.bp'. +A paragraph also begins after a completely +empty line, and at each section boundary (see \fB[[\fR above) (4.2, 6.8, +7.6). +.iP "|" 15 +Places the cursor on the character in the column specified +by the count (7.1, 7.2). +.iP "}" 15 +Advances to the beginning of the next paragraph. See \fB{\fR for the +definition of paragraph (4.2, 6.8, 7.6). +.iP "~" 15 +Unused. +.iP "^?\ (\s-2\fRDEL\fP\s0)" 15 +Interrupts the editor, returning it to command accepting state (1.5, +7.5) +.bp +\&. From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 09:50:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE8DCB65; Sun, 26 Apr 2015 09:50:27 +0000 (UTC) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 507121F6D; Sun, 26 Apr 2015 09:50:27 +0000 (UTC) Received: by wgyo15 with SMTP id o15so88856035wgy.2; Sun, 26 Apr 2015 02:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=CNwl+IM1HpmM0bKJDPoRnlzj85LbMnH3T9jd+Iwdlzw=; b=dpUySq2ef9lJDccXoYuOmxeDwC3zlY/aIahy78F8I/Lw8P5ZjnoNKYPC2eXp/p/Y0Z vYlyaZJNGpPs97VHJUpDDEHoKGuQKxjOSo616Bse4YrLDtd2e/JERU8UNiFArPcHvcaX 6YSjc3KRtPZbKPA8OrDio9i0dO+QHOYc5BD1Y3k/PZkXwGUuXUv0FuQ1z8RhFaYZwvQ2 QVVD2R1QCA4PJXWf53p+7S9DQmYz4aX8hcJ75hDdT5kgntC5pkvoG/egL92gzVQqE8at xAf0JoSnd/BfzigTR6RbEFLxKKrI79P8D0EKTW2qME7vh9+w0GxavSeyYr8hctDtjNdV Kk0Q== X-Received: by 10.180.96.41 with SMTP id dp9mr11401318wib.77.1430041825490; Sun, 26 Apr 2015 02:50:25 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id em18sm770540wjd.19.2015.04.26.02.50.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Apr 2015 02:50:24 -0700 (PDT) Sender: Baptiste Daroussin Date: Sun, 26 Apr 2015 11:50:23 +0200 From: Baptiste Daroussin To: Garrett Cooper Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r281994 - in head: . share/doc/usd share/doc/usd/10.exref share/doc/usd/10.exref/exref share/doc/usd/10.exref/summary share/doc/usd/11.vitut share/doc/usd/12.vi share/doc/usd/12.vi/summ... Message-ID: <20150426095022.GG13141@ivaldir.etoilebsd.net> References: <201504260752.t3Q7qi0s063835@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+1TulI7fc0PCHNy3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 09:50:27 -0000 --+1TulI7fc0PCHNy3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Apr 26, 2015 at 02:47:37AM -0700, Garrett Cooper wrote: > This broke the build ;/.. Fixed, sorry I missed one file Best regards, Bapt --+1TulI7fc0PCHNy3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlU8tN4ACgkQ8kTtMUmk6Ez/QACfenq5puh4c/D7va34pbhsw2jm aAUAoKiL1P0II72kVQWMMbYB/3wqhuQl =rtxM -----END PGP SIGNATURE----- --+1TulI7fc0PCHNy3-- From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:03:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3301EF4F; Sun, 26 Apr 2015 10:03:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 220431103; Sun, 26 Apr 2015 10:03:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QA359q028761; Sun, 26 Apr 2015 10:03:06 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QA35rw028760; Sun, 26 Apr 2015 10:03:05 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261003.t3QA35rw028760@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:03:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281997 - head/bin/ed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:03:06 -0000 Author: bapt Date: Sun Apr 26 10:03:05 2015 New Revision: 281997 URL: https://svnweb.freebsd.org/changeset/base/281997 Log: mdoc: escape Re Modified: head/bin/ed/ed.1 Modified: head/bin/ed/ed.1 ============================================================================== --- head/bin/ed/ed.1 Sun Apr 26 09:49:57 2015 (r281996) +++ head/bin/ed/ed.1 Sun Apr 26 10:03:05 2015 (r281997) @@ -738,7 +738,7 @@ It is an error if no substitutions are p lines. The current address is set the last line affected. .Pp -.Ar Re +.Ar \&Re and .Ar replacement may be delimited by any character other than space and newline From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:09:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E40B261; Sun, 26 Apr 2015 10:09:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C8A5113A; Sun, 26 Apr 2015 10:09:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QA9RrH029819; Sun, 26 Apr 2015 10:09:27 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QA9RaO029818; Sun, 26 Apr 2015 10:09:27 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261009.t3QA9RaO029818@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281998 - head/bin/expr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:09:27 -0000 Author: bapt Date: Sun Apr 26 10:09:26 2015 New Revision: 281998 URL: https://svnweb.freebsd.org/changeset/base/281998 Log: Use mdoc(7) macros for curly braces Modified: head/bin/expr/expr.1 Modified: head/bin/expr/expr.1 ============================================================================== --- head/bin/expr/expr.1 Sun Apr 26 10:03:05 2015 (r281997) +++ head/bin/expr/expr.1 Sun Apr 26 10:09:26 2015 (r281998) @@ -90,15 +90,15 @@ Return the evaluation of .Ar expr1 if neither expression evaluates to an empty string or zero; otherwise, returns zero. -.It Ar expr1 Li "{=, >, >=, <, <=, !=}" Ar expr2 +.It Ar expr1 Bro =, >, >=, <, <=, != Brc Ar expr2 Return the results of integer comparison if both arguments are integers; otherwise, returns the results of string comparison using the locale-specific collation sequence. The result of each comparison is 1 if the specified relation is true, or 0 if the relation is false. -.It Ar expr1 Li "{+, -}" Ar expr2 +.It Ar expr1 Bro +, - Brc Ar expr2 Return the results of addition or subtraction of integer-valued arguments. -.It Ar expr1 Li "{*, /, %}" Ar expr2 +.It Ar expr1 Bro *, /, % Brc Ar expr2 Return the results of multiplication, integer division, or remainder of integer-valued arguments. .It Ar expr1 Li : Ar expr2 The From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:18:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E9B5454; Sun, 26 Apr 2015 10:18:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D6461212; Sun, 26 Apr 2015 10:18:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QAIjBP034711; Sun, 26 Apr 2015 10:18:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QAIjql034710; Sun, 26 Apr 2015 10:18:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261018.t3QAIjql034710@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281999 - head/sbin/atm/atmconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:18:45 -0000 Author: bapt Date: Sun Apr 26 10:18:44 2015 New Revision: 281999 URL: https://svnweb.freebsd.org/changeset/base/281999 Log: Fix 2 rendering issue with mandoc Modified: head/sbin/atm/atmconfig/atmconfig.8 Modified: head/sbin/atm/atmconfig/atmconfig.8 ============================================================================== --- head/sbin/atm/atmconfig/atmconfig.8 Sun Apr 26 10:09:26 2015 (r281998) +++ head/sbin/atm/atmconfig/atmconfig.8 Sun Apr 26 10:18:44 2015 (r281999) @@ -90,7 +90,7 @@ To get a list of options and arguments f .Pp To get a list of common options use: .D1 Nm Ic help Cm options -.Ss The Ic diag Ss Command +.Ss The Ic diag Command The .Ic diag command allows the inspection of the ATM interfaces on the local host @@ -201,7 +201,7 @@ Print traffic parameters: PCR, SCR, MBS, .It Nm Ic diag Cm stats Ar device Print driver specific statistics. .El -.Ss The Ic natm Ss Command +.Ss The Ic natm Command The .Ic natm command is used to change From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:20:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 547F65A3; Sun, 26 Apr 2015 10:20:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 433BA121D; Sun, 26 Apr 2015 10:20:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QAKC7c037395; Sun, 26 Apr 2015 10:20:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QAKCAQ037394; Sun, 26 Apr 2015 10:20:12 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261020.t3QAKCAQ037394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:20:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282000 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:20:12 -0000 Author: bapt Date: Sun Apr 26 10:20:11 2015 New Revision: 282000 URL: https://svnweb.freebsd.org/changeset/base/282000 Log: Remove End Of Line whitespaces Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sun Apr 26 10:18:44 2015 (r281999) +++ head/sbin/camcontrol/camcontrol.8 Sun Apr 26 10:20:11 2015 (r282000) @@ -529,7 +529,7 @@ on the system. .It Ic defects Send the .Tn SCSI -READ DEFECT DATA (10) command (0x37) or the +READ DEFECT DATA (10) command (0x37) or the .Tn SCSI READ DEFECT DATA (12) command (0xB7) to the given device, and print out any combination of: the total number of defects, the primary @@ -563,12 +563,12 @@ drives. .It longblock Print out the list as logical blocks. This option uses a 64-bit block size. -.It bfi +.It bfi Print out the list in bytes from index format. .It extbfi Print out the list in extended bytes from index format. The extended format allows for ranges of blocks to be printed. -.It phys +.It phys Print out the list in physical sector format. Most drives support this format. .It extphys From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:29:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA1D57AE; Sun, 26 Apr 2015 10:29:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 991BC12FC; Sun, 26 Apr 2015 10:29:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QATiWV039746; Sun, 26 Apr 2015 10:29:44 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QATiTc039745; Sun, 26 Apr 2015 10:29:44 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261029.t3QATiTc039745@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282001 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:29:44 -0000 Author: bapt Date: Sun Apr 26 10:29:43 2015 New Revision: 282001 URL: https://svnweb.freebsd.org/changeset/base/282001 Log: Escape "Ed" Modified: head/lib/libc/gen/getutxent.3 Modified: head/lib/libc/gen/getutxent.3 ============================================================================== --- head/lib/libc/gen/getutxent.3 Sun Apr 26 10:20:11 2015 (r282000) +++ head/lib/libc/gen/getutxent.3 Sun Apr 26 10:29:43 2015 (r282001) @@ -475,4 +475,4 @@ They replaced the .In utmp.h interface. .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:38:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7929492B; Sun, 26 Apr 2015 10:38:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6825113C3; Sun, 26 Apr 2015 10:38:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QAcRr9044527; Sun, 26 Apr 2015 10:38:27 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QAcRmw044526; Sun, 26 Apr 2015 10:38:27 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261038.t3QAcRmw044526@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:38:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282002 - head/bin/expr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:38:27 -0000 Author: bapt Date: Sun Apr 26 10:38:26 2015 New Revision: 282002 URL: https://svnweb.freebsd.org/changeset/base/282002 Log: Pet manlint Modified: head/bin/expr/expr.1 Modified: head/bin/expr/expr.1 ============================================================================== --- head/bin/expr/expr.1 Sun Apr 26 10:29:43 2015 (r282001) +++ head/bin/expr/expr.1 Sun Apr 26 10:38:26 2015 (r282002) @@ -100,7 +100,7 @@ or 0 if the relation is false. Return the results of addition or subtraction of integer-valued arguments. .It Ar expr1 Bro *, /, % Brc Ar expr2 Return the results of multiplication, integer division, or remainder of integer-valued arguments. -.It Ar expr1 Li : Ar expr2 +.It Ar expr1 Li \&: Ar expr2 The .Dq Li \&: operator matches From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:52:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D282AAD9; Sun, 26 Apr 2015 10:52:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B439A15BF; Sun, 26 Apr 2015 10:52:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QAqeO3053561; Sun, 26 Apr 2015 10:52:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QAqb1r053543; Sun, 26 Apr 2015 10:52:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261052.t3QAqb1r053543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:52:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282003 - in head/lib/libc: gen sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:52:41 -0000 Author: bapt Date: Sun Apr 26 10:52:37 2015 New Revision: 282003 URL: https://svnweb.freebsd.org/changeset/base/282003 Log: Escape "Ed" Modified: head/lib/libc/gen/posix_spawn.3 head/lib/libc/gen/posix_spawn_file_actions_addopen.3 head/lib/libc/gen/posix_spawn_file_actions_init.3 head/lib/libc/gen/posix_spawnattr_getflags.3 head/lib/libc/gen/posix_spawnattr_getpgroup.3 head/lib/libc/gen/posix_spawnattr_getschedparam.3 head/lib/libc/gen/posix_spawnattr_getschedpolicy.3 head/lib/libc/gen/posix_spawnattr_getsigdefault.3 head/lib/libc/gen/posix_spawnattr_getsigmask.3 head/lib/libc/gen/posix_spawnattr_init.3 head/lib/libc/sys/posix_openpt.2 Modified: head/lib/libc/gen/posix_spawn.3 ============================================================================== --- head/lib/libc/gen/posix_spawn.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawn.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -457,4 +457,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/gen/posix_spawn_file_actions_addopen.3 ============================================================================== --- head/lib/libc/gen/posix_spawn_file_actions_addopen.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawn_file_actions_addopen.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -200,4 +200,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/gen/posix_spawn_file_actions_init.3 ============================================================================== --- head/lib/libc/gen/posix_spawn_file_actions_init.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawn_file_actions_init.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -101,4 +101,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/gen/posix_spawnattr_getflags.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getflags.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawnattr_getflags.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -108,4 +108,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/gen/posix_spawnattr_getpgroup.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getpgroup.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawnattr_getpgroup.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -93,4 +93,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/gen/posix_spawnattr_getschedparam.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getschedparam.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawnattr_getschedparam.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -97,4 +97,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/gen/posix_spawnattr_getschedpolicy.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getschedpolicy.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawnattr_getschedpolicy.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -95,4 +95,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/gen/posix_spawnattr_getsigdefault.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getsigdefault.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawnattr_getsigdefault.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -95,4 +95,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/gen/posix_spawnattr_getsigmask.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_getsigmask.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawnattr_getsigmask.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -95,4 +95,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/gen/posix_spawnattr_init.3 ============================================================================== --- head/lib/libc/gen/posix_spawnattr_init.3 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/gen/posix_spawnattr_init.3 Sun Apr 26 10:52:37 2015 (r282003) @@ -120,4 +120,4 @@ and functions first appeared in .Fx 8.0 . .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org Modified: head/lib/libc/sys/posix_openpt.2 ============================================================================== --- head/lib/libc/sys/posix_openpt.2 Sun Apr 26 10:38:26 2015 (r282002) +++ head/lib/libc/sys/posix_openpt.2 Sun Apr 26 10:52:37 2015 (r282003) @@ -137,4 +137,4 @@ is included for compatibility; in opening a terminal does not cause it to become a process's controlling terminal. .Sh AUTHORS -.An Ed Schouten Aq Mt ed@FreeBSD.org +.An \&Ed Schouten Aq Mt ed@FreeBSD.org From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:53:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC614D21; Sun, 26 Apr 2015 10:53:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAB6415D2; Sun, 26 Apr 2015 10:53:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QAraCU053736; Sun, 26 Apr 2015 10:53:36 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QAraVt053733; Sun, 26 Apr 2015 10:53:36 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201504261053.t3QAraVt053733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sun, 26 Apr 2015 10:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282004 - head/sbin/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:53:37 -0000 Author: melifaro Date: Sun Apr 26 10:53:35 2015 New Revision: 282004 URL: https://svnweb.freebsd.org/changeset/base/282004 Log: Generalize object reference handling in ipfw rules. No ABI changes. Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/tables.c Modified: head/sbin/ipfw/ipfw2.c ============================================================================== --- head/sbin/ipfw/ipfw2.c Sun Apr 26 10:52:37 2015 (r282003) +++ head/sbin/ipfw/ipfw2.c Sun Apr 26 10:53:35 2015 (r282004) @@ -375,6 +375,13 @@ static int ipfw_show_config(struct cmdli ipfw_cfg_lheader *cfg, size_t sz, int ac, char **av); static void ipfw_list_tifaces(void); +struct tidx; +static uint16_t pack_object(struct tidx *tstate, char *name, int otype); +static uint16_t pack_table(struct tidx *tstate, char *name); + +static char *table_search_ctlv(ipfw_obj_ctlv *ctlv, uint16_t idx); +static void object_sort_ctlv(ipfw_obj_ctlv *ctlv); + /* * Simple string buffer API. * Used to simplify buffer passing between function and for @@ -2558,6 +2565,7 @@ ipfw_show_config(struct cmdline_opts *co if (cfg->flags & IPFW_CFG_GET_STATIC) { /* We've requested static rules */ if (ctlv->head.type == IPFW_TLV_TBLNAME_LIST) { + object_sort_ctlv(ctlv); fo->tstate = ctlv; readsz += ctlv->head.length; ctlv = (ipfw_obj_ctlv *)((caddr_t)ctlv + @@ -2724,19 +2732,18 @@ struct tidx { }; static uint16_t -pack_table(struct tidx *tstate, char *name) +pack_object(struct tidx *tstate, char *name, int otype) { int i; ipfw_obj_ntlv *ntlv; - if (table_check_name(name) != 0) - return (0); - for (i = 0; i < tstate->count; i++) { if (strcmp(tstate->idx[i].name, name) != 0) continue; if (tstate->idx[i].set != tstate->set) continue; + if (tstate->idx[i].head.type != otype) + continue; return (tstate->idx[i].idx); } @@ -2752,7 +2759,7 @@ pack_table(struct tidx *tstate, char *na ntlv = &tstate->idx[i]; memset(ntlv, 0, sizeof(ipfw_obj_ntlv)); strlcpy(ntlv->name, name, sizeof(ntlv->name)); - ntlv->head.type = IPFW_TLV_TBL_NAME; + ntlv->head.type = otype; ntlv->head.length = sizeof(ipfw_obj_ntlv); ntlv->set = tstate->set; ntlv->idx = ++tstate->counter; @@ -2761,6 +2768,16 @@ pack_table(struct tidx *tstate, char *na return (ntlv->idx); } +static uint16_t +pack_table(struct tidx *tstate, char *name) +{ + + if (table_check_name(name) != 0) + return (0); + + return (pack_object(tstate, name, IPFW_TLV_TBL_NAME)); +} + static void fill_table(ipfw_insn *cmd, char *av, uint8_t opcode, struct tidx *tstate) { @@ -3611,7 +3628,6 @@ compile_rule(char *av[], uint32_t *rbuf, break; } else goto chkarg; - case TOK_QUEUE: action->opcode = O_QUEUE; goto chkarg; @@ -4656,6 +4672,101 @@ done: *rbufsize = (char *)dst - (char *)rule; } +static int +compare_ntlv(const void *_a, const void *_b) +{ + ipfw_obj_ntlv *a, *b; + + a = (ipfw_obj_ntlv *)_a; + b = (ipfw_obj_ntlv *)_b; + + if (a->set < b->set) + return (-1); + else if (a->set > b->set) + return (1); + + if (a->idx < b->idx) + return (-1); + else if (a->idx > b->idx) + return (1); + + if (a->head.type < b->head.type) + return (-1); + else if (a->head.type > b->head.type) + return (1); + + return (0); +} + +/* + * Provide kernel with sorted list of referenced objects + */ +static void +object_sort_ctlv(ipfw_obj_ctlv *ctlv) +{ + + qsort(ctlv + 1, ctlv->count, ctlv->objsize, compare_ntlv); +} + +struct object_kt { + uint16_t uidx; + uint16_t type; +}; +static int +compare_object_kntlv(const void *k, const void *v) +{ + ipfw_obj_ntlv *ntlv; + struct object_kt key; + + key = *((struct object_kt *)k); + ntlv = (ipfw_obj_ntlv *)v; + + if (key.uidx < ntlv->idx) + return (-1); + else if (key.uidx > ntlv->idx) + return (1); + + if (key.type < ntlv->head.type) + return (-1); + else if (key.type > ntlv->head.type) + return (1); + + return (0); +} + +/* + * Finds object name in @ctlv by @idx and @type. + * Uses the following facts: + * 1) All TLVs are the same size + * 2) Kernel implementation provides already sorted list. + * + * Returns table name or NULL. + */ +static char * +object_search_ctlv(ipfw_obj_ctlv *ctlv, uint16_t idx, uint16_t type) +{ + ipfw_obj_ntlv *ntlv; + struct object_kt key; + + key.uidx = idx; + key.type = type; + + ntlv = bsearch(&key, (ctlv + 1), ctlv->count, ctlv->objsize, + compare_object_kntlv); + + if (ntlv != 0) + return (ntlv->name); + + return (NULL); +} + +static char * +table_search_ctlv(ipfw_obj_ctlv *ctlv, uint16_t idx) +{ + + return (object_search_ctlv(ctlv, idx, IPFW_TLV_TBL_NAME)); +} + /* * Adds one or more rules to ipfw chain. * Data layout: @@ -4724,7 +4835,7 @@ ipfw_add(char *av[]) ctlv->count = ts.count; ctlv->objsize = sizeof(ipfw_obj_ntlv); memcpy(ctlv + 1, ts.idx, tlen); - table_sort_ctlv(ctlv); + object_sort_ctlv(ctlv); tstate = ctlv; /* Rule next */ ctlv = (ipfw_obj_ctlv *)((caddr_t)ctlv + ctlv->head.length); Modified: head/sbin/ipfw/ipfw2.h ============================================================================== --- head/sbin/ipfw/ipfw2.h Sun Apr 26 10:52:37 2015 (r282003) +++ head/sbin/ipfw/ipfw2.h Sun Apr 26 10:53:35 2015 (r282004) @@ -344,8 +344,6 @@ int fill_ext6hdr(struct _ipfw_insn *cmd, /* tables.c */ struct _ipfw_obj_ctlv; -char *table_search_ctlv(struct _ipfw_obj_ctlv *ctlv, uint16_t idx); -void table_sort_ctlv(struct _ipfw_obj_ctlv *ctlv); int table_check_name(char *tablename); void ipfw_list_ta(int ac, char *av[]); void ipfw_list_values(int ac, char *av[]); Modified: head/sbin/ipfw/tables.c ============================================================================== --- head/sbin/ipfw/tables.c Sun Apr 26 10:52:37 2015 (r282003) +++ head/sbin/ipfw/tables.c Sun Apr 26 10:53:35 2015 (r282004) @@ -1937,73 +1937,6 @@ ipfw_list_values(int ac, char *av[]) } int -compare_ntlv(const void *_a, const void *_b) -{ - ipfw_obj_ntlv *a, *b; - - a = (ipfw_obj_ntlv *)_a; - b = (ipfw_obj_ntlv *)_b; - - if (a->set < b->set) - return (-1); - else if (a->set > b->set) - return (1); - - if (a->idx < b->idx) - return (-1); - else if (a->idx > b->idx) - return (1); - - return (0); -} - -int -compare_kntlv(const void *k, const void *v) -{ - ipfw_obj_ntlv *ntlv; - uint16_t key; - - key = *((uint16_t *)k); - ntlv = (ipfw_obj_ntlv *)v; - - if (key < ntlv->idx) - return (-1); - else if (key > ntlv->idx) - return (1); - - return (0); -} - -/* - * Finds table name in @ctlv by @idx. - * Uses the following facts: - * 1) All TLVs are the same size - * 2) Kernel implementation provides already sorted list. - * - * Returns table name or NULL. - */ -char * -table_search_ctlv(ipfw_obj_ctlv *ctlv, uint16_t idx) -{ - ipfw_obj_ntlv *ntlv; - - ntlv = bsearch(&idx, (ctlv + 1), ctlv->count, ctlv->objsize, - compare_kntlv); - - if (ntlv != 0) - return (ntlv->name); - - return (NULL); -} - -void -table_sort_ctlv(ipfw_obj_ctlv *ctlv) -{ - - qsort(ctlv + 1, ctlv->count, ctlv->objsize, compare_ntlv); -} - -int table_check_name(char *tablename) { int c, i, l; From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:53:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCE7DE5F; Sun, 26 Apr 2015 10:53:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBE1215D5; Sun, 26 Apr 2015 10:53:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QAroi6053816; Sun, 26 Apr 2015 10:53:50 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QArod7053815; Sun, 26 Apr 2015 10:53:50 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261053.t3QArod7053815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282005 - head/lib/libc/rpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:53:51 -0000 Author: bapt Date: Sun Apr 26 10:53:50 2015 New Revision: 282005 URL: https://svnweb.freebsd.org/changeset/base/282005 Log: mdoc: fix functions declarations Modified: head/lib/libc/rpc/rpcbind.3 Modified: head/lib/libc/rpc/rpcbind.3 ============================================================================== --- head/lib/libc/rpc/rpcbind.3 Sun Apr 26 10:53:35 2015 (r282004) +++ head/lib/libc/rpc/rpcbind.3 Sun Apr 26 10:53:50 2015 (r282005) @@ -25,7 +25,7 @@ .Ft bool_t .Fn rpcb_gettime "const char *host" "time_t * timep" .Ft "enum clnt_stat" -.Fn rpcb_rmtcall "const struct netconfig *netconf" "const char *host" "const rpcprog_t prognum, const rpcvers_t versnum" "const rpcproc_t procnum, const xdrproc_t inproc" "const caddr_t in" "const xdrproc_t outproc" "const caddr_t out" "const struct timeval tout, const struct netbuf *svcaddr" +.Fn rpcb_rmtcall "const struct netconfig *netconf" "const char *host" "const rpcprog_t prognum" "const rpcvers_t versnum" "const rpcproc_t procnum" "const xdrproc_t inproc" "const caddr_t in" "const xdrproc_t outproc" "const caddr_t out" "const struct timeval tout" "const struct netbuf *svcaddr" .Ft bool_t .Fn rpcb_set "const rpcprog_t prognum" "const rpcvers_t versnum" "const struct netconfig *netconf" "const struct netbuf *svcaddr" .Ft bool_t From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:54:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47C8EFAB; Sun, 26 Apr 2015 10:54:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3706115E0; Sun, 26 Apr 2015 10:54:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QAsroH054012; Sun, 26 Apr 2015 10:54:53 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QAsrOL054011; Sun, 26 Apr 2015 10:54:53 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261054.t3QAsrOL054011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282006 - head/lib/libc/nls X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:54:53 -0000 Author: bapt Date: Sun Apr 26 10:54:52 2015 New Revision: 282006 URL: https://svnweb.freebsd.org/changeset/base/282006 Log: Use mdoc(7) macros to handle parenthesis Modified: head/lib/libc/nls/catopen.3 Modified: head/lib/libc/nls/catopen.3 ============================================================================== --- head/lib/libc/nls/catopen.3 Sun Apr 26 10:53:50 2015 (r282005) +++ head/lib/libc/nls/catopen.3 Sun Apr 26 10:54:52 2015 (r282006) @@ -94,7 +94,7 @@ An empty string is substituted for undef Path names templates defined in .Ev NLSPATH are separated by colons -.No ( Sq \&: ) . +.Pq Sq \&: . A leading or two adjacent colons is equivalent to specifying %N. .Pp From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:55:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9223186; Sun, 26 Apr 2015 10:55:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7FA015EC; Sun, 26 Apr 2015 10:55:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QAteSH054219; Sun, 26 Apr 2015 10:55:40 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QAteIm054217; Sun, 26 Apr 2015 10:55:40 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261055.t3QAteIm054217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282007 - head/lib/libc/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:55:40 -0000 Author: bapt Date: Sun Apr 26 10:55:39 2015 New Revision: 282007 URL: https://svnweb.freebsd.org/changeset/base/282007 Log: mdoc: rendering fixes Modified: head/lib/libc/regex/re_format.7 head/lib/libc/regex/regex.3 Modified: head/lib/libc/regex/re_format.7 ============================================================================== --- head/lib/libc/regex/re_format.7 Sun Apr 26 10:54:52 2015 (r282006) +++ head/lib/libc/regex/re_format.7 Sun Apr 26 10:55:39 2015 (r282007) @@ -392,10 +392,12 @@ and .Ql ?\& are ordinary characters, and their functionality can be expressed using bounds -.No ( Ql {1,} +.Po +.Ql {1,} or .Ql {0,1} -respectively). +respectively +.Pc . Also note that .Ql x+ in modern REs is equivalent to Modified: head/lib/libc/regex/regex.3 ============================================================================== --- head/lib/libc/regex/regex.3 Sun Apr 26 10:54:52 2015 (r282006) +++ head/lib/libc/regex/regex.3 Sun Apr 26 10:55:39 2015 (r282007) @@ -420,10 +420,12 @@ it should have been the result from the using that .Ft regex_t . The -.Fn ( regerror +.Po +.Fn regerror may be able to supply a more detailed message using information from the -.Ft regex_t . ) +.Ft regex_t . +.Pc The .Fn regerror function From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 10:56:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 343142CB; Sun, 26 Apr 2015 10:56:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22FAB15F2; Sun, 26 Apr 2015 10:56:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QAu7RN054344; Sun, 26 Apr 2015 10:56:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QAu7HR054343; Sun, 26 Apr 2015 10:56:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261056.t3QAu7HR054343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 10:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282008 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 10:56:07 -0000 Author: bapt Date: Sun Apr 26 10:56:06 2015 New Revision: 282008 URL: https://svnweb.freebsd.org/changeset/base/282008 Log: mdoc: remove end of line whitespace Modified: head/lib/libc/gen/nice.3 Modified: head/lib/libc/gen/nice.3 ============================================================================== --- head/lib/libc/gen/nice.3 Sun Apr 26 10:55:39 2015 (r282007) +++ head/lib/libc/gen/nice.3 Sun Apr 26 10:56:06 2015 (r282008) @@ -87,7 +87,7 @@ The function conforms to .St -p1003.1-2008 except for the return value. -This implementation returns 0 upon successful completion but +This implementation returns 0 upon successful completion but the standard requires returning the new nice value, which could be \-1. .Sh HISTORY From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 11:30:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3E82D5A; Sun, 26 Apr 2015 11:30:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2FE11902; Sun, 26 Apr 2015 11:30:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QBUREw072124; Sun, 26 Apr 2015 11:30:27 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QBURpU072123; Sun, 26 Apr 2015 11:30:27 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261130.t3QBURpU072123@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 11:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282013 - head/lib/msun/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 11:30:28 -0000 Author: bapt Date: Sun Apr 26 11:30:27 2015 New Revision: 282013 URL: https://svnweb.freebsd.org/changeset/base/282013 Log: Remove end of line whitespace Modified: head/lib/msun/man/j0.3 Modified: head/lib/msun/man/j0.3 ============================================================================== --- head/lib/msun/man/j0.3 Sun Apr 26 11:25:29 2015 (r282012) +++ head/lib/msun/man/j0.3 Sun Apr 26 11:30:27 2015 (r282013) @@ -98,7 +98,7 @@ The functions .Fn y1 , and .Fn y1f -compute the linearly independent Bessel function of the second kind +compute the linearly independent Bessel function of the second kind of orders 0 and 1 for the positive .Em real value @@ -135,12 +135,12 @@ is \*(Pm0, these routines will generate a divide-by-zero exception and return -\*(If. If .Fa x -is a sufficiently small positive number, then +is a sufficiently small positive number, then .Fn y1 , .Fn y1f , .Fn yn , and -.Fn ynf +.Fn ynf will generate an overflow exception and return -\*(If. .Sh SEE ALSO .Xr math 3 From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 11:35:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6019A176; Sun, 26 Apr 2015 11:35:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0C319E3; Sun, 26 Apr 2015 11:35:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QBZ81r074683; Sun, 26 Apr 2015 11:35:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QBZ8Ei074682; Sun, 26 Apr 2015 11:35:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261135.t3QBZ8Ei074682@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 11:35:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282015 - head/lib/msun/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 11:35:08 -0000 Author: bapt Date: Sun Apr 26 11:35:07 2015 New Revision: 282015 URL: https://svnweb.freebsd.org/changeset/base/282015 Log: mdoc: remove empty line Modified: head/lib/msun/man/lgamma.3 Modified: head/lib/msun/man/lgamma.3 ============================================================================== --- head/lib/msun/man/lgamma.3 Sun Apr 26 11:33:01 2015 (r282014) +++ head/lib/msun/man/lgamma.3 Sun Apr 26 11:35:07 2015 (r282015) @@ -124,7 +124,6 @@ are deprecated aliases for and .Fn lgammaf_r , respectively. - .Sh IDIOSYNCRASIES Do not use the expression .Dq Li signgam\(**exp(lgamma(x)) From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 11:35:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C34422B5; Sun, 26 Apr 2015 11:35:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1F2519E8; Sun, 26 Apr 2015 11:35:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QBZbxV074789; Sun, 26 Apr 2015 11:35:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QBZbCx074788; Sun, 26 Apr 2015 11:35:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261135.t3QBZbCx074788@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 11:35:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282016 - head/lib/msun/man X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 11:35:37 -0000 Author: bapt Date: Sun Apr 26 11:35:36 2015 New Revision: 282016 URL: https://svnweb.freebsd.org/changeset/base/282016 Log: mdoc: fix function declaration Modified: head/lib/msun/man/nextafter.3 Modified: head/lib/msun/man/nextafter.3 ============================================================================== --- head/lib/msun/man/nextafter.3 Sun Apr 26 11:35:07 2015 (r282015) +++ head/lib/msun/man/nextafter.3 Sun Apr 26 11:35:36 2015 (r282016) @@ -78,11 +78,11 @@ routines conform to They implement the Nextafter function recommended by .St -ieee754 , with the extension that -.Fn nextafter +0.0, -0.0 +.Fn nextafter "+0.0" "-0.0" returns .Li -0.0 , and -.Fn nextafter -0.0, +0.0 +.Fn nextafter "-0.0" "+0.0" returns .Li +0.0 . .Sh HISTORY From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 11:39:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5AC56F0; Sun, 26 Apr 2015 11:39:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A440C1A28; Sun, 26 Apr 2015 11:39:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QBdESe075533; Sun, 26 Apr 2015 11:39:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QBdE1Y075532; Sun, 26 Apr 2015 11:39:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504261139.t3QBdE1Y075532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 26 Apr 2015 11:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282017 - head/sys/dev/sound/pcm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 11:39:14 -0000 Author: hselasky Date: Sun Apr 26 11:39:13 2015 New Revision: 282017 URL: https://svnweb.freebsd.org/changeset/base/282017 Log: Allow DSP basename cloning to be disabled or enabled at boot and runtime. This is useful when implementing OSS sound stacks in userspace via libcuse for example. MFC after: 2 weeks Modified: head/sys/dev/sound/pcm/dsp.c Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Sun Apr 26 11:35:36 2015 (r282016) +++ head/sys/dev/sound/pcm/dsp.c Sun Apr 26 11:39:13 2015 (r282017) @@ -48,6 +48,11 @@ SYSCTL_INT(_hw_snd, OID_AUTO, compat_lin &dsp_mmap_allow_prot_exec, 0, "linux mmap compatibility (-1=force disable 0=auto 1=force enable)"); +static int dsp_basename_clone = 1; +SYSCTL_INT(_hw_snd, OID_AUTO, basename_clone, CTLFLAG_RWTUN, + &dsp_basename_clone, 0, + "DSP basename cloning (0: Disable; 1: Enabled)"); + struct dsp_cdevinfo { struct pcm_channel *rdch, *wrch; struct pcm_channel *volch; @@ -2357,9 +2362,10 @@ dsp_clone(void *arg, devname = devcmp; devhw = dsp_cdevs[i].hw; devcmax = dsp_cdevs[i].max - 1; - if (strcmp(name, devcmp) == 0) - unit = snd_unit; - else if (dsp_stdclone(name, devcmp, devsep, + if (strcmp(name, devcmp) == 0) { + if (dsp_basename_clone != 0) + unit = snd_unit; + } else if (dsp_stdclone(name, devcmp, devsep, dsp_cdevs[i].use_sep, &unit, &cunit) != 0) { unit = -1; cunit = -1; From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 11:39:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BB7C834; Sun, 26 Apr 2015 11:39:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A8321A2D; Sun, 26 Apr 2015 11:39:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QBdQ9O075611; Sun, 26 Apr 2015 11:39:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QBdQDY075610; Sun, 26 Apr 2015 11:39:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504261139.t3QBdQDY075610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 26 Apr 2015 11:39:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282018 - head/sys/netinet/libalias X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 11:39:26 -0000 Author: bapt Date: Sun Apr 26 11:39:25 2015 New Revision: 282018 URL: https://svnweb.freebsd.org/changeset/base/282018 Log: mdoc: fix rendering issues Modified: head/sys/netinet/libalias/libalias.3 Modified: head/sys/netinet/libalias/libalias.3 ============================================================================== --- head/sys/netinet/libalias/libalias.3 Sun Apr 26 11:39:13 2015 (r282017) +++ head/sys/netinet/libalias/libalias.3 Sun Apr 26 11:39:25 2015 (r282018) @@ -173,10 +173,12 @@ Mainly useful for debugging when the log .It Dv PKT_ALIAS_DENY_INCOMING If this mode bit is set, all incoming packets associated with new TCP connections or new UDP transactions will be marked for being ignored -.Fn ( LibAliasIn +.Po +.Fn LibAliasIn returns .Dv PKT_ALIAS_IGNORED -code) +code +.Pc by the calling program. Response packets to connections or transactions initiated from the packet aliasing host or local network will be unaffected. @@ -1001,7 +1003,7 @@ If this results in a conflict, then port a unique aliasing link can be established. In an alternate operating mode, the first choice of an aliasing port is also random and unrelated to the local port number. -.Sh MODULAR ARCHITECTURE (AND Xr ipfw 4 Sh SUPPORT) +.Sh MODULAR ARCHITECTURE Po AND Xr ipfw 4 SUPPORT Pc One of the latest improvements to .Nm was to make its support From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 11:54:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 711D9C3F; Sun, 26 Apr 2015 11:54:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FDA71C0A; Sun, 26 Apr 2015 11:54:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QBsQ7n084797; Sun, 26 Apr 2015 11:54:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QBsQBm084796; Sun, 26 Apr 2015 11:54:26 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504261154.t3QBsQBm084796@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 26 Apr 2015 11:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282019 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 11:54:26 -0000 Author: andrew Date: Sun Apr 26 11:54:25 2015 New Revision: 282019 URL: https://svnweb.freebsd.org/changeset/base/282019 Log: Use ARMv7 style unaligned access on ARMv6. We set this bit in locore, but it was missing from here. Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sun Apr 26 11:39:25 2015 (r282018) +++ head/sys/arm/arm/cpufunc.c Sun Apr 26 11:54:25 2015 (r282019) @@ -1186,7 +1186,8 @@ arm11x6_setup(void) CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_SYST_ENABLE | - CPU_CONTROL_IC_ENABLE; + CPU_CONTROL_IC_ENABLE | + CPU_CONTROL_UNAL_ENABLE; /* * "write as existing" bits From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 12:24:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83B965CF; Sun, 26 Apr 2015 12:24:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 650891F8F; Sun, 26 Apr 2015 12:24:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QCOhf4000151; Sun, 26 Apr 2015 12:24:43 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QCOhmX000150; Sun, 26 Apr 2015 12:24:43 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201504261224.t3QCOhmX000150@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Sun, 26 Apr 2015 12:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282020 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 12:24:43 -0000 Author: grembo (ports committer) Date: Sun Apr 26 12:24:42 2015 New Revision: 282020 URL: https://svnweb.freebsd.org/changeset/base/282020 Log: Improve smb(4) man page. Differential Revision: https://reviews.freebsd.org/D2368 Reviewed by: wblock Approved by: wblock Modified: head/share/man/man4/smb.4 Modified: head/share/man/man4/smb.4 ============================================================================== --- head/share/man/man4/smb.4 Sun Apr 26 11:54:25 2015 (r282019) +++ head/share/man/man4/smb.4 Sun Apr 26 12:24:42 2015 (r282020) @@ -37,10 +37,10 @@ .Sh DESCRIPTION The .Em smb -character device driver provides generic i/o to any +character device driver provides generic I/O to any .Xr smbus 4 instance. -In order to control SMB devices, use +To control SMB devices, use .Pa /dev/smb? with the ioctls described below. Any of these ioctl commands takes a pointer to @@ -74,86 +74,74 @@ struct smbcmd { The .Fa slave field is always used, and provides the address of the -SMBus slave device to talk to. +SMBus slave device. The slave address is specified in the seven most significant bits -.Pq i.e. Dq "left-justified" . +.Pq i.e., Dq "left-justified" . The least significant bit of the slave address must be zero. .Pp .Bl -column ".Dv SMB_QUICK_WRITE" -compact .It Em Ioctl Ta Em Description .Pp .It Dv SMB_QUICK_WRITE Ta -The .Em QuickWrite -command just issues the device address with write intent -to the bus, without transferring any data. +does not transfer any data. +It just issues the device address with write intent to the bus. .It Dv SMB_QUICK_READ Ta -The .Em QuickRead -command just issues the device address with read intent -to the bus, without transferring any data. +does not transfer any data. +It just issues the device address with read intent to the bus. .It Dv SMB_SENDB Ta -The .Em SendByte -command sends the byte provided in the +sends the byte provided in .Fa cmd -field to the device. +to the device. .It Dv SMB_RECVB Ta -The .Em ReceiveByte -command reads a single byte from the device which will -be returned in the -.Fa cmd -field. +reads a single byte from the device which is returned in +.Fa cmd . .It Dv SMB_WRITEB Ta -The .Em WriteByte -command first sends the byte from the +first sends the byte from .Fa cmd -field to the device, followed by the byte given in +to the device, followed by the byte given in .Fa wdata.byte . .It Dv SMB_WRITEW Ta -The .Em WriteWord -command first sends the byte from the +first sends the byte from .Fa cmd -field to the device, followed by the word given in +to the device, followed by the word given in .Fa wdata.word . Note that the SMBus byte-order is little-endian by definition. .It Dv SMB_READB Ta -The .Em ReadByte -command first sends the byte from the +first sends the byte from .Fa cmd -field to the device, and then reads one byte of data from +to the device, then reads one byte of data from the device. -The returned data will be stored in +Returned data is stored in .Fa rdata.byte . .It Dv SMB_READW Ta -The .Em ReadWord -command first sends the byte from the +first sends the byte from .Fa cmd -field to the device, and then reads one word of data from +to the device, then reads one word of data from the device. -The returned data will be stored in +Returned data is stored in .Fa rdata.word . .It Dv SMB_PCALL Ta -The .Em ProcedureCall -command first sends the byte from the +first sends the byte from .Fa cmd -field to the device, followed by the word provided in +to the device, followed by the word provided in .Fa wdata.word . -It then reads one word of data from the device, and returns it +It then reads one word of data from the device and returns it in .Fa rdata.word . .It Dv SMB_BWRITE Ta -The .Em BlockWrite -command first sends the byte from the +first sends the byte from .Fa cmd -field to the device, followed by +to the device, followed by .Fa wcount bytes of data that are taken from the buffer pointed to by .Fa wbuf . @@ -163,34 +151,32 @@ but since .Xr smbus 4 is also used to access I2C devices, the limit has been increased to 1024. -This value is available in the constant +This value can be read from the constant .Dv SMB_MAXBLOCKSIZE . .It Dv SMB_BREAD Ta -The .Em BlockRead -command first sends the byte from the +first sends the byte from .Fa cmd -field to the device, and then reads +to the device, then reads .Fa rcount bytes of data that from the device. -These data will be returned in the buffer pointed to by +This data is returned in the buffer pointed to by .Fa rbuf . .It Dv SMB_TRANS Ta -The .Em Trans -command sends an SMB roll-up transaction with flags that also allow it to -be used for (mostly) I2C pass-through and with with 10-bit addresses. -This function can be used to roll up all of the above functions. -It first sends the byte from the +sends an SMB roll-up transaction with flags that also allow it to +be used for (mostly) I2C pass-through and with 10-bit addresses. +This function can be utilized to roll up all of the above functions. +It first sends the byte from .Fa cmd -field to the device, followed by +to the device, followed by .Fa wcount bytes of data that are taken from the buffer pointed to by .Fa wbuf , then reads .Fa rcount bytes of data that from the device. -These data will be returned in the buffer pointed to by +This data is returned in the buffer pointed to by .Fa rbuf . .Pp The following flags are allowed in @@ -239,5 +225,4 @@ This manual page was written by .An Nicolas Souchu and extended by -.An Michael Gmelin Aq freebsd@grem.de -. +.An Michael Gmelin Aq freebsd@grem.de . From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 15:57:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AABCC59B; Sun, 26 Apr 2015 15:57:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F52014C9; Sun, 26 Apr 2015 15:57:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QFv3Le006543; Sun, 26 Apr 2015 15:57:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QFv30p006542; Sun, 26 Apr 2015 15:57:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504261557.t3QFv30p006542@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 26 Apr 2015 15:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282023 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 15:57:03 -0000 Author: andrew Date: Sun Apr 26 15:57:02 2015 New Revision: 282023 URL: https://svnweb.freebsd.org/changeset/base/282023 Log: Remove the armv6 code from locore-v4.S, it's not needed there. Modified: head/sys/arm/arm/locore-v4.S Modified: head/sys/arm/arm/locore-v4.S ============================================================================== --- head/sys/arm/arm/locore-v4.S Sun Apr 26 15:42:14 2015 (r282022) +++ head/sys/arm/arm/locore-v4.S Sun Apr 26 15:57:02 2015 (r282023) @@ -169,7 +169,6 @@ Lunmapped: adr r0, Lpagetable bl translate_va_to_pa -#ifndef _ARM_ARCH_6 /* * Some of the older ports (the various XScale, mostly) assume * that the memory before the kernel is mapped, and use it for @@ -191,25 +190,6 @@ Lunmapped: ldr r2, =(KERNBASE) bl build_pagetables ldr r5, =(KERNPHYSADDR) -#else - /* - * Map PA == VA - */ - /* Find the start kernels load address */ - adr r5, _start - ldr r2, =(L1_S_OFFSET) - bic r5, r2 - mov r1, r5 - mov r2, r5 - /* Map 64MiB, preserved over calls to build_pagetables */ - mov r3, #64 - bl build_pagetables - - /* Create the kernel map to jump to */ - mov r1, r5 - ldr r2, =(KERNVIRTADDR) - bl build_pagetables -#endif #if defined(SOCDEV_PA) && defined(SOCDEV_VA) /* Create the custom map */ @@ -221,11 +201,6 @@ Lunmapped: mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) - mov r0, #0 - mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ -#endif - /* Set the Domain Access register. Very important! */ mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) mcr p15, 0, r0, c3, c0, 0 @@ -236,11 +211,6 @@ Lunmapped: * instructions emitted by clang. */ mrc p15, 0, r0, c1, c0, 0 -#ifdef _ARM_ARCH_6 - orr r0, r0, #(CPU_CONTROL_V6_EXTPAGE | CPU_CONTROL_UNAL_ENABLE) - orr r0, r0, #(CPU_CONTROL_AFLT_ENABLE) - orr r0, r0, #(CPU_CONTROL_AF_ENABLE) -#endif orr r0, r0, #(CPU_CONTROL_MMU_ENABLE) mcr p15, 0, r0, c1, c0, 0 nop From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 16:18:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7CED9C9; Sun, 26 Apr 2015 16:18:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9426E16CC; Sun, 26 Apr 2015 16:18:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QGIg1P016875; Sun, 26 Apr 2015 16:18:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QGIgni016873; Sun, 26 Apr 2015 16:18:42 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504261618.t3QGIgni016873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 26 Apr 2015 16:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282024 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 16:18:42 -0000 Author: andrew Date: Sun Apr 26 16:18:41 2015 New Revision: 282024 URL: https://svnweb.freebsd.org/changeset/base/282024 Log: Fix the style of locore-v4.S and locore-v6.S to help find any common code. Modified: head/sys/arm/arm/locore-v4.S head/sys/arm/arm/locore-v6.S Modified: head/sys/arm/arm/locore-v4.S ============================================================================== --- head/sys/arm/arm/locore-v4.S Sun Apr 26 15:57:02 2015 (r282023) +++ head/sys/arm/arm/locore-v4.S Sun Apr 26 16:18:41 2015 (r282024) @@ -250,7 +250,7 @@ virt_done: /* init arm will return the new stack pointer. */ mov sp, r0 - bl _C_LABEL(mi_startup) /* call mi_startup()! */ + bl _C_LABEL(mi_startup) /* call mi_startup()! */ adr r0, .Lmainreturned b _C_LABEL(panic) @@ -428,7 +428,7 @@ ENTRY(longjmp) END(longjmp) .data - .global _C_LABEL(esym) + .global _C_LABEL(esym) _C_LABEL(esym): .word _C_LABEL(end) ENTRY_NP(abort) @@ -441,7 +441,7 @@ ENTRY_NP(sigcode) /* * Call the sigreturn system call. - * + * * We have to load r7 manually rather than using * "ldr r7, =SYS_sigreturn" to ensure the value of szsigcode is * correct. Using the alternative places esigcode at the address Modified: head/sys/arm/arm/locore-v6.S ============================================================================== --- head/sys/arm/arm/locore-v6.S Sun Apr 26 15:57:02 2015 (r282023) +++ head/sys/arm/arm/locore-v6.S Sun Apr 26 16:18:41 2015 (r282024) @@ -52,13 +52,13 @@ __FBSDID("$FreeBSD$"); .align 2 /* - * On entry for FreeBSD boot ABI: - * r0 - metadata pointer or 0 (boothowto on AT91's boot2) - * r1 - if (r0 == 0) then metadata pointer - * On entry for Linux boot ABI: + * On entry for FreeBSD boot ABI: + * r0 - metadata pointer or 0 (boothowto on AT91's boot2) + * r1 - if (r0 == 0) then metadata pointer + * On entry for Linux boot ABI: * r0 - 0 * r1 - machine type (passed as arg2 to initarm) - * r2 - Pointer to a tagged list or dtb image (phys addr) (passed as arg1 initarm) + * r2 - Pointer to a tagged list or dtb image (phys addr) (passed as arg1 initarm) * * For both types of boot we gather up the args, put them in a struct arm_boot_params * structure and pass that to initarm. @@ -66,17 +66,17 @@ __FBSDID("$FreeBSD$"); .globl btext btext: ASENTRY_NP(_start) - STOP_UNWINDING /* Can't unwind into the bootloader! */ + STOP_UNWINDING /* Can't unwind into the bootloader! */ - /* Make sure interrupts are disabled. */ + /* Make sure interrupts are disabled. */ cpsid ifa - mov r8, r0 /* 0 or boot mode from boot2 */ - mov r9, r1 /* Save Machine type */ - mov r10, r2 /* Save meta data */ + mov r8, r0 /* 0 or boot mode from boot2 */ + mov r9, r1 /* Save Machine type */ + mov r10, r2 /* Save meta data */ mov r11, r3 /* Future expansion */ - /* + /* * Check whether data cache is enabled. If it is, then we know * current tags are valid (not power-on garbage values) and there * might be dirty lines that need cleaning. Disable cache to prevent @@ -119,13 +119,13 @@ ASENTRY_NP(_start) /* * Map PA == VA */ - /* Find the start kernels load address */ + /* Find the start kernels load address */ adr r5, _start ldr r2, =(PTE1_OFFSET) bic r5, r2 mov r1, r5 mov r2, r5 - /* Map 64MiB, preserved over calls to build_pagetables */ + /* Map 64MiB, preserved over calls to build_pagetables */ mov r3, #64 bl build_pagetables @@ -142,41 +142,41 @@ ASENTRY_NP(_start) #endif bl init_mmu - /* Switch to virtual addresses. */ + /* Switch to virtual addresses. */ ldr pc, =1f 1: - /* Setup stack, clear BSS */ + /* Setup stack, clear BSS */ ldr r1, =.Lstart ldmia r1, {r1, r2, sp} /* Set initial stack and */ add sp, sp, #INIT_ARM_STACK_SIZE - sub r2, r2, r1 /* get zero init data */ + sub r2, r2, r1 /* get zero init data */ mov r3, #0 2: str r3, [r1], #0x0004 /* get zero init data */ - subs r2, r2, #4 + subs r2, r2, #4 bgt 2b - mov r1, #28 /* loader info size is 28 bytes also second arg */ - subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ - mov r0, sp /* loader info pointer is first arg */ - bic sp, sp, #7 /* align stack to 8 bytes */ - str r1, [r0] /* Store length of loader info */ + mov r1, #28 /* loader info size is 28 bytes also second arg */ + subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ + mov r0, sp /* loader info pointer is first arg */ + bic sp, sp, #7 /* align stack to 8 bytes */ + str r1, [r0] /* Store length of loader info */ str r8, [r0, #4] /* Store r0 from boot loader */ str r9, [r0, #8] /* Store r1 from boot loader */ str r10, [r0, #12] /* store r2 from boot loader */ str r11, [r0, #16] /* store r3 from boot loader */ str r5, [r0, #20] /* store the physical address */ - adr r4, Lpagetable /* load the pagetable address */ + adr r4, Lpagetable /* load the pagetable address */ ldr r5, [r4, #4] str r5, [r0, #24] /* store the pagetable address */ mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ - /* init arm will return the new stack pointer. */ + /* init arm will return the new stack pointer. */ mov sp, r0 - bl _C_LABEL(mi_startup) /* call mi_startup()! */ + bl _C_LABEL(mi_startup) /* call mi_startup()! */ ldr r0, =.Lmainreturned b _C_LABEL(panic) @@ -219,8 +219,8 @@ translate_va_to_pa: mov pc, lr /* - * Init MMU - * r0 - The table base address + * Init MMU + * r0 - the table base address */ ASENTRY_NP(init_mmu) @@ -267,11 +267,11 @@ END(init_mmu) /* - * Init SMP coherent mode, enable caching and switch to final MMU table. - * Called with disabled caches - * r0 - The table base address - * r1 - clear bits for aux register - * r2 - set bits for aux register + * Init SMP coherent mode, enable caching and switch to final MMU table. + * Called with disabled caches + * r0 - The table base address + * r1 - clear bits for aux register + * r2 - set bits for aux register */ ASENTRY_NP(reinit_mmu) push {r4-r11, lr} @@ -331,11 +331,11 @@ END(reinit_mmu) /* * Builds the page table - * r0 - The table base address - * r1 - The physical address (trashed) - * r2 - The virtual address (trashed) - * r3 - The number of 1MiB sections - * r4 - Trashed + * r0 - The table base address + * r1 - The physical address (trashed) + * r2 - The virtual address (trashed) + * r3 - The number of 1MiB sections + * r4 - Trashed * * Addresses must be 1MiB aligned */ @@ -350,15 +350,15 @@ build_pagetables: #endif orr r1, r4 - /* Move the virtual address to the correct bit location */ + /* Move the virtual address to the correct bit location */ lsr r2, #(PTE1_SHIFT - 2) mov r4, r3 1: str r1, [r0, r2] - add r2, r2, #4 - add r1, r1, #(PTE1_SIZE) - adds r4, r4, #-1 + add r2, r2, #4 + add r1, r1, #(PTE1_SIZE) + adds r4, r4, #-1 bhi 1b mov pc, lr @@ -372,7 +372,7 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1) .word svcstk /* must remain in order together. */ .Lmainreturned: - .asciz "main() returned" + .asciz "main() returned" .align 2 .bss @@ -380,8 +380,8 @@ svcstk: .space INIT_ARM_STACK_SIZE * MAXCPU /* - * Memory for the initial pagetable. We are unable to place this in - * the bss as this will be cleared after the table is loaded. + * Memory for the initial pagetable. We are unable to place this in + * the bss as this will be cleared after the table is loaded. */ .section ".init_pagetable" .align 14 /* 16KiB aligned */ @@ -398,7 +398,7 @@ boot_pt1: #if defined(SMP) ASENTRY_NP(mpentry) - /* Make sure interrupts are disabled. */ + /* Make sure interrupts are disabled. */ cpsid ifa /* Setup core, disable all caches. */ @@ -419,7 +419,7 @@ ASENTRY_NP(mpentry) mcr CP15_ICIALLU ISB - /* Find the delta between VA and PA */ + /* Find the delta between VA and PA */ adr r0, Lpagetable bl translate_va_to_pa @@ -433,7 +433,7 @@ ASENTRY_NP(mpentry) mul r2, r1, r0 /* Point sp to initstack */ add sp, sp, r2 /* area for this processor. */ - /* Switch to virtual addresses. */ + /* Switch to virtual addresses. */ ldr pc, =1f 1: mov fp, #0 /* trace back starts here */ @@ -466,7 +466,7 @@ ENTRY_NP(cpu_halt) /* * _cpu_reset_address contains the address to branch to, to complete * the cpu reset after turning the MMU off - * This variable is provided by the hardware specific code + * This variable is provided by the hardware specific code */ .Lcpu_reset_address: .word _C_LABEL(cpu_reset_address) @@ -498,38 +498,37 @@ END(abort) ENTRY_NP(sigcode) mov r0, sp - add r0, r0, #SIGF_UC + add r0, r0, #SIGF_UC /* - * Call the sigreturn system call. + * Call the sigreturn system call. * * We have to load r7 manually rather than using - * "ldr r7, =SYS_sigreturn" to ensure the value of szsigcode is + * "ldr r7, =SYS_sigreturn" to ensure the value of szsigcode is * correct. Using the alternative places esigcode at the address - * of the data rather than the address one past the data. + * of the data rather than the address one past the data. */ - ldr r7, [pc, #12] /* Load SYS_sigreturn */ + ldr r7, [pc, #12] /* Load SYS_sigreturn */ swi SYS_sigreturn - /* Well if that failed we better exit quick ! */ + /* Well if that failed we better exit quick ! */ - ldr r7, [pc, #8] /* Load SYS_exit */ + ldr r7, [pc, #8] /* Load SYS_exit */ swi SYS_exit - /* Branch back to retry SYS_sigreturn */ + /* Branch back to retry SYS_sigreturn */ b . - 16 END(sigcode) - .word SYS_sigreturn .word SYS_exit .align 2 - .global _C_LABEL(esigcode) + .global _C_LABEL(esigcode) _C_LABEL(esigcode): .data - .global szsigcode + .global szsigcode szsigcode: .long esigcode-sigcode From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 16:37:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6B93D12; Sun, 26 Apr 2015 16:37:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D47CB1883; Sun, 26 Apr 2015 16:37:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QGbS6U026744; Sun, 26 Apr 2015 16:37:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QGbSjf026742; Sun, 26 Apr 2015 16:37:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504261637.t3QGbSjf026742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 26 Apr 2015 16:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282025 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 16:37:29 -0000 Author: andrew Date: Sun Apr 26 16:37:27 2015 New Revision: 282025 URL: https://svnweb.freebsd.org/changeset/base/282025 Log: Cleanup a little more: - Remove whitespace at the end of lines - Use a tab after instructions, not spaces Modified: head/sys/arm/arm/locore-v4.S head/sys/arm/arm/locore-v6.S Modified: head/sys/arm/arm/locore-v4.S ============================================================================== --- head/sys/arm/arm/locore-v4.S Sun Apr 26 16:18:41 2015 (r282024) +++ head/sys/arm/arm/locore-v4.S Sun Apr 26 16:37:27 2015 (r282025) @@ -116,7 +116,7 @@ ASENTRY_NP(_start) * If we're running with MMU disabled, test against the * physical address instead. */ - mrc p15, 0, r2, c1, c0, 0 + mrc p15, 0, r2, c1, c0, 0 ands r2, r2, #CPU_CONTROL_MMU_ENABLE ldreq r6, =PHYSADDR ldrne r6, =LOADERRAMADDR @@ -125,7 +125,7 @@ ASENTRY_NP(_start) cmp r7, pc bhi from_ram b do_copy - + flash_lower: cmp r6, pc bls from_ram @@ -148,12 +148,12 @@ from_ram: disable_mmu: /* Disable MMU for a while */ - mrc p15, 0, r2, c1, c0, 0 + mrc p15, 0, r2, c1, c0, 0 bic r2, r2, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ CPU_CONTROL_WBUF_ENABLE) bic r2, r2, #(CPU_CONTROL_IC_ENABLE) bic r2, r2, #(CPU_CONTROL_BPRD_ENABLE) - mcr p15, 0, r2, c1, c0, 0 + mcr p15, 0, r2, c1, c0, 0 nop nop @@ -172,25 +172,25 @@ Lunmapped: /* * Some of the older ports (the various XScale, mostly) assume * that the memory before the kernel is mapped, and use it for - * the various stacks, page tables, etc. For those CPUs, map the - * 64 first MB of RAM, as it used to be. + * the various stacks, page tables, etc. For those CPUs, map the + * 64 first MB of RAM, as it used to be. */ /* * Map PA == VA - */ - ldr r5, =PHYSADDR - mov r1, r5 - mov r2, r5 + */ + ldr r5, =PHYSADDR + mov r1, r5 + mov r2, r5 /* Map 64MiB, preserved over calls to build_pagetables */ - mov r3, #64 - bl build_pagetables - + mov r3, #64 + bl build_pagetables + /* Create the kernel map to jump to */ - mov r1, r5 - ldr r2, =(KERNBASE) - bl build_pagetables + mov r1, r5 + ldr r2, =(KERNBASE) + bl build_pagetables ldr r5, =(KERNPHYSADDR) - + #if defined(SOCDEV_PA) && defined(SOCDEV_VA) /* Create the custom map */ ldr r1, =SOCDEV_PA @@ -202,9 +202,9 @@ Lunmapped: mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ /* Set the Domain Access register. Very important! */ - mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) + mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) mcr p15, 0, r0, c3, c0, 0 - /* + /* * Enable MMU. * On armv6 enable extended page tables, and set alignment checking * to modulo-4 (CPU_CONTROL_UNAL_ENABLE) for the ldrd/strd @@ -359,11 +359,11 @@ pagetable: .word _C_LABEL(cpufuncs) ENTRY_NP(cpu_halt) - mrs r2, cpsr + mrs r2, cpsr bic r2, r2, #(PSR_MODE) - orr r2, r2, #(PSR_SVC32_MODE) + orr r2, r2, #(PSR_SVC32_MODE) orr r2, r2, #(PSR_I | PSR_F) - msr cpsr_fsxc, r2 + msr cpsr_fsxc, r2 ldr r4, .Lcpu_reset_address ldr r4, [r4] @@ -389,9 +389,9 @@ ENTRY_NP(cpu_halt) * Hurl ourselves into the ROM */ mov r0, #(CPU_CONTROL_32BP_ENABLE | CPU_CONTROL_32BD_ENABLE) - mcr p15, 0, r0, c1, c0, 0 - mcrne p15, 0, r2, c8, c7, 0 /* nail I+D TLB on ARMv4 and greater */ - mov pc, r4 + mcr p15, 0, r0, c1, c0, 0 + mcrne p15, 0, r2, c8, c7, 0 /* nail I+D TLB on ARMv4 and greater */ + mov pc, r4 /* * _cpu_reset_address contains the address to branch to, to complete Modified: head/sys/arm/arm/locore-v6.S ============================================================================== --- head/sys/arm/arm/locore-v6.S Sun Apr 26 16:18:41 2015 (r282024) +++ head/sys/arm/arm/locore-v6.S Sun Apr 26 16:37:27 2015 (r282025) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); -#ifndef ARM_NEW_PMAP +#ifndef ARM_NEW_PMAP #define PTE1_OFFSET L1_S_OFFSET #define PTE1_SHIFT L1_S_SHIFT #define PTE1_SIZE L1_S_SIZE @@ -93,7 +93,7 @@ ASENTRY_NP(_start) * valid. Disable all caches and the MMU, and invalidate everything * before setting up new page tables and re-enabling the mmu. */ -1: +1: bic r7, #CPU_CONTROL_DC_ENABLE bic r7, #CPU_CONTROL_MMU_ENABLE bic r7, #CPU_CONTROL_IC_ENABLE @@ -422,7 +422,7 @@ ASENTRY_NP(mpentry) /* Find the delta between VA and PA */ adr r0, Lpagetable bl translate_va_to_pa - + bl init_mmu adr r1, .Lstart+8 /* Get initstack pointer from */ @@ -459,7 +459,7 @@ ENTRY_NP(cpu_halt) ldr r4, [r4] teq r4, #0 movne pc, r4 -1: +1: WFI b 1b From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 17:22:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8C2AA8D; Sun, 26 Apr 2015 17:22:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D73AF1D21; Sun, 26 Apr 2015 17:22:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QHMx52052336; Sun, 26 Apr 2015 17:22:59 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QHMxJr052333; Sun, 26 Apr 2015 17:22:59 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201504261722.t3QHMxJr052333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 26 Apr 2015 17:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282032 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 17:23:00 -0000 Author: mjg Date: Sun Apr 26 17:22:59 2015 New Revision: 282032 URL: https://svnweb.freebsd.org/changeset/base/282032 Log: Consistently use p instead of td->td_proc in create_thread No functional changes. Modified: head/sys/kern/kern_thr.c Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Sun Apr 26 16:54:33 2015 (r282031) +++ head/sys/kern/kern_thr.c Sun Apr 26 17:22:59 2015 (r282032) @@ -187,9 +187,9 @@ create_thread(struct thread *td, mcontex } #ifdef RACCT - PROC_LOCK(td->td_proc); + PROC_LOCK(p); error = racct_add(p, RACCT_NTHR, 1); - PROC_UNLOCK(td->td_proc); + PROC_UNLOCK(p); if (error != 0) return (EPROCLIM); #endif @@ -250,9 +250,9 @@ create_thread(struct thread *td, mcontex } } - PROC_LOCK(td->td_proc); - td->td_proc->p_flag |= P_HADTHREADS; - thread_link(newtd, p); + PROC_LOCK(p); + p->p_flag |= P_HADTHREADS; + thread_link(newtd, p); bcopy(p->p_comm, newtd->td_name, sizeof(newtd->td_name)); thread_lock(td); /* let the scheduler know about these things. */ From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 17:27:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6162C2B; Sun, 26 Apr 2015 17:27:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4A711D45; Sun, 26 Apr 2015 17:27:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QHRtpF053707; Sun, 26 Apr 2015 17:27:55 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QHRtwb053706; Sun, 26 Apr 2015 17:27:55 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201504261727.t3QHRtwb053706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 26 Apr 2015 17:27:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282033 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 17:27:56 -0000 Author: mjg Date: Sun Apr 26 17:27:55 2015 New Revision: 282033 URL: https://svnweb.freebsd.org/changeset/base/282033 Log: fd: plug an always overwritten initialization in fdalloc Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Apr 26 17:22:59 2015 (r282032) +++ head/sys/kern/kern_descrip.c Sun Apr 26 17:27:55 2015 (r282033) @@ -1609,7 +1609,7 @@ fdalloc(struct thread *td, int minfd, in { struct proc *p = td->td_proc; struct filedesc *fdp = p->p_fd; - int fd = -1, maxfd, allocfd; + int fd, maxfd, allocfd; #ifdef RACCT int error; #endif From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 21:31:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEE874A8; Sun, 26 Apr 2015 21:31:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0A4814E1; Sun, 26 Apr 2015 21:31:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QLVU6E076920; Sun, 26 Apr 2015 21:31:30 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QLVUYo076919; Sun, 26 Apr 2015 21:31:30 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504262131.t3QLVUYo076919@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 26 Apr 2015 21:31:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282039 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 21:31:31 -0000 Author: glebius Date: Sun Apr 26 21:31:30 2015 New Revision: 282039 URL: https://svnweb.freebsd.org/changeset/base/282039 Log: Don't use ifm_data. It was used only for self checking debug. Reviewed by: np Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sun Apr 26 21:28:15 2015 (r282038) +++ head/sys/dev/cxgbe/t4_main.c Sun Apr 26 21:31:30 2015 (r282039) @@ -1571,9 +1571,6 @@ cxgbe_media_status(struct ifnet *ifp, st struct ifmedia *media = NULL; struct ifmedia_entry *cur; int speed = pi->link_cfg.speed; -#ifdef INVARIANTS - int data = (pi->port_type << 8) | pi->mod_type; -#endif if (ifp == pi->ifp) media = &pi->media; @@ -1584,7 +1581,6 @@ cxgbe_media_status(struct ifnet *ifp, st MPASS(media != NULL); cur = media->ifm_cur; - MPASS(cur->ifm_data == data); ifmr->ifm_status = IFM_AVALID; if (!pi->link_cfg.link_ok) @@ -2884,30 +2880,29 @@ t4_set_desc(struct adapter *sc) static void build_medialist(struct port_info *pi, struct ifmedia *media) { - int data, m; + int m; PORT_LOCK(pi); ifmedia_removeall(media); m = IFM_ETHER | IFM_FDX; - data = (pi->port_type << 8) | pi->mod_type; switch(pi->port_type) { case FW_PORT_TYPE_BT_XFI: case FW_PORT_TYPE_BT_XAUI: - ifmedia_add(media, m | IFM_10G_T, data, NULL); + ifmedia_add(media, m | IFM_10G_T, 0, NULL); /* fall through */ case FW_PORT_TYPE_BT_SGMII: - ifmedia_add(media, m | IFM_1000_T, data, NULL); - ifmedia_add(media, m | IFM_100_TX, data, NULL); - ifmedia_add(media, IFM_ETHER | IFM_AUTO, data, NULL); + ifmedia_add(media, m | IFM_1000_T, 0, NULL); + ifmedia_add(media, m | IFM_100_TX, 0, NULL); + ifmedia_add(media, IFM_ETHER | IFM_AUTO, 0, NULL); ifmedia_set(media, IFM_ETHER | IFM_AUTO); break; case FW_PORT_TYPE_CX4: - ifmedia_add(media, m | IFM_10G_CX4, data, NULL); + ifmedia_add(media, m | IFM_10G_CX4, 0, NULL); ifmedia_set(media, m | IFM_10G_CX4); break; @@ -2918,29 +2913,29 @@ build_medialist(struct port_info *pi, st switch (pi->mod_type) { case FW_PORT_MOD_TYPE_LR: - ifmedia_add(media, m | IFM_10G_LR, data, NULL); + ifmedia_add(media, m | IFM_10G_LR, 0, NULL); ifmedia_set(media, m | IFM_10G_LR); break; case FW_PORT_MOD_TYPE_SR: - ifmedia_add(media, m | IFM_10G_SR, data, NULL); + ifmedia_add(media, m | IFM_10G_SR, 0, NULL); ifmedia_set(media, m | IFM_10G_SR); break; case FW_PORT_MOD_TYPE_LRM: - ifmedia_add(media, m | IFM_10G_LRM, data, NULL); + ifmedia_add(media, m | IFM_10G_LRM, 0, NULL); ifmedia_set(media, m | IFM_10G_LRM); break; case FW_PORT_MOD_TYPE_TWINAX_PASSIVE: case FW_PORT_MOD_TYPE_TWINAX_ACTIVE: - ifmedia_add(media, m | IFM_10G_TWINAX, data, NULL); + ifmedia_add(media, m | IFM_10G_TWINAX, 0, NULL); ifmedia_set(media, m | IFM_10G_TWINAX); break; case FW_PORT_MOD_TYPE_NONE: m &= ~IFM_FDX; - ifmedia_add(media, m | IFM_NONE, data, NULL); + ifmedia_add(media, m | IFM_NONE, 0, NULL); ifmedia_set(media, m | IFM_NONE); break; @@ -2950,7 +2945,7 @@ build_medialist(struct port_info *pi, st device_printf(pi->dev, "unknown port_type (%d), mod_type (%d)\n", pi->port_type, pi->mod_type); - ifmedia_add(media, m | IFM_UNKNOWN, data, NULL); + ifmedia_add(media, m | IFM_UNKNOWN, 0, NULL); ifmedia_set(media, m | IFM_UNKNOWN); break; } @@ -2960,24 +2955,24 @@ build_medialist(struct port_info *pi, st switch (pi->mod_type) { case FW_PORT_MOD_TYPE_LR: - ifmedia_add(media, m | IFM_40G_LR4, data, NULL); + ifmedia_add(media, m | IFM_40G_LR4, 0, NULL); ifmedia_set(media, m | IFM_40G_LR4); break; case FW_PORT_MOD_TYPE_SR: - ifmedia_add(media, m | IFM_40G_SR4, data, NULL); + ifmedia_add(media, m | IFM_40G_SR4, 0, NULL); ifmedia_set(media, m | IFM_40G_SR4); break; case FW_PORT_MOD_TYPE_TWINAX_PASSIVE: case FW_PORT_MOD_TYPE_TWINAX_ACTIVE: - ifmedia_add(media, m | IFM_40G_CR4, data, NULL); + ifmedia_add(media, m | IFM_40G_CR4, 0, NULL); ifmedia_set(media, m | IFM_40G_CR4); break; case FW_PORT_MOD_TYPE_NONE: m &= ~IFM_FDX; - ifmedia_add(media, m | IFM_NONE, data, NULL); + ifmedia_add(media, m | IFM_NONE, 0, NULL); ifmedia_set(media, m | IFM_NONE); break; @@ -2985,7 +2980,7 @@ build_medialist(struct port_info *pi, st device_printf(pi->dev, "unknown port_type (%d), mod_type (%d)\n", pi->port_type, pi->mod_type); - ifmedia_add(media, m | IFM_UNKNOWN, data, NULL); + ifmedia_add(media, m | IFM_UNKNOWN, 0, NULL); ifmedia_set(media, m | IFM_UNKNOWN); break; } @@ -2995,7 +2990,7 @@ build_medialist(struct port_info *pi, st device_printf(pi->dev, "unknown port_type (%d), mod_type (%d)\n", pi->port_type, pi->mod_type); - ifmedia_add(media, m | IFM_UNKNOWN, data, NULL); + ifmedia_add(media, m | IFM_UNKNOWN, 0, NULL); ifmedia_set(media, m | IFM_UNKNOWN); break; } From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 21:34:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 187CA6EE; Sun, 26 Apr 2015 21:34:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 079F914F4; Sun, 26 Apr 2015 21:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QLYtnc078640; Sun, 26 Apr 2015 21:34:55 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QLYtUJ078639; Sun, 26 Apr 2015 21:34:55 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201504262134.t3QLYtUJ078639@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 26 Apr 2015 21:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282041 - head/usr.bin/hexdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 21:34:56 -0000 Author: jilles Date: Sun Apr 26 21:34:55 2015 New Revision: 282041 URL: https://svnweb.freebsd.org/changeset/base/282041 Log: hexdump: Don't use uninitialized struct stat. Modified: head/usr.bin/hexdump/display.c Modified: head/usr.bin/hexdump/display.c ============================================================================== --- head/usr.bin/hexdump/display.c Sun Apr 26 21:32:45 2015 (r282040) +++ head/usr.bin/hexdump/display.c Sun Apr 26 21:34:55 2015 (r282041) @@ -380,7 +380,7 @@ doskip(const char *fname, int statok) return; } } - if (S_ISREG(sb.st_mode)) { + if (statok && S_ISREG(sb.st_mode)) { if (fseeko(stdin, skip, SEEK_SET)) err(1, "%s", fname); address += skip; From owner-svn-src-head@FreeBSD.ORG Sun Apr 26 21:47:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D850C90F; Sun, 26 Apr 2015 21:47:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7C3B160F; Sun, 26 Apr 2015 21:47:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3QLlFcQ083892; Sun, 26 Apr 2015 21:47:15 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3QLlF7U083891; Sun, 26 Apr 2015 21:47:15 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201504262147.t3QLlF7U083891@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 26 Apr 2015 21:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282042 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2015 21:47:16 -0000 Author: tuexen Date: Sun Apr 26 21:47:15 2015 New Revision: 282042 URL: https://svnweb.freebsd.org/changeset/base/282042 Log: Don't panic under INVARIANTS when receiving a SACK which cumacks a TSN never sent. While there, fix two typos. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sun Apr 26 21:34:55 2015 (r282041) +++ head/sys/netinet/sctp_indata.c Sun Apr 26 21:47:15 2015 (r282042) @@ -3614,24 +3614,17 @@ sctp_express_handle_sack(struct sctp_tcb send_s = asoc->sending_seq; } if (SCTP_TSN_GE(cumack, send_s)) { -#ifndef INVARIANTS struct mbuf *op_err; char msg[SCTP_DIAG_INFO_LEN]; -#endif -#ifdef INVARIANTS - panic("Impossible sack 1"); -#else - *abort_now = 1; /* XXX */ - snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal then TSN %8.8x", + snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", cumack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED); return; -#endif } } asoc->this_sack_highest_gap = cumack; @@ -4195,7 +4188,7 @@ sctp_handle_sack(struct mbuf *m, int off hopeless_peer: *abort_now = 1; /* XXX */ - snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal then TSN %8.8x", + snprintf(msg, sizeof(msg), "Cum ack %8.8x greater or equal than TSN %8.8x", cum_ack, send_s); op_err = sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg); stcb->sctp_ep->last_abort_code = SCTP_FROM_SCTP_INDATA + SCTP_LOC_25; From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 00:39:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E7A9E60; Mon, 27 Apr 2015 00:39:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BCCA1534; Mon, 27 Apr 2015 00:39:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R0dwaE069258; Mon, 27 Apr 2015 00:39:58 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R0dwZI069257; Mon, 27 Apr 2015 00:39:58 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201504270039.t3R0dwZI069257@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Mon, 27 Apr 2015 00:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282045 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 00:39:58 -0000 Author: ganbold Date: Mon Apr 27 00:39:57 2015 New Revision: 282045 URL: https://svnweb.freebsd.org/changeset/base/282045 Log: Enable root mounting from mmc/sd card. Modified: head/sys/arm/conf/RK3188 Modified: head/sys/arm/conf/RK3188 ============================================================================== --- head/sys/arm/conf/RK3188 Sun Apr 26 22:30:55 2015 (r282044) +++ head/sys/arm/conf/RK3188 Mon Apr 27 00:39:57 2015 (r282045) @@ -72,8 +72,8 @@ options WITNESS # Enable checks to de options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options DIAGNOSTIC -# Boot device is 2nd slice on USB -options ROOTDEVNAME=\"ufs:/dev/da0s2\" +# Root mount from MMC/SD card +options ROOTDEVNAME=\"ufs:/dev/mmcsd0\" # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 00:55:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 219DBF4; Mon, 27 Apr 2015 00:55:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 033FD16CE; Mon, 27 Apr 2015 00:55:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R0twBN078540; Mon, 27 Apr 2015 00:55:58 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R0tvEG078524; Mon, 27 Apr 2015 00:55:57 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504270055.t3R0tvEG078524@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 27 Apr 2015 00:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282046 - in head/sys: netinet netinet6 netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 00:55:59 -0000 Author: ae Date: Mon Apr 27 00:55:56 2015 New Revision: 282046 URL: https://svnweb.freebsd.org/changeset/base/282046 Log: Fix possible use after free due to security policy deletion. When we are passing mbuf to IPSec processing via ipsec[46]_process_packet(), we hold one reference to security policy and release it just after return from this function. But IPSec processing can be deffered and when we release reference to security policy after ipsec[46]_process_packet(), user can delete this security policy from SPDB. And when IPSec processing will be done, xform's callback function will do access to already freed memory. To fix this move KEY_FREESP() into callback function. Now IPSec code will release reference to SP after processing will be finished. Differential Revision: https://reviews.freebsd.org/D2324 No objections from: #network Sponsored by: Yandex LLC Modified: head/sys/netinet/ip_ipsec.c head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_ipsec.c head/sys/netipsec/ipsec_output.c head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c Modified: head/sys/netinet/ip_ipsec.c ============================================================================== --- head/sys/netinet/ip_ipsec.c Mon Apr 27 00:39:57 2015 (r282045) +++ head/sys/netinet/ip_ipsec.c Mon Apr 27 00:55:56 2015 (r282046) @@ -199,6 +199,9 @@ ip_ipsec_output(struct mbuf **m, struct /* NB: callee frees mbuf */ *error = ipsec4_process_packet(*m, sp->req); + /* Release SP if an error occured */ + if (*error != 0) + KEY_FREESP(&sp); if (*error == EJUSTRETURN) { /* * We had a SP with a level of 'use' and no SA. We @@ -238,9 +241,7 @@ done: KEY_FREESP(&sp); return 0; reinjected: - if (sp != NULL) - KEY_FREESP(&sp); - return -1; + return (-1); bad: if (sp != NULL) KEY_FREESP(&sp); Modified: head/sys/netinet6/ip6_forward.c ============================================================================== --- head/sys/netinet6/ip6_forward.c Mon Apr 27 00:39:57 2015 (r282045) +++ head/sys/netinet6/ip6_forward.c Mon Apr 27 00:55:56 2015 (r282046) @@ -248,8 +248,7 @@ ip6_forward(struct mbuf *m, int srcrt) /* * when the kernel forwards a packet, it is not proper to apply - * IPsec transport mode to the packet is not proper. this check - * avoid from this. + * IPsec transport mode to the packet. This check avoid from this. * at present, if there is even a transport mode SA request in the * security policy, the kernel does not apply IPsec to the packet. * this check is not enough because the following case is valid. @@ -283,9 +282,9 @@ ip6_forward(struct mbuf *m, int srcrt) * ipsec6_proces_packet will send the packet using ip6_output */ error = ipsec6_process_packet(m, sp->req); - - KEY_FREESP(&sp); - + /* Release SP if an error occured */ + if (error != 0) + KEY_FREESP(&sp); if (error == EJUSTRETURN) { /* * We had a SP with a level of 'use' and no SA. We Modified: head/sys/netinet6/ip6_ipsec.c ============================================================================== --- head/sys/netinet6/ip6_ipsec.c Mon Apr 27 00:39:57 2015 (r282045) +++ head/sys/netinet6/ip6_ipsec.c Mon Apr 27 00:55:56 2015 (r282046) @@ -213,7 +213,9 @@ ip6_ipsec_output(struct mbuf **m, struct /* NB: callee frees mbuf */ *error = ipsec6_process_packet(*m, sp->req); - + /* Release SP if an error occured */ + if (*error != 0) + KEY_FREESP(&sp); if (*error == EJUSTRETURN) { /* * We had a SP with a level of 'use' and no SA. We @@ -253,9 +255,7 @@ done: KEY_FREESP(&sp); return 0; reinjected: - if (sp != NULL) - KEY_FREESP(&sp); - return -1; + return (-1); bad: if (sp != NULL) KEY_FREESP(&sp); Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Mon Apr 27 00:39:57 2015 (r282045) +++ head/sys/netipsec/ipsec_output.c Mon Apr 27 00:55:56 2015 (r282046) @@ -104,6 +104,7 @@ ipsec_process_done(struct mbuf *m, struc IPSEC_ASSERT(m != NULL, ("null mbuf")); IPSEC_ASSERT(isr != NULL, ("null ISR")); + IPSEC_ASSERT(isr->sp != NULL, ("NULL isr->sp")); sav = isr->sav; IPSEC_ASSERT(sav != NULL, ("null SA")); IPSEC_ASSERT(sav->sah != NULL, ("null SAH")); @@ -163,6 +164,10 @@ ipsec_process_done(struct mbuf *m, struc * If this is a problem we'll need to introduce a queue * to set the packet on so we can unwind the stack before * doing further processing. + * + * If ipsec[46]_process_packet() will successfully queue + * the request, we need to take additional reference to SP, + * because xform callback will release reference. */ if (isr->next) { /* XXX-BZ currently only support same AF bundles. */ @@ -170,7 +175,11 @@ ipsec_process_done(struct mbuf *m, struc #ifdef INET case AF_INET: IPSECSTAT_INC(ips_out_bundlesa); - return ipsec4_process_packet(m, isr->next); + key_addref(isr->sp); + error = ipsec4_process_packet(m, isr->next); + if (error != 0) + KEY_FREESP(&isr->sp); + return (error); /* NOTREACHED */ #endif #ifdef notyet @@ -178,7 +187,11 @@ ipsec_process_done(struct mbuf *m, struc case AF_INET6: /* XXX */ IPSEC6STAT_INC(ips_out_bundlesa); - return ipsec6_process_packet(m, isr->next); + key_addref(isr->sp); + error = ipsec6_process_packet(m, isr->next); + if (error != 0) + KEY_FREESP(&isr->sp); + return (error); /* NOTREACHED */ #endif /* INET6 */ #endif Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Mon Apr 27 00:39:57 2015 (r282045) +++ head/sys/netipsec/xform_ah.c Mon Apr 27 00:55:56 2015 (r282046) @@ -1091,6 +1091,7 @@ ah_output_cb(struct cryptop *crp) m = (struct mbuf *) crp->crp_buf; isr = tc->tc_isr; + IPSEC_ASSERT(isr->sp != NULL, ("NULL isr->sp")); IPSECREQUEST_LOCK(isr); sav = tc->tc_sav; /* With the isr lock released SA pointer can be updated. */ @@ -1154,16 +1155,18 @@ ah_output_cb(struct cryptop *crp) error = ipsec_process_done(m, isr); KEY_FREESAV(&sav); IPSECREQUEST_UNLOCK(isr); - return error; + KEY_FREESP(&isr->sp); + return (error); bad: if (sav) KEY_FREESAV(&sav); IPSECREQUEST_UNLOCK(isr); + KEY_FREESP(&isr->sp); if (m) m_freem(m); free(tc, M_XDATA); crypto_freereq(crp); - return error; + return (error); } static struct xformsw ah_xformsw = { Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Mon Apr 27 00:39:57 2015 (r282045) +++ head/sys/netipsec/xform_esp.c Mon Apr 27 00:55:56 2015 (r282046) @@ -888,6 +888,7 @@ esp_output_cb(struct cryptop *crp) m = (struct mbuf *) crp->crp_buf; isr = tc->tc_isr; + IPSEC_ASSERT(isr->sp != NULL, ("NULL isr->sp")); IPSECREQUEST_LOCK(isr); sav = tc->tc_sav; /* With the isr lock released SA pointer can be updated. */ @@ -966,16 +967,18 @@ esp_output_cb(struct cryptop *crp) error = ipsec_process_done(m, isr); KEY_FREESAV(&sav); IPSECREQUEST_UNLOCK(isr); - return error; + KEY_FREESP(&isr->sp); + return (error); bad: if (sav) KEY_FREESAV(&sav); IPSECREQUEST_UNLOCK(isr); + KEY_FREESP(&isr->sp); if (m) m_freem(m); free(tc, M_XDATA); crypto_freereq(crp); - return error; + return (error); } static struct xformsw esp_xformsw = { Modified: head/sys/netipsec/xform_ipcomp.c ============================================================================== --- head/sys/netipsec/xform_ipcomp.c Mon Apr 27 00:39:57 2015 (r282045) +++ head/sys/netipsec/xform_ipcomp.c Mon Apr 27 00:55:56 2015 (r282046) @@ -492,6 +492,7 @@ ipcomp_output_cb(struct cryptop *crp) skip = tc->tc_skip; isr = tc->tc_isr; + IPSEC_ASSERT(isr->sp != NULL, ("NULL isr->sp")); IPSECREQUEST_LOCK(isr); sav = tc->tc_sav; /* With the isr lock released SA pointer can be updated. */ @@ -606,16 +607,18 @@ ipcomp_output_cb(struct cryptop *crp) error = ipsec_process_done(m, isr); KEY_FREESAV(&sav); IPSECREQUEST_UNLOCK(isr); - return error; + KEY_FREESP(&isr->sp); + return (error); bad: if (sav) KEY_FREESAV(&sav); IPSECREQUEST_UNLOCK(isr); + KEY_FREESP(&isr->sp); if (m) m_freem(m); free(tc, M_XDATA); crypto_freereq(crp); - return error; + return (error); } static struct xformsw ipcomp_xformsw = { From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 01:11:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E3353F2; Mon, 27 Apr 2015 01:11:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC7418AC; Mon, 27 Apr 2015 01:11:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R1BA2k086716; Mon, 27 Apr 2015 01:11:10 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R1BAP4086714; Mon, 27 Apr 2015 01:11:10 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504270111.t3R1BAP4086714@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 27 Apr 2015 01:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282047 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 01:11:10 -0000 Author: ae Date: Mon Apr 27 01:11:09 2015 New Revision: 282047 URL: https://svnweb.freebsd.org/changeset/base/282047 Log: Remove now unneded KEY_FREESP() for case when ipsec[46]_process_packet() returns EJUSTRETURN. Sponsored by: Yandex LLC Modified: head/sys/netinet/ip_ipsec.c head/sys/netinet6/ip6_ipsec.c Modified: head/sys/netinet/ip_ipsec.c ============================================================================== --- head/sys/netinet/ip_ipsec.c Mon Apr 27 00:55:56 2015 (r282046) +++ head/sys/netinet/ip_ipsec.c Mon Apr 27 01:11:09 2015 (r282047) @@ -237,9 +237,7 @@ ip_ipsec_output(struct mbuf **m, struct /* No IPsec processing for this packet. */ } done: - if (sp != NULL) - KEY_FREESP(&sp); - return 0; + return (0); reinjected: return (-1); bad: Modified: head/sys/netinet6/ip6_ipsec.c ============================================================================== --- head/sys/netinet6/ip6_ipsec.c Mon Apr 27 00:55:56 2015 (r282046) +++ head/sys/netinet6/ip6_ipsec.c Mon Apr 27 01:11:09 2015 (r282047) @@ -251,9 +251,7 @@ ip6_ipsec_output(struct mbuf **m, struct /* No IPsec processing for this packet. */ } done: - if (sp != NULL) - KEY_FREESP(&sp); - return 0; + return (0); reinjected: return (-1); bad: From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 01:12:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C1A0571; Mon, 27 Apr 2015 01:12:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A3E018B7; Mon, 27 Apr 2015 01:12:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R1CqUG088129; Mon, 27 Apr 2015 01:12:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R1Cp3U088126; Mon, 27 Apr 2015 01:12:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504270112.t3R1Cp3U088126@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 27 Apr 2015 01:12:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282048 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 01:12:52 -0000 Author: ae Date: Mon Apr 27 01:12:51 2015 New Revision: 282048 URL: https://svnweb.freebsd.org/changeset/base/282048 Log: Make ipsec_in_reject() static. We use ipsec[46]_in_reject() instead. Sponsored by: Yandex LLC Modified: head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec.h Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Mon Apr 27 01:11:09 2015 (r282047) +++ head/sys/netipsec/ipsec.c Mon Apr 27 01:12:51 2015 (r282048) @@ -238,6 +238,7 @@ SYSCTL_VNET_PCPUSTAT(_net_inet6_ipsec6, struct ipsecstat, ipsec6stat, "IPsec IPv6 statistics."); #endif /* INET6 */ +static int ipsec_in_reject(struct secpolicy *, struct mbuf *); static int ipsec_setspidx_inpcb(struct mbuf *, struct inpcb *); static int ipsec_setspidx(struct mbuf *, struct secpolicyindex *, int); static void ipsec4_get_ulp(struct mbuf *m, struct secpolicyindex *, int); @@ -1191,7 +1192,7 @@ ipsec_get_reqlevel(struct ipsecrequest * * 0: valid * 1: invalid */ -int +static int ipsec_in_reject(struct secpolicy *sp, struct mbuf *m) { struct ipsecrequest *isr; Modified: head/sys/netipsec/ipsec.h ============================================================================== --- head/sys/netipsec/ipsec.h Mon Apr 27 01:11:09 2015 (r282047) +++ head/sys/netipsec/ipsec.h Mon Apr 27 01:12:51 2015 (r282048) @@ -309,7 +309,6 @@ struct inpcb; extern int ipsec_init_policy(struct socket *so, struct inpcbpolicy **); extern int ipsec_copy_policy(struct inpcbpolicy *, struct inpcbpolicy *); extern u_int ipsec_get_reqlevel(struct ipsecrequest *); -extern int ipsec_in_reject(struct secpolicy *, struct mbuf *); extern int ipsec_set_policy(struct inpcb *inp, int optname, caddr_t request, size_t len, struct ucred *cred); From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 01:36:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBA577FE; Mon, 27 Apr 2015 01:36:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9A521A67; Mon, 27 Apr 2015 01:36:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R1aGTC098323; Mon, 27 Apr 2015 01:36:16 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R1aGm2098322; Mon, 27 Apr 2015 01:36:16 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201504270136.t3R1aGm2098322@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 27 Apr 2015 01:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282049 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 01:36:17 -0000 Author: loos Date: Mon Apr 27 01:36:16 2015 New Revision: 282049 URL: https://svnweb.freebsd.org/changeset/base/282049 Log: Pass the supplied buffer length instead of a fixed size. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Mon Apr 27 01:12:51 2015 (r282048) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Mon Apr 27 01:36:16 2015 (r282049) @@ -306,8 +306,7 @@ bcm2835_mbox_init_dma(device_t dev, size return (NULL); } - err = bus_dmamap_load(*tag, *map, buf, - sizeof(struct msg_set_power_state), bcm2835_mbox_dma_cb, + err = bus_dmamap_load(*tag, *map, buf, len, bcm2835_mbox_dma_cb, phys, 0); if (err != 0) { bus_dmamem_free(*tag, buf, *map); From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 05:13:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CAD55AE for ; Mon, 27 Apr 2015 05:13:38 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B78AD1E9C for ; Mon, 27 Apr 2015 05:13:37 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-241-118.lns20.per4.internode.on.net [121.45.241.118]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t3R5DBsL037863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 26 Apr 2015 22:13:17 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <553DC562.8090902@freebsd.org> Date: Mon, 27 Apr 2015 13:13:06 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Scott Long , Chagin Dmitry CC: Chris Torek , dim@FreeBSD.org, adrian@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281451 - head/sys/vm References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> <20150425070658.GA3442@dchagin.static.corbina.net> <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> In-Reply-To: <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 05:13:38 -0000 On 4/26/15 3:28 AM, Scott Long wrote: > > Too early in boot to get a crashdump. but not too early for gdb live. From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 05:44:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C110FB5A; Mon, 27 Apr 2015 05:44:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEEBC116D; Mon, 27 Apr 2015 05:44:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R5iA2C023221; Mon, 27 Apr 2015 05:44:10 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R5iALg023220; Mon, 27 Apr 2015 05:44:10 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504270544.t3R5iALg023220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 27 Apr 2015 05:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282051 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 05:44:10 -0000 Author: glebius Date: Mon Apr 27 05:44:09 2015 New Revision: 282051 URL: https://svnweb.freebsd.org/changeset/base/282051 Log: Fix memory leak. PR: 199670 Reviewed by: ae 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 Apr 27 05:42:14 2015 (r282050) +++ head/sys/netpfil/ipfw/ip_fw_nat.c Mon Apr 27 05:44:09 2015 (r282051) @@ -242,6 +242,8 @@ add_redir_spool_cfg(char *buf, struct cf } if (r->alink[0] == NULL) { printf("LibAliasRedirect* returned NULL\n"); + free(r->alink, M_IPFW); + free(r, M_IPFW); return (EINVAL); } /* LSNAT handling. */ From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 06:34:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D32E50D; Mon, 27 Apr 2015 06:34:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BCB2168F; Mon, 27 Apr 2015 06:34:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R6YqS9048391; Mon, 27 Apr 2015 06:34:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R6YqXu048390; Mon, 27 Apr 2015 06:34:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270634.t3R6YqXu048390@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 06:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282054 - head/usr.sbin/bluetooth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 06:34:52 -0000 Author: ngie Date: Mon Apr 27 06:34:51 2015 New Revision: 282054 URL: https://svnweb.freebsd.org/changeset/base/282054 Log: ath3kfw, bcmfw, bthidcontrol, bthidd all require usb(4); build them conditionally if MK_USB != no MFC after: 1 week Modified: head/usr.sbin/bluetooth/Makefile Modified: head/usr.sbin/bluetooth/Makefile ============================================================================== --- head/usr.sbin/bluetooth/Makefile Mon Apr 27 06:02:47 2015 (r282053) +++ head/usr.sbin/bluetooth/Makefile Mon Apr 27 06:34:51 2015 (r282054) @@ -1,12 +1,10 @@ # $Id: Makefile,v 1.5 2003/09/08 02:28:35 max Exp $ # $FreeBSD$ +.include + SUBDIR= \ - ath3kfw \ - bcmfw \ bt3cfw \ - bthidcontrol \ - bthidd \ btpand \ hccontrol \ hcsecd \ @@ -17,5 +15,12 @@ SUBDIR= \ sdpcontrol \ sdpd +.if ${MK_USB} != "no" +SUBDIR+= ath3kfw +SUBDIR+= bcmfw +SUBDIR+= bthidcontrol +SUBDIR+= bthidd +.endif + .include From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 06:46:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18BAB9B1; Mon, 27 Apr 2015 06:46:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 071201789; Mon, 27 Apr 2015 06:46:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R6kX5e054010; Mon, 27 Apr 2015 06:46:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R6kXS1054009; Mon, 27 Apr 2015 06:46:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270646.t3R6kXS1054009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 06:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282056 - head/contrib/netbsd-tests/lib/libm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 06:46:34 -0000 Author: ngie Date: Mon Apr 27 06:46:33 2015 New Revision: 282056 URL: https://svnweb.freebsd.org/changeset/base/282056 Log: The fmodl compat shims on arm/mips/powerpc aren't complete Disable the test code for now on those architectures MFC after: 1 week PR: 199422 Modified: head/contrib/netbsd-tests/lib/libm/t_fmod.c Directory Properties: head/ (props changed) Modified: head/contrib/netbsd-tests/lib/libm/t_fmod.c ============================================================================== --- head/contrib/netbsd-tests/lib/libm/t_fmod.c Mon Apr 27 06:40:28 2015 (r282055) +++ head/contrib/netbsd-tests/lib/libm/t_fmod.c Mon Apr 27 06:46:33 2015 (r282056) @@ -43,15 +43,21 @@ ATF_TC_BODY(fmod, tc) { ATF_CHECK(fmodf(2.0, 1.0) == 0); ATF_CHECK(fmod(2.0, 1.0) == 0); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_CHECK(fmodl(2.0, 1.0) == 0); +#endif ATF_CHECK(fmodf(2.0, 0.5) == 0); ATF_CHECK(fmod(2.0, 0.5) == 0); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_CHECK(fmodl(2.0, 0.5) == 0); +#endif ATF_CHECK(fabsf(fmodf(1.0, 0.1) - 0.1f) <= 55 * FLT_EPSILON); ATF_CHECK(fabs(fmod(1.0, 0.1) - 0.1) <= 55 * DBL_EPSILON); +#if !defined(__FreeBSD__) || LDBL_PREC != 53 ATF_CHECK(fabsl(fmodl(1.0, 0.1L) - 0.1L) <= 55 * LDBL_EPSILON); +#endif } ATF_TP_ADD_TCS(tp) From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 06:49:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00D0FB84; Mon, 27 Apr 2015 06:49:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9BBF179D; Mon, 27 Apr 2015 06:49:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R6nSZg054473; Mon, 27 Apr 2015 06:49:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R6nR68054468; Mon, 27 Apr 2015 06:49:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270649.t3R6nR68054468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 06:49:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282057 - in head/lib: libc librt libthr msun X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 06:49:29 -0000 Author: ngie Date: Mon Apr 27 06:49:27 2015 New Revision: 282057 URL: https://svnweb.freebsd.org/changeset/base/282057 Log: Build/install libc, librt, libthr, and msun NetBSD test suites on all architectures MFC after: 1 week Deleted: head/lib/libc/Makefile.amd64 head/lib/libc/Makefile.i386 head/lib/librt/Makefile.amd64 head/lib/librt/Makefile.i386 head/lib/libthr/Makefile.amd64 head/lib/libthr/Makefile.i386 head/lib/msun/Makefile.amd64 head/lib/msun/Makefile.i386 Modified: head/lib/libc/Makefile head/lib/librt/Makefile head/lib/libthr/Makefile head/lib/msun/Makefile Directory Properties: head/ (props changed) Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Mon Apr 27 06:46:33 2015 (r282056) +++ head/lib/libc/Makefile Mon Apr 27 06:49:27 2015 (r282057) @@ -157,7 +157,9 @@ libkern.${LIBC_ARCH}:: ${KMSRCS} ${CP} ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} .endif -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: head/lib/librt/Makefile ============================================================================== --- head/lib/librt/Makefile Mon Apr 27 06:46:33 2015 (r282056) +++ head/lib/librt/Makefile Mon Apr 27 06:49:27 2015 (r282057) @@ -19,6 +19,8 @@ PRECIOUSLIB= VERSION_MAP= ${.CURDIR}/Version.map -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Mon Apr 27 06:46:33 2015 (r282056) +++ head/lib/libthr/Makefile Mon Apr 27 06:49:27 2015 (r282057) @@ -61,6 +61,8 @@ SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthr SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a .endif -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Mon Apr 27 06:46:33 2015 (r282056) +++ head/lib/msun/Makefile Mon Apr 27 06:49:27 2015 (r282057) @@ -221,6 +221,8 @@ MLINKS+=trunc.3 truncf.3 trunc.3 truncl. .include -.include +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 07:00:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DE63EAB; Mon, 27 Apr 2015 07:00:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C5A118B9; Mon, 27 Apr 2015 07:00:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R70Y7s060950; Mon, 27 Apr 2015 07:00:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R70Ykm060948; Mon, 27 Apr 2015 07:00:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270700.t3R70Ykm060948@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 07:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282059 - in head/etc: rc.d rc.d/tests tests tests/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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 07:00:35 -0000 Author: ngie Date: Mon Apr 27 07:00:34 2015 New Revision: 282059 URL: https://svnweb.freebsd.org/changeset/base/282059 Log: Move etc/tests/rc.d to etc/rc.d/tests to match the directory layout jmmv@ documented and implemented in other areas of the FreeBSD tree MFC after: 1 week Added: head/etc/rc.d/tests/ - copied from r281491, user/ngie/more-tests/etc/rc.d/tests/ Deleted: head/etc/tests/rc.d/ Modified: head/etc/rc.d/Makefile head/etc/tests/Makefile Directory Properties: head/ (props changed) Modified: head/etc/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Mon Apr 27 06:51:27 2015 (r282058) +++ head/etc/rc.d/Makefile Mon Apr 27 07:00:34 2015 (r282059) @@ -263,6 +263,10 @@ FILES+= routed FILES+= sendmail .endif +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .if ${MK_TIMED} != "no" FILES+= timed .endif Modified: head/etc/tests/Makefile ============================================================================== --- head/etc/tests/Makefile Mon Apr 27 06:51:27 2015 (r282058) +++ head/etc/tests/Makefile Mon Apr 27 07:00:34 2015 (r282059) @@ -7,6 +7,4 @@ TESTSDIR= ${TESTSBASE}/etc .PATH: ${.CURDIR:H:H}/tests KYUAFILE= yes -TESTS_SUBDIRS+= rc.d - .include From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 07:22:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71E1933F; Mon, 27 Apr 2015 07:22:20 +0000 (UTC) Received: from svn.freebsd.org (unknown [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 603551B3B; Mon, 27 Apr 2015 07:22:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R7MKw3073537; Mon, 27 Apr 2015 07:22:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R7MIHY073526; Mon, 27 Apr 2015 07:22:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270722.t3R7MIHY073526@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 07:22:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282061 - in head: etc/mtree tests/sys/kern tests/sys/kern/execve tools/regression/execve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 07:22:20 -0000 Author: ngie Date: Mon Apr 27 07:22:18 2015 New Revision: 282061 URL: https://svnweb.freebsd.org/changeset/base/282061 Log: Integrate tools/regression/execve into the FreeBSD test suite as tests/sys/kern/execve MFC after: 1 week Added: head/tests/sys/kern/execve/ - copied from r281464, user/ngie/more-tests/tests/sys/kern/execve/ head/tests/sys/kern/execve/dev_null_script - copied unchanged from r281489, user/ngie/more-tests/tests/sys/kern/execve/dev_null_script head/tests/sys/kern/execve/script_arg - copied unchanged from r281489, user/ngie/more-tests/tests/sys/kern/execve/script_arg head/tests/sys/kern/execve/script_arg_nospace - copied unchanged from r281489, user/ngie/more-tests/tests/sys/kern/execve/script_arg_nospace Deleted: head/tests/sys/kern/execve/devnullscript head/tests/sys/kern/execve/scriptarg head/tests/sys/kern/execve/scriptarg-nospace head/tools/regression/execve/ Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/kern/Makefile head/tests/sys/kern/execve/Makefile Directory Properties: head/ (props changed) head/etc/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Apr 27 07:02:24 2015 (r282060) +++ head/etc/mtree/BSD.tests.dist Mon Apr 27 07:22:18 2015 (r282061) @@ -355,6 +355,8 @@ .. sys kern + execve + .. .. netinet .. Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Mon Apr 27 07:02:24 2015 (r282060) +++ head/tests/sys/kern/Makefile Mon Apr 27 07:22:18 2015 (r282061) @@ -10,4 +10,6 @@ LDADD.unix_seqpacket_test+= -lpthread WARNS?= 5 +TESTS_SUBDIRS+= execve + .include Modified: head/tests/sys/kern/execve/Makefile ============================================================================== --- user/ngie/more-tests/tests/sys/kern/execve/Makefile Sun Apr 12 12:29:34 2015 (r281464) +++ head/tests/sys/kern/execve/Makefile Mon Apr 27 07:22:18 2015 (r282061) @@ -1,3 +1,5 @@ +# $FreeBSD$ + TESTSDIR= ${TESTSBASE}/sys/kern/execve BINDIR= ${TESTSDIR} Copied: head/tests/sys/kern/execve/dev_null_script (from r281489, user/ngie/more-tests/tests/sys/kern/execve/dev_null_script) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/execve/dev_null_script Mon Apr 27 07:22:18 2015 (r282061, copy of r281489, user/ngie/more-tests/tests/sys/kern/execve/dev_null_script) @@ -0,0 +1,4 @@ +#! /dev/null +# $FreeBSD$ + +echo succeeded Copied: head/tests/sys/kern/execve/script_arg (from r281489, user/ngie/more-tests/tests/sys/kern/execve/script_arg) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/execve/script_arg Mon Apr 27 07:22:18 2015 (r282061, copy of r281489, user/ngie/more-tests/tests/sys/kern/execve/script_arg) @@ -0,0 +1,4 @@ +#! /bin/sh -x +# $FreeBSD$ + +echo succeeded Copied: head/tests/sys/kern/execve/script_arg_nospace (from r281489, user/ngie/more-tests/tests/sys/kern/execve/script_arg_nospace) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/execve/script_arg_nospace Mon Apr 27 07:22:18 2015 (r282061, copy of r281489, user/ngie/more-tests/tests/sys/kern/execve/script_arg_nospace) @@ -0,0 +1,4 @@ +#!/bin/sh -x +# $FreeBSD$ + +echo succeeded From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 07:28:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 056794A3; Mon, 27 Apr 2015 07:28:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE62A1B67; Mon, 27 Apr 2015 07:28:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R7SfMw074459; Mon, 27 Apr 2015 07:28:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R7SfN0074458; Mon, 27 Apr 2015 07:28:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270728.t3R7SfN0074458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 07:28:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282062 - head/tools/regression/gaithrstress X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 07:28:42 -0000 Author: ngie Date: Mon Apr 27 07:28:41 2015 New Revision: 282062 URL: https://svnweb.freebsd.org/changeset/base/282062 Log: Fix -Wformat warnings by using proper format string qualifiers for long and unsigned[ long] types MFC after: 1 week Modified: head/tools/regression/gaithrstress/gaithrstress.c Directory Properties: head/ (props changed) Modified: head/tools/regression/gaithrstress/gaithrstress.c ============================================================================== --- head/tools/regression/gaithrstress/gaithrstress.c Mon Apr 27 07:22:18 2015 (r282061) +++ head/tools/regression/gaithrstress/gaithrstress.c Mon Apr 27 07:28:41 2015 (r282062) @@ -230,7 +230,7 @@ usage: err(1, "reading word file %s", wordfile); if (nrandwords < 1) errx(1, "word file %s did not have >0 words", wordfile); - printf("Read %u random words from %s.\n", nrandwords, wordfile); + printf("Read %zu random words from %s.\n", nrandwords, wordfile); workers = calloc(nworkers, sizeof(*workers)); if (workers == NULL) err(1, "allocating workers"); @@ -242,8 +242,8 @@ usage: for (i = 0; i < nworkers; i++) { if (pthread_create(&workers[i].w_thread, NULL, work, &workers[i]) != 0) - err(1, "creating worker %u", i); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + err(1, "creating worker %zu", i); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -255,7 +255,7 @@ usage: fflush(stdout); for (i = 0; i < nworkers; i++) { pthread_join(workers[i].w_thread, NULL); - printf("%u%s", i, i == nworkers - 1 ? ".\n" : ", "); + printf("%zu%s", i, i == nworkers - 1 ? ".\n" : ", "); fflush(stdout); } @@ -264,7 +264,7 @@ usage: printf("%-10s%-20s%-20s%-29s\n", "------", "--------------", "----------", "---------------------------"); for (i = 0; i < nworkers; i++) { - printf("%-10u%-20ju%-20ju%u:%s%.2f\n", i, + printf("%-10zu%-20ju%-20ju%ld:%s%.2f\n", i, workers[i].w_lookup_success, workers[i].w_lookup_failure, workers[i].w_max_lookup_time.tv_sec / 60, workers[i].w_max_lookup_time.tv_sec % 60 < 10 ? "0" : "", From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 07:37:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E22706C0; Mon, 27 Apr 2015 07:37:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0E191C8F; Mon, 27 Apr 2015 07:37:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R7bnW8079322; Mon, 27 Apr 2015 07:37:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R7bnJG079320; Mon, 27 Apr 2015 07:37:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270737.t3R7bnJG079320@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 07:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282063 - in head: etc/mtree tests/sys tests/sys/kqueue tools/regression/kqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 07:37:50 -0000 Author: ngie Date: Mon Apr 27 07:37:48 2015 New Revision: 282063 URL: https://svnweb.freebsd.org/changeset/base/282063 Log: Integrate tools/regression/kqueue into the FreeBSD test suite as tests/sys/kqueue MFC after: 1 week Added: head/tests/sys/kqueue/ - copied from r281427, user/ngie/more-tests/tests/sys/kqueue/ Deleted: head/tools/regression/kqueue/ Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile Directory Properties: head/ (props changed) head/etc/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Apr 27 07:28:41 2015 (r282062) +++ head/etc/mtree/BSD.tests.dist Mon Apr 27 07:37:48 2015 (r282063) @@ -358,6 +358,8 @@ execve .. .. + kqueue + .. netinet .. opencrypto Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Mon Apr 27 07:28:41 2015 (r282062) +++ head/tests/sys/Makefile Mon Apr 27 07:37:48 2015 (r282063) @@ -5,6 +5,7 @@ TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= kern +TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= opencrypto From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 07:38:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37CFD81E; Mon, 27 Apr 2015 07:38:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 276421C9E; Mon, 27 Apr 2015 07:38:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R7clpJ079522; Mon, 27 Apr 2015 07:38:47 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R7clxV079521; Mon, 27 Apr 2015 07:38:47 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201504270738.t3R7clxV079521@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Mon, 27 Apr 2015 07:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282064 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 07:38:47 -0000 Author: scottl Date: Mon Apr 27 07:38:46 2015 New Revision: 282064 URL: https://svnweb.freebsd.org/changeset/base/282064 Log: Small change in header order to allow this to compile. Obtained from: Netflix, Inc. MFC after: 3 days Modified: head/sys/boot/common/md.c Modified: head/sys/boot/common/md.c ============================================================================== --- head/sys/boot/common/md.c Mon Apr 27 07:37:48 2015 (r282063) +++ head/sys/boot/common/md.c Mon Apr 27 07:38:46 2015 (r282064) @@ -27,11 +27,11 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include #include -#include #include "bootstrap.h" From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 07:40:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4590A9AD; Mon, 27 Apr 2015 07:40:42 +0000 (UTC) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [IPv6:2607:f8b0:400e:c03::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1558F1CBF; Mon, 27 Apr 2015 07:40:42 +0000 (UTC) Received: by pacwv17 with SMTP id wv17so98682939pac.0; Mon, 27 Apr 2015 00:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=BGvSQWq4484J3Ukanbelb7S4NLm+L+xdnkjnkxLwpW4=; b=fya563dWayy8cVyQW8LRw8gXcTfgHQYrp/Kgf4kWD5FYU+ZV0L+lofUuZ91g9oq8HT 70ganFNZLCvFaVY86Np5mSq1MhLP8gZWZRGzkn6Kss2iTcXt/5ZSv/TnOpxuyfrTrLef HaGYmcIlCNKF7f/oyqBZvCXCiSeEhHkdlU1rqF1VgbHuDOd7VtNggvrrzXXArpk9ZPzV LSMBe4OUg4Y8mur6kgrTEd/oPtAxFZWr62VRJtLs0NFOAyEB+GbSRU2fl1sM/BOM5RoM jXqegAvpqu9p3DJwYLAmH7j8LXFh0pjpsfKXd/ht1KEwI0nRf7SWHZ3qt22oyDdkxcDK J+1g== X-Received: by 10.66.191.226 with SMTP id hb2mr20013375pac.72.1430120441423; Mon, 27 Apr 2015 00:40:41 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:f039:b350:5840:757f? ([2601:8:ab80:7d6:f039:b350:5840:757f]) by mx.google.com with ESMTPSA id fm3sm18549027pab.29.2015.04.27.00.40.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Apr 2015 00:40:40 -0700 (PDT) Subject: Re: svn commit: r282064 - head/sys/boot/common Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_DBE215F4-A35D-43A6-9528-2D885BCF3347"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <201504270738.t3R7clxV079521@svn.freebsd.org> Date: Mon, 27 Apr 2015 00:40:39 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <00E0CFB6-FEEA-4260-9B8B-807353025D58@gmail.com> References: <201504270738.t3R7clxV079521@svn.freebsd.org> To: Scott Long X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 07:40:42 -0000 --Apple-Mail=_DBE215F4-A35D-43A6-9528-2D885BCF3347 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Apr 27, 2015, at 0:38, Scott Long wrote: > Author: scottl > Date: Mon Apr 27 07:38:46 2015 > New Revision: 282064 > URL: https://svnweb.freebsd.org/changeset/base/282064 > > Log: > Small change in header order to allow this to compile. > > Obtained from: Netflix, Inc. > MFC after: 3 days > > Modified: > head/sys/boot/common/md.c Hi Scott, How was this broken before? Thanks! -NGie --Apple-Mail=_DBE215F4-A35D-43A6-9528-2D885BCF3347 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVPef3AAoJEMZr5QU6S73eA00H/0zqvz9cNd8iPJintKtjIM2C nSXZikiKx/T6xRJPyLFaR66BACAttMX4lFj0V072rw2HfyGjPuRHSiTQ7kHpxdeT 2ciLc5MMlpK6/t/a3FoXxRWWOJ/36fCVUDSSNGGjC6Z4LxCy804wCjWpttVQUe/N UFwN/HWZguQjWAk7xJfUYlNmtbxx30+6oZr75XJetoAY4UyJ4byBCQJBZiNC+HHf MelU9eNjAmHQzDTxtPXsgQWNjC9s2WgPvVQtnF4hDphccMTwPAr+/FCbewC4M1eG F8QKGdUCnqY/NNghp/iiQ0hyPh+fG8hdm2jFuNY5SztUSMzUJZwgWRoXqiGK+YU= =my0t -----END PGP SIGNATURE----- --Apple-Mail=_DBE215F4-A35D-43A6-9528-2D885BCF3347-- From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 08:15:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53D64188; Mon, 27 Apr 2015 08:15:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40EA110A1; Mon, 27 Apr 2015 08:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R8FJiH099095; Mon, 27 Apr 2015 08:15:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R8FHZP099090; Mon, 27 Apr 2015 08:15:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270815.t3R8FHZP099090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 08:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282067 - in head: etc/mtree tests/sys tests/sys/fifo tests/sys/file tools/regression/fifo tools/regression/file/dup tools/regression/file/fcntlflags tools/regression/file/flock tools/r... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 08:15:19 -0000 Author: ngie Date: Mon Apr 27 08:15:17 2015 New Revision: 282067 URL: https://svnweb.freebsd.org/changeset/base/282067 Log: Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo and tools/regression/file into the FreeBSD test suite as tests/sys/file MFC after: 1 week Added: head/tests/sys/fifo/ - copied from r281450, user/ngie/more-tests/tests/sys/fifo/ head/tests/sys/fifo/Makefile - copied unchanged from r281485, user/ngie/more-tests/tests/sys/fifo/Makefile head/tests/sys/file/ - copied from r281432, user/ngie/more-tests/tests/sys/file/ head/tests/sys/file/Makefile - copied unchanged from r281485, user/ngie/more-tests/tests/sys/file/Makefile Deleted: head/tools/regression/fifo/ head/tools/regression/file/dup/ head/tools/regression/file/fcntlflags/ head/tools/regression/file/flock/ head/tools/regression/file/ftruncate/ head/tools/regression/file/newfileops_on_fork/ Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile head/tests/sys/file/closefrom_test.c Directory Properties: head/ (props changed) head/etc/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Apr 27 08:06:33 2015 (r282066) +++ head/etc/mtree/BSD.tests.dist Mon Apr 27 08:15:17 2015 (r282067) @@ -354,6 +354,10 @@ .. .. sys + fifo + .. + file + .. kern execve .. Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Mon Apr 27 08:06:33 2015 (r282066) +++ head/tests/sys/Makefile Mon Apr 27 08:15:17 2015 (r282067) @@ -4,6 +4,8 @@ TESTSDIR= ${TESTSBASE}/sys +TESTS_SUBDIRS+= fifo +TESTS_SUBDIRS+= file TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= netinet Copied: head/tests/sys/fifo/Makefile (from r281485, user/ngie/more-tests/tests/sys/fifo/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/fifo/Makefile Mon Apr 27 08:15:17 2015 (r282067, copy of r281485, user/ngie/more-tests/tests/sys/fifo/Makefile) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/fifo + +PLAIN_TESTS_C+= fifo_create +PLAIN_TESTS_C+= fifo_io +PLAIN_TESTS_C+= fifo_misc +PLAIN_TESTS_C+= fifo_open + +TEST_METADATA.fifo_create+= required_user="root" +TEST_METADATA.fifo_open+= required_user="root" + +.include Copied: head/tests/sys/file/Makefile (from r281485, user/ngie/more-tests/tests/sys/file/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/file/Makefile Mon Apr 27 08:15:17 2015 (r282067, copy of r281485, user/ngie/more-tests/tests/sys/file/Makefile) @@ -0,0 +1,25 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/file + +BINDIR= ${TESTSDIR} + +TAP_TESTS_C+= closefrom_test +TAP_TESTS_C+= dup_test +TAP_TESTS_C+= fcntlflags_test +TAP_TESTS_SH+= flock_test +PLAIN_TESTS_C+= ftruncate_test +PLAIN_TESTS_C+= newfileops_on_fork_test + +PROGS+= flock_helper + +DPADD.closefrom_test= ${LIBUTIL} +LDADD.closefrom_test= -lutil + +DPADD.flock_helper= ${LIBPTHREAD} +LDADD.flock_helper= -lpthread + +DPADD.newfileops_on_fork_test= ${LIBPTHREAD} +LDADD.newfileops_on_fork_test= -lpthread + +.include Modified: head/tests/sys/file/closefrom_test.c ============================================================================== --- user/ngie/more-tests/tests/sys/file/closefrom_test.c Sat Apr 11 10:14:59 2015 (r281432) +++ head/tests/sys/file/closefrom_test.c Mon Apr 27 08:15:17 2015 (r282067) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Advanced Computing Technologies LLC + * Copyright (c) 2009 Hudson River Trading LLC * Written by: John H. Baldwin * All rights reserved. * From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 08:16:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A3292E0; Mon, 27 Apr 2015 08:16:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4026510B7; Mon, 27 Apr 2015 08:16:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R8Ga4j099353; Mon, 27 Apr 2015 08:16:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R8GaZB099352; Mon, 27 Apr 2015 08:16:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270816.t3R8GaZB099352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 08:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282068 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 08:16:36 -0000 Author: ngie Date: Mon Apr 27 08:16:35 2015 New Revision: 282068 URL: https://svnweb.freebsd.org/changeset/base/282068 Log: Remove mergeinfo added from ^/user/ngie/more-tests Modified: Directory Properties: head/etc/ (props changed) From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 08:29:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 835496E5; Mon, 27 Apr 2015 08:29:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70C0E11EC; Mon, 27 Apr 2015 08:29:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R8Tf8u004928; Mon, 27 Apr 2015 08:29:41 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R8Te8x004922; Mon, 27 Apr 2015 08:29:40 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201504270829.t3R8Te8x004922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 27 Apr 2015 08:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282070 - in head/sys: netinet 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 08:29:41 -0000 Author: melifaro Date: Mon Apr 27 08:29:39 2015 New Revision: 282070 URL: https://svnweb.freebsd.org/changeset/base/282070 Log: Make rule table kernel-index rewriting support any kind of objects. Currently we have tables identified by their names in userland with internal kernel-assigned indices. This works the following way: When userland wishes to communicate with kernel to add or change rule(s), it makes indexed sorted array of table names (internally ipfw_obj_ntlv entries), and refer to indices in that array in rule manipulation. Prior to committing new rule to the ruleset kernel a) finds all referenced tables, bump their refcounts and change values inside the opcodes to be real kernel indices b) auto-creates all referenced but not existing tables and then do a) for them. Kernel does almost the same when exporting rules to userland: prepares array of used tables in all rules in range, and prepends it before the actual ruleset retaining actual in-kernel indexes for that. There is also special translation layer for legacy clients which is able to provide 'real' indices for table names (basically doing atoi()). While it is arguable that every subsystem really needs names instead of numbers, there are several things that should be noted: 1) every non-singleton subsystem needs to store its runtime state somewhere inside ipfw chain (and be able to get it fast) 2) we can't assume object numbers provided by humans will be dense. Existing nat implementation (O(n) access and LIST inside chain) is a good example. Hence the following: * Convert table-centric rewrite code to be more generic, callback-based * Move most of the code from ip_fw_table.c to ip_fw_sockopt.c * Provide abstract API to permit subsystems convert their objects between userland string identifier and in-kernel index. (See struct opcode_obj_rewrite) for more details * Create another per-chain index (in next commit) shared among all subsystems * Convert current NAT44 implementation to use new API, O(1) lookups, shared index and names instead of numbers (in next commit). Sponsored by: Yandex LLC Modified: head/sys/netinet/ip_fw.h head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/netpfil/ipfw/ip_fw_table.c head/sys/netpfil/ipfw/ip_fw_table.h Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Mon Apr 27 08:21:16 2015 (r282069) +++ head/sys/netinet/ip_fw.h Mon Apr 27 08:29:39 2015 (r282070) @@ -40,10 +40,12 @@ #define IPFW_MAX_SETS 32 /* Number of sets supported by ipfw*/ /* - * Default number of ipfw tables. + * Compat values for old clients */ +#ifndef _KERNEL #define IPFW_TABLES_MAX 65535 #define IPFW_TABLES_DEFAULT 128 +#endif /* * Most commands (queue, pipe, tag, untag, limit...) can have a 16-bit @@ -963,7 +965,6 @@ typedef struct _ipfw_ta_info { uint64_t spare1; } ipfw_ta_info; -#define IPFW_OBJTYPE_TABLE 1 typedef struct _ipfw_obj_header { ip_fw3_opheader opheader; /* IP_FW3 opcode */ uint32_t spare; Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Mon Apr 27 08:21:16 2015 (r282069) +++ head/sys/netpfil/ipfw/ip_fw2.c Mon Apr 27 08:29:39 2015 (r282070) @@ -2762,6 +2762,10 @@ vnet_ipfw_init(const void *unused) LIST_INIT(&chain->nat); #endif + /* Init shared services hash table */ + ipfw_init_srv(chain); + + ipfw_init_obj_rewriter(); ipfw_init_counters(); /* insert the default rule and create the initial map */ chain->n_rules = 1; @@ -2860,9 +2864,11 @@ vnet_ipfw_uninit(const void *unused) if (reap != NULL) ipfw_reap_rules(reap); vnet_ipfw_iface_destroy(chain); + ipfw_destroy_srv(chain); IPFW_LOCK_DESTROY(chain); ipfw_dyn_uninit(1); /* free the remaining parts */ ipfw_destroy_counters(); + ipfw_destroy_obj_rewriter(); return (0); } Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Mon Apr 27 08:21:16 2015 (r282069) +++ head/sys/netpfil/ipfw/ip_fw_private.h Mon Apr 27 08:29:39 2015 (r282070) @@ -264,10 +264,10 @@ struct ip_fw_chain { struct ip_fw **map; /* array of rule ptrs to ease lookup */ uint32_t id; /* ruleset id */ int n_rules; /* number of static rules */ - LIST_HEAD(nat_list, cfg_nat) nat; /* list of nat entries */ void *tablestate; /* runtime table info */ void *valuestate; /* runtime table value info */ int *idxmap; /* skipto array of rules */ + void **srvstate; /* runtime service mappings */ #if defined( __linux__ ) || defined( _WIN32 ) spinlock_t rwmtx; #else @@ -275,10 +275,12 @@ struct ip_fw_chain { #endif int static_len; /* total len of static rules (v0) */ uint32_t gencnt; /* NAT generation count */ + LIST_HEAD(nat_list, cfg_nat) nat; /* list of nat entries */ struct ip_fw *default_rule; struct tables_config *tblcfg; /* tables module data */ void *ifcfg; /* interface module data */ int *idxmap_back; /* standby skipto array of rules */ + struct namedobj_instance *srvmap; /* cfg name->number mappings */ #if defined( __linux__ ) || defined( _WIN32 ) spinlock_t uh_lock; #else @@ -306,16 +308,15 @@ struct table_value { uint64_t refcnt; /* Number of references */ }; -struct namedobj_instance; struct named_object { TAILQ_ENTRY(named_object) nn_next; /* namehash */ TAILQ_ENTRY(named_object) nv_next; /* valuehash */ char *name; /* object name */ - uint8_t type; /* object type */ - uint8_t compat; /* Object name is number */ + uint8_t subtype; /* object subtype within class */ + uint8_t etlv; /* Export TLV id */ + uint16_t spare[2]; uint16_t kidx; /* object kernel index */ - uint16_t uidx; /* userland idx for compat records */ uint32_t set; /* set object belongs to */ uint32_t refcnt; /* number of references */ }; @@ -450,7 +451,7 @@ struct obj_idx { struct rule_check_info { uint16_t flags; /* rule-specific check flags */ - uint16_t table_opcodes; /* count of opcodes referencing table */ + uint16_t object_opcodes; /* num of opcodes referencing objects */ uint16_t urule_numoff; /* offset of rulenum in bytes */ uint8_t version; /* rule version */ uint8_t spare; @@ -507,6 +508,84 @@ struct ip_fw_bcounter0 { (r)->cmd_len * 4 - 4, 8)) #define RULEKSIZE1(r) roundup2((sizeof(struct ip_fw) + (r)->cmd_len*4 - 4), 8) +/* + * Tables/Objects index rewriting code + */ + +/* Default and maximum number of ipfw tables/objects. */ +#define IPFW_TABLES_MAX 65536 +#define IPFW_TABLES_DEFAULT 128 +#define IPFW_OBJECTS_MAX 65536 +#define IPFW_OBJECTS_DEFAULT 128 + +#define CHAIN_TO_SRV(ch) ((ch)->srvmap) + +struct tid_info { + uint32_t set; /* table set */ + uint16_t uidx; /* table index */ + uint8_t type; /* table type */ + uint8_t atype; + uint8_t spare; + int tlen; /* Total TLV size block */ + void *tlvs; /* Pointer to first TLV */ +}; + +/* + * Classifier callback. Checks if @cmd opcode contains kernel object reference. + * If true, returns its index and type. + * Returns 0 if match is found, 1 overwise. + */ +typedef int (ipfw_obj_rw_cl)(ipfw_insn *cmd, uint16_t *puidx, uint8_t *ptype); +/* + * Updater callback. Sets kernel object reference index to @puidx + */ +typedef void (ipfw_obj_rw_upd)(ipfw_insn *cmd, uint16_t puidx); +/* + * Finder callback. Tries to find named object by name (specified via @ti). + * Stores found named object pointer in @pno. + * If object was not found, NULL is stored. + * + * Return 0 if input data was valid. + */ +typedef int (ipfw_obj_fname_cb)(struct ip_fw_chain *ch, + struct tid_info *ti, struct named_object **pno); +/* + * Another finder callback. Tries to findex named object by kernel index. + * + * Returns pointer to named object or NULL. + */ +typedef struct named_object *(ipfw_obj_fidx_cb)(struct ip_fw_chain *ch, + uint16_t kidx); +/* + * Object creator callback. Tries to create object specified by @ti. + * Stores newly-allocated object index in @pkidx. + * + * Returns 0 on success. + */ +typedef int (ipfw_obj_create_cb)(struct ip_fw_chain *ch, struct tid_info *ti, + uint16_t *pkidx); + + +struct opcode_obj_rewrite { + uint32_t opcode; /* Opcode to act upon */ + uint32_t etlv; /* Relevant export TLV id */ + ipfw_obj_rw_cl *classifier; /* Check if rewrite is needed */ + ipfw_obj_rw_upd *update; /* update cmd with new value */ + ipfw_obj_fname_cb *find_byname; /* Find named object by name */ + ipfw_obj_fidx_cb *find_bykidx; /* Find named object by kidx */ + ipfw_obj_create_cb *create_object; /* Create named object */ +}; + +#define IPFW_ADD_OBJ_REWRITER(f, c) do { \ + if ((f) != 0) \ + ipfw_add_obj_rewriter(c, \ + sizeof(c) / sizeof(c[0])); \ + } while(0) +#define IPFW_DEL_OBJ_REWRITER(l, c) do { \ + if ((l) != 0) \ + ipfw_del_obj_rewriter(c, \ + sizeof(c) / sizeof(c[0])); \ + } while(0) /* In ip_fw_iface.c */ int ipfw_iface_init(void); @@ -562,6 +641,7 @@ caddr_t ipfw_get_sopt_header(struct sock sizeof(c) / sizeof(c[0])); \ } while(0) +struct namedobj_instance; typedef void (objhash_cb_t)(struct namedobj_instance *ni, struct named_object *, void *arg); typedef uint32_t (objhash_hash_f)(struct namedobj_instance *ni, void *key, @@ -578,6 +658,8 @@ void ipfw_objhash_bitmap_free(void *idx, void ipfw_objhash_set_hashf(struct namedobj_instance *ni, objhash_hash_f *f); struct named_object *ipfw_objhash_lookup_name(struct namedobj_instance *ni, uint32_t set, char *name); +struct named_object *ipfw_objhash_lookup_name_type(struct namedobj_instance *ni, + uint32_t set, uint32_t type, char *name); struct named_object *ipfw_objhash_lookup_kidx(struct namedobj_instance *ni, uint16_t idx); int ipfw_objhash_same_name(struct namedobj_instance *ni, struct named_object *a, @@ -591,6 +673,25 @@ int ipfw_objhash_free_idx(struct namedob int ipfw_objhash_alloc_idx(void *n, uint16_t *pidx); void ipfw_objhash_set_funcs(struct namedobj_instance *ni, objhash_hash_f *hash_f, objhash_cmp_f *cmp_f); +void ipfw_init_obj_rewriter(void); +void ipfw_destroy_obj_rewriter(void); +void ipfw_add_obj_rewriter(struct opcode_obj_rewrite *rw, size_t count); +int ipfw_del_obj_rewriter(struct opcode_obj_rewrite *rw, size_t count); + +int ipfw_rewrite_rule_uidx(struct ip_fw_chain *chain, + struct rule_check_info *ci); +int ipfw_mark_object_kidx(struct ip_fw_chain *chain, struct ip_fw *rule, + uint32_t *bmask); +int ref_opcode_object(struct ip_fw_chain *ch, ipfw_insn *cmd, struct tid_info *ti, + struct obj_idx *pidx, int *found, int *unresolved); +void unref_oib_objects(struct ip_fw_chain *ch, ipfw_insn *cmd, + struct obj_idx *oib, struct obj_idx *end); +int create_objects_compat(struct ip_fw_chain *ch, ipfw_insn *cmd, + struct obj_idx *oib, struct obj_idx *pidx, struct tid_info *ti); +void update_opcode_kidx(ipfw_insn *cmd, uint16_t idx); +int classify_opcode_kidx(ipfw_insn *cmd, uint16_t *puidx); +void ipfw_init_srv(struct ip_fw_chain *ch); +void ipfw_destroy_srv(struct ip_fw_chain *ch); /* In ip_fw_table.c */ struct table_info; Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Apr 27 08:21:16 2015 (r282069) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Apr 27 08:29:39 2015 (r282070) @@ -148,6 +148,21 @@ static struct ipfw_sopt_handler scodes[] { IP_FW_DUMP_SOPTCODES, 0, HDIR_GET, dump_soptcodes }, }; +static int +set_legacy_obj_kidx(struct ip_fw_chain *ch, struct ip_fw_rule0 *rule); +struct opcode_obj_rewrite *ipfw_find_op_rw(uint16_t opcode); +static int mark_object_kidx(struct ip_fw_chain *ch, struct ip_fw *rule, + uint32_t *bmask); +static void unref_rule_objects(struct ip_fw_chain *chain, struct ip_fw *rule); +static int export_objhash_ntlv(struct namedobj_instance *ni, uint16_t kidx, + struct sockopt_data *sd); + +/* + * Opcode object rewriter variables + */ +struct opcode_obj_rewrite *ctl3_rewriters; +static size_t ctl3_rsize; + /* * static variables followed by global ones */ @@ -646,17 +661,18 @@ commit_rules(struct ip_fw_chain *chain, struct ip_fw *krule; struct ip_fw **map; /* the new array of pointers */ - /* Check if we need to do table remap */ + /* Check if we need to do table/obj index remap */ tcount = 0; for (ci = rci, i = 0; i < count; ci++, i++) { - if (ci->table_opcodes == 0) + if (ci->object_opcodes == 0) continue; /* - * Rule has some table opcodes. - * Reference & allocate needed tables/ + * Rule has some object opcodes. + * We need to find (and create non-existing) + * kernel objects, and reference existing ones. */ - error = ipfw_rewrite_table_uidx(chain, ci); + error = ipfw_rewrite_rule_uidx(chain, ci); if (error != 0) { /* @@ -674,9 +690,9 @@ commit_rules(struct ip_fw_chain *chain, IPFW_UH_WLOCK(chain); while (ci != rci) { ci--; - if (ci->table_opcodes == 0) + if (ci->object_opcodes == 0) continue; - ipfw_unref_rule_tables(chain,ci->krule); + unref_rule_objects(chain,ci->krule); } IPFW_UH_WUNLOCK(chain); @@ -696,10 +712,10 @@ commit_rules(struct ip_fw_chain *chain, /* Unbind tables */ IPFW_UH_WLOCK(chain); for (ci = rci, i = 0; i < count; ci++, i++) { - if (ci->table_opcodes == 0) + if (ci->object_opcodes == 0) continue; - ipfw_unref_rule_tables(chain, ci->krule); + unref_rule_objects(chain, ci->krule); } IPFW_UH_WUNLOCK(chain); } @@ -759,7 +775,7 @@ ipfw_reap_add(struct ip_fw_chain *chain, IPFW_UH_WLOCK_ASSERT(chain); /* Unlink rule from everywhere */ - ipfw_unref_rule_tables(chain, rule); + unref_rule_objects(chain, rule); *((struct ip_fw **)rule) = *head; *head = rule; @@ -1542,7 +1558,7 @@ check_ipfw_rule_body(ipfw_insn *cmd, int cmdlen != F_INSN_SIZE(ipfw_insn_u32) + 1 && cmdlen != F_INSN_SIZE(ipfw_insn_u32)) goto bad_size; - ci->table_opcodes++; + ci->object_opcodes++; break; case O_IP_FLOW_LOOKUP: if (cmd->arg1 >= V_fw_tables_max) { @@ -1553,7 +1569,7 @@ check_ipfw_rule_body(ipfw_insn *cmd, int if (cmdlen != F_INSN_SIZE(ipfw_insn) && cmdlen != F_INSN_SIZE(ipfw_insn_u32)) goto bad_size; - ci->table_opcodes++; + ci->object_opcodes++; break; case O_MACADDR2: if (cmdlen != F_INSN_SIZE(ipfw_insn_mac)) @@ -1587,7 +1603,7 @@ check_ipfw_rule_body(ipfw_insn *cmd, int case O_XMIT: case O_VIA: if (((ipfw_insn_if *)cmd)->name[0] == '\1') - ci->table_opcodes++; + ci->object_opcodes++; if (cmdlen != F_INSN_SIZE(ipfw_insn_if)) goto bad_size; break; @@ -1631,6 +1647,7 @@ check_ipfw_rule_body(ipfw_insn *cmd, int return EINVAL; if (cmdlen != F_INSN_SIZE(ipfw_insn_nat)) goto bad_size; + ci->object_opcodes++; goto check_action; case O_FORWARD_MAC: /* XXX not implemented yet */ case O_CHECK_STATE: @@ -1788,7 +1805,7 @@ ipfw_getrules(struct ip_fw_chain *chain, l = RULESIZE7(rule); if (bp + l + sizeof(uint32_t) <= ep) { bcopy(rule, bp, l + sizeof(uint32_t)); - error = ipfw_rewrite_table_kidx(chain, + error = set_legacy_obj_kidx(chain, (struct ip_fw_rule0 *)bp); if (error != 0) return (0); @@ -1817,7 +1834,7 @@ ipfw_getrules(struct ip_fw_chain *chain, } dst = (struct ip_fw_rule0 *)bp; export_rule0(rule, dst, l); - error = ipfw_rewrite_table_kidx(chain, dst); + error = set_legacy_obj_kidx(chain, dst); /* * XXX HACK. Store the disable mask in the "next" @@ -1861,6 +1878,34 @@ struct dump_args { }; /* + * Export named object info in instance @ni, identified by @kidx + * to ipfw_obj_ntlv. TLV is allocated from @sd space. + * + * Returns 0 on success. + */ +static int +export_objhash_ntlv(struct namedobj_instance *ni, uint16_t kidx, + struct sockopt_data *sd) +{ + struct named_object *no; + ipfw_obj_ntlv *ntlv; + + no = ipfw_objhash_lookup_kidx(ni, kidx); + KASSERT(no != NULL, ("invalid object kernel index passed")); + + ntlv = (ipfw_obj_ntlv *)ipfw_get_sopt_space(sd, sizeof(*ntlv)); + if (ntlv == NULL) + return (ENOMEM); + + ntlv->head.type = no->etlv; + ntlv->head.length = sizeof(*ntlv); + ntlv->idx = no->kidx; + strlcpy(ntlv->name, no->name, sizeof(ntlv->name)); + + return (0); +} + +/* * Dumps static rules with table TLVs in buffer @sd. * * Returns 0 on success. @@ -1874,6 +1919,7 @@ dump_static_rules(struct ip_fw_chain *ch uint32_t tcount; ipfw_obj_ctlv *ctlv; struct ip_fw *krule; + struct namedobj_instance *ni; caddr_t dst; /* Dump table names first (if any) */ @@ -1891,13 +1937,21 @@ dump_static_rules(struct ip_fw_chain *ch i = 0; tcount = da->tcount; + ni = ipfw_get_table_objhash(chain); while (tcount > 0) { if ((bmask[i / 32] & (1 << (i % 32))) == 0) { i++; continue; } - if ((error = ipfw_export_table_ntlv(chain, i, sd)) != 0) + /* Jump to shared named object bitmask */ + if (i >= IPFW_TABLES_MAX) { + ni = CHAIN_TO_SRV(chain); + i -= IPFW_TABLES_MAX; + bmask += IPFW_TABLES_MAX / 32; + } + + if ((error = export_objhash_ntlv(ni, i, sd)) != 0) return (error); i++; @@ -1929,6 +1983,52 @@ dump_static_rules(struct ip_fw_chain *ch } /* + * Marks every object index used in @rule with bit in @bmask. + * Used to generate bitmask of referenced tables/objects for given ruleset + * or its part. + * + * Returns number of newly-referenced objects. + */ +static int +mark_object_kidx(struct ip_fw_chain *ch, struct ip_fw *rule, + uint32_t *bmask) +{ + int cmdlen, l, count; + ipfw_insn *cmd; + uint16_t kidx; + struct opcode_obj_rewrite *rw; + int bidx; + uint8_t subtype; + + l = rule->cmd_len; + cmd = rule->cmd; + cmdlen = 0; + count = 0; + for ( ; l > 0 ; l -= cmdlen, cmd += cmdlen) { + cmdlen = F_LEN(cmd); + + rw = ipfw_find_op_rw(cmd->opcode); + if (rw == NULL) + continue; + + if (rw->classifier(cmd, &kidx, &subtype) != 0) + continue; + + bidx = kidx / 32; + /* Maintain separate bitmasks for table and non-table objects */ + if (rw->etlv != IPFW_TLV_TBL_NAME) + bidx += IPFW_TABLES_MAX / 32; + + if ((bmask[bidx] & (1 << (kidx % 32))) == 0) + count++; + + bmask[bidx] |= 1 << (kidx % 32); + } + + return (count); +} + +/* * Dumps requested objects data * Data layout (version 0)(current): * Request: [ ipfw_cfg_lheader ] + IPFW_CFG_GET_* flags @@ -1963,9 +2063,9 @@ dump_config(struct ip_fw_chain *chain, i error = 0; bmask = NULL; - /* Allocate needed state */ + /* Allocate needed state. Note we allocate 2xspace mask, for table&srv */ if (hdr->flags & IPFW_CFG_GET_STATIC) - bmask = malloc(IPFW_TABLES_MAX / 8, M_TEMP, M_WAITOK | M_ZERO); + bmask = malloc(IPFW_TABLES_MAX / 4, M_TEMP, M_WAITOK | M_ZERO); IPFW_UH_RLOCK(chain); @@ -1994,7 +2094,8 @@ dump_config(struct ip_fw_chain *chain, i rule = chain->map[i]; da.rsize += RULEUSIZE1(rule) + sizeof(ipfw_obj_tlv); da.rcount++; - da.tcount += ipfw_mark_table_kidx(chain, rule, bmask); + /* Update bitmask of used objects for given range */ + da.tcount += mark_object_kidx(chain, rule, bmask); } /* Add counters if requested */ if (hdr->flags & IPFW_CFG_GET_COUNTERS) { @@ -2064,6 +2165,241 @@ check_object_name(ipfw_obj_ntlv *ntlv) } /* + * Creates non-existent objects referenced by rule. + * + * Return 0 on success. + */ +int +create_objects_compat(struct ip_fw_chain *ch, ipfw_insn *cmd, + struct obj_idx *oib, struct obj_idx *pidx, struct tid_info *ti) +{ + struct opcode_obj_rewrite *rw; + struct obj_idx *p; + uint16_t kidx; + int error; + + /* + * Compatibility stuff: do actual creation for non-existing, + * but referenced objects. + */ + for (p = oib; p < pidx; p++) { + if (p->kidx != 0) + continue; + + ti->uidx = p->uidx; + ti->type = p->type; + ti->atype = 0; + + rw = ipfw_find_op_rw((cmd + p->off)->opcode); + KASSERT(rw != NULL, ("Unable to find handler for op %d", + (cmd + p->off)->opcode)); + + error = rw->create_object(ch, ti, &kidx); + if (error == 0) { + p->kidx = kidx; + continue; + } + + /* + * Error happened. We have to rollback everything. + * Drop all already acquired references. + */ + IPFW_UH_WLOCK(ch); + unref_oib_objects(ch, cmd, oib, pidx); + IPFW_UH_WUNLOCK(ch); + + return (error); + } + + return (error); +} + +/* + * Compatibility function for old ipfw(8) binaries. + * Rewrites table/nat kernel indices with userland ones. + * Convert tables matching '/^\d+$/' to their atoi() value. + * Use number 65535 for other tables. + * + * Returns 0 on success. + */ +static int +set_legacy_obj_kidx(struct ip_fw_chain *ch, struct ip_fw_rule0 *rule) +{ + int cmdlen, error, l; + ipfw_insn *cmd; + uint16_t kidx, uidx; + struct named_object *no; + struct opcode_obj_rewrite *rw; + uint8_t subtype; + char *end; + long val; + + error = 0; + + l = rule->cmd_len; + cmd = rule->cmd; + cmdlen = 0; + for ( ; l > 0 ; l -= cmdlen, cmd += cmdlen) { + cmdlen = F_LEN(cmd); + + rw = ipfw_find_op_rw(cmd->opcode); + if (rw == NULL) + continue; + + /* Check if is index in given opcode */ + if (rw->classifier(cmd, &kidx, &subtype) != 0) + continue; + + /* Try to find referenced kernel object */ + no = rw->find_bykidx(ch, kidx); + if (no == NULL) + continue; + + val = strtol(no->name, &end, 10); + if (*end == '\0' && val < 65535) { + uidx = val; + } else { + + /* + * We are called via legacy opcode. + * Save error and show table as fake number + * not to make ipfw(8) hang. + */ + uidx = 65535; + error = 2; + } + + rw->update(cmd, uidx); + } + + return (error); +} + + +/* + * Unreferences all already-referenced objects in given @cmd rule, + * using information in @oib. + * + * Used to rollback partially converted rule on error. + */ +void +unref_oib_objects(struct ip_fw_chain *ch, ipfw_insn *cmd, struct obj_idx *oib, + struct obj_idx *end) +{ + struct opcode_obj_rewrite *rw; + struct named_object *no; + struct obj_idx *p; + + IPFW_UH_WLOCK_ASSERT(ch); + + for (p = oib; p < end; p++) { + if (p->kidx == 0) + continue; + + rw = ipfw_find_op_rw((cmd + p->off)->opcode); + KASSERT(rw != NULL, ("Unable to find handler for op %d", + (cmd + p->off)->opcode)); + + /* Find & unref by existing idx */ + no = rw->find_bykidx(ch, p->kidx); + KASSERT(no != NULL, ("Ref'd object %d disappeared", p->kidx)); + no->refcnt--; + } +} + +/* + * Remove references from every object used in @rule. + * Used at rule removal code. + */ +static void +unref_rule_objects(struct ip_fw_chain *ch, struct ip_fw *rule) +{ + int cmdlen, l; + ipfw_insn *cmd; + struct named_object *no; + uint16_t kidx; + struct opcode_obj_rewrite *rw; + uint8_t subtype; + + IPFW_UH_WLOCK_ASSERT(ch); + + l = rule->cmd_len; + cmd = rule->cmd; + cmdlen = 0; + for ( ; l > 0 ; l -= cmdlen, cmd += cmdlen) { + cmdlen = F_LEN(cmd); + + rw = ipfw_find_op_rw(cmd->opcode); + if (rw == NULL) + continue; + if (rw->classifier(cmd, &kidx, &subtype) != 0) + continue; + + no = rw->find_bykidx(ch, kidx); + + KASSERT(no != NULL, ("table id %d not found", kidx)); + KASSERT(no->subtype == subtype, + ("wrong type %d (%d) for table id %d", + no->subtype, subtype, kidx)); + KASSERT(no->refcnt > 0, ("refcount for table %d is %d", + kidx, no->refcnt)); + + no->refcnt--; + } +} + + +/* + * Find and reference object (if any) stored in instruction @cmd. + * + * Saves object info in @pidx, sets + * - @found to 1 if object was found and references + * - @unresolved to 1 if object should exists but not found + * + * Returns non-zero value in case of error. + */ +int +ref_opcode_object(struct ip_fw_chain *ch, ipfw_insn *cmd, struct tid_info *ti, + struct obj_idx *pidx, int *found, int *unresolved) +{ + struct named_object *no; + struct opcode_obj_rewrite *rw; + int error; + + *found = 0; + *unresolved = 0; + + /* Check if this opcode is candidate for rewrite */ + rw = ipfw_find_op_rw(cmd->opcode); + if (rw == NULL) + return (0); + + /* Check if we need to rewrite this opcode */ + if (rw->classifier(cmd, &ti->uidx, &ti->type) != 0) + return (0); + + /* Need to rewrite. Save necessary fields */ + pidx->uidx = ti->uidx; + pidx->type = ti->type; + + /* Try to find referenced kernel object */ + error = rw->find_byname(ch, ti, &no); + if (error != 0) + return (error); + if (no == NULL) { + *unresolved = 1; + return (0); + } + + /* Found. bump refcount */ + *found = 1; + no->refcnt++; + pidx->kidx = no->kidx; + + return (0); +} + +/* * Adds one or more rules to ipfw @chain. * Data layout (version 0)(current): * Request: @@ -2315,6 +2651,160 @@ dump_soptcodes(struct ip_fw_chain *chain } /* + * Compares two opcodes. + * Used both in qsort() and bsearch(). + * + * Returns 0 if match is found. + */ +static int +compare_opcodes(const void *_a, const void *_b) +{ + const struct opcode_obj_rewrite *a, *b; + + a = (const struct opcode_obj_rewrite *)_a; + b = (const struct opcode_obj_rewrite *)_b; + + if (a->opcode < b->opcode) + return (-1); + else if (a->opcode > b->opcode) + return (1); + + return (0); +} + +/* + * Finds opcode object rewriter based on @code. + * + * Returns pointer to handler or NULL. + */ +struct opcode_obj_rewrite * +ipfw_find_op_rw(uint16_t opcode) +{ + struct opcode_obj_rewrite *rw, h; + + memset(&h, 0, sizeof(h)); + h.opcode = opcode; + + rw = (struct opcode_obj_rewrite *)bsearch(&h, ctl3_rewriters, + ctl3_rsize, sizeof(h), compare_opcodes); + + return (rw); +} + +int +classify_opcode_kidx(ipfw_insn *cmd, uint16_t *puidx) +{ + struct opcode_obj_rewrite *rw; + uint8_t subtype; + + rw = ipfw_find_op_rw(cmd->opcode); + if (rw == NULL) + return (1); + + return (rw->classifier(cmd, puidx, &subtype)); +} + +void +update_opcode_kidx(ipfw_insn *cmd, uint16_t idx) +{ + struct opcode_obj_rewrite *rw; + + rw = ipfw_find_op_rw(cmd->opcode); + KASSERT(rw != NULL, ("No handler to update opcode %d", cmd->opcode)); + rw->update(cmd, idx); +} + +void +ipfw_init_obj_rewriter() +{ + + ctl3_rewriters = NULL; + ctl3_rsize = 0; +} + +void +ipfw_destroy_obj_rewriter() +{ + + if (ctl3_rewriters != NULL) + free(ctl3_rewriters, M_IPFW); + ctl3_rewriters = NULL; + ctl3_rsize = 0; +} + +/* + * Adds one or more opcode object rewrite handlers to the global array. + * Function may sleep. + */ +void +ipfw_add_obj_rewriter(struct opcode_obj_rewrite *rw, size_t count) +{ + size_t sz; + struct opcode_obj_rewrite *tmp; + + CTL3_LOCK(); + + for (;;) { + sz = ctl3_rsize + count; + CTL3_UNLOCK(); + tmp = malloc(sizeof(*rw) * sz, M_IPFW, M_WAITOK | M_ZERO); + CTL3_LOCK(); + if (ctl3_rsize + count <= sz) + break; + + /* Retry */ + free(tmp, M_IPFW); + } + + /* Merge old & new arrays */ + sz = ctl3_rsize + count; + memcpy(tmp, ctl3_rewriters, ctl3_rsize * sizeof(*rw)); + memcpy(&tmp[ctl3_rsize], rw, count * sizeof(*rw)); + qsort(tmp, sz, sizeof(*rw), compare_opcodes); + /* Switch new and free old */ + if (ctl3_rewriters != NULL) + free(ctl3_rewriters, M_IPFW); + ctl3_rewriters = tmp; + ctl3_rsize = sz; + + CTL3_UNLOCK(); +} + +/* + * Removes one or more object rewrite handlers from the global array. + */ +int +ipfw_del_obj_rewriter(struct opcode_obj_rewrite *rw, size_t count) +{ + size_t sz; + struct opcode_obj_rewrite *tmp, *h; + int i; + + CTL3_LOCK(); + + for (i = 0; i < count; i++) { + tmp = &rw[i]; + h = ipfw_find_op_rw(tmp->opcode); + if (h == NULL) + continue; + + sz = (ctl3_rewriters + ctl3_rsize - (h + 1)) * sizeof(*h); + memmove(h, h + 1, sz); + ctl3_rsize--; + } + + if (ctl3_rsize == 0) { + if (ctl3_rewriters != NULL) + free(ctl3_rewriters, M_IPFW); + ctl3_rewriters = NULL; + } + + CTL3_UNLOCK(); + + return (0); +} + +/* * Compares two sopt handlers (code, version and handler ptr). * Used both as qsort() and bsearch(). * Does not compare handler for latter case. @@ -3150,6 +3640,23 @@ convert_rule_to_8(struct ip_fw_rule0 *ru * */ +void +ipfw_init_srv(struct ip_fw_chain *ch) +{ + + ch->srvmap = ipfw_objhash_create(IPFW_OBJECTS_DEFAULT); + ch->srvstate = malloc(sizeof(void *) * IPFW_OBJECTS_DEFAULT, + M_IPFW, M_WAITOK | M_ZERO); +} + +void +ipfw_destroy_srv(struct ip_fw_chain *ch) +{ + + free(ch->srvstate, M_IPFW); + ipfw_objhash_destroy(ch->srvmap); +} + /* * Allocate new bitmask which can be used to enlarge/shrink * named instance index. @@ -3323,6 +3830,26 @@ ipfw_objhash_lookup_name(struct namedobj return (NULL); } +/* + * Find named object by name, considering also its TLV type. + */ +struct named_object * +ipfw_objhash_lookup_name_type(struct namedobj_instance *ni, uint32_t set, + uint32_t type, char *name) +{ + struct named_object *no; + uint32_t hash; + + hash = ni->hash_f(ni, name, set) % ni->nn_size; + + TAILQ_FOREACH(no, &ni->names[hash], nn_next) { + if (ni->cmp_f(no, name, set) == 0 && no->etlv == type) + return (no); + } + + return (NULL); +} + struct named_object * ipfw_objhash_lookup_kidx(struct namedobj_instance *ni, uint16_t kidx) { Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Mon Apr 27 08:21:16 2015 (r282069) +++ head/sys/netpfil/ipfw/ip_fw_table.c Mon Apr 27 08:29:39 2015 (r282070) @@ -89,6 +89,8 @@ struct table_config { struct namedobj_instance *vi; }; +static int find_table_err(struct namedobj_instance *ni, struct tid_info *ti, + struct table_config **tc); static struct table_config *find_table(struct namedobj_instance *ni, struct tid_info *ti); static struct table_config *alloc_table_config(struct ip_fw_chain *ch, @@ -122,7 +124,6 @@ static struct table_algo *find_table_alg static void objheader_to_ti(struct _ipfw_obj_header *oh, struct tid_info *ti); static void ntlv_to_ti(struct _ipfw_obj_ntlv *ntlv, struct tid_info *ti); -static int classify_table_opcode(ipfw_insn *cmd, uint16_t *puidx, uint8_t *ptype); #define CHAIN_TO_NI(chain) (CHAIN_TO_TCFG(chain)->namehash) #define KIDX_TO_TI(ch, k) (&(((struct table_info *)(ch)->tablestate)[k])) @@ -297,7 +298,7 @@ find_ref_table(struct ip_fw_chain *ch, s tc = NULL; if ((tc = find_table(ni, ti)) != NULL) { /* check table type */ - if (tc->no.type != ti->type) + if (tc->no.subtype != ti->type) return (EINVAL); if (tc->locked != 0) @@ -1116,7 +1117,7 @@ find_table_entry(struct ip_fw_chain *ch, } /* check table type */ - if (tc->no.type != ti.type) { + if (tc->no.subtype != ti.type) { IPFW_UH_RUNLOCK(ch); return (EINVAL); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 08:31:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AB93849; Mon, 27 Apr 2015 08:31:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E414D12A1; Mon, 27 Apr 2015 08:31:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R8Vin1008887; Mon, 27 Apr 2015 08:31:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R8VioP008883; Mon, 27 Apr 2015 08:31:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270831.t3R8VioP008883@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 08:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282071 - in head: etc/mtree tests/sys tests/sys/mqueue tools/regression/mqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 08:31:45 -0000 Author: ngie Date: Mon Apr 27 08:31:43 2015 New Revision: 282071 URL: https://svnweb.freebsd.org/changeset/base/282071 Log: Integrate tools/regression/mqueue into the FreeBSD test suite as tests/sys/mqueue MFC after: 1 week Added: head/tests/sys/mqueue/ - copied from r281428, user/ngie/more-tests/tests/sys/mqueue/ head/tests/sys/mqueue/mqueue_test.sh - copied unchanged from r281490, user/ngie/more-tests/tests/sys/mqueue/mqueue_test.sh Deleted: head/tools/regression/mqueue/ Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile Directory Properties: head/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Apr 27 08:29:39 2015 (r282070) +++ head/etc/mtree/BSD.tests.dist Mon Apr 27 08:31:43 2015 (r282071) @@ -364,6 +364,8 @@ .. kqueue .. + mqueue + .. netinet .. opencrypto Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Mon Apr 27 08:29:39 2015 (r282070) +++ head/tests/sys/Makefile Mon Apr 27 08:31:43 2015 (r282071) @@ -8,6 +8,7 @@ TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file TESTS_SUBDIRS+= kern TESTS_SUBDIRS+= kqueue +TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= opencrypto Copied: head/tests/sys/mqueue/mqueue_test.sh (from r281490, user/ngie/more-tests/tests/sys/mqueue/mqueue_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/mqueue/mqueue_test.sh Mon Apr 27 08:31:43 2015 (r282071, copy of r281490, user/ngie/more-tests/tests/sys/mqueue/mqueue_test.sh) @@ -0,0 +1,54 @@ + +mqtest1_head() +{ + : +} +mqtest1_body() +{ + atf_check -s exit:0 -x $(atf_get_srcdir)/mqtest1 +} + +mqtest2_head() +{ + : +} +mqtest2_body() +{ + atf_check -s exit:0 -x $(atf_get_srcdir)/mqtest2 +} + +mqtest3_head() +{ + : +} +mqtest3_body() +{ + atf_check -s exit:0 -x $(atf_get_srcdir)/mqtest3 +} + +mqtest4_head() +{ + : +} +mqtest4_body() +{ + atf_check -s exit:0 -x $(atf_get_srcdir)/mqtest4 +} + +mqtest5_head() +{ + : +} +mqtest5_body() +{ + atf_check -s exit:0 -x $(atf_get_srcdir)/mqtest5 +} + +atf_init_test_cases() +{ + atf_add_test_case mqtest1 + atf_add_test_case mqtest2 + atf_add_test_case mqtest3 + atf_add_test_case mqtest4 + atf_add_test_case mqtest5 +} From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 08:34:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 529CF9B2; Mon, 27 Apr 2015 08:34:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4152D12B4; Mon, 27 Apr 2015 08:34:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R8YmdP009365; Mon, 27 Apr 2015 08:34:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R8Yle7009360; Mon, 27 Apr 2015 08:34:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270834.t3R8Yle7009360@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 08:34:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282072 - head/tools/regression/p1003_1b X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 08:34:48 -0000 Author: ngie Date: Mon Apr 27 08:34:46 2015 New Revision: 282072 URL: https://svnweb.freebsd.org/changeset/base/282072 Log: - Fix compilation (MAP_INHERIT's dead) - Fix warnings - Use mkstemp instead of tmpnam MFC after: 1 week Modified: head/tools/regression/p1003_1b/Makefile head/tools/regression/p1003_1b/fifo.c head/tools/regression/p1003_1b/sched.c head/tools/regression/p1003_1b/yield.c Directory Properties: head/ (props changed) Modified: head/tools/regression/p1003_1b/Makefile ============================================================================== --- head/tools/regression/p1003_1b/Makefile Mon Apr 27 08:31:43 2015 (r282071) +++ head/tools/regression/p1003_1b/Makefile Mon Apr 27 08:34:46 2015 (r282072) @@ -14,4 +14,5 @@ SRCS=\ MAN= CFLAGS+=-DNO_MEMLOCK + .include Modified: head/tools/regression/p1003_1b/fifo.c ============================================================================== --- head/tools/regression/p1003_1b/fifo.c Mon Apr 27 08:31:43 2015 (r282071) +++ head/tools/regression/p1003_1b/fifo.c Mon Apr 27 08:34:46 2015 (r282072) @@ -31,17 +31,17 @@ * * $FreeBSD$ */ -#include -#include -#include -#include -#include -#include #include #include #include +#include +#include +#include #include #include +#include +#include +#include volatile int ticked; #define CAN_USE_ALARMS @@ -109,7 +109,7 @@ int fifo(int argc, char *argv[]) fifo_param.sched_priority = 1; p = (long *)mmap(0, sizeof(*p), - PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED|MAP_INHERIT, -1, 0); + PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0); if (p == (long *)-1) err(errno, "mmap"); Modified: head/tools/regression/p1003_1b/sched.c ============================================================================== --- head/tools/regression/p1003_1b/sched.c Mon Apr 27 08:31:43 2015 (r282071) +++ head/tools/regression/p1003_1b/sched.c Mon Apr 27 08:34:46 2015 (r282072) @@ -41,16 +41,17 @@ #define _POSIX_SOURCE #define _POSIX_C_SOURCE 199309L -#include -#include - -#include -#include +#include #include #include -#include - +#include #include +#include +#define __XSI_VISIBLE 1 +#include +#undef __XSI_VISIBLE +#include +#include #include "prutil.h" @@ -209,17 +210,14 @@ int sched(int ac, char *av[]) { -#define NAM "P1003_1b_schedXXXX" - char nam[L_tmpnam]; + char nam[] = "P1003_1b_schedXXXXXX"; int fd; pid_t p; pid_t *lastrun; - strcpy(nam, NAM); - if (tmpnam(nam) != nam) - q(__LINE__, errno, "tmpnam " NAM); - q(__LINE__, (fd = open(nam, O_RDWR|O_CREAT, 0666)), - "open " NAM); + fd = mkstemp(nam); + if (fd == -1) + q(__LINE__, errno, "mkstemp failed"); (void)unlink(nam); Modified: head/tools/regression/p1003_1b/yield.c ============================================================================== --- head/tools/regression/p1003_1b/yield.c Mon Apr 27 08:31:43 2015 (r282071) +++ head/tools/regression/p1003_1b/yield.c Mon Apr 27 08:34:46 2015 (r282072) @@ -89,7 +89,7 @@ int yield(int argc, char *argv[]) n = nslaves = atoi(argv[1]); p = (int *)mmap(0, sizeof(int), - PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED|MAP_INHERIT, -1, 0); + PROT_READ|PROT_WRITE, MAP_ANON|MAP_SHARED, -1, 0); if (p == (int *)-1) err(errno, "mmap"); From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 08:37:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF6B1B17; Mon, 27 Apr 2015 08:37:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DB1512CB; Mon, 27 Apr 2015 08:37:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R8bEsD009927; Mon, 27 Apr 2015 08:37:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R8bEqt009925; Mon, 27 Apr 2015 08:37:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270837.t3R8bEqt009925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 08:37:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282073 - head/tools/regression/aio/aiop X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 08:37:14 -0000 Author: ngie Date: Mon Apr 27 08:37:13 2015 New Revision: 282073 URL: https://svnweb.freebsd.org/changeset/base/282073 Log: - Fix style(9) a bit -- Fix whitespace -- Use err/errx -- Remove superfluous braces - Be a bit more defensive with input from the end-user - Don't throw a floating point exception by dividing by 0 when processing a zero-byte file MFC after: 1 week Modified: head/tools/regression/aio/aiop/Makefile head/tools/regression/aio/aiop/aiop.c Directory Properties: head/ (props changed) Modified: head/tools/regression/aio/aiop/Makefile ============================================================================== --- head/tools/regression/aio/aiop/Makefile Mon Apr 27 08:34:46 2015 (r282072) +++ head/tools/regression/aio/aiop/Makefile Mon Apr 27 08:37:13 2015 (r282073) @@ -3,4 +3,6 @@ PROG= aiop MAN= +WARNS= 6 + .include Modified: head/tools/regression/aio/aiop/aiop.c ============================================================================== --- head/tools/regression/aio/aiop/aiop.c Mon Apr 27 08:34:46 2015 (r282072) +++ head/tools/regression/aio/aiop/aiop.c Mon Apr 27 08:37:13 2015 (r282073) @@ -39,21 +39,22 @@ #include __FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include #include -#include -#include -#include #include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include #include -#include -#include +#include +#include /* * This is a bit of a quick hack to do parallel IO testing through POSIX AIO. @@ -84,14 +85,12 @@ disk_getsize(int fd) { off_t mediasize; - if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0) { - perror("ioctl(DIOCGMEDIASIZE)"); - exit(1); - } - return mediasize; + if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0) + err(1, "ioctl(DIOCGMEDIASIZE)"); + return (mediasize); } -iot_t +static iot_t choose_aio(iot_t iomask) { /* choose a random read or write event, limited by the mask */ @@ -102,7 +101,7 @@ choose_aio(iot_t iomask) return (random() & 0x01 ? IOT_READ : IOT_WRITE); } -void +static void set_aio(struct aiocb *a, iot_t iot, int fd, off_t offset, int size, char *buf) { int r; @@ -115,10 +114,8 @@ set_aio(struct aiocb *a, iot_t iot, int r = aio_read(a); else r = aio_write(a); - if (r != 0) { - perror("set_aio"); - exit(1); - } + if (r != 0) + err(1, "set_aio call failed"); } int @@ -134,30 +131,35 @@ main(int argc, char *argv[]) off_t file_size, offset; struct aiocb *a; int i, n; - struct timeval st, et, rt; - float f_rt; + struct timeval st, et, rt; + float f_rt; iot_t iowhat; if (argc < 6) { - printf("Usage: %s \n", argv[0]); + printf("Usage: %s \n", + argv[0]); exit(1); } fn = argv[1]; io_size = atoi(argv[2]); + if (io_size <= 0) + errx(1, "the I/O size must be >0"); nrun = atoi(argv[3]); + if (nrun <= 0) + errx(1, "the number of runs must be >0"); aio_len = atoi(argv[4]); - if (strcmp(argv[5], "ro") == 0) { + if (aio_len <= 0) + errx(1, "AIO concurrency must be >0"); + if (strcmp(argv[5], "ro") == 0) iowhat = IOT_READ; - } else if (strcmp(argv[5], "rw") == 0) { + else if (strcmp(argv[5], "rw") == 0) iowhat = IOT_READ | IOT_WRITE; - } else if (strcmp(argv[5], "wo") == 0) { + else if (strcmp(argv[5], "wo") == 0) iowhat = IOT_WRITE; - } else { - fprintf(stderr, "needs to be ro, rw, wo!\n"); - exit(1); - } + else + errx(1, "the I/O type needs to be \"ro\", \"rw\", or \"wo\"!\n"); /* * Random returns values between 0 and (2^32)-1; only good for 4 gig. @@ -171,35 +173,31 @@ main(int argc, char *argv[]) else fd = open(fn, O_RDWR | O_DIRECT); - if (fd < 0) { - perror("open"); - exit(1); - } - if (fstat(fd, &sb) < 0) { - perror("fstat"); - exit(1); - } + if (fd < 0) + err(1, "open failed"); + if (fstat(fd, &sb) < 0) + err(1, "fstat failed"); if (S_ISREG(sb.st_mode)) { file_size = sb.st_size; } else if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) { file_size = disk_getsize(fd); - } else { - perror("unknown file type\n"); - exit(1); - } + } else + errx(1, "unknown file type"); + if (file_size <= 0) + errx(1, "path provided too small"); + printf("File: %s; File size %jd bytes\n", fn, (intmax_t)file_size); aio = calloc(aio_len, sizeof(struct aiocb)); abuf = calloc(aio_len, sizeof(char *)); - for (i = 0; i < aio_len; i++) { + for (i = 0; i < aio_len; i++) abuf[i] = calloc(1, io_size * sizeof(char)); - } /* Fill with the initial contents */ - gettimeofday(&st, NULL); + gettimeofday(&st, NULL); for (i = 0; i < aio_len; i++) { - offset = random() % (file_size / io_size); - offset *= io_size; + offset = random() % (file_size / io_size); + offset *= io_size; set_aio(aio + i, choose_aio(iowhat), fd, offset, io_size, abuf[i]); } @@ -208,18 +206,18 @@ main(int argc, char *argv[]) n = a - aio; assert(n < aio_len); assert(n >= 0); - offset = random() % (file_size / io_size); - offset *= io_size; + offset = random() % (file_size / io_size); + offset *= io_size; set_aio(aio + n, choose_aio(iowhat), fd, offset, io_size, abuf[n]); } - gettimeofday(&et, NULL); - timersub(&et, &st, &rt); - f_rt = ((float) (rt.tv_usec)) / 1000000.0; - f_rt += (float) (rt.tv_sec); - printf("Runtime: %.2f seconds, ", f_rt); - printf("Op rate: %.2f ops/sec, ", ((float) (nrun)) / f_rt); - printf("Avg transfer rate: %.2f bytes/sec\n", ((float) (nrun)) * ((float)io_size) / f_rt); + gettimeofday(&et, NULL); + timersub(&et, &st, &rt); + f_rt = ((float) (rt.tv_usec)) / 1000000.0; + f_rt += (float) (rt.tv_sec); + printf("Runtime: %.2f seconds, ", f_rt); + printf("Op rate: %.2f ops/sec, ", ((float) (nrun)) / f_rt); + printf("Avg transfer rate: %.2f bytes/sec\n", ((float) (nrun)) * ((float)io_size) / f_rt); From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 08:51:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB912DCC; Mon, 27 Apr 2015 08:51:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D841A1506; Mon, 27 Apr 2015 08:51:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R8pgbp018560; Mon, 27 Apr 2015 08:51:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R8pfcQ018553; Mon, 27 Apr 2015 08:51:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270851.t3R8pfcQ018553@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 08:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282074 - in head: etc/mtree tests/sys tests/sys/aio tools/regression/aio/aiotest tools/regression/aio/kqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 08:51:43 -0000 Author: ngie Date: Mon Apr 27 08:51:40 2015 New Revision: 282074 URL: https://svnweb.freebsd.org/changeset/base/282074 Log: Integrate tools/regression/aio/aiotest and tools/regression/aio/kqueue into the FreeBSD test suite as tests/sys/aio MFC after: 1 week Added: head/tests/sys/aio/ - copied from r281593, user/ngie/more-tests/tests/sys/aio/ head/tests/sys/aio/aio_kqueue_test.c - copied unchanged from r281596, user/ngie/more-tests/tests/sys/aio/aio_kqueue.c head/tests/sys/aio/lio_kqueue_test.c - copied unchanged from r281596, user/ngie/more-tests/tests/sys/aio/lio_kqueue.c Deleted: head/tools/regression/aio/aiotest/ head/tools/regression/aio/kqueue/ Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile head/tests/sys/aio/Makefile Directory Properties: head/ (props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Apr 27 08:37:13 2015 (r282073) +++ head/etc/mtree/BSD.tests.dist Mon Apr 27 08:51:40 2015 (r282074) @@ -354,6 +354,8 @@ .. .. sys + aio + .. fifo .. file Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Mon Apr 27 08:37:13 2015 (r282073) +++ head/tests/sys/Makefile Mon Apr 27 08:51:40 2015 (r282074) @@ -4,6 +4,7 @@ TESTSDIR= ${TESTSBASE}/sys +TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= fifo TESTS_SUBDIRS+= file TESTS_SUBDIRS+= kern Modified: head/tests/sys/aio/Makefile ============================================================================== --- user/ngie/more-tests/tests/sys/aio/Makefile Thu Apr 16 07:49:39 2015 (r281593) +++ head/tests/sys/aio/Makefile Mon Apr 27 08:51:40 2015 (r282074) @@ -2,6 +2,8 @@ TESTSDIR= ${TESTSBASE}/sys/aio +PLAIN_TESTS_C+= aio_kqueue_test +PLAIN_TESTS_C+= lio_kqueue_test ATF_TESTS_C+= aio_test DPADD.aio_test+= ${LIBUTIL} Copied: head/tests/sys/aio/aio_kqueue_test.c (from r281596, user/ngie/more-tests/tests/sys/aio/aio_kqueue.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/aio/aio_kqueue_test.c Mon Apr 27 08:51:40 2015 (r282074, copy of r281596, user/ngie/more-tests/tests/sys/aio/aio_kqueue.c) @@ -0,0 +1,207 @@ +/*- + * Copyright (C) 2005 IronPort Systems, 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$ + */ + +/* + * Prerequisities: + * - AIO support must be compiled into the kernel (see sys//NOTES for + * more details). + * + * Note: it is a good idea to run this against a physical drive to + * exercise the physio fast path (ie. aio_kqueue /dev/) + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" + +#define MAX 128 +#define MAX_RUNS 300 +/* #define DEBUG */ + +int +main (int argc, char *argv[]) +{ + int fd; + struct aiocb *iocb[MAX], *kq_iocb; + int i, result, run, error, j; + char buffer[32768]; + int kq = kqueue(); + struct kevent ke, kq_returned; + struct timespec ts; + int cancel, pending, tmp_file = 0, failed = 0; + char *file, pathname[sizeof(PATH_TEMPLATE)+1]; + + if (kq < 0) { + perror("No kqeueue\n"); + exit(1); + } + + if (argc == 1) { + strcpy(pathname, PATH_TEMPLATE); + fd = mkstemp(pathname); + file = pathname; + tmp_file = 1; + } else { + file = argv[1]; + fd = open(file, O_RDWR|O_CREAT, 0666); + } + if (fd == -1) + err(1, "Can't open %s\n", file); + + for (run = 0; run < MAX_RUNS; run++){ +#ifdef DEBUG + printf("Run %d\n", run); +#endif + for (i = 0; i < MAX; i++) { + iocb[i] = (struct aiocb *)calloc(1, + sizeof(struct aiocb)); + if (iocb[i] == NULL) + err(1, "calloc"); + } + + pending = 0; + for (i = 0; i < MAX; i++) { + pending++; + iocb[i]->aio_nbytes = sizeof(buffer); + iocb[i]->aio_buf = buffer; + iocb[i]->aio_fildes = fd; + iocb[i]->aio_offset = iocb[i]->aio_nbytes * i * run; + + iocb[i]->aio_sigevent.sigev_notify_kqueue = kq; + iocb[i]->aio_sigevent.sigev_value.sival_ptr = iocb[i]; + iocb[i]->aio_sigevent.sigev_notify = SIGEV_KEVENT; + + result = aio_write(iocb[i]); + if (result != 0) { + perror("aio_write"); + printf("Result %d iteration %d\n", result, i); + exit(1); + } +#ifdef DEBUG + printf("WRITE %d is at %p\n", i, iocb[i]); +#endif + result = rand(); + if (result < RAND_MAX/32) { + if (result > RAND_MAX/64) { + result = aio_cancel(fd, iocb[i]); +#ifdef DEBUG + printf("Cancel %d %p result %d\n", i, iocb[i], result); +#endif + if (result == AIO_CANCELED) { + aio_return(iocb[i]); + iocb[i] = NULL; + pending--; + } + } + } + } + cancel = MAX - pending; + + i = 0; + while (pending) { + + for (;;) { + + bzero(&ke, sizeof(ke)); + bzero(&kq_returned, sizeof(ke)); + ts.tv_sec = 0; + ts.tv_nsec = 1; + result = kevent(kq, NULL, 0, + &kq_returned, 1, &ts); + error = errno; + if (result < 0) + perror("kevent error: "); + kq_iocb = kq_returned.udata; +#ifdef DEBUG + printf("kevent %d %d errno %d return.ident %p " + "return.data %p return.udata %p %p\n", + i, result, error, + kq_returned.ident, kq_returned.data, + kq_returned.udata, + kq_iocb); +#endif + + if (kq_iocb) + break; +#ifdef DEBUG + printf("Try again left %d out of %d %d\n", + pending, MAX, cancel); +#endif + } + + for (j = 0; j < MAX && iocb[j] != kq_iocb; + j++) ; +#ifdef DEBUG + printf("kq_iocb %p\n", kq_iocb); + + printf("Error Result for %d is %d pending %d\n", + j, result, pending); +#endif + result = aio_return(kq_iocb); +#ifdef DEBUG + printf("Return Result for %d is %d\n\n", j, result); +#endif + if (result != sizeof(buffer)) { + printf("FAIL: run %d, operation %d, result %d " + " (errno=%d) should be %zu\n", run, pending, + result, errno, sizeof(buffer)); + failed++; + } else + printf("PASS: run %d, left %d\n", run, + pending - 1); + + free(kq_iocb); + iocb[j] = NULL; + pending--; + i++; + } + + for (i = 0; i < MAX; i++) + free(iocb[i]); + + } + + if (tmp_file) + unlink(pathname); + + if (failed != 0) + printf("FAIL: %d tests failed\n", failed); + else + printf("PASS: All tests passed\n"); + + exit (failed == 0 ? 0 : 1); +} Copied: head/tests/sys/aio/lio_kqueue_test.c (from r281596, user/ngie/more-tests/tests/sys/aio/lio_kqueue.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/aio/lio_kqueue_test.c Mon Apr 27 08:51:40 2015 (r282074, copy of r281596, user/ngie/more-tests/tests/sys/aio/lio_kqueue.c) @@ -0,0 +1,245 @@ +/*- + * Copyright (C) 2005 IronPort Systems, 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$ + */ + +/* + * Note: it is a good idea to run this against a physical drive to + * exercise the physio fast path (ie. lio_kqueue /dev/) + * This will ensure op's counting is correct. It is currently broken. + * + * Also note that LIO & kqueue is not implemented in FreeBSD yet, LIO + * is also broken with respect to op's and some paths. + * + * A patch to make this work is at: + * http://www.ambrisko.com/doug/listio_kqueue/listio_kqueue.patch + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" + +#define LIO_MAX 5 +#define MAX LIO_MAX * 16 +#define MAX_RUNS 300 + +int +main(int argc, char *argv[]){ + int fd; + struct aiocb *iocb[MAX]; + struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; + int i, result, run, error, j, k; + char buffer[32768]; + int kq = kqueue(); + struct kevent ke, kq_returned; + struct timespec ts; + struct sigevent sig; + time_t time1, time2; + char *file, pathname[sizeof(PATH_TEMPLATE)-1]; + int tmp_file = 0, failed = 0; + + if (kq < 0) { + perror("No kqeueue\n"); + exit(1); + } + + if (argc == 1) { + strcpy(pathname, PATH_TEMPLATE); + fd = mkstemp(pathname); + file = pathname; + tmp_file = 1; + } else { + file = argv[1]; + fd = open(file, O_RDWR|O_CREAT, 0666); + } + if (fd < 0){ + fprintf(stderr, "Can't open %s\n", argv[1]); + perror(""); + exit(1); + } + +#ifdef DEBUG + printf("Hello kq %d fd %d\n", kq, fd); +#endif + + for (run = 0; run < MAX_RUNS; run++){ +#ifdef DEBUG + printf("Run %d\n", run); +#endif + for (j = 0; j < LIO_MAX; j++) { + lio[j] = (struct aiocb **) + malloc(sizeof(struct aiocb *) * MAX/LIO_MAX); + for(i = 0; i < MAX / LIO_MAX; i++) { + k = (MAX / LIO_MAX * j) + i; + lio_element = lio[j]; + lio[j][i] = iocb[k] = (struct aiocb *) + malloc(sizeof(struct aiocb)); + bzero(iocb[k], sizeof(struct aiocb)); + iocb[k]->aio_nbytes = sizeof(buffer); + iocb[k]->aio_buf = buffer; + iocb[k]->aio_fildes = fd; + iocb[k]->aio_offset + = iocb[k]->aio_nbytes * k * (run + 1); + +#ifdef DEBUG + printf("hello iocb[k] %d\n", + iocb[k]->aio_offset); +#endif + iocb[k]->aio_lio_opcode = LIO_WRITE; + } + sig.sigev_notify_kqueue = kq; + sig.sigev_value.sival_ptr = lio[j]; + sig.sigev_notify = SIGEV_KEVENT; + time(&time1); + result = lio_listio(LIO_NOWAIT, lio[j], + MAX / LIO_MAX, &sig); + error = errno; + time(&time2); +#ifdef DEBUG + printf("Time %d %d %d result -> %d\n", + time1, time2, time2-time1, result); +#endif + if (result != 0) { + errno = error; + perror("list_listio"); + printf("FAIL: Result %d iteration %d\n",result, j); + exit(1); + } +#ifdef DEBUG + printf("write %d is at %p\n", j, lio[j]); +#endif + } + + for(i = 0; i < LIO_MAX; i++) { + for(j = LIO_MAX - 1; j >=0; j--) { + if (lio[j]) + break; + } + + for(;;) { + bzero(&ke, sizeof(ke)); + bzero(&kq_returned, sizeof(ke)); + ts.tv_sec = 0; + ts.tv_nsec = 1; +#ifdef DEBUG + printf("FOO lio %d -> %p\n", j, lio[j]); +#endif + EV_SET(&ke, (uintptr_t)lio[j], + EVFILT_LIO, EV_ONESHOT, 0, 0, iocb[j]); + result = kevent(kq, NULL, 0, + &kq_returned, 1, &ts); + error = errno; + if (result < 0) { + perror("kevent error: "); + } + kq_lio = kq_returned.udata; +#ifdef DEBUG + printf("kevent %d %d errno %d return.ident %p " + "return.data %p return.udata %p %p\n", + i, result, error, + kq_returned.ident, kq_returned.data, + kq_returned.udata, + lio[j]); +#endif + + if(kq_lio) + break; +#ifdef DEBUG + printf("Try again\n"); +#endif + } + +#ifdef DEBUG + printf("lio %p\n", lio); +#endif + + for (j = 0; j < LIO_MAX; j++) { + if (lio[j] == kq_lio) { + break; + } + } + if (j == LIO_MAX) { + printf("FAIL:\n"); + exit(1); + } + +#ifdef DEBUG + printf("Error Result for %d is %d\n", j, result); +#endif + if (result < 0) { + printf("FAIL: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); + failed = 1; + } else { + printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); + } + for(k = 0; k < MAX / LIO_MAX; k++){ + result = aio_return(kq_lio[k]); +#ifdef DEBUG + printf("Return Resulto for %d %d is %d\n", j, k, result); +#endif + if (result != sizeof(buffer)) { + printf("FAIL: run %d, operation %d sub-opt %d result %d (errno=%d) should be %zu\n", + run, LIO_MAX - i -1, k, result, errno, sizeof(buffer)); + } else { + printf("PASS: run %d, operation %d sub-opt %d result %d\n", + run, LIO_MAX - i -1, k, result); + } + } +#ifdef DEBUG + printf("\n"); +#endif + + for(k = 0; k < MAX / LIO_MAX; k++) { + free(lio[j][k]); + } + free(lio[j]); + lio[j] = NULL; + } + } +#ifdef DEBUG + printf("Done\n"); +#endif + + if (tmp_file) { + unlink(pathname); + } + + if (failed) { + printf("FAIL: Atleast one\n"); + exit(1); + } else { + printf("PASS: All\n"); + exit(0); + } +} From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 09:04:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CDAA2ED; Mon, 27 Apr 2015 09:04:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6D24167D; Mon, 27 Apr 2015 09:04:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R94GLF024558; Mon, 27 Apr 2015 09:04:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R94G4j024557; Mon, 27 Apr 2015 09:04:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270904.t3R94G4j024557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 09:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282075 - head/tools/regression/mmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 09:04:17 -0000 Author: ngie Date: Mon Apr 27 09:04:16 2015 New Revision: 282075 URL: https://svnweb.freebsd.org/changeset/base/282075 Log: Convert this testcase over to a TAP format testcase MFC after: 1 week Modified: head/tools/regression/mmap/mmap.c Modified: head/tools/regression/mmap/mmap.c ============================================================================== --- head/tools/regression/mmap/mmap.c Mon Apr 27 08:51:40 2015 (r282074) +++ head/tools/regression/mmap/mmap.c Mon Apr 27 09:04:16 2015 (r282075) @@ -31,10 +31,11 @@ #include #include +#include #include -#include +#include -const struct tests { +static const struct { void *addr; int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */ } tests[] = { @@ -49,6 +50,8 @@ const struct tests { { (void *)(0x1000 * PAGE_SIZE), { 1, 1 } }, }; +#define MAP_AT_ZERO "security.bsd.map_at_zero" + int main(void) { @@ -60,37 +63,43 @@ main(void) /* Get the current sysctl value of security.bsd.map_at_zero. */ len = sizeof(mib) / sizeof(*mib); - if (sysctlnametomib("security.bsd.map_at_zero", mib, &len) == -1) - err(1, "sysctlnametomib(security.bsd.map_at_zero)"); + if (sysctlnametomib(MAP_AT_ZERO, mib, &len) == -1) { + printf("1..0 # SKIP: sysctlnametomib(\"%s\") failed: %s\n", + MAP_AT_ZERO, strerror(errno)); + return (0); + } len = sizeof(map_at_zero); - if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) - err(1, "sysctl(security.bsd.map_at_zero)"); + if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) { + printf("1..0 # SKIP: sysctl for %s failed: %s\n", MAP_AT_ZERO, + strerror(errno)); + return (0); + } /* Normalize to 0 or 1 for array access. */ map_at_zero = !!map_at_zero; - for (i=0; i < (sizeof(tests) / sizeof(*tests)); i++) { + printf("1..%zu\n", nitems(tests)); + for (i = 0; i < (int)nitems(tests); i++) { p = mmap((void *)tests[i].addr, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_FIXED, -1, 0); if (p == MAP_FAILED) { if (tests[i].ok[map_at_zero] != 0) error++; - warnx("%s: mmap(%p, ...) failed.", - (tests[i].ok[map_at_zero] == 0) ? "OK " : "ERR", - tests[i].addr); + printf("%sok %d # mmap(%p, ...) failed\n", + tests[i].ok[map_at_zero] == 0 ? "" : "not ", + i + 1, + tests[i].addr); } else { if (tests[i].ok[map_at_zero] != 1) error++; - warnx("%s: mmap(%p, ...) succeeded: p=%p", - (tests[i].ok[map_at_zero] == 1) ? "OK " : "ERR", + printf("%sok %d # mmap(%p, ...) succeeded: p=%p\n", + tests[i].ok[map_at_zero] == 1 ? "" : "not ", + i + 1, tests[i].addr, p); } } - if (error) - err(1, "---\nERROR: %d unexpected results.", error); - return (error != 0); } From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 09:06:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6958F549; Mon, 27 Apr 2015 09:06:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2AD16A0; Mon, 27 Apr 2015 09:06:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R96SiJ025042; Mon, 27 Apr 2015 09:06:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R96RQf025037; Mon, 27 Apr 2015 09:06:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504270906.t3R96RQf025037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 09:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282076 - in head: tests/sys/kern tools/regression/mmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 09:06:28 -0000 Author: ngie Date: Mon Apr 27 09:06:27 2015 New Revision: 282076 URL: https://svnweb.freebsd.org/changeset/base/282076 Log: Integrate tools/regression/mmap into the FreeBSD test suite as tests/sys/kern/mmap_test MFC after: 1 week Added: head/tests/sys/kern/mmap_test.c - copied unchanged from r282075, head/tools/regression/mmap/mmap.c Deleted: head/tools/regression/mmap/ Modified: head/tests/sys/kern/Makefile Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Mon Apr 27 09:04:16 2015 (r282075) +++ head/tests/sys/kern/Makefile Mon Apr 27 09:06:27 2015 (r282076) @@ -3,6 +3,7 @@ TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= kern_descrip_test +TAP_TESTS_C+= mmap_test ATF_TESTS_C+= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" Copied: head/tests/sys/kern/mmap_test.c (from r282075, head/tools/regression/mmap/mmap.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/kern/mmap_test.c Mon Apr 27 09:06:27 2015 (r282076, copy of r282075, head/tools/regression/mmap/mmap.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2009 Simon L. Nielsen , + * Bjoern A. Zeeb + * + * 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 + +static const struct { + void *addr; + int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */ +} tests[] = { + { (void *)0, { 0, 1 } }, /* Test sysctl. */ + { (void *)1, { 0, 0 } }, + { (void *)(PAGE_SIZE - 1), { 0, 0 } }, + { (void *)PAGE_SIZE, { 1, 1 } }, + { (void *)-1, { 0, 0 } }, + { (void *)(-PAGE_SIZE), { 0, 0 } }, + { (void *)(-1 - PAGE_SIZE), { 0, 0 } }, + { (void *)(-1 - PAGE_SIZE - 1), { 0, 0 } }, + { (void *)(0x1000 * PAGE_SIZE), { 1, 1 } }, +}; + +#define MAP_AT_ZERO "security.bsd.map_at_zero" + +int +main(void) +{ + void *p; + size_t len; + int i, error, mib[3], map_at_zero; + + error = 0; + + /* Get the current sysctl value of security.bsd.map_at_zero. */ + len = sizeof(mib) / sizeof(*mib); + if (sysctlnametomib(MAP_AT_ZERO, mib, &len) == -1) { + printf("1..0 # SKIP: sysctlnametomib(\"%s\") failed: %s\n", + MAP_AT_ZERO, strerror(errno)); + return (0); + } + + len = sizeof(map_at_zero); + if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) { + printf("1..0 # SKIP: sysctl for %s failed: %s\n", MAP_AT_ZERO, + strerror(errno)); + return (0); + } + + /* Normalize to 0 or 1 for array access. */ + map_at_zero = !!map_at_zero; + + printf("1..%zu\n", nitems(tests)); + for (i = 0; i < (int)nitems(tests); i++) { + p = mmap((void *)tests[i].addr, PAGE_SIZE, + PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_FIXED, + -1, 0); + if (p == MAP_FAILED) { + if (tests[i].ok[map_at_zero] != 0) + error++; + printf("%sok %d # mmap(%p, ...) failed\n", + tests[i].ok[map_at_zero] == 0 ? "" : "not ", + i + 1, + tests[i].addr); + } else { + if (tests[i].ok[map_at_zero] != 1) + error++; + printf("%sok %d # mmap(%p, ...) succeeded: p=%p\n", + tests[i].ok[map_at_zero] == 1 ? "" : "not ", + i + 1, + tests[i].addr, p); + } + } + + return (error != 0); +} From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 09:12:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3EBF83F; Mon, 27 Apr 2015 09:12:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9166E177A; Mon, 27 Apr 2015 09:12:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R9Cu43029616; Mon, 27 Apr 2015 09:12:56 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R9CtXR029611; Mon, 27 Apr 2015 09:12:55 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201504270912.t3R9CtXR029611@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Mon, 27 Apr 2015 09:12:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282078 - in head/sys: arm64/arm64 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 09:12:56 -0000 Author: zbb Date: Mon Apr 27 09:12:54 2015 New Revision: 282078 URL: https://svnweb.freebsd.org/changeset/base/282078 Log: Introduce ddb(4) support for ARM64 Obtained from: Semihalf Reviewed by: emaste Sponsored by: The FreeBSD Foundation Added: head/sys/arm64/arm64/db_disasm.c (contents, props changed) head/sys/arm64/arm64/db_interface.c (contents, props changed) head/sys/arm64/arm64/db_trace.c (contents, props changed) head/sys/arm64/arm64/debug_monitor.c (contents, props changed) Modified: head/sys/conf/files.arm64 Added: head/sys/arm64/arm64/db_disasm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/db_disasm.c Mon Apr 27 09:12:54 2015 (r282078) @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include + +vm_offset_t +db_disasm(vm_offset_t loc, boolean_t altfmt) +{ + return 0; +} + +/* End of db_disasm.c */ Added: head/sys/arm64/arm64/db_interface.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/db_interface.c Mon Apr 27 09:12:54 2015 (r282078) @@ -0,0 +1,168 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include + +#ifdef KDB +#include +#endif + +#include +#include + +#include +#include +#include + +static int +db_frame(struct db_variable *vp, db_expr_t *valuep, int op) +{ + long *reg; + + if (kdb_frame == NULL) + return (0); + + reg = (long *)((uintptr_t)kdb_frame + (db_expr_t)vp->valuep); + if (op == DB_VAR_GET) + *valuep = *reg; + else + *reg = *valuep; + return (1); +} + +#define DB_OFFSET(x) (db_expr_t *)offsetof(struct trapframe, x) +struct db_variable db_regs[] = { + { "spsr", DB_OFFSET(tf_spsr), db_frame }, + { "x0", DB_OFFSET(tf_x[0]), db_frame }, + { "x1", DB_OFFSET(tf_x[1]), db_frame }, + { "x2", DB_OFFSET(tf_x[2]), db_frame }, + { "x3", DB_OFFSET(tf_x[3]), db_frame }, + { "x4", DB_OFFSET(tf_x[4]), db_frame }, + { "x5", DB_OFFSET(tf_x[5]), db_frame }, + { "x6", DB_OFFSET(tf_x[6]), db_frame }, + { "x7", DB_OFFSET(tf_x[7]), db_frame }, + { "x8", DB_OFFSET(tf_x[8]), db_frame }, + { "x9", DB_OFFSET(tf_x[9]), db_frame }, + { "x10", DB_OFFSET(tf_x[10]), db_frame }, + { "x11", DB_OFFSET(tf_x[11]), db_frame }, + { "x12", DB_OFFSET(tf_x[12]), db_frame }, + { "x13", DB_OFFSET(tf_x[13]), db_frame }, + { "x14", DB_OFFSET(tf_x[14]), db_frame }, + { "x15", DB_OFFSET(tf_x[15]), db_frame }, + { "x16", DB_OFFSET(tf_x[16]), db_frame }, + { "x17", DB_OFFSET(tf_x[17]), db_frame }, + { "x18", DB_OFFSET(tf_x[18]), db_frame }, + { "x19", DB_OFFSET(tf_x[19]), db_frame }, + { "x20", DB_OFFSET(tf_x[20]), db_frame }, + { "x21", DB_OFFSET(tf_x[21]), db_frame }, + { "x22", DB_OFFSET(tf_x[22]), db_frame }, + { "x23", DB_OFFSET(tf_x[23]), db_frame }, + { "x24", DB_OFFSET(tf_x[24]), db_frame }, + { "x25", DB_OFFSET(tf_x[25]), db_frame }, + { "x26", DB_OFFSET(tf_x[26]), db_frame }, + { "x27", DB_OFFSET(tf_x[27]), db_frame }, + { "x28", DB_OFFSET(tf_x[28]), db_frame }, + { "x29", DB_OFFSET(tf_x[29]), db_frame }, + { "lr", DB_OFFSET(tf_lr), db_frame }, + { "elr", DB_OFFSET(tf_elr), db_frame }, + { "sp", DB_OFFSET(tf_sp), db_frame }, +}; + +struct db_variable *db_eregs = db_regs + sizeof(db_regs)/sizeof(db_regs[0]); + +void +db_show_mdpcpu(struct pcpu *pc) +{ +} + +static int +db_validate_address(vm_offset_t addr) +{ + struct proc *p = curproc; + struct pmap *pmap; + + if (!p || !p->p_vmspace || !p->p_vmspace->vm_map.pmap || + addr >= VM_MAXUSER_ADDRESS) + pmap = pmap_kernel(); + else + pmap = p->p_vmspace->vm_map.pmap; + + return (pmap_extract(pmap, addr) == FALSE); +} + +/* + * Read bytes from kernel address space for debugger. + */ +int +db_read_bytes(vm_offset_t addr, size_t size, char *data) +{ + const char *src = (const char *)addr; + + while (size-- > 0) { + if (db_validate_address((u_int)src)) { + db_printf("address %p is invalid\n", src); + return (-1); + } + *data++ = *src++; + } + return (0); +} + +/* + * Write bytes to kernel address space for debugger. + */ +int +db_write_bytes(vm_offset_t addr, size_t size, char *data) +{ + char *dst; + + dst = (char *)addr; + while (size-- > 0) { + if (db_validate_address((u_int)dst)) { + db_printf("address %p is invalid\n", dst); + return (-1); + } + *dst++ = *data++; + } + + dsb(); + /* Clean D-cache and invalidate I-cache */ + cpu_dcache_wb_range(addr, (vm_size_t)size); + cpu_icache_sync_range(addr, (vm_size_t)size); + dsb(); + isb(); + + return (0); +} Added: head/sys/arm64/arm64/db_trace.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/db_trace.c Mon Apr 27 09:12:54 2015 (r282078) @@ -0,0 +1,152 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); +#include +#include +#include +#include +#include +#include + +#include +#include + +struct unwind_state { + uint64_t fp; + uint64_t sp; + uint64_t pc; +}; + +void +db_md_list_watchpoints() +{ + + dbg_show_watchpoint(); +} + +int +db_md_clr_watchpoint(db_expr_t addr, db_expr_t size) +{ + + return (dbg_remove_watchpoint(addr, size, DBG_FROM_EL1)); +} + +int +db_md_set_watchpoint(db_expr_t addr, db_expr_t size) +{ + + return (dbg_setup_watchpoint(addr, size, DBG_FROM_EL1, + HW_BREAKPOINT_RW)); +} + +static int +db_unwind_frame(struct unwind_state *frame) +{ + uint64_t fp = frame->fp; + + if (fp == 0) + return -1; + + frame->sp = fp + 0x10; + /* FP to previous frame (X29) */ + frame->fp = *(uint64_t *)(fp); + /* LR (X30) */ + frame->pc = *(uint64_t *)(fp + 8) - 4; + return (0); +} + +static void +db_stack_trace_cmd(struct unwind_state *frame) +{ + c_db_sym_t sym; + const char *name; + db_expr_t value; + db_expr_t offset; + + while (1) { + uint64_t pc = frame->pc; + int ret; + + ret = db_unwind_frame(frame); + if (ret < 0) + break; + + sym = db_search_symbol(pc, DB_STGY_ANY, &offset); + if (sym == C_DB_SYM_NULL) { + value = 0; + name = "(null)"; + } else + db_symbol_values(sym, &name, &value); + + db_printf("%s() at ", name); + db_printsym(frame->pc, DB_STGY_PROC); + db_printf("\n"); + + db_printf("\t pc = 0x%016lx lr = 0x%016lx\n", pc, + frame->pc); + db_printf("\t sp = 0x%016lx fp = 0x%016lx\n", frame->sp, + frame->fp); + /* TODO: Show some more registers */ + db_printf("\n"); + } +} + +int +db_trace_thread(struct thread *thr, int count) +{ + struct unwind_state frame; + struct pcb *ctx; + + if (thr != curthread) { + ctx = kdb_thr_ctx(thr); + + frame.sp = (uint64_t)ctx->pcb_sp; + frame.fp = (uint64_t)ctx->pcb_x[29]; + frame.pc = (uint64_t)ctx->pcb_x[30]; + db_stack_trace_cmd(&frame); + } else + db_trace_self(); + return (0); +} + +void +db_trace_self(void) +{ + struct unwind_state frame; + uint64_t sp; + + __asm __volatile("mov %0, sp" : "=&r" (sp)); + + frame.sp = sp; + frame.fp = (uint64_t)__builtin_frame_address(0); + frame.pc = (uint64_t)db_trace_self; + db_stack_trace_cmd(&frame); +} Added: head/sys/arm64/arm64/debug_monitor.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/arm64/debug_monitor.c Mon Apr 27 09:12:54 2015 (r282078) @@ -0,0 +1,487 @@ +/*- + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Semihalf under + * the sponsorship of the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +enum dbg_t { + DBG_TYPE_BREAKPOINT = 0, + DBG_TYPE_WATCHPOINT = 1, +}; + +static int dbg_watchpoint_num; +static int dbg_breakpoint_num; +static int dbg_ref_count_mde[MAXCPU]; +static int dbg_ref_count_kde[MAXCPU]; + +/* Watchpoints/breakpoints control register bitfields */ +#define DBG_WATCH_CTRL_LEN_1 (0x1 << 5) +#define DBG_WATCH_CTRL_LEN_2 (0x3 << 5) +#define DBG_WATCH_CTRL_LEN_4 (0xf << 5) +#define DBG_WATCH_CTRL_LEN_8 (0xff << 5) +#define DBG_WATCH_CTRL_LEN_MASK(x) ((x) & (0xff << 5)) +#define DBG_WATCH_CTRL_EXEC (0x0 << 3) +#define DBG_WATCH_CTRL_LOAD (0x1 << 3) +#define DBG_WATCH_CTRL_STORE (0x2 << 3) +#define DBG_WATCH_CTRL_ACCESS_MASK(x) ((x) & (0x3 << 3)) + +/* Common for breakpoint and watchpoint */ +#define DBG_WB_CTRL_EL1 (0x1 << 1) +#define DBG_WB_CTRL_EL0 (0x2 << 1) +#define DBG_WB_CTRL_ELX_MASK(x) ((x) & (0x3 << 1)) +#define DBG_WB_CTRL_E (0x1 << 0) + +#define DBG_REG_BASE_BVR 0 +#define DBG_REG_BASE_BCR (DBG_REG_BASE_BVR + 16) +#define DBG_REG_BASE_WVR (DBG_REG_BASE_BCR + 16) +#define DBG_REG_BASE_WCR (DBG_REG_BASE_WVR + 16) + +/* Watchpoint/breakpoint helpers */ +#define DBG_WB_WVR "wvr" +#define DBG_WB_WCR "wcr" +#define DBG_WB_BVR "bvr" +#define DBG_WB_BCR "bcr" + +#define DBG_WB_READ(reg, num, val) do { \ + __asm __volatile("mrs %0, dbg" reg #num "_el1" : "=r" (val)); \ +} while (0) + +#define DBG_WB_WRITE(reg, num, val) do { \ + __asm __volatile("msr dbg" reg #num "_el1, %0" :: "r" (val)); \ +} while (0) + +#define READ_WB_REG_CASE(reg, num, offset, val) \ + case (num + offset): \ + DBG_WB_READ(reg, num, val); \ + break + +#define WRITE_WB_REG_CASE(reg, num, offset, val) \ + case (num + offset): \ + DBG_WB_WRITE(reg, num, val); \ + break + +#define SWITCH_CASES_READ_WB_REG(reg, offset, val) \ + READ_WB_REG_CASE(reg, 0, offset, val); \ + READ_WB_REG_CASE(reg, 1, offset, val); \ + READ_WB_REG_CASE(reg, 2, offset, val); \ + READ_WB_REG_CASE(reg, 3, offset, val); \ + READ_WB_REG_CASE(reg, 4, offset, val); \ + READ_WB_REG_CASE(reg, 5, offset, val); \ + READ_WB_REG_CASE(reg, 6, offset, val); \ + READ_WB_REG_CASE(reg, 7, offset, val); \ + READ_WB_REG_CASE(reg, 8, offset, val); \ + READ_WB_REG_CASE(reg, 9, offset, val); \ + READ_WB_REG_CASE(reg, 10, offset, val); \ + READ_WB_REG_CASE(reg, 11, offset, val); \ + READ_WB_REG_CASE(reg, 12, offset, val); \ + READ_WB_REG_CASE(reg, 13, offset, val); \ + READ_WB_REG_CASE(reg, 14, offset, val); \ + READ_WB_REG_CASE(reg, 15, offset, val) + +#define SWITCH_CASES_WRITE_WB_REG(reg, offset, val) \ + WRITE_WB_REG_CASE(reg, 0, offset, val); \ + WRITE_WB_REG_CASE(reg, 1, offset, val); \ + WRITE_WB_REG_CASE(reg, 2, offset, val); \ + WRITE_WB_REG_CASE(reg, 3, offset, val); \ + WRITE_WB_REG_CASE(reg, 4, offset, val); \ + WRITE_WB_REG_CASE(reg, 5, offset, val); \ + WRITE_WB_REG_CASE(reg, 6, offset, val); \ + WRITE_WB_REG_CASE(reg, 7, offset, val); \ + WRITE_WB_REG_CASE(reg, 8, offset, val); \ + WRITE_WB_REG_CASE(reg, 9, offset, val); \ + WRITE_WB_REG_CASE(reg, 10, offset, val); \ + WRITE_WB_REG_CASE(reg, 11, offset, val); \ + WRITE_WB_REG_CASE(reg, 12, offset, val); \ + WRITE_WB_REG_CASE(reg, 13, offset, val); \ + WRITE_WB_REG_CASE(reg, 14, offset, val); \ + WRITE_WB_REG_CASE(reg, 15, offset, val) + +static uint64_t +dbg_wb_read_reg(int reg, int n) +{ + uint64_t val = 0; + + switch (reg + n) { + SWITCH_CASES_READ_WB_REG(DBG_WB_WVR, DBG_REG_BASE_WVR, val); + SWITCH_CASES_READ_WB_REG(DBG_WB_WCR, DBG_REG_BASE_WCR, val); + SWITCH_CASES_READ_WB_REG(DBG_WB_BVR, DBG_REG_BASE_BVR, val); + SWITCH_CASES_READ_WB_REG(DBG_WB_BCR, DBG_REG_BASE_BCR, val); + default: + db_printf("trying to read from wrong debug register %d\n", n); + } + + return val; +} + +static void +dbg_wb_write_reg(int reg, int n, uint64_t val) +{ + switch (reg + n) { + SWITCH_CASES_WRITE_WB_REG(DBG_WB_WVR, DBG_REG_BASE_WVR, val); + SWITCH_CASES_WRITE_WB_REG(DBG_WB_WCR, DBG_REG_BASE_WCR, val); + SWITCH_CASES_WRITE_WB_REG(DBG_WB_BVR, DBG_REG_BASE_BVR, val); + SWITCH_CASES_WRITE_WB_REG(DBG_WB_BCR, DBG_REG_BASE_BCR, val); + default: + db_printf("trying to write to wrong debug register %d\n", n); + } + isb(); +} + +void +kdb_cpu_set_singlestep(void) +{ + + kdb_frame->tf_spsr |= DBG_SPSR_SS; + WRITE_SPECIALREG(MDSCR_EL1, READ_SPECIALREG(MDSCR_EL1) | + DBG_MDSCR_SS | DBG_MDSCR_KDE); + + /* + * Disable breakpoints and watchpoints, e.g. stepping + * over watched instruction will trigger break exception instead of + * single-step exception and locks CPU on that instruction for ever. + */ + if (dbg_ref_count_mde[PCPU_GET(cpuid)] > 0) { + WRITE_SPECIALREG(MDSCR_EL1, + READ_SPECIALREG(MDSCR_EL1) & ~DBG_MDSCR_MDE); + } +} + +void +kdb_cpu_clear_singlestep(void) +{ + + WRITE_SPECIALREG(MDSCR_EL1, READ_SPECIALREG(MDSCR_EL1) & + ~(DBG_MDSCR_SS | DBG_MDSCR_KDE)); + + /* Restore breakpoints and watchpoints */ + if (dbg_ref_count_mde[PCPU_GET(cpuid)] > 0) { + WRITE_SPECIALREG(MDSCR_EL1, + READ_SPECIALREG(MDSCR_EL1) | DBG_MDSCR_MDE); + } + + if (dbg_ref_count_kde[PCPU_GET(cpuid)] > 0) { + WRITE_SPECIALREG(MDSCR_EL1, + READ_SPECIALREG(MDSCR_EL1) | DBG_MDSCR_KDE); + } +} + +static const char * +dbg_watchtype_str(uint32_t type) +{ + switch (type) { + case DBG_WATCH_CTRL_EXEC: + return ("execute"); + case DBG_WATCH_CTRL_STORE: + return ("write"); + case DBG_WATCH_CTRL_LOAD: + return ("read"); + case DBG_WATCH_CTRL_LOAD | DBG_WATCH_CTRL_STORE: + return ("read/write"); + default: + return ("invalid"); + } +} + +static int +dbg_watchtype_len(uint32_t len) +{ + switch (len) { + case DBG_WATCH_CTRL_LEN_1: + return (1); + case DBG_WATCH_CTRL_LEN_2: + return (2); + case DBG_WATCH_CTRL_LEN_4: + return (4); + case DBG_WATCH_CTRL_LEN_8: + return (8); + default: + return (0); + } +} + +void +dbg_show_watchpoint(void) +{ + uint32_t wcr, len, type; + uint64_t addr; + int i; + + db_printf("\nhardware watchpoints:\n"); + db_printf(" watch status type len address symbol\n"); + db_printf(" ----- -------- ---------- --- ------------------ ------------------\n"); + for (i = 0; i < dbg_watchpoint_num; i++) { + wcr = dbg_wb_read_reg(DBG_REG_BASE_WCR, i); + if ((wcr & DBG_WB_CTRL_E) != 0) { + type = DBG_WATCH_CTRL_ACCESS_MASK(wcr); + len = DBG_WATCH_CTRL_LEN_MASK(wcr); + addr = dbg_wb_read_reg(DBG_REG_BASE_WVR, i); + db_printf(" %-5d %-8s %10s %3d 0x%16lx ", + i, "enabled", dbg_watchtype_str(type), + dbg_watchtype_len(len), addr); + db_printsym((db_addr_t)addr, DB_STGY_ANY); + db_printf("\n"); + } else { + db_printf(" %-5d disabled\n", i); + } + } +} + + +static int +dbg_find_free_slot(enum dbg_t type) +{ + u_int max, reg, i; + + switch(type) { + case DBG_TYPE_BREAKPOINT: + max = dbg_breakpoint_num; + reg = DBG_REG_BASE_BCR; + + break; + case DBG_TYPE_WATCHPOINT: + max = dbg_watchpoint_num; + reg = DBG_REG_BASE_WCR; + break; + default: + db_printf("Unsupported debug type\n"); + return (i); + } + + for (i = 0; i < max; i++) { + if ((dbg_wb_read_reg(reg, i) & DBG_WB_CTRL_E) == 0) + return (i); + } + + return (-1); +} + +static int +dbg_find_slot(enum dbg_t type, db_expr_t addr) +{ + u_int max, reg_addr, reg_ctrl, i; + + switch(type) { + case DBG_TYPE_BREAKPOINT: + max = dbg_breakpoint_num; + reg_addr = DBG_REG_BASE_BVR; + reg_ctrl = DBG_REG_BASE_BCR; + break; + case DBG_TYPE_WATCHPOINT: + max = dbg_watchpoint_num; + reg_addr = DBG_REG_BASE_WVR; + reg_ctrl = DBG_REG_BASE_WCR; + break; + default: + db_printf("Unsupported debug type\n"); + return (i); + } + + for (i = 0; i < max; i++) { + if ((dbg_wb_read_reg(reg_addr, i) == addr) && + ((dbg_wb_read_reg(reg_ctrl, i) & DBG_WB_CTRL_E) != 0)) + return (i); + } + + return (-1); +} + +static void +dbg_enable_monitor(enum dbg_el_t el) +{ + uint64_t reg_mdcr = 0; + + /* + * There is no need to have debug monitor on permanently, thus we are + * refcounting and turn it on only if any of CPU is going to use that. + */ + if (atomic_fetchadd_int(&dbg_ref_count_mde[PCPU_GET(cpuid)], 1) == 0) + reg_mdcr = DBG_MDSCR_MDE; + + if ((el == DBG_FROM_EL1) && + atomic_fetchadd_int(&dbg_ref_count_kde[PCPU_GET(cpuid)], 1) == 0) + reg_mdcr |= DBG_MDSCR_KDE; + + if (reg_mdcr) + WRITE_SPECIALREG(MDSCR_EL1, READ_SPECIALREG(MDSCR_EL1) | reg_mdcr); +} + +static void +dbg_disable_monitor(enum dbg_el_t el) +{ + uint64_t reg_mdcr = 0; + + if (atomic_fetchadd_int(&dbg_ref_count_mde[PCPU_GET(cpuid)], -1) == 1) + reg_mdcr = DBG_MDSCR_MDE; + + if ((el == DBG_FROM_EL1) && + atomic_fetchadd_int(&dbg_ref_count_kde[PCPU_GET(cpuid)], -1) == 1) + reg_mdcr |= DBG_MDSCR_KDE; + + if (reg_mdcr) + WRITE_SPECIALREG(MDSCR_EL1, READ_SPECIALREG(MDSCR_EL1) & ~reg_mdcr); +} + +int +dbg_setup_watchpoint(db_expr_t addr, db_expr_t size, enum dbg_el_t el, + enum dbg_access_t access) +{ + uint64_t wcr_size, wcr_priv, wcr_access; + u_int i; + + i = dbg_find_free_slot(DBG_TYPE_WATCHPOINT); + if (i == -1) { + db_printf("Can not find slot for watchpoint, max %d" + " watchpoints supported\n", dbg_watchpoint_num); + return (i); + } + + switch(size) { + case 1: + wcr_size = DBG_WATCH_CTRL_LEN_1; + break; + case 2: + wcr_size = DBG_WATCH_CTRL_LEN_2; + break; + case 4: + wcr_size = DBG_WATCH_CTRL_LEN_4; + break; + case 8: + wcr_size = DBG_WATCH_CTRL_LEN_8; + break; + default: + db_printf("Unsupported address size for watchpoint\n"); + return (-1); + } + + switch(el) { + case DBG_FROM_EL0: + wcr_priv = DBG_WB_CTRL_EL0; + break; + case DBG_FROM_EL1: + wcr_priv = DBG_WB_CTRL_EL1; + break; + default: + db_printf("Unsupported exception level for watchpoint\n"); + return (-1); + } + + switch(access) { + case HW_BREAKPOINT_X: + wcr_access = DBG_WATCH_CTRL_EXEC; + break; + case HW_BREAKPOINT_R: + wcr_access = DBG_WATCH_CTRL_LOAD; + break; + case HW_BREAKPOINT_W: + wcr_access = DBG_WATCH_CTRL_STORE; + break; + case HW_BREAKPOINT_RW: + wcr_access = DBG_WATCH_CTRL_LOAD | DBG_WATCH_CTRL_STORE; + break; + default: + db_printf("Unsupported exception level for watchpoint\n"); + return (-1); + } + + dbg_wb_write_reg(DBG_REG_BASE_WVR, i, addr); + dbg_wb_write_reg(DBG_REG_BASE_WCR, i, wcr_size | wcr_access | wcr_priv | + DBG_WB_CTRL_E); + dbg_enable_monitor(el); + return (0); +} + +int +dbg_remove_watchpoint(db_expr_t addr, db_expr_t size, enum dbg_el_t el) +{ + u_int i; + + i = dbg_find_slot(DBG_TYPE_WATCHPOINT, addr); + if (i == -1) { + db_printf("Can not find watchpoint for address 0%lx\n", addr); + return (i); + } + + dbg_wb_write_reg(DBG_REG_BASE_WCR, i, 0); + dbg_disable_monitor(el); + return (0); +} + +void +dbg_monitor_init(void) +{ + u_int i; + + /* Clear OS lock */ + WRITE_SPECIALREG(OSLAR_EL1, 0); + + /* Find out many breakpoints and watchpoints we can use */ + dbg_watchpoint_num = ((READ_SPECIALREG(ID_AA64DFR0_EL1) >> 20) & 0xf) + 1; + dbg_breakpoint_num = ((READ_SPECIALREG(ID_AA64DFR0_EL1) >> 12) & 0xf) + 1; + + if (bootverbose && PCPU_GET(cpuid) == 0) { + db_printf("%d watchpoints and %d breakpoints supported\n", + dbg_watchpoint_num, dbg_breakpoint_num); + } + + /* + * We have limited number of {watch,break}points, each consists of + * two registers: + * - wcr/bcr regsiter configurates corresponding {watch,break}point + * behaviour + * - wvr/bvr register keeps address we are hunting for + * + * Reset all breakpoints and watchpoints. + */ + for (i = 0; i < dbg_watchpoint_num; ++i) { + dbg_wb_write_reg(DBG_REG_BASE_WCR, i, 0); + dbg_wb_write_reg(DBG_REG_BASE_WVR, i, 0); + } + + for (i = 0; i < dbg_breakpoint_num; ++i) { + dbg_wb_write_reg(DBG_REG_BASE_BCR, i, 0); + dbg_wb_write_reg(DBG_REG_BASE_BVR, i, 0); + } + + dbg_enable(); +} Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Apr 27 09:10:32 2015 (r282077) +++ head/sys/conf/files.arm64 Mon Apr 27 09:12:54 2015 (r282078) @@ -10,6 +10,10 @@ arm64/arm64/clock.c standard arm64/arm64/copyinout.S standard arm64/arm64/copystr.c standard arm64/arm64/cpufunc_asm.S standard +arm64/arm64/db_disasm.c optional ddb +arm64/arm64/db_interface.c optional ddb +arm64/arm64/db_trace.c optional ddb +arm64/arm64/debug_monitor.c optional kdb arm64/arm64/dump_machdep.c standard arm64/arm64/elf_machdep.c standard arm64/arm64/exception.S standard From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 09:16:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05760B9A; Mon, 27 Apr 2015 09:16:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE3F017A1; Mon, 27 Apr 2015 09:16:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3R9GMMM030323; Mon, 27 Apr 2015 09:16:22 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3R9GM7b030322; Mon, 27 Apr 2015 09:16:22 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201504270916.t3R9GM7b030322@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 27 Apr 2015 09:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282081 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 09:16:23 -0000 Author: melifaro Date: Mon Apr 27 09:16:22 2015 New Revision: 282081 URL: https://svnweb.freebsd.org/changeset/base/282081 Log: Use free_nat_instance() for nat instance deletion. Sponsored by: Yandex LLC 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 Apr 27 09:15:36 2015 (r282080) +++ head/sys/netpfil/ipfw/ip_fw_nat.c Mon Apr 27 09:16:22 2015 (r282081) @@ -265,6 +265,16 @@ add_redir_spool_cfg(char *buf, struct cf return (0); } +static void +free_nat_instance(struct cfg_nat *ptr) +{ + + del_redir_spool_cfg(ptr, &ptr->redir_chain); + LibAliasUninit(ptr->lib); + free(ptr, M_IPFW); +} + + /* * ipfw_nat - perform mbuf header translation. * @@ -538,7 +548,7 @@ nat44_config(struct ip_fw_chain *chain, IPFW_UH_WUNLOCK(chain); if (tcfg != NULL) - free(tcfg, M_IPFW); + free_nat_instance(ptr); } /* @@ -628,9 +638,7 @@ nat44_destroy(struct ip_fw_chain *chain, IPFW_WUNLOCK(chain); IPFW_UH_WUNLOCK(chain); - del_redir_spool_cfg(ptr, &ptr->redir_chain); - LibAliasUninit(ptr->lib); - free(ptr, M_IPFW); + free_nat_instance(ptr); return (0); } @@ -996,9 +1004,7 @@ ipfw_nat_del(struct sockopt *sopt) flush_nat_ptrs(chain, i); IPFW_WUNLOCK(chain); IPFW_UH_WUNLOCK(chain); - del_redir_spool_cfg(ptr, &ptr->redir_chain); - LibAliasUninit(ptr->lib); - free(ptr, M_IPFW); + free_nat_instance(ptr); return (0); } @@ -1141,9 +1147,7 @@ vnet_ipfw_nat_uninit(const void *arg __u IPFW_WLOCK(chain); LIST_FOREACH_SAFE(ptr, &chain->nat, _next, ptr_temp) { LIST_REMOVE(ptr, _next); - del_redir_spool_cfg(ptr, &ptr->redir_chain); - LibAliasUninit(ptr->lib); - free(ptr, M_IPFW); + free_nat_instance(ptr); } flush_nat_ptrs(chain, -1 /* flush all */); V_ipfw_nat_ready = 0; From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 10:01:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D479F3F9; Mon, 27 Apr 2015 10:01:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2DA51CC1; Mon, 27 Apr 2015 10:01:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RA1N1J051004; Mon, 27 Apr 2015 10:01:23 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RA1Nxc051003; Mon, 27 Apr 2015 10:01:23 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201504271001.t3RA1Nxc051003@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 27 Apr 2015 10:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282082 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 10:01:23 -0000 Author: melifaro Date: Mon Apr 27 10:01:22 2015 New Revision: 282082 URL: https://svnweb.freebsd.org/changeset/base/282082 Log: Fix 'may be used uninitialized' warning not caught by clang. Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Apr 27 09:16:22 2015 (r282081) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Apr 27 10:01:22 2015 (r282082) @@ -2211,7 +2211,7 @@ create_objects_compat(struct ip_fw_chain return (error); } - return (error); + return (0); } /* From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 10:19:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFC748CB; Mon, 27 Apr 2015 10:19:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BED931E3E; Mon, 27 Apr 2015 10:19:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RAJMSu059899; Mon, 27 Apr 2015 10:19:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RAJM8r059898; Mon, 27 Apr 2015 10:19:22 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504271019.t3RAJM8r059898@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 27 Apr 2015 10:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282083 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 10:19:22 -0000 Author: andrew Date: Mon Apr 27 10:19:21 2015 New Revision: 282083 URL: https://svnweb.freebsd.org/changeset/base/282083 Log: Add GCC to the list of broken options on arm64. Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Mon Apr 27 10:01:22 2015 (r282082) +++ head/share/mk/src.opts.mk Mon Apr 27 10:19:21 2015 (r282083) @@ -233,7 +233,7 @@ __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .endif .if ${__T} == "aarch64" -BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GDB +BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GDB .endif # LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 .if ${__T} == "arm" || ${__T} == "armeb" From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 11:12:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92EE5854; Mon, 27 Apr 2015 11:12:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66F29144F; Mon, 27 Apr 2015 11:12:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RBCqxR091927; Mon, 27 Apr 2015 11:12:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RBCq14091926; Mon, 27 Apr 2015 11:12:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504271112.t3RBCq14091926@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 27 Apr 2015 11:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282084 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 11:12:52 -0000 Author: kib Date: Mon Apr 27 11:12:51 2015 New Revision: 282084 URL: https://svnweb.freebsd.org/changeset/base/282084 Log: Fix locking for oshmctl() and shmsys(). Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Mon Apr 27 10:19:21 2015 (r282083) +++ head/sys/kern/sysv_shm.c Mon Apr 27 11:12:51 2015 (r282084) @@ -961,39 +961,39 @@ oshmctl(struct thread *td, struct oshmct if (!prison_allow(td->td_ucred, PR_ALLOW_SYSVIPC)) return (ENOSYS); + if (uap->cmd != IPC_STAT) { + return (freebsd7_shmctl(td, + (struct freebsd7_shmctl_args *)uap)); + } SYSVSHM_LOCK(); shmseg = shm_find_segment(uap->shmid, true); if (shmseg == NULL) { SYSVSHM_UNLOCK(); return (EINVAL); } - switch (uap->cmd) { - case IPC_STAT: - error = ipcperm(td, &shmseg->u.shm_perm, IPC_R); - if (error != 0) - break; + error = ipcperm(td, &shmseg->u.shm_perm, IPC_R); + if (error != 0) { + SYSVSHM_UNLOCK(); + return (error); + } #ifdef MAC - error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, - uap->cmd); - if (error != 0) - break; -#endif - ipcperm_new2old(&shmseg->u.shm_perm, &outbuf.shm_perm); - outbuf.shm_segsz = shmseg->u.shm_segsz; - outbuf.shm_cpid = shmseg->u.shm_cpid; - outbuf.shm_lpid = shmseg->u.shm_lpid; - outbuf.shm_nattch = shmseg->u.shm_nattch; - outbuf.shm_atime = shmseg->u.shm_atime; - outbuf.shm_dtime = shmseg->u.shm_dtime; - outbuf.shm_ctime = shmseg->u.shm_ctime; - outbuf.shm_handle = shmseg->object; - error = copyout(&outbuf, uap->ubuf, sizeof(outbuf)); - break; - default: - error = freebsd7_shmctl(td, (struct freebsd7_shmctl_args *)uap); - break; + error = mac_sysvshm_check_shmctl(td->td_ucred, shmseg, uap->cmd); + if (error != 0) { + SYSVSHM_UNLOCK(); + return (error); } +#endif + ipcperm_new2old(&shmseg->u.shm_perm, &outbuf.shm_perm); + outbuf.shm_segsz = shmseg->u.shm_segsz; + outbuf.shm_cpid = shmseg->u.shm_cpid; + outbuf.shm_lpid = shmseg->u.shm_lpid; + outbuf.shm_nattch = shmseg->u.shm_nattch; + outbuf.shm_atime = shmseg->u.shm_atime; + outbuf.shm_dtime = shmseg->u.shm_dtime; + outbuf.shm_ctime = shmseg->u.shm_ctime; + outbuf.shm_handle = shmseg->object; SYSVSHM_UNLOCK(); + error = copyout(&outbuf, uap->ubuf, sizeof(outbuf)); return (error); #else return (EINVAL); @@ -1025,9 +1025,7 @@ sys_shmsys(struct thread *td, struct shm return (ENOSYS); if (uap->which < 0 || uap->which >= nitems(shmcalls)) return (EINVAL); - SYSVSHM_LOCK(); error = (*shmcalls[uap->which])(td, &uap->a2); - SYSVSHM_UNLOCK(); return (error); } From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 11:13:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C85B3999; Mon, 27 Apr 2015 11:13:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8C291457; Mon, 27 Apr 2015 11:13:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RBDKa3092048; Mon, 27 Apr 2015 11:13:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RBDKG2092047; Mon, 27 Apr 2015 11:13:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504271113.t3RBDKG2092047@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 27 Apr 2015 11:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282085 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 11:13:21 -0000 Author: kib Date: Mon Apr 27 11:13:19 2015 New Revision: 282085 URL: https://svnweb.freebsd.org/changeset/base/282085 Log: Partially revert r255986: do not call VOP_FSYNC() when helping bufdaemon in getnewbuf(), do use buf_flush(). The difference is that bufdaemon uses TRYLOCK to get buffer locks, which allows calls to getnewbuf() while another buffer is locked. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Mon Apr 27 11:12:51 2015 (r282084) +++ head/sys/kern/vfs_bio.c Mon Apr 27 11:13:19 2015 (r282085) @@ -113,8 +113,8 @@ static void vfs_setdirty_locked_object(s static void vfs_vmio_release(struct buf *bp); static int vfs_bio_clcheck(struct vnode *vp, int size, daddr_t lblkno, daddr_t blkno); -static int buf_flush(int); -static int flushbufqueues(int, int); +static int buf_flush(struct vnode *vp, int); +static int flushbufqueues(struct vnode *, int, int); static void buf_daemon(void); static void bremfreel(struct buf *bp); static __inline void bd_wakeup(void); @@ -2097,7 +2097,7 @@ getnewbuf_bufd_help(struct vnode *vp, in { struct thread *td; char *waitmsg; - int cnt, error, flags, norunbuf, wait; + int error, fl, flags, norunbuf; mtx_assert(&bqclean, MA_OWNED); @@ -2119,8 +2119,6 @@ getnewbuf_bufd_help(struct vnode *vp, in return; td = curthread; - cnt = 0; - wait = MNT_NOWAIT; rw_wlock(&nblock); while ((needsbuffer & flags) != 0) { if (vp != NULL && vp->v_type != VCHR && @@ -2134,20 +2132,23 @@ getnewbuf_bufd_help(struct vnode *vp, in * cannot be achieved by the buf_daemon, that * cannot lock the vnode. */ - if (cnt++ > 2) - wait = MNT_WAIT; - ASSERT_VOP_LOCKED(vp, "bufd_helper"); - error = VOP_ISLOCKED(vp) == LK_EXCLUSIVE ? 0 : - vn_lock(vp, LK_TRYUPGRADE); - if (error == 0) { - /* play bufdaemon */ - norunbuf = curthread_pflags_set(TDP_BUFNEED | - TDP_NORUNNINGBUF); - VOP_FSYNC(vp, wait, td); - atomic_add_long(¬bufdflushes, 1); - curthread_pflags_restore(norunbuf); - } + norunbuf = ~(TDP_BUFNEED | TDP_NORUNNINGBUF) | + (td->td_pflags & TDP_NORUNNINGBUF); + + /* + * Play bufdaemon. The getnewbuf() function + * may be called while the thread owns lock + * for another dirty buffer for the same + * vnode, which makes it impossible to use + * VOP_FSYNC() there, due to the buffer lock + * recursion. + */ + td->td_pflags |= TDP_BUFNEED | TDP_NORUNNINGBUF; + fl = buf_flush(vp, flushbufqtarget); + td->td_pflags &= norunbuf; rw_wlock(&nblock); + if (fl != 0) + continue; if ((needsbuffer & flags) == 0) break; } @@ -2566,18 +2567,20 @@ static struct kproc_desc buf_kp = { SYSINIT(bufdaemon, SI_SUB_KTHREAD_BUF, SI_ORDER_FIRST, kproc_start, &buf_kp); static int -buf_flush(int target) +buf_flush(struct vnode *vp, int target) { int flushed; - flushed = flushbufqueues(target, 0); + flushed = flushbufqueues(vp, target, 0); if (flushed == 0) { /* * Could not find any buffers without rollback * dependencies, so just write the first one * in the hopes of eventually making progress. */ - flushed = flushbufqueues(target, 1); + if (vp != NULL && target > 2) + target /= 2; + flushbufqueues(vp, target, 1); } return (flushed); } @@ -2614,7 +2617,7 @@ buf_daemon() * the I/O system. */ while (numdirtybuffers > lodirty) { - if (buf_flush(numdirtybuffers - lodirty) == 0) + if (buf_flush(NULL, numdirtybuffers - lodirty) == 0) break; kern_yield(PRI_USER); } @@ -2669,7 +2672,7 @@ SYSCTL_INT(_vfs, OID_AUTO, flushwithdeps 0, "Number of buffers flushed with dependecies that require rollbacks"); static int -flushbufqueues(int target, int flushdeps) +flushbufqueues(struct vnode *lvp, int target, int flushdeps) { struct buf *sentinel; struct vnode *vp; @@ -2679,6 +2682,7 @@ flushbufqueues(int target, int flushdeps int flushed; int queue; int error; + bool unlock; flushed = 0; queue = QUEUE_DIRTY; @@ -2700,8 +2704,18 @@ flushbufqueues(int target, int flushdeps mtx_unlock(&bqdirty); break; } - KASSERT(bp->b_qindex != QUEUE_SENTINEL, - ("parallel calls to flushbufqueues() bp %p", bp)); + /* + * Skip sentinels inserted by other invocations of the + * flushbufqueues(), taking care to not reorder them. + * + * Only flush the buffers that belong to the + * vnode locked by the curthread. + */ + if (bp->b_qindex == QUEUE_SENTINEL || (lvp != NULL && + bp->b_vp != lvp)) { + mtx_unlock(&bqdirty); + continue; + } error = BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL); mtx_unlock(&bqdirty); if (error != 0) @@ -2749,16 +2763,37 @@ flushbufqueues(int target, int flushdeps BUF_UNLOCK(bp); continue; } - error = vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT); + if (lvp == NULL) { + unlock = true; + error = vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT); + } else { + ASSERT_VOP_LOCKED(vp, "getbuf"); + unlock = false; + error = VOP_ISLOCKED(vp) == LK_EXCLUSIVE ? 0 : + vn_lock(vp, LK_TRYUPGRADE); + } if (error == 0) { CTR3(KTR_BUF, "flushbufqueue(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); - vfs_bio_awrite(bp); + if (curproc == bufdaemonproc) { + vfs_bio_awrite(bp); + } else { + bremfree(bp); + bwrite(bp); + notbufdflushes++; + } vn_finished_write(mp); - VOP_UNLOCK(vp, 0); + if (unlock) + VOP_UNLOCK(vp, 0); flushwithdeps += hasdeps; flushed++; - if (runningbufspace > hirunningspace) + + /* + * Sleeping on runningbufspace while holding + * vnode lock leads to deadlock. + */ + if (curproc == bufdaemonproc && + runningbufspace > hirunningspace) waitrunningbufspace(); continue; } From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 11:18:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09934BBB; Mon, 27 Apr 2015 11:18:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB8B6149E; Mon, 27 Apr 2015 11:18:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RBIH6v092791; Mon, 27 Apr 2015 11:18:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RBIHTB092788; Mon, 27 Apr 2015 11:18:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504271118.t3RBIHTB092788@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 27 Apr 2015 11:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282086 - in head: sys/kern usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 11:18:18 -0000 Author: trasz Date: Mon Apr 27 11:18:16 2015 New Revision: 282086 URL: https://svnweb.freebsd.org/changeset/base/282086 Log: Make setproctitle(3) work in Capsicum capability mode. This makes ctld(8) child processes to indicate initiator address and name in their titles, similar to what iscsid(8) child processes do. PR: 181352 Differential Revision: https://reviews.freebsd.org/D2363 Reviewed by: rwatson@, mjg@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_proc.c head/usr.sbin/ctld/login.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Apr 27 11:13:19 2015 (r282085) +++ head/sys/kern/kern_proc.c Mon Apr 27 11:18:16 2015 (r282086) @@ -2822,7 +2822,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC sysctl_kern_proc, "Return process table, no threads"); static SYSCTL_NODE(_kern_proc, KERN_PROC_ARGS, args, - CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, + CTLFLAG_RW | CTLFLAG_CAPWR | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, sysctl_kern_proc_args, "Process argument list"); static SYSCTL_NODE(_kern_proc, KERN_PROC_ENV, env, CTLFLAG_RD | CTLFLAG_MPSAFE, Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Mon Apr 27 11:13:19 2015 (r282085) +++ head/usr.sbin/ctld/login.c Mon Apr 27 11:18:16 2015 (r282086) @@ -800,9 +800,6 @@ login(struct connection *conn) } conn->conn_initiator_name = checked_strdup(initiator_name); log_set_peer_name(conn->conn_initiator_name); - /* - * XXX: This doesn't work (does nothing) because of Capsicum. - */ setproctitle("%s (%s)", conn->conn_initiator_addr, conn->conn_initiator_name); redirected = login_portal_redirect(conn, request); From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 11:45:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5606C23D; Mon, 27 Apr 2015 11:45:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 282C3181C; Mon, 27 Apr 2015 11:45:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RBjnfp008062; Mon, 27 Apr 2015 11:45:49 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RBjnTT008061; Mon, 27 Apr 2015 11:45:49 GMT (envelope-from des@FreeBSD.org) Message-Id: <201504271145.t3RBjnTT008061@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 27 Apr 2015 11:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282087 - head/contrib/ldns/packaging X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 11:45:49 -0000 Author: des Date: Mon Apr 27 11:45:48 2015 New Revision: 282087 URL: https://svnweb.freebsd.org/changeset/base/282087 Log: Restore packaging subdir to enable running unmodified configure script. Added: head/contrib/ldns/packaging/ - copied from r246827, vendor/ldns/dist/packaging/ From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 12:02:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C99A270E; Mon, 27 Apr 2015 12:02:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA6411A3C; Mon, 27 Apr 2015 12:02:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RC2HHd017522; Mon, 27 Apr 2015 12:02:17 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RC2G3v017517; Mon, 27 Apr 2015 12:02:16 GMT (envelope-from des@FreeBSD.org) Message-Id: <201504271202.t3RC2G3v017517@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 27 Apr 2015 12:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282088 - in head/contrib/ldns: . drill X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 12:02:18 -0000 Author: des Date: Mon Apr 27 12:02:16 2015 New Revision: 282088 URL: https://svnweb.freebsd.org/changeset/base/282088 Log: Add a script that runs configure for both ldns and drill. Run configure for drill (I forgot to do it when I imported 1.6.17, but the omission was harmless). Note that running configure --with-drill at the top level doesn't quite work for us since it is geared toward the slightly weird upstream Makefiles, which we don't use. Added: head/contrib/ldns/freebsd-configure.sh (contents, props changed) Modified: head/contrib/ldns/drill/config.h head/contrib/ldns/drill/drill.1 Modified: head/contrib/ldns/drill/config.h ============================================================================== --- head/contrib/ldns/drill/config.h Mon Apr 27 11:45:48 2015 (r282087) +++ head/contrib/ldns/drill/config.h Mon Apr 27 12:02:16 2015 (r282088) @@ -122,7 +122,7 @@ #define PACKAGE_NAME "ldns" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "ldns 1.6.16" +#define PACKAGE_STRING "ldns 1.6.17" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libdns" @@ -131,7 +131,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.6.16" +#define PACKAGE_VERSION "1.6.17" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 Modified: head/contrib/ldns/drill/drill.1 ============================================================================== --- head/contrib/ldns/drill/drill.1 Mon Apr 27 11:45:48 2015 (r282087) +++ head/contrib/ldns/drill/drill.1 Mon Apr 27 12:02:16 2015 (r282088) @@ -83,6 +83,11 @@ Chase the signature(s) of 'name' to a kn the tree as possible. .TP +\fB\-I \fIIPv4 or IPv6 address\fR +Source address to query from. The source address has to be present +on an interface of the host running drill. + +.TP \fB\-V \fIlevel\fR Be more verbose. Set level to 5 to see the actual query that is sent. @@ -217,6 +222,12 @@ specify named base64 tsig key, and optio \fB\-z \fR don't randomize the nameserver list before sending queries. +.SH "EXIT STATUS" +The exit status is 0 if the looked up answer is secure and trusted, +or insecure. +The exit status is not 0 if the looked up answer is untrusted or bogus, +or an error occurred while performing the lookup. + .SH "FILES" .TP /etc/unbound/root.key Added: head/contrib/ldns/freebsd-configure.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ldns/freebsd-configure.sh Mon Apr 27 12:02:16 2015 (r282088) @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +set -e + +ldns=$(dirname $(realpath $0)) +cd $ldns + +libtoolize --copy +autoheader +autoconf +./configure --prefix= --exec-prefix=/usr + +cd $ldns/drill +autoheader +autoconf +./configure --prefix= --exec-prefix=/usr From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 12:06:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAB6A8EF; Mon, 27 Apr 2015 12:06:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 952CE1A7E; Mon, 27 Apr 2015 12:06:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RC6GP4018128; Mon, 27 Apr 2015 12:06:16 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RC6DlD018110; Mon, 27 Apr 2015 12:06:13 GMT (envelope-from des@FreeBSD.org) Message-Id: <201504271206.t3RC6DlD018110@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 27 Apr 2015 12:06:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282089 - in head/contrib/unbound: . compat daemon doc iterator libunbound libunbound/python services smallapp util validator X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 12:06:16 -0000 Author: des Date: Mon Apr 27 12:06:13 2015 New Revision: 282089 URL: https://svnweb.freebsd.org/changeset/base/282089 Log: Upgrade Unbound to 1.5.3. Modified: head/contrib/unbound/Makefile.in head/contrib/unbound/compat/getentropy_linux.c head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/unbound.c head/contrib/unbound/daemon/worker.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3 head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8 head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8 head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8 head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1 head/contrib/unbound/doc/unbound-host.1.in head/contrib/unbound/doc/unbound.8 head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5 head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/iterator/iter_scrub.c head/contrib/unbound/iterator/iter_utils.c head/contrib/unbound/iterator/iter_utils.h head/contrib/unbound/iterator/iterator.c head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/libunbound/python/libunbound.i head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/localzone.c head/contrib/unbound/services/localzone.h head/contrib/unbound/smallapp/unbound-checkconf.c head/contrib/unbound/smallapp/unbound-control-setup.sh head/contrib/unbound/smallapp/unbound-control-setup.sh.in head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.y head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/net_help.c head/contrib/unbound/util/rtt.c head/contrib/unbound/util/rtt.h head/contrib/unbound/validator/val_secalgo.c head/contrib/unbound/validator/val_utils.c head/contrib/unbound/validator/val_utils.h head/contrib/unbound/validator/validator.c Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/Makefile.in ============================================================================== --- head/contrib/unbound/Makefile.in Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/Makefile.in Mon Apr 27 12:06:13 2015 (r282089) @@ -459,8 +459,8 @@ strip: $(STRIP) unbound$(EXEEXT) $(STRIP) unbound-checkconf$(EXEEXT) $(STRIP) unbound-control$(EXEEXT) - $(STRIP) unbound-host$(EXEEXT) - $(STRIP) unbound-anchor$(EXEEXT) + $(STRIP) unbound-host$(EXEEXT) || $(STRIP) .libs/unbound-host$(EXEEXT) + $(STRIP) unbound-anchor$(EXEEXT) || $(STRIP) .libs/unbound-anchor$(EXEEXT) pythonmod-install: $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG) @@ -576,6 +576,7 @@ depend: -e 's?$$(srcdir)/util/configlexer.c?util/configlexer.c?g' \ -e 's?$$(srcdir)/util/configparser.c?util/configparser.c?g' \ -e 's?$$(srcdir)/util/configparser.h?util/configparser.h?g' \ + -e 's?$$(srcdir)/dnstap/dnstap_config.h??g' \ -e 's?$$(srcdir)/pythonmod/pythonmod.h?$$(PYTHONMOD_HEADER)?g' \ -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' \ > $(DEPEND_TMP) @@ -689,13 +690,14 @@ iter_utils.lo iter_utils.o: $(srcdir)/it $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/ldns/sbuffer.h listen_dnsport.lo listen_dnsport.o: $(srcdir)/services/listen_dnsport.c config.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/services/outside_network.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h \ - $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h $(srcdir)/ldns/sbuffer.h localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h \ $(srcdir)/ldns/sbuffer.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h + $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ @@ -711,15 +713,16 @@ modstack.lo modstack.o: $(srcdir)/servic $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/netevent.h + $(srcdir)/util/netevent.h outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ - $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rtt.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/random.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rtt.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/dnstap/dnstap.h \ alloc.lo alloc.o: $(srcdir)/util/alloc.c config.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/regional.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ @@ -732,8 +735,8 @@ config_file.lo config_file.o: $(srcdir)/ $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/parseutil.h \ - $(srcdir)/util/iana_ports.inc + $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h $(srcdir)/util/rtt.h $(srcdir)/ldns/wire2str.h \ + $(srcdir)/ldns/parseutil.h $(srcdir)/util/iana_ports.inc configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h util/configparser.h configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ @@ -743,15 +746,16 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ - $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_nsec3.h \ - $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_neg.h \ - $(srcdir)/validator/autotrust.h $(srcdir)/util/storage/dnstree.h $(srcdir)/libunbound/libworker.h \ - $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h $(srcdir)/util/config_file.h + $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ + $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h \ + $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/util/config_file.h locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/ldns/sbuffer.h mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ @@ -767,6 +771,7 @@ netevent.lo netevent.o: $(srcdir)/util/n $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/dnstap/dnstap.h \ $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h \ @@ -854,8 +859,8 @@ val_nsec.lo val_nsec.o: $(srcdir)/valida $(srcdir)/validator/val_utils.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ $(srcdir)/ldns/rrdef.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h -val_secalgo.lo val_secalgo.o: $(srcdir)/validator/val_secalgo.c config.h $(srcdir)/validator/val_secalgo.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ +val_secalgo.lo val_secalgo.o: $(srcdir)/validator/val_secalgo.c config.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_secalgo.h \ $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/keyraw.h \ $(srcdir)/ldns/sbuffer.h \ @@ -884,6 +889,11 @@ dns64.lo dns64.o: $(srcdir)/dns64/dns64. $(srcdir)/util/regional.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h +dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ + $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/dnstap/dnstap.pb-c.h +dnstap.pb-c.lo dnstap.pb-c.o: $(srcdir)/dnstap/dnstap.pb-c.c $(srcdir)/dnstap/dnstap.pb-c.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/unitmain.h \ $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/rrdef.h @@ -894,7 +904,8 @@ unitlruhash.lo unitlruhash.o: $(srcdir)/ $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/log.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/random.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ @@ -935,19 +946,21 @@ cachedump.lo cachedump.o: $(srcdir)/daem $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ - $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h \ - $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h + $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h \ + $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h \ + $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/ldns/wire2str.h \ + $(srcdir)/ldns/str2wire.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/netevent.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/daemon/remote.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ + $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ + $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \ @@ -959,11 +972,12 @@ remote.lo remote.o: $(srcdir)/daemon/rem $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/localzone.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ @@ -973,14 +987,15 @@ stats.lo stats.o: $(srcdir)/daemon/stats $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/daemon/daemon.h \ - $(srcdir)/services/modstack.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/outside_network.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h \ - $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h + $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h \ - $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ + $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ + $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ @@ -993,7 +1008,8 @@ worker.lo worker.o: $(srcdir)/daemon/wor $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ @@ -1008,9 +1024,10 @@ testbound.lo testbound.o: $(srcdir)/test $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/ldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/util/log.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/services/listen_dnsport.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ @@ -1021,7 +1038,8 @@ worker.lo worker.o: $(srcdir)/daemon/wor $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/outside_network.h \ @@ -1036,10 +1054,11 @@ acl_list.lo acl_list.o: $(srcdir)/daemon $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/netevent.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/daemon/remote.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ + $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ + $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \ @@ -1049,12 +1068,12 @@ stats.lo stats.o: $(srcdir)/daemon/stats $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/daemon/daemon.h \ - $(srcdir)/services/modstack.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/outside_network.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h \ - $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h + $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h replay.lo replay.o: $(srcdir)/testcode/replay.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h @@ -1063,10 +1082,10 @@ fake_event.lo fake_event.o: $(srcdir)/te $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/config_file.h $(srcdir)/services/listen_dnsport.h \ - $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h + $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h lock_verify.lo lock_verify.o: $(srcdir)/testcode/lock_verify.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ @@ -1118,13 +1137,14 @@ libworker.lo libworker.o: $(srcdir)/libu $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h \ $(srcdir)/ldns/sbuffer.h $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h \ - $(srcdir)/util/netevent.h $(srcdir)/services/mesh.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h \ - $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/ldns/str2wire.h + $(srcdir)/util/netevent.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/services/localzone.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/ldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ @@ -1144,7 +1164,8 @@ perf.lo perf.o: $(srcdir)/testcode/perf. delayer.lo delayer.o: $(srcdir)/testcode/delayer.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h unbound-control.lo unbound-control.o: $(srcdir)/smallapp/unbound-control.c config.h \ - $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h + $(srcdir)/util/log.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h unbound-anchor.lo unbound-anchor.o: $(srcdir)/smallapp/unbound-anchor.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/ldns/rrdef.h \ @@ -1155,13 +1176,14 @@ pythonmod_utils.lo pythonmod_utils.o: $( $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ - $(srcdir)/ldns/sbuffer.h + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/ldns/sbuffer.h win_svc.lo win_svc.o: $(srcdir)/winrc/win_svc.c config.h $(srcdir)/winrc/win_svc.h $(srcdir)/winrc/w_inst.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/netevent.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/daemon/remote.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ + $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ + $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/util/winsock_event.h w_inst.lo w_inst.o: $(srcdir)/winrc/w_inst.c config.h $(srcdir)/winrc/w_inst.h $(srcdir)/winrc/win_svc.h unbound-service-install.lo unbound-service-install.o: $(srcdir)/winrc/unbound-service-install.c config.h \ Modified: head/contrib/unbound/compat/getentropy_linux.c ============================================================================== --- head/contrib/unbound/compat/getentropy_linux.c Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/compat/getentropy_linux.c Mon Apr 27 12:06:13 2015 (r282089) @@ -93,6 +93,13 @@ getentropy(void *buf, size_t len) return -1; } +#ifdef SYS_getrandom + /* try to use getrandom syscall introduced with kernel 3.17 */ + ret = syscall(SYS_getrandom, buf, len, 0); + if (ret != -1) + return (ret); +#endif /* SYS_getrandom */ + /* * Try to get entropy with /dev/urandom * @@ -474,22 +481,24 @@ getentropy_fallback(void *buf, size_t le HD(cnt); } -#ifdef AT_RANDOM +#ifdef HAVE_GETAUXVAL +# ifdef AT_RANDOM /* Not as random as you think but we take what we are given */ p = (char *) getauxval(AT_RANDOM); if (p) HR(p, 16); -#endif -#ifdef AT_SYSINFO_EHDR +# endif +# ifdef AT_SYSINFO_EHDR p = (char *) getauxval(AT_SYSINFO_EHDR); if (p) HR(p, pgs); -#endif -#ifdef AT_BASE +# endif +# ifdef AT_BASE p = (char *) getauxval(AT_BASE); if (p) HD(p); -#endif +# endif +#endif /* HAVE_GETAUXVAL */ SHA512_Final(results, &ctx); memcpy((char*)buf + i, results, min(sizeof(results), len - i)); Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/config.h Mon Apr 27 12:06:13 2015 (r282089) @@ -43,7 +43,7 @@ /* Whether the C compiler accepts the "unused" attribute */ #define HAVE_ATTR_UNUSED 1 -/* Define to 1 if your system has a working `chown' function. */ +/* Define to 1 if you have the `chown' function. */ #define HAVE_CHOWN 1 /* Define to 1 if you have the `chroot' function. */ @@ -147,6 +147,9 @@ /* Whether getaddrinfo is available */ #define HAVE_GETADDRINFO 1 +/* Define to 1 if you have the `getauxval' function. */ +/* #undef HAVE_GETAUXVAL */ + /* Define to 1 if you have the `getentropy' function. */ /* #undef HAVE_GETENTROPY */ @@ -483,7 +486,7 @@ #define PACKAGE_NAME "unbound" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "unbound 1.5.1" +#define PACKAGE_STRING "unbound 1.5.3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "unbound" @@ -492,7 +495,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.5.1" +#define PACKAGE_VERSION "1.5.3" /* default pidfile location */ #define PIDFILE "/var/unbound/unbound.pid" @@ -511,7 +514,7 @@ #define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" /* version number for resource files */ -#define RSRC_PACKAGE_VERSION 1,5,1,0 +#define RSRC_PACKAGE_VERSION 1,5,3,0 /* Directory to chdir to */ #define RUN_DIR "/var/unbound" @@ -800,6 +803,10 @@ #define ARG_LL "%I64" #endif +#ifndef AF_LOCAL +#define AF_LOCAL AF_UNIX +#endif + #ifdef HAVE_ATTR_FORMAT Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/config.h.in Mon Apr 27 12:06:13 2015 (r282089) @@ -42,7 +42,7 @@ /* Whether the C compiler accepts the "unused" attribute */ #undef HAVE_ATTR_UNUSED -/* Define to 1 if your system has a working `chown' function. */ +/* Define to 1 if you have the `chown' function. */ #undef HAVE_CHOWN /* Define to 1 if you have the `chroot' function. */ @@ -146,6 +146,9 @@ /* Whether getaddrinfo is available */ #undef HAVE_GETADDRINFO +/* Define to 1 if you have the `getauxval' function. */ +#undef HAVE_GETAUXVAL + /* Define to 1 if you have the `getentropy' function. */ #undef HAVE_GETENTROPY @@ -799,6 +802,10 @@ #define ARG_LL "%I64" #endif +#ifndef AF_LOCAL +#define AF_LOCAL AF_UNIX +#endif + #ifdef HAVE_ATTR_FORMAT Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/configure Mon Apr 27 12:06:13 2015 (r282089) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for unbound 1.5.1. +# Generated by GNU Autoconf 2.69 for unbound 1.5.3. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='unbound' PACKAGE_TARNAME='unbound' -PACKAGE_VERSION='1.5.1' -PACKAGE_STRING='unbound 1.5.1' +PACKAGE_VERSION='1.5.3' +PACKAGE_STRING='unbound 1.5.3' PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl' PACKAGE_URL='' @@ -733,6 +733,7 @@ UNBOUND_PIDFILE UNBOUND_SHARE_DIR UNBOUND_CHROOT_DIR UNBOUND_RUN_DIR +ub_conf_dir ub_conf_file EGREP GREP @@ -1387,7 +1388,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures unbound 1.5.1 to adapt to many kinds of systems. +\`configure' configures unbound 1.5.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1452,7 +1453,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of unbound 1.5.1:";; + short | recursive ) echo "Configuration of unbound 1.5.3:";; esac cat <<\_ACEOF @@ -1627,7 +1628,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -unbound configure 1.5.1 +unbound configure 1.5.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2336,7 +2337,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by unbound $as_me 1.5.1, which was +It was created by unbound $as_me 1.5.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2688,11 +2689,11 @@ UNBOUND_VERSION_MAJOR=1 UNBOUND_VERSION_MINOR=5 -UNBOUND_VERSION_MICRO=1 +UNBOUND_VERSION_MICRO=3 LIBUNBOUND_CURRENT=5 -LIBUNBOUND_REVISION=3 +LIBUNBOUND_REVISION=6 LIBUNBOUND_AGE=3 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -2732,7 +2733,9 @@ LIBUNBOUND_AGE=3 # 1.4.21 had 4:1:2 # 1.4.22 had 4:1:2 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr -# 1.5.1 had 5:4:3 +# 1.5.1 had 5:3:3 +# 1.5.2 had 5:5:3 +# 1.5.3 had 5:6:3 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -4047,6 +4050,30 @@ cat >>confdefs.h <<_ACEOF #define CONFIGFILE "$hdr_config" _ACEOF +ub_conf_dir=`$as_dirname -- "$ub_conf_file" || +$as_expr X"$ub_conf_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ub_conf_file" : 'X\(//\)[^/]' \| \ + X"$ub_conf_file" : 'X\(//\)$' \| \ + X"$ub_conf_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ub_conf_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + # Determine run, chroot directory and pidfile locations @@ -17932,7 +17959,7 @@ if test "$ac_res" != no; then : fi -for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent +for ac_func in tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -18227,6 +18254,62 @@ done # this lib needed for sha2 on solaris LIBS="$LIBS -lmd" fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 +$as_echo_n "checking for library containing clock_gettime... " >&6; } +if ${ac_cv_search_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_clock_gettime=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_clock_gettime+:} false; then : + break +fi +done +if ${ac_cv_search_clock_gettime+:} false; then : + +else + ac_cv_search_clock_gettime=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 +$as_echo "$ac_cv_search_clock_gettime" >&6; } +ac_res=$ac_cv_search_clock_gettime +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + ;; Linux|*) case " $LIBOBJS " in @@ -18271,6 +18354,17 @@ fi done + for ac_func in getauxval +do : + ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval" +if test "x$ac_cv_func_getauxval" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETAUXVAL 1 +_ACEOF + +fi +done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : @@ -18768,7 +18862,7 @@ _ACEOF -version=1.5.1 +version=1.5.3 date=`date +'%b %e, %Y'` @@ -19283,7 +19377,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by unbound $as_me 1.5.1, which was +This file was extended by unbound $as_me 1.5.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19349,7 +19443,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -unbound config.status 1.5.1 +unbound config.status 1.5.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/configure.ac Mon Apr 27 12:06:13 2015 (r282089) @@ -10,14 +10,14 @@ sinclude(dnstap/dnstap.m4) # must be numbers. ac_defun because of later processing m4_define([VERSION_MAJOR],[1]) m4_define([VERSION_MINOR],[5]) -m4_define([VERSION_MICRO],[1]) +m4_define([VERSION_MICRO],[3]) AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound) AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR]) AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR]) AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO]) LIBUNBOUND_CURRENT=5 -LIBUNBOUND_REVISION=3 +LIBUNBOUND_REVISION=6 LIBUNBOUND_AGE=3 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 @@ -57,7 +57,9 @@ LIBUNBOUND_AGE=3 # 1.4.21 had 4:1:2 # 1.4.22 had 4:1:2 # 1.5.0 had 5:3:3 # adds ub_ctx_add_ta_autr -# 1.5.1 had 5:4:3 +# 1.5.1 had 5:3:3 +# 1.5.2 had 5:5:3 +# 1.5.3 had 5:6:3 # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary @@ -118,6 +120,8 @@ AC_ARG_WITH([conf_file], AC_SUBST(ub_conf_file) ACX_ESCAPE_BACKSLASH($ub_conf_file, hdr_config) AC_DEFINE_UNQUOTED(CONFIGFILE, ["$hdr_config"], [Pathname to the Unbound configuration file]) +ub_conf_dir=`AS_DIRNAME(["$ub_conf_file"])` +AC_SUBST(ub_conf_dir) # Determine run, chroot directory and pidfile locations AC_ARG_WITH(run-dir, @@ -975,7 +979,7 @@ AC_INCLUDES_DEFAULT #endif ]) AC_SEARCH_LIBS([setusercontext], [util]) -AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent]) +AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill chown sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex endservent endprotoent]) AC_CHECK_FUNCS([setresuid],,[AC_CHECK_FUNCS([setreuid])]) AC_CHECK_FUNCS([setresgid],,[AC_CHECK_FUNCS([setregid])]) @@ -1018,6 +1022,7 @@ if test "$USE_NSS" = "no"; then # this lib needed for sha2 on solaris LIBS="$LIBS -lmd" fi + AC_SEARCH_LIBS([clock_gettime], [rt]) ;; Linux|*) AC_LIBOBJ(getentropy_linux) @@ -1026,6 +1031,7 @@ if test "$USE_NSS" = "no"; then AC_LIBOBJ(sha512) ]) AC_CHECK_HEADERS([sys/sysctl.h],,, [AC_INCLUDES_DEFAULT]) + AC_CHECK_FUNCS([getauxval]) AC_SEARCH_LIBS([clock_gettime], [rt]) ;; esac @@ -1211,6 +1217,10 @@ dnl includes #else #define ARG_LL "%I64" #endif + +#ifndef AF_LOCAL +#define AF_LOCAL AF_UNIX +#endif ] AHX_CONFIG_FORMAT_ATTRIBUTE Modified: head/contrib/unbound/daemon/remote.c ============================================================================== --- head/contrib/unbound/daemon/remote.c Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/daemon/remote.c Mon Apr 27 12:06:13 2015 (r282089) @@ -327,9 +327,14 @@ add_open(const char* ip, int nr, struct * group as the user we run as. */ if(fd != -1) { - if (cfg->username && cfg->username[0]) - chown(ip, cfg->uid, cfg->gid); +#ifdef HAVE_CHOWN + if (cfg->username && cfg->username[0] && + cfg_uid != (uid_t)-1) + chown(ip, cfg_uid, cfg_gid); chmod(ip, (mode_t)(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)); +#else + (void)cfg; +#endif } } else { hints.ai_socktype = SOCK_STREAM; Modified: head/contrib/unbound/daemon/unbound.c ============================================================================== --- head/contrib/unbound/daemon/unbound.c Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/daemon/unbound.c Mon Apr 27 12:06:13 2015 (r282089) @@ -503,26 +503,28 @@ perform_setup(struct daemon* daemon, str #ifdef HAVE_KILL if(cfg->pidfile && cfg->pidfile[0]) { writepid(daemon->pidfile, getpid()); - if(cfg->username && cfg->username[0]) { - if(chown(daemon->pidfile, cfg->uid, cfg->gid) == -1) { + if(cfg->username && cfg->username[0] && cfg_uid != (uid_t)-1) { +# ifdef HAVE_CHOWN + if(chown(daemon->pidfile, cfg_uid, cfg_gid) == -1) { log_err("cannot chown %u.%u %s: %s", - (unsigned)cfg->uid, (unsigned)cfg->gid, + (unsigned)cfg_uid, (unsigned)cfg_gid, daemon->pidfile, strerror(errno)); } +# endif /* HAVE_CHOWN */ } } #else (void)daemon; -#endif +#endif /* HAVE_KILL */ /* Set user context */ #ifdef HAVE_GETPWNAM - if(cfg->username && cfg->username[0]) { + if(cfg->username && cfg->username[0] && cfg_uid != (uid_t)-1) { #ifdef HAVE_SETUSERCONTEXT /* setusercontext does initgroups, setuid, setgid, and * also resource limits from login config, but we * still call setresuid, setresgid to be sure to set all uid*/ - if(setusercontext(NULL, pwd, cfg->uid, (unsigned) + if(setusercontext(NULL, pwd, cfg_uid, (unsigned) LOGIN_SETALL & ~LOGIN_SETUSER & ~LOGIN_SETGROUP) != 0) log_warn("unable to setusercontext %s: %s", cfg->username, strerror(errno)); @@ -584,29 +586,29 @@ perform_setup(struct daemon* daemon, str /* drop permissions after chroot, getpwnam, pidfile, syslog done*/ #ifdef HAVE_GETPWNAM - if(cfg->username && cfg->username[0]) { + if(cfg->username && cfg->username[0] && cfg_uid != (uid_t)-1) { # ifdef HAVE_INITGROUPS - if(initgroups(cfg->username, cfg->gid) != 0) + if(initgroups(cfg->username, cfg_gid) != 0) log_warn("unable to initgroups %s: %s", cfg->username, strerror(errno)); # endif /* HAVE_INITGROUPS */ endpwent(); #ifdef HAVE_SETRESGID - if(setresgid(cfg->gid,cfg->gid,cfg->gid) != 0) + if(setresgid(cfg_gid,cfg_gid,cfg_gid) != 0) #elif defined(HAVE_SETREGID) && !defined(DARWIN_BROKEN_SETREUID) - if(setregid(cfg->gid,cfg->gid) != 0) + if(setregid(cfg_gid,cfg_gid) != 0) #else /* use setgid */ - if(setgid(cfg->gid) != 0) + if(setgid(cfg_gid) != 0) #endif /* HAVE_SETRESGID */ fatal_exit("unable to set group id of %s: %s", cfg->username, strerror(errno)); #ifdef HAVE_SETRESUID - if(setresuid(cfg->uid,cfg->uid,cfg->uid) != 0) + if(setresuid(cfg_uid,cfg_uid,cfg_uid) != 0) #elif defined(HAVE_SETREUID) && !defined(DARWIN_BROKEN_SETREUID) - if(setreuid(cfg->uid,cfg->uid) != 0) + if(setreuid(cfg_uid,cfg_uid) != 0) #else /* use setuid */ - if(setuid(cfg->uid) != 0) + if(setuid(cfg_uid) != 0) #endif /* HAVE_SETRESUID */ fatal_exit("unable to set user id of %s: %s", cfg->username, strerror(errno)); @@ -651,7 +653,8 @@ run_daemon(const char* cfgfile, int cmdl log_warn("Continuing with default config settings"); } apply_settings(daemon, cfg, cmdline_verbose, debug_mode); - config_lookup_uid(cfg); + if(!done_setup) + config_lookup_uid(cfg); /* prepare */ if(!daemon_open_shared_ports(daemon)) Modified: head/contrib/unbound/daemon/worker.c ============================================================================== --- head/contrib/unbound/daemon/worker.c Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/daemon/worker.c Mon Apr 27 12:06:13 2015 (r282089) @@ -900,7 +900,7 @@ worker_handle_request(struct comm_point* goto send_reply; } if(local_zones_answer(worker->daemon->local_zones, &qinfo, &edns, - c->buffer, worker->scratchpad)) { + c->buffer, worker->scratchpad, repinfo)) { regional_free_all(worker->scratchpad); if(sldns_buffer_limit(c->buffer) == 0) { comm_point_drop_reply(repinfo); Modified: head/contrib/unbound/doc/Changelog ============================================================================== --- head/contrib/unbound/doc/Changelog Mon Apr 27 12:02:16 2015 (r282088) +++ head/contrib/unbound/doc/Changelog Mon Apr 27 12:06:13 2015 (r282089) @@ -1,12 +1,112 @@ -8 December 2014: Wouter - - Fix CVE-2014-8602: denial of service by making resolver chase - endless series of delegations. +23 March 2015: Wouter + - Fix segfault on user not found at startup (from Maciej Soltysiak). + +2 March 2015: Wouter + - iana portlist update. + +20 February 2015: Wouter + - Use the getrandom syscall introduced in Linux 3.17 (from Heiner + Kallweit). + - Fix #645 Portability to Solaris 10, use AF_LOCAL. + - Fix #646 Portability to Solaris, -lrt for getentropy_solaris. + - Fix #647 crash in 1.5.2 because pwd.db no longer accessible after + reload. + +19 February 2015: Wouter + - 1.5.2 release tag. + - svn trunk contains 1.5.3 under development. + +13 February 2015: Wouter + - Fix #643: doc/example.conf.in: unnecessary whitespace. + +12 February 2015: Wouter + - tag 1.5.2rc1 + +11 February 2015: Wouter + - iana portlist update. + +10 February 2015: Wouter + - Fix scrubber with harden-glue turned off to reject NS (and other + not-address) records. + +9 February 2015: Wouter + - Fix validation failure in case upstream forwarder (ISC BIND) does + not have the same trust anchors and decides to insert unsigned NS + record in authority section. + +2 February 2015: Wouter + - infra-cache-min-rtt patch from Florian Riehm, for expected long + uplink roundtrip times. + +30 January 2015: Wouter + - Fix 0x20 capsforid fallback to omit gratuitous NS and additional + section changes. + - Portability fix for Solaris ('sun' is not usable for a variable). + +29 January 2015: Wouter + - Fix pyunbound byte string representation for python3. + +26 January 2015: Wouter + - Fix unintended use of gcc extension for incomplete enum types, + compile with pedantic c99 compliance (from Daniel Dickman). + +23 January 2015: Wouter + - windows port fixes, no AF_LOCAL, no chown, no chmod(grp). + +16 January 2015: Wouter + - unit test for local unix connection. Documentation and log_addr + does not inspect port for AF_LOCAL. + - unbound-checkconf -f prints chroot with pidfile path. + +13 January 2015: Wouter + - iana portlist update. + +12 January 2015: Wouter + - Cast sun_len sizeof to socklen_t. + - Fix pyunbound ord call, portable for python 2 and 3. + +7 January 2015: Wouter + - Fix warnings in pythonmod changes. + +6 January 2015: Wouter + - iana portlist update. - patch for remote control over local sockets, from Dag-Erling Smorgrav, Ilya Bakulin. Use control-interface: /path/sock and control-use-cert: no. - Fixup that patch and uid lookup (only for daemon). - coded the default of control-use-cert, to yes. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 13:48:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 132F524A; Mon, 27 Apr 2015 13:48:02 +0000 (UTC) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFFA21695; Mon, 27 Apr 2015 13:48:01 +0000 (UTC) Received: by igblo3 with SMTP id lo3so62319561igb.1; Mon, 27 Apr 2015 06:48:01 -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:message-id :subject:to:cc:content-type; bh=3otOs8Rx97204ePg6Lnq72nYUmheTgz4gAJ4jeOPc/8=; b=YQUpNUEYW3skWmA1gwpuKdoxNjlWk6UJFzDilw5qabA2cdO9O1n8TUg24STu1mqJZg joBLyRQCiT0sn79h5bDwF9nOQ4BZzGoxzGYYMDhdlPqvRV/3Fz3fvZMw8RP3YyRERsEo 4BHTHdFQ46OOzxzNnd1NBDf9x0+WmNOE8oKuOKRKWfKZ/SpCka2CbksXLl8kv8mHUYb9 3/YDKtNjfasZ4AdHeweUPq3EItemTLB9IsV/mh+qzwHpCMGVX5SDFUY/wJIN0Rua9uXN DTJpiWO4GDUSWZzGfhWskAwTqYAYgFcSQPtLpWpQo6vg3t/QK6Tigoh+DuCJuI+SPslm Es2g== X-Received: by 10.42.104.143 with SMTP id r15mr12392941ico.33.1430142481124; Mon, 27 Apr 2015 06:48:01 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.48.3 with HTTP; Mon, 27 Apr 2015 06:47:40 -0700 (PDT) In-Reply-To: <201504270649.t3R6nR68054468@svn.freebsd.org> References: <201504270649.t3R6nR68054468@svn.freebsd.org> From: Ed Maste Date: Mon, 27 Apr 2015 09:47:40 -0400 X-Google-Sender-Auth: vIoAJcLTeAPJmofMeswqSaSNzmw Message-ID: Subject: Re: svn commit: r282057 - in head/lib: libc librt libthr msun To: Garrett Cooper Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 13:48:02 -0000 On 27 April 2015 at 02:49, Garrett Cooper wrote: > Author: ngie > Date: Mon Apr 27 06:49:27 2015 > New Revision: 282057 > URL: https://svnweb.freebsd.org/changeset/base/282057 > > Log: > Build/install libc, librt, libthr, and msun NetBSD test suites on all > architectures It looks like this broke arm64: https://jenkins.freebsd.org/job/FreeBSD_HEAD_arm64/61/ From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 13:56:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 156657CA; Mon, 27 Apr 2015 13:56:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0378817B6; Mon, 27 Apr 2015 13:56:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RDuL2l073249; Mon, 27 Apr 2015 13:56:21 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RDuLGP073244; Mon, 27 Apr 2015 13:56:21 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504271356.t3RDuLGP073244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 27 Apr 2015 13:56:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282091 - in head/lib: libc/tests/sys libthr/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 13:56:22 -0000 Author: andrew Date: Mon Apr 27 13:56:20 2015 New Revision: 282091 URL: https://svnweb.freebsd.org/changeset/base/282091 Log: Disable the tests that use makecontext on arm64, it still needs to be written. Modified: head/lib/libc/tests/sys/Makefile head/lib/libthr/tests/Makefile Modified: head/lib/libc/tests/sys/Makefile ============================================================================== --- head/lib/libc/tests/sys/Makefile Mon Apr 27 12:54:04 2015 (r282090) +++ head/lib/libc/tests/sys/Makefile Mon Apr 27 13:56:20 2015 (r282091) @@ -12,7 +12,9 @@ NETBSD_ATF_TESTS_C+= clock_gettime_test NETBSD_ATF_TESTS_C+= connect_test NETBSD_ATF_TESTS_C+= dup_test NETBSD_ATF_TESTS_C+= fsync_test +.if ${MACHINE} != "arm64" # ARM64TODO: Missing makecontext NETBSD_ATF_TESTS_C+= getcontext_test +.endif NETBSD_ATF_TESTS_C+= getgroups_test NETBSD_ATF_TESTS_C+= getitimer_test NETBSD_ATF_TESTS_C+= getlogin_test Modified: head/lib/libthr/tests/Makefile ============================================================================== --- head/lib/libthr/tests/Makefile Mon Apr 27 12:54:04 2015 (r282090) +++ head/lib/libthr/tests/Makefile Mon Apr 27 13:56:20 2015 (r282091) @@ -25,7 +25,9 @@ NETBSD_ATF_TESTS_C+= sigmask_test NETBSD_ATF_TESTS_C+= sigsuspend_test NETBSD_ATF_TESTS_C+= siglongjmp_test NETBSD_ATF_TESTS_C+= sleep_test +.if ${MACHINE} != "arm64" # ARM64TODO: Missing makecontext NETBSD_ATF_TESTS_C+= swapcontext_test +.endif NETBSD_ATF_TESTS_SH= atexit_test NETBSD_ATF_TESTS_SH+= cancel_test From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 13:57:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA538A89; Mon, 27 Apr 2015 13:57:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B56E617FE; Mon, 27 Apr 2015 13:57:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RDveRt073465; Mon, 27 Apr 2015 13:57:40 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RDveT0073464; Mon, 27 Apr 2015 13:57:40 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504271357.t3RDveT0073464@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 27 Apr 2015 13:57:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282092 - head/lib/msun/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 13:57:40 -0000 Author: andrew Date: Mon Apr 27 13:57:39 2015 New Revision: 282092 URL: https://svnweb.freebsd.org/changeset/base/282092 Log: Correct the spelling of MACHINE_CPUARCH, MACHINE_CPU is not set on arm64. Modified: head/lib/msun/tests/Makefile Modified: head/lib/msun/tests/Makefile ============================================================================== --- head/lib/msun/tests/Makefile Mon Apr 27 13:56:20 2015 (r282091) +++ head/lib/msun/tests/Makefile Mon Apr 27 13:57:39 2015 (r282092) @@ -7,7 +7,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/ TESTSDIR= ${TESTSBASE}/lib/msun .if ${MACHINE} == "sparc" || ${MACHINE} == "i386" \ - || ${MACHINE} == "amd64" || ${MACHINE_CPU} == "arm" \ + || ${MACHINE} == "amd64" || ${MACHINE_CPUARCH} == "arm" \ || ${MACHINE} == "sparc64" CFLAGS+= -DHAVE_FENV_H .endif From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 14:18:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1274401; Mon, 27 Apr 2015 14:18:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B000E1A64; Mon, 27 Apr 2015 14:18:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3REI8Qr084045; Mon, 27 Apr 2015 14:18:08 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3REI8D2084043; Mon, 27 Apr 2015 14:18:08 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201504271418.t3REI8D2084043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Mon, 27 Apr 2015 14:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282093 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 14:18:08 -0000 Author: zbb Date: Mon Apr 27 14:18:07 2015 New Revision: 282093 URL: https://svnweb.freebsd.org/changeset/base/282093 Log: Fix wrong cast of pointer to u_int in db_interface.c on ARM64 Fix to commit introduced in: r282078 Pointed out by: andrew Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/db_interface.c Modified: head/sys/arm64/arm64/db_interface.c ============================================================================== --- head/sys/arm64/arm64/db_interface.c Mon Apr 27 13:57:39 2015 (r282092) +++ head/sys/arm64/arm64/db_interface.c Mon Apr 27 14:18:07 2015 (r282093) @@ -131,7 +131,7 @@ db_read_bytes(vm_offset_t addr, size_t s const char *src = (const char *)addr; while (size-- > 0) { - if (db_validate_address((u_int)src)) { + if (db_validate_address((vm_offset_t)src)) { db_printf("address %p is invalid\n", src); return (-1); } @@ -150,7 +150,7 @@ db_write_bytes(vm_offset_t addr, size_t dst = (char *)addr; while (size-- > 0) { - if (db_validate_address((u_int)dst)) { + if (db_validate_address((vm_offset_t)dst)) { db_printf("address %p is invalid\n", dst); return (-1); } From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 15:16:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D7E64FC; Mon, 27 Apr 2015 15:16:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BC6411FF; Mon, 27 Apr 2015 15:16:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RFGqLb016300; Mon, 27 Apr 2015 15:16:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RFGqn9016299; Mon, 27 Apr 2015 15:16:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504271516.t3RFGqn9016299@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 27 Apr 2015 15:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282096 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 15:16:52 -0000 Author: andrew Date: Mon Apr 27 15:16:51 2015 New Revision: 282096 URL: https://svnweb.freebsd.org/changeset/base/282096 Log: Return NULL on failure from nexus_alloc_resource as it reutrns a pointer. Modified: head/sys/arm64/arm64/nexus.c Modified: head/sys/arm64/arm64/nexus.c ============================================================================== --- head/sys/arm64/arm64/nexus.c Mon Apr 27 15:00:16 2015 (r282095) +++ head/sys/arm64/arm64/nexus.c Mon Apr 27 15:16:51 2015 (r282096) @@ -208,12 +208,12 @@ nexus_alloc_resource(device_t bus, devic break; default: - return (0); + return (NULL); } rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == 0) - return (0); + return (NULL); rman_set_rid(rv, *rid); rman_set_bushandle(rv, rman_get_start(rv)); @@ -221,7 +221,7 @@ nexus_alloc_resource(device_t bus, devic if (needactivate) { if (bus_activate_resource(child, type, *rid, rv)) { rman_release_resource(rv); - return (0); + return (NULL); } } From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 15:22:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31834ACD; Mon, 27 Apr 2015 15:22:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 202F71305; Mon, 27 Apr 2015 15:22:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RFMvvT020925; Mon, 27 Apr 2015 15:22:57 GMT (envelope-from jgh@FreeBSD.org) Received: (from jgh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RFMvjT020924; Mon, 27 Apr 2015 15:22:57 GMT (envelope-from jgh@FreeBSD.org) Message-Id: <201504271522.t3RFMvjT020924@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jgh set sender to jgh@FreeBSD.org using -f From: Jason Helfman Date: Mon, 27 Apr 2015 15:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282097 - head/usr.sbin/ntp/doc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 15:22:58 -0000 Author: jgh (doc,ports committer) Date: Mon Apr 27 15:22:57 2015 New Revision: 282097 URL: https://svnweb.freebsd.org/changeset/base/282097 Log: - remove -l option from ntpdate manpage, as it is no longer an option Differential Revision: https://reviews.freebsd.org/D2358 Submitted by: gnn@ Approved by: wblock (mentor) MFC after: after 1 week Modified: head/usr.sbin/ntp/doc/ntptime.8 Modified: head/usr.sbin/ntp/doc/ntptime.8 ============================================================================== --- head/usr.sbin/ntp/doc/ntptime.8 Mon Apr 27 15:16:51 2015 (r282096) +++ head/usr.sbin/ntp/doc/ntptime.8 Mon Apr 27 15:22:57 2015 (r282097) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2000 +.Dd April 27, 2015 .Dt NTPTIME 8 .Os .Sh NAME @@ -52,8 +52,6 @@ Specify estimated error, in microseconds Specify frequency offset, in parts per million. .It Fl h Display help information. -.It Fl l -Specify the leap bits as a code from 0 to 3. .It Fl m Ar max_error Specify max possible errors, in microseconds. .It Fl o Ar offset From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 15:53:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AC086A9; Mon, 27 Apr 2015 15:53:34 +0000 (UTC) Received: from mail-pd0-x230.google.com (mail-pd0-x230.google.com [IPv6:2607:f8b0:400e:c02::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35BAC172D; Mon, 27 Apr 2015 15:53:34 +0000 (UTC) Received: by pdea3 with SMTP id a3so132698791pde.3; Mon, 27 Apr 2015 08:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=2q47zWF2AP0Nzue4BmQmXxH+QT+m5Io8hWnFL5cbz3M=; b=xBEivuIL557P0jYk9zDFna7A0uFywS7V6t2HNYbdYF0etE4/2xHR2KHTblU6kP04Vz NRsJXm3PnMBRRufxs1+AZPny3Op4emgs8bBQNncuSv/3OolwIg0kEE5oVNglSSpl98rc oK7dbmvkl8f64Sdbzgh+Wi8pdCGHWjeCbvT611tCsrYdbYy82U03XVrpRtY+ZTggSjTy K2IYkQCfKUgsP36vYqNlPrKE+Y+Ax3UjKaZuej5wNlSLqm9lSWtO5+x5Cfpi1p1b7nbk H9V61YMCiSkB2PVIp24/sNxh0NaDHNUanP2tdsZdceTZQQfxz1nGhXhS+tMaRd0iz+Cy /AWw== X-Received: by 10.70.87.231 with SMTP id bb7mr23366771pdb.70.1430150013552; Mon, 27 Apr 2015 08:53:33 -0700 (PDT) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id td3sm570679pab.46.2015.04.27.08.53.32 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Apr 2015 08:53:32 -0700 (PDT) References: <201504270649.t3R6nR68054468@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <0A268ACC-686D-47B4-828D-7141A8C5A419@gmail.com> Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: svn commit: r282057 - in head/lib: libc librt libthr msun Date: Mon, 27 Apr 2015 08:53:31 -0700 To: Ed Maste X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 15:53:34 -0000 > On Apr 27, 2015, at 06:47, Ed Maste wrote: >=20 >> On 27 April 2015 at 02:49, Garrett Cooper wrote: >> Author: ngie >> Date: Mon Apr 27 06:49:27 2015 >> New Revision: 282057 >> URL: https://svnweb.freebsd.org/changeset/base/282057 >>=20 >> Log: >> Build/install libc, librt, libthr, and msun NetBSD test suites on all >> architectures >=20 > It looks like this broke arm64: > https://jenkins.freebsd.org/job/FreeBSD_HEAD_arm64/61/ Yup. I didn't catch this sooner because I ran my make tinderbox on ref10-amd= 64, which doesn't have the required binutils package on it, and I missed the= message about that architecture being skipped >.>.. Sorry about that.= From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 16:01:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6727E986; Mon, 27 Apr 2015 16:01:24 +0000 (UTC) Date: Mon, 27 Apr 2015 16:01:21 +0000 From: Glen Barber To: Garrett Cooper Cc: Ed Maste , Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r282057 - in head/lib: libc librt libthr msun Message-ID: <20150427160121.GA1424@hub.FreeBSD.org> References: <201504270649.t3R6nR68054468@svn.freebsd.org> <0A268ACC-686D-47B4-828D-7141A8C5A419@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: <0A268ACC-686D-47B4-828D-7141A8C5A419@gmail.com> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 16:01:25 -0000 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 27, 2015 at 08:53:31AM -0700, Garrett Cooper wrote: > Yup. I didn't catch this sooner because I ran my make tinderbox > on ref10-amd64, which doesn't have the required binutils package > on it, and I missed the message about that architecture being skipped > >.>.. JFYI, ref10-amd64 now does have aarch64-binutils, as of about 2 hours ago. Glen --45Z9DzgjV8m4Oswq Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVPl1MAAoJEAMUWKVHj+KTHYEP/0NV0HgO36tBH/mbjptxbLzz /6u6D3+m5zy0z5S2y2kXT+1uvzXNegC5eG1cVkJ7che5Hwhr3roHRPdGtha86T/3 TP+x7t6/WPNAYGbhy1d6BC2wx9I2Q17v1KiZHTV0SVjsF5ZH77aAEfmSo00OJcLU WyhIJs5n7RJJ2EqufKfzAhD/c1KYybiCROnRglMGkldHslT0BgCRlbuzwLrfQtEY IO+Pb15cnAhV3gVjMgNBUFvGHijeO91oJwsuwS9Jeb4HmjrScJqLPJZ3Uy1eScdh T4aFr+uU/BqYqLy5xRnSPAP3dBnOaIQaURw6wVOz90grc54fqHNbLWsnWwGOX2IR h1tbR3NwXc+011tTcPW/n9AvN8Rj/483jnwu3s+s/6axHSMLdKuTph5YPL+vRixS b0MhiVhpt8yLofWY8YbL2JES2b/AsVF4B6hM0wczqYRKAfIiQWdPZ49iqqRkR9YD OYkwhtpMFr3qwfayZUoR9rUxWKKOfFVlI0orWfm12qD5XxM9p64cZnHSpxnP3jEI KinupJrfcKw88bHxNa5s53Cj7b4DYa7zvDxIKFMUYC3gyh1ADBJXysPXzQde3SNe //6T8MvZcke5PDD5g3iMPb8eKVtDfUFNU6nFU3w1f6OfQwWZYm2f+krOhvaM9hdD i3TpPgPoImFHu3+rl05N =FIX9 -----END PGP SIGNATURE----- --45Z9DzgjV8m4Oswq-- From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 16:45:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B8376C0; Mon, 27 Apr 2015 16:45:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F8201D23; Mon, 27 Apr 2015 16:45:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RGjHTi061799; Mon, 27 Apr 2015 16:45:17 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RGjHRs061797; Mon, 27 Apr 2015 16:45:17 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504271645.t3RGjHRs061797@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Mon, 27 Apr 2015 16:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282098 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 16:45:17 -0000 Author: oshogbo Date: Mon Apr 27 16:45:16 2015 New Revision: 282098 URL: https://svnweb.freebsd.org/changeset/base/282098 Log: Add myself (oshogbo) to calendar.freebsd and committers-src.dot. Approved by: pjd (mentor) Modified: head/share/misc/committers-src.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Mon Apr 27 15:22:57 2015 (r282097) +++ head/share/misc/committers-src.dot Mon Apr 27 16:45:16 2015 (r282098) @@ -240,6 +240,7 @@ np [label="Navdeep Parhar\nnp@FreeBSD.or nwhitehorn [label="Nathan Whitehorn\nnwhitehorn@FreeBSD.org\n2008/07/03"] obrien [label="David E. O'Brien\nobrien@FreeBSD.org\n1996/10/29"] olli [label="Oliver Fromme\nolli@FreeBSD.org\n2008/02/14"] +oshogbo [label="Mariusz Zaborski\noshogbo@FreeBSD.org\n2015/04/15"] peadar [label="Peter Edwards\npeadar@FreeBSD.org\n2004/03/08"] peter [label="Peter Wemm\npeter@FreeBSD.org\n1995/07/04"] peterj [label="Peter Jeremy\npeterj@FreeBSD.org\n2012/09/14"] @@ -633,6 +634,7 @@ phk -> mux pjd -> kib pjd -> lulf +pjd -> oshogbo pjd -> smh pjd -> trociny Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Mon Apr 27 15:22:57 2015 (r282097) +++ head/usr.bin/calendar/calendars/calendar.freebsd Mon Apr 27 16:45:16 2015 (r282098) @@ -359,6 +359,7 @@ 12/01 Alexey Dokuchaev born in Magadan, USSR, 1980 12/02 Ermal Luçi born in Tirane, Albania, 1980 12/03 Diane Bruce born in Ottawa, Ontario, Canada, 1952 +12/04 Mariusz Zaborski born in Skierniewice, Poland, 1990 12/05 Ivan Voras born in Slavonski Brod, Croatia, 1981 12/06 Stefan Farfeleder born in Wien, Austria, 1980 12/11 Ganael Laplanche born in Reims, France, 1980 From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 16:46:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3FB781E; Mon, 27 Apr 2015 16:46:07 +0000 (UTC) Received: from mail-oi0-x231.google.com (mail-oi0-x231.google.com [IPv6:2607:f8b0:4003:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0CF91D35; Mon, 27 Apr 2015 16:46:07 +0000 (UTC) Received: by oiko83 with SMTP id o83so94206129oik.1; Mon, 27 Apr 2015 09:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=Hfacr4IVqwPvBZ05v2KMvEvPgrvXz5FGsw5A/iIVNks=; b=Meo81O5pl/gQO4LydwKOwMwDtWlxknxlf+fOfSWHYxOg8eTD0Fr/68uivM+ykB0NNb 2f9gojb/7O3InQAsRx6lCvDEAzYUhaWuvy0qBJU/fqz2GtIJe99XvssTjrLF7e4HNK4g +po58y6vyihm6WFSlFFbVTfApsOBDYXqTJL/oyoZxU+sPAwfbqsNHaDR9eX0XohfomYj er9MEWSWFqnO4/t/5G5AV8bf8w/+efPi9kP0mmzJ9xWciUHPHkBXWSb0jjllELjz4fIL 6naNzy63I+2sNOqDCqpJltGQK+gcR6rtqriaFJVRl7zLUwlR4NEiwwZu4LuTy+r+5hzL rMeQ== X-Received: by 10.202.104.88 with SMTP id d85mr10186935oic.37.1430153166809; Mon, 27 Apr 2015 09:46:06 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:f039:b350:5840:757f? ([2601:8:ab80:7d6:f039:b350:5840:757f]) by mx.google.com with ESMTPSA id d129sm11531009oig.15.2015.04.27.09.46.05 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Apr 2015 09:46:06 -0700 (PDT) Subject: Re: svn commit: r282057 - in head/lib: libc librt libthr msun Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6D6673A1-30B6-4AE6-880D-12584A534CF1"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <20150427160121.GA1424@hub.FreeBSD.org> Date: Mon, 27 Apr 2015 09:46:04 -0700 Cc: Ed Maste , Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <201504270649.t3R6nR68054468@svn.freebsd.org> <0A268ACC-686D-47B4-828D-7141A8C5A419@gmail.com> <20150427160121.GA1424@hub.FreeBSD.org> To: Glen Barber X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 16:46:08 -0000 --Apple-Mail=_6D6673A1-30B6-4AE6-880D-12584A534CF1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Apr 27, 2015, at 9:01, Glen Barber wrote: > On Mon, Apr 27, 2015 at 08:53:31AM -0700, Garrett Cooper wrote: >> Yup. I didn't catch this sooner because I ran my make tinderbox >> on ref10-amd64, which doesn't have the required binutils package >> on it, and I missed the message about that architecture being skipped >>> .>.. >=20 > JFYI, ref10-amd64 now does have aarch64-binutils, as of about 2 hours > ago. Yup =97 saw that. Thanks all! --Apple-Mail=_6D6673A1-30B6-4AE6-880D-12584A534CF1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVPmfNAAoJEMZr5QU6S73ex/QH/i6yp7QzUrD96O+h2NTOrwC3 dDPqDw7Zz4/B4C3NDCdM+6n0DCi7QLZf+MxxiVMajuw11Q7sH1qKZtaMIYWxAxe1 b4ly0e/knnQfL5wxsxldIN/h340affgpOEDoXRGQwMlHfiC5t+/1BYXvksdQ9tBq j84FeaPeIGQSafS5lFgwq8Pme4QGsoCi41IfIe8u1Q8HzJhV2vE1NjvjXvgams6d b/OoZFNcxSpo1rBm/KG0Bv/SezCXsBWORcdqtskc+qcKayHblKYqubAxG7v4XRUI VLXVhvqRw/Du1kwGeah/JDU/MnU135m5cq0Ivddv9g0BStqb4/mHHxvBEvzuoaE= =G9V4 -----END PGP SIGNATURE----- --Apple-Mail=_6D6673A1-30B6-4AE6-880D-12584A534CF1-- From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 17:04:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6112FD6D; Mon, 27 Apr 2015 17:04:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FF591F8A; Mon, 27 Apr 2015 17:04:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RH4SbE071591; Mon, 27 Apr 2015 17:04:28 GMT (envelope-from rene@FreeBSD.org) Received: (from rene@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RH4SSE071590; Mon, 27 Apr 2015 17:04:28 GMT (envelope-from rene@FreeBSD.org) Message-Id: <201504271704.t3RH4SSE071590@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rene set sender to rene@FreeBSD.org using -f From: Rene Ladan Date: Mon, 27 Apr 2015 17:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282099 - head/usr.bin/calendar/calendars X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 17:04:28 -0000 Author: rene (doc,ports committer) Date: Mon Apr 27 17:04:27 2015 New Revision: 282099 URL: https://svnweb.freebsd.org/changeset/base/282099 Log: The Dutch queen abdicated two years ago, the national holiday associated with her birthday is now associated with the birthday of her son. Modified: head/usr.bin/calendar/calendars/calendar.holiday Modified: head/usr.bin/calendar/calendars/calendar.holiday ============================================================================== --- head/usr.bin/calendar/calendars/calendar.holiday Mon Apr 27 16:45:16 2015 (r282098) +++ head/usr.bin/calendar/calendars/calendar.holiday Mon Apr 27 17:04:27 2015 (r282099) @@ -144,8 +144,8 @@ 04/26 Confederate Memorial Day in Florida & Georgia 04/26 Union Day in Tanzania 04/27 Independence Day in Togo +04/27 King's Birthday in the Netherlands, the Netherlands Antilles 04/29 Showa Day in Japan -04/30 Queen's Birthday in the Netherlands, the Netherlands Antilles 04/30 The Workers Day in Uruguay 04/MonLast Arbor Day in Wyoming (last Monday) 04/MonLast Confederate Memorial Day in Alabama & Mississippi (last Monday) From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 17:23:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDA6A21C; Mon, 27 Apr 2015 17:23:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8E3611C5; Mon, 27 Apr 2015 17:23:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RHNLhO081268; Mon, 27 Apr 2015 17:23:21 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RHNKbP081255; Mon, 27 Apr 2015 17:23:20 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201504271723.t3RHNKbP081255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 27 Apr 2015 17:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282100 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo contrib/libxo/m4 contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/xo contrib/libxo/xohtml con... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 17:23:22 -0000 Author: marcel Date: Mon Apr 27 17:23:19 2015 New Revision: 282100 URL: https://svnweb.freebsd.org/changeset/base/282100 Log: Upgrade libxo to 0.3.2. Obtained from: https://github.com/Juniper/libxo/tree/0.3.2 Requested by: Phil Shafer This import incorporates local change 279966. Local change 276260 has been merged-in. Added: head/contrib/libxo/libxo/xo_open_marker.3 (contents, props changed) head/contrib/libxo/libxo/xo_set_version.3 (contents, props changed) head/contrib/libxo/tests/core/saved/test_10.H.err head/contrib/libxo/tests/core/saved/test_10.H.out head/contrib/libxo/tests/core/saved/test_10.HIPx.err head/contrib/libxo/tests/core/saved/test_10.HIPx.out head/contrib/libxo/tests/core/saved/test_10.HP.err head/contrib/libxo/tests/core/saved/test_10.HP.out head/contrib/libxo/tests/core/saved/test_10.J.err head/contrib/libxo/tests/core/saved/test_10.J.out head/contrib/libxo/tests/core/saved/test_10.JP.err head/contrib/libxo/tests/core/saved/test_10.JP.out head/contrib/libxo/tests/core/saved/test_10.T.err head/contrib/libxo/tests/core/saved/test_10.T.out head/contrib/libxo/tests/core/saved/test_10.X.err head/contrib/libxo/tests/core/saved/test_10.X.out head/contrib/libxo/tests/core/saved/test_10.XP.err head/contrib/libxo/tests/core/saved/test_10.XP.out head/contrib/libxo/tests/core/saved/test_10.err head/contrib/libxo/tests/core/saved/test_10.out head/contrib/libxo/tests/core/test_10.c (contents, props changed) head/contrib/libxo/xohtml/Makefile.am (contents, props changed) head/contrib/libxo/xohtml/xohtml.1 (contents, props changed) Modified: head/contrib/libxo/Makefile.am head/contrib/libxo/configure.ac head/contrib/libxo/doc/libxo.txt head/contrib/libxo/libxo/Makefile.am head/contrib/libxo/libxo/libxo.c head/contrib/libxo/libxo/xo.h head/contrib/libxo/libxo/xo_error.3 head/contrib/libxo/libxo/xo_format.5 head/contrib/libxo/libxo/xo_open_container.3 head/contrib/libxo/libxo/xoconfig.h head/contrib/libxo/libxo/xoconfig.h.in head/contrib/libxo/libxo/xoversion.h head/contrib/libxo/m4/libtool.m4 head/contrib/libxo/m4/ltoptions.m4 head/contrib/libxo/m4/ltversion.m4 head/contrib/libxo/tests/core/Makefile.am head/contrib/libxo/tests/core/saved/test_01.JP.out head/contrib/libxo/tests/core/saved/test_02.JP.out head/contrib/libxo/tests/core/saved/test_05.H.out head/contrib/libxo/tests/core/saved/test_05.HIPx.out head/contrib/libxo/tests/core/saved/test_05.HP.out head/contrib/libxo/tests/core/saved/test_05.J.out head/contrib/libxo/tests/core/saved/test_05.JP.out head/contrib/libxo/tests/core/saved/test_05.T.out head/contrib/libxo/tests/core/saved/test_05.X.out head/contrib/libxo/tests/core/saved/test_05.XP.out head/contrib/libxo/tests/core/saved/test_09.JP.out head/contrib/libxo/tests/core/test_05.c head/contrib/libxo/xo/xo.1 head/contrib/libxo/xohtml/xohtml.css head/contrib/libxo/xohtml/xohtml.sh.in head/contrib/libxo/xolint/Makefile.am head/contrib/libxo/xolint/xolint.1 head/contrib/libxo/xolint/xolint.pl head/lib/libxo/Makefile Modified: head/contrib/libxo/Makefile.am ============================================================================== --- head/contrib/libxo/Makefile.am Mon Apr 27 17:04:27 2015 (r282099) +++ head/contrib/libxo/Makefile.am Mon Apr 27 17:23:19 2015 (r282100) @@ -10,7 +10,7 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = libxo xo xolint tests doc +SUBDIRS = libxo xo xolint xohtml tests doc bin_SCRIPTS=libxo-config dist_doc_DATA = Copyright Modified: head/contrib/libxo/configure.ac ============================================================================== --- head/contrib/libxo/configure.ac Mon Apr 27 17:04:27 2015 (r282099) +++ head/contrib/libxo/configure.ac Mon Apr 27 17:23:19 2015 (r282100) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.2.0], [phil@juniper.net]) +AC_INIT([libxo], [0.3.2], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. @@ -133,6 +133,14 @@ AC_ARG_ENABLE([debug], AC_MSG_RESULT([$LIBXO_DEBUG]) AM_CONDITIONAL([LIBXO_DEBUG], [test "$LIBXO_DEBUG" != "no"]) +AC_MSG_CHECKING([whether to build with text-only rendering]) +AC_ARG_ENABLE([text-only], + [ --enable-text-only Turn on text-only rendering], + [LIBXO_TEXT_ONLY=yes; AC_DEFINE([LIBXO_TEXT_ONLY], [1], [Enable text-only rendering])], + [LIBXO_TEXT_ONLY=no]) +AC_MSG_RESULT([$LIBXO_TEXT_ONLY]) +AM_CONDITIONAL([LIBXO_TEXT_ONLY], [test "$LIBXO_TEXT_ONLY" != "no"]) + AC_CHECK_LIB([m], [lrint]) AM_CONDITIONAL([HAVE_LIBM], [test "$HAVE_LIBM" != "no"]) @@ -233,6 +241,7 @@ AC_CONFIG_FILES([ libxo/xoversion.h xo/Makefile xolint/Makefile + xohtml/Makefile packaging/libxo.pc doc/Makefile tests/Makefile @@ -253,6 +262,7 @@ AC_MSG_NOTICE([summary of build options: bindir: ${XO_BINDIR} includedir: ${XO_INCLUDEDIR} share dir: ${XO_SHAREDIR} + oxtradoc dir: ${SLAX_OXTRADOCDIR} compiler: ${CC} (${HAVE_GCC:-no}) compiler flags: ${CFLAGS} @@ -262,4 +272,5 @@ AC_MSG_NOTICE([summary of build options: debug: ${LIBXO_DEBUG:-no} printf-like: ${HAVE_PRINTFLIKE:-no} libxo-options: ${LIBXO_OPTS:-no} + text-only: ${LIBXO_TEXT_ONLY:-no} ]) Modified: head/contrib/libxo/doc/libxo.txt ============================================================================== --- head/contrib/libxo/doc/libxo.txt Mon Apr 27 17:04:27 2015 (r282099) +++ head/contrib/libxo/doc/libxo.txt Mon Apr 27 17:23:19 2015 (r282100) @@ -134,7 +134,7 @@ A single libxo function call in source c my-box example.com JSON: - "host": my-box", + "host": "my-box", "domain": "example.com" For brevity, the HTML output is emitted. @@ -228,17 +228,17 @@ data, including data type, description,
36
-
./src
+
./src
40
-
./bin
+
./bin
90
-
./
+
./
** Format Strings @format-strings@ @@ -285,6 +285,7 @@ content. The roles are listed below; on |---+--------------+-------------------------------------------------| | M | Name | Description | |---+--------------+-------------------------------------------------| +| C | color/effect | Field has color and effect controls | | D | decoration | Field is non-text (e.g., colon, comma) | | E | error | Field is an error message | | L | label | Field is text that prefixes a value | @@ -298,6 +299,56 @@ content. The roles are listed below; on | ] | stop anchor | End a section of anchored variable-width text | |---+--------------+-------------------------------------------------| +**** The Color Role ({C:}) + +Colors and effects control how text values are displayed; they are +used for display styles (TEXT and HTML). The color content can be +either static, when placed directly within the field descriptor, or a +printf-style format descriptor can be used, if preceded by a slash ("/"): + + xo_emit("{C:bold}{Lwc:Cost}{:cost/%u}{C:reset}\n", cost); + xo_emit("{C:/fg-%s,bg-%s}{Lwc:Cost}{:cost/%u}{C:reset}\n", + fg_color, bg_color, cost); + +The content should be a comma-separated list of zero or more colors or +display effects. Colors and effects remain in effect until +modified by other "C" roles. If the content is empty, the "reset" +action is performed. + +|---------------+-------------------------------------------------| +| Name | Description | +|---------------+-------------------------------------------------| +| bg-XXXXX | Change background color | +| bold | Start bold text effect | +| fg-XXXXX | Change foreground color | +| inverse | Start inverse (aka reverse) text effect | +| no-bold | Stop bold text effect | +| no-inverse | Stop inverse (aka reverse) text effect | +| no-underline | Stop underline text effect | +| normal | Reset effects (only) | +| reset | Reset colors and effects (restore defaults) | +| underline | Start underline text effect | +|---------------+-------------------------------------------------| + +The following color names are supported: + +|---------------| +| Name | +|---------------| +| black | +| blue | +| cyan | +| default | +| green | +| magenta | +| red | +| white | +| yellow | +|---------------| + +Color names are prefixed with either "fg-" or "bg-" to change the +foreground and background colors, respectively. + **** The Decoration Role ({D:}) Decorations are typically punctuation marks such as colons, @@ -1404,9 +1455,21 @@ functions like xo_failure, xo_warn, xo_e initialized by xo_parse_args, but subsequent calls to xo_set_program can override this value. + xo_set_program(argv[0]); + Note that the value is not copied, so the memory passed to xo_set_program (and xo_parse_args) must be maintained by the caller. +*** xo_set_version + +The xo_set_version function records a version number to be emitted as +part of the data for encoding styles (XML and JSON). This version +number is suitable for tracking changes in the content, allowing a +user of the data to discern which version of the data model is in use. + + void xo_set_version (const char *version); + void xo_set_version_h (xo_handle_t *xop, const char *version); + *** Field Information (xo_info_t) @info@ HTML data can include additional information in attributes that @@ -1705,6 +1768,32 @@ The "-V" option does not report errors, all field names, sorted alphabetically. The output can help spot inconsistencies and spelling errors. +* xohtml + +xohtml is a tool for turning the output of libxo-enabled commands into +html files suitable for display in modern HTML web browsers. It can +be used to test and debug HTML output, as well as to make the user +ache to escape the world of 70s terminal devices. + +xohtml is given a command, either on the command line or via the "-c" +option. If not command is given, standard input is used. The +command's output is wrapped in HTML tags, with references to +supporting CSS and Javascript files, and written to standard output or +the file given in the "-f" option. The "-b" option can be used to +provide an alternative base path for the support files. + +|--------------+---------------------------------------------------| +| Option | Meaning | +|--------------+---------------------------------------------------| +| -b | Base path for finding css/javascript files | +| -c | Command to execute | +| -f | Output file name | +|--------------+---------------------------------------------------| + +The "-c" option takes a full command with arguments, including +any libxo options needed to generate html ("--libxo=html"). This +value must be quoted if it consists of multiple tokens. + * FAQs This section contains the set of questions that users typically ask, Modified: head/contrib/libxo/libxo/Makefile.am ============================================================================== --- head/contrib/libxo/libxo/Makefile.am Mon Apr 27 17:04:27 2015 (r282099) +++ head/contrib/libxo/libxo/Makefile.am Mon Apr 27 17:23:19 2015 (r282100) @@ -38,12 +38,15 @@ man_MANS = \ xo_no_setlocale.3 \ xo_open_container.3 \ xo_open_list.3 \ + xo_open_marker.3 \ xo_parse_args.3 \ xo_set_allocator.3 \ xo_set_flags.3 \ xo_set_info.3 \ xo_set_options.3 \ xo_set_style.3 \ + xo_set_version.3 \ xo_set_writer.3 -EXTRA_DIST = +EXTRA_DIST = ${man_MANS} + Modified: head/contrib/libxo/libxo/libxo.c ============================================================================== --- head/contrib/libxo/libxo/libxo.c Mon Apr 27 17:04:27 2015 (r282099) +++ head/contrib/libxo/libxo/libxo.c Mon Apr 27 17:23:19 2015 (r282100) @@ -121,6 +121,50 @@ typedef struct xo_stack_s { char *xs_keys; /* XPath predicate for any key fields */ } xo_stack_t; +/* "colors" refers to fancy ansi codes */ +#define XO_COL_DEFAULT 0 +#define XO_COL_BLACK 1 +#define XO_COL_RED 2 +#define XO_COL_GREEN 3 +#define XO_COL_YELLOW 4 +#define XO_COL_BLUE 5 +#define XO_COL_MAGENTA 6 +#define XO_COL_CYAN 7 +#define XO_COL_WHITE 8 + +#define XO_NUM_COLORS 9 + +/* "effects" refers to fancy ansi codes */ +/* + * Yes, there's no blink. We're civilized. We like users. Blink + * isn't something one does to someone you like. Friends don't let + * friends use blink. On friends. You know what I mean. Blink is + * like, well, it's like bursting into show tunes at a funeral. It's + * just not done. Not something anyone wants. And on those rare + * instances where it might actually be appropriate, it's still wrong. + * It's likely done my the wrong person for the wrong reason. Just + * like blink. And if I implemented blink, I'd be like a funeral + * director who adds "Would you like us to burst into show tunes?" on + * the list of questions asking while making funeral arrangements. + * It's formalizing wrongness in the wrong way. And we're just too + * civilized to do that. Hhhmph! + */ +#define XO_EFF_RESET (1<<0) +#define XO_EFF_NORMAL (1<<1) +#define XO_EFF_BOLD (1<<2) +#define XO_EFF_UNDERLINE (1<<3) +#define XO_EFF_INVERSE (1<<4) + +#define XO_EFF_CLEAR_BITS XO_EFF_RESET + +typedef uint8_t xo_effect_t; +typedef uint8_t xo_color_t; +typedef struct xo_colors_s { + xo_effect_t xoc_effects; /* Current effect set */ + xo_color_t xoc_col_fg; /* Foreground color */ + xo_color_t xoc_col_bg; /* Background color */ +} xo_colors_t; + /* * xo_handle_t: this is the principle data structure for libxo. * It's used as a store for state, options, and content. @@ -136,7 +180,6 @@ struct xo_handle_s { xo_formatter_t xo_formatter; /* Custom formating function */ xo_checkpointer_t xo_checkpointer; /* Custom formating support function */ void *xo_opaque; /* Opaque data for write function */ - FILE *xo_fp; /* XXX File pointer */ xo_buffer_t xo_data; /* Output data */ xo_buffer_t xo_fmt; /* Work area for building format strings */ xo_buffer_t xo_attrs; /* Work area for building XML attributes */ @@ -154,6 +197,11 @@ struct xo_handle_s { int xo_anchor_min_width; /* Desired width of anchored text */ unsigned xo_units_offset; /* Start of units insertion point */ unsigned xo_columns; /* Columns emitted during this xo_emit call */ + uint8_t xo_color_map_fg[XO_NUM_COLORS]; /* Foreground color mappings */ + uint8_t xo_color_map_bg[XO_NUM_COLORS]; /* Background color mappings */ + xo_colors_t xo_colors; /* Current color and effect values */ + xo_buffer_t xo_color_buf; /* HTML: buffer of colors and effects */ + char *xo_version; /* Version string */ }; /* Flags for formatting functions */ @@ -161,7 +209,7 @@ typedef unsigned long xo_xff_flags_t; #define XFF_COLON (1<<0) /* Append a ":" */ #define XFF_COMMA (1<<1) /* Append a "," iff there's more output */ #define XFF_WS (1<<2) /* Append a blank */ -#define XFF_ENCODE_ONLY (1<<3) /* Only emit for encoding formats (xml and json) */ +#define XFF_ENCODE_ONLY (1<<3) /* Only emit for encoding formats (xml, json) */ #define XFF_QUOTE (1<<4) /* Force quotes */ #define XFF_NOQUOTE (1<<5) /* Force no quotes */ @@ -277,6 +325,24 @@ static void xo_anchor_clear (xo_handle_t *xop); /* + * xo_style is used to retrieve the current style. When we're built + * for "text only" mode, we use this function to drive the removal + * of most of the code in libxo. We return a constant and the compiler + * happily removes the non-text code that is not longer executed. This + * trims our code nicely without needing to trampel perfectly readable + * code with ifdefs. + */ +static inline unsigned short +xo_style (xo_handle_t *xop UNUSED) +{ +#ifdef LIBXO_TEXT_ONLY + return XO_STYLE_TEXT; +#else /* LIBXO_TEXT_ONLY */ + return xop->xo_style; +#endif /* LIBXO_TEXT_ONLY */ +} + +/* * Callback to write data to a FILE pointer */ static int @@ -321,6 +387,24 @@ xo_buf_init (xo_buffer_t *xbp) } /* + * Reset the buffer to empty + */ +static void +xo_buf_reset (xo_buffer_t *xbp) +{ + xbp->xb_curp = xbp->xb_bufp; +} + +/* + * Reset the buffer to empty + */ +static int +xo_buf_is_empty (xo_buffer_t *xbp) +{ + return (xbp->xb_curp == xbp->xb_bufp); +} + +/* * Initialize the contents of an xo_buffer_t. */ static void @@ -363,8 +447,8 @@ xo_no_setlocale (void) /* * We need to decide if stdout is line buffered (_IOLBF). Lacking a * standard way to decide this (e.g. getlinebuf()), we have configure - * look to find __flbf, which glibc supported. If not, we'll rely - * on isatty, with the assumption that terminals are the only thing + * look to find __flbf, which glibc supported. If not, we'll rely on + * isatty, with the assumption that terminals are the only thing * that's line buffered. We _could_ test for "steam._flags & _IOLBF", * which is all __flbf does, but that's even tackier. Like a * bedazzled Elvis outfit on an ugly lap dog sort of tacky. Not @@ -399,6 +483,13 @@ xo_init_handle (xo_handle_t *xop) xop->xo_flags |= XOF_FLUSH_LINE; /* + * We only want to do color output on terminals, but we only want + * to do this if the user has asked for color. + */ + if ((xop->xo_flags & XOF_COLOR_ALLOWED) && isatty(1)) + xop->xo_flags |= XOF_COLOR; + + /* * We need to initialize the locale, which isn't really pretty. * Libraries should depend on their caller to set up the * environment. But we really can't count on the caller to do @@ -497,7 +588,7 @@ xo_default (xo_handle_t *xop) /* * Return the number of spaces we should be indenting. If - * we are pretty-printing, theis is indent * indent_by. + * we are pretty-printing, this is indent * indent_by. */ static int xo_indent (xo_handle_t *xop) @@ -647,6 +738,21 @@ xo_buf_append (xo_buffer_t *xbp, const c xbp->xb_curp += len; } +/* + * Append the given NUL-terminated string to the given buffer + */ +static void +xo_buf_append_str (xo_buffer_t *xbp, const char *str) +{ + int len = strlen(str); + + if (!xo_buf_has_room(xbp, len)) + return; + + memcpy(xbp->xb_curp, str, len); + xbp->xb_curp += len; +} + static void xo_buf_escape (xo_handle_t *xop, xo_buffer_t *xbp, const char *str, int len, xo_xff_flags_t flags) @@ -656,7 +762,7 @@ xo_buf_escape (xo_handle_t *xop, xo_buff memcpy(xbp->xb_curp, str, len); - switch (xop->xo_style) { + switch (xo_style(xop)) { case XO_STYLE_XML: case XO_STYLE_HTML: len = xo_escape_xml(xbp, len, (flags & XFF_ATTR)); @@ -711,7 +817,7 @@ xo_vsnprintf (xo_handle_t *xop, xo_buffe else rc = vsnprintf(xbp->xb_curp, left, fmt, va_local); - if (rc > xbp->xb_size) { + if (rc >= left) { if (!xo_buf_has_room(xbp, rc)) { va_end(va_local); return -1; @@ -721,7 +827,7 @@ xo_vsnprintf (xo_handle_t *xop, xo_buffe * After we call vsnprintf(), the stage of vap is not defined. * We need to copy it before we pass. Then we have to do our * own logic below to move it along. This is because the - * implementation can have va_list be a point (bsd) or a + * implementation can have va_list be a pointer (bsd) or a * structure (macosx) or anything in between. */ @@ -730,7 +836,7 @@ xo_vsnprintf (xo_handle_t *xop, xo_buffe left = xbp->xb_size - (xbp->xb_curp - xbp->xb_bufp); if (xop->xo_formatter) - xop->xo_formatter(xop, xbp->xb_curp, left, fmt, va_local); + rc = xop->xo_formatter(xop, xbp->xb_curp, left, fmt, va_local); else rc = vsnprintf(xbp->xb_curp, left, fmt, va_local); } @@ -1219,7 +1325,7 @@ xo_message_hcv (xo_handle_t *xop, int co int need_nl = (fmt[strlen(fmt) - 1] != '\n'); - switch (xop->xo_style) { + switch (xo_style(xop)) { case XO_STYLE_XML: xbp = &xop->xo_data; if (xop->xo_flags & XOF_PRETTY) @@ -1431,6 +1537,10 @@ xo_destroy (xo_handle_t *xop_arg) xo_buf_cleanup(&xop->xo_fmt); xo_buf_cleanup(&xop->xo_predicate); xo_buf_cleanup(&xop->xo_attrs); + xo_buf_cleanup(&xop->xo_color_buf); + + if (xop->xo_version) + xo_free(xop->xo_version); if (xop_arg == NULL) { bzero(&xo_default_handle, sizeof(xo_default_handle)); @@ -1457,7 +1567,7 @@ xo_style_t xo_get_style (xo_handle_t *xop) { xop = xo_default(xop); - return xop->xo_style; + return xo_style(xop); } static int @@ -1492,6 +1602,8 @@ xo_name_to_flag (const char *name) return XOF_INFO; if (strcmp(name, "warn-xml") == 0) return XOF_WARN_XML; + if (strcmp(name, "color") == 0) + return XOF_COLOR_ALLOWED; if (strcmp(name, "columns") == 0) return XOF_COLUMNS; if (strcmp(name, "dtrt") == 0) @@ -1547,6 +1659,11 @@ xo_set_options (xo_handle_t *xop, const xop = xo_default(xop); +#ifdef LIBXO_COLOR_ON_BY_DEFAULT + /* If the installer used --enable-color-on-by-default, then we allow it */ + xop->xo_flags |= XOF_COLOR_ALLOWED; +#endif /* LIBXO_COLOR_ON_BY_DEFAULT */ + /* * We support a simpler, old-school style of giving option * also, using a single character for each option. It's @@ -1557,6 +1674,10 @@ xo_set_options (xo_handle_t *xop, const for (input++ ; *input; input++) { switch (*input) { + case 'c': + xop->xo_flags |= XOF_COLOR_ALLOWED; + break; + case 'f': xop->xo_flags |= XOF_FLUSH; break; @@ -1634,6 +1755,11 @@ xo_set_options (xo_handle_t *xop, const if (vp) *vp++ = '\0'; + if (strcmp("colors", cp) == 0) { + /* XXX Look for colors=red-blue+green-yellow */ + continue; + } + new_style = xo_name_to_style(cp); if (new_style >= 0) { if (style >= 0) @@ -1645,7 +1771,9 @@ xo_set_options (xo_handle_t *xop, const if (new_flag != 0) xop->xo_flags |= new_flag; else { - if (strcmp(cp, "indent") == 0) { + if (strcmp(cp, "no-color") == 0) { + xop->xo_flags &= ~XOF_COLOR_ALLOWED; + } else if (strcmp(cp, "indent") == 0) { xop->xo_indent_by = atoi(vp); } else { xo_warnx("unknown option: '%s'", cp); @@ -1801,7 +1929,7 @@ xo_line_ensure_open (xo_handle_t *xop, x if (xop->xo_flags & XOF_DIV_OPEN) return; - if (xop->xo_style != XO_STYLE_HTML) + if (xo_style(xop) != XO_STYLE_HTML) return; xop->xo_flags |= XOF_DIV_OPEN; @@ -1819,7 +1947,7 @@ xo_line_close (xo_handle_t *xop) { static char div_close[] = ""; - switch (xop->xo_style) { + switch (xo_style(xop)) { case XO_STYLE_HTML: if (!(xop->xo_flags & XOF_DIV_OPEN)) xo_line_ensure_open(xop, 0); @@ -1976,7 +2104,7 @@ xo_format_string_direct (xo_handle_t *xo if (width < 0) width = iswcntrl(wc) ? 0 : 1; - if (xop->xo_style == XO_STYLE_TEXT || xop->xo_style == XO_STYLE_HTML) { + if (xo_style(xop) == XO_STYLE_TEXT || xo_style(xop) == XO_STYLE_HTML) { if (max > 0 && cols + width > max) break; } @@ -1985,7 +2113,7 @@ xo_format_string_direct (xo_handle_t *xo case XF_ENC_UTF8: /* Output in UTF-8 needs to be escaped, based on the style */ - switch (xop->xo_style) { + switch (xo_style(xop)) { case XO_STYLE_XML: case XO_STYLE_HTML: if (wc == '<') @@ -2071,7 +2199,7 @@ xo_format_string (xo_handle_t *xop, xo_b wchar_t *wcp = NULL; int len, cols = 0, rc = 0; int off = xbp->xb_curp - xbp->xb_bufp, off2; - int need_enc = (xop->xo_style == XO_STYLE_TEXT) + int need_enc = (xo_style(xop) == XO_STYLE_TEXT) ? XF_ENC_LOCALE : XF_ENC_UTF8; if (xo_check_conversion(xop, xfp->xf_enc, need_enc)) @@ -2185,7 +2313,7 @@ static void xo_data_append_content (xo_handle_t *xop, const char *str, int len) { int cols; - int need_enc = (xop->xo_style == XO_STYLE_TEXT) + int need_enc = (xo_style(xop) == XO_STYLE_TEXT) ? XF_ENC_LOCALE : XF_ENC_UTF8; cols = xo_format_string_direct(xop, &xop->xo_data, XFF_UNESCAPE, @@ -2246,9 +2374,9 @@ xo_format_data (xo_handle_t *xop, xo_buf xo_format_t xf; const char *cp, *ep, *sp, *xp = NULL; int rc, cols; - int style = (flags & XFF_XML) ? XO_STYLE_XML : xop->xo_style; + int style = (flags & XFF_XML) ? XO_STYLE_XML : xo_style(xop); unsigned make_output = !(flags & XFF_NO_OUTPUT); - int need_enc = (xop->xo_style == XO_STYLE_TEXT) + int need_enc = (xo_style(xop) == XO_STYLE_TEXT) ? XF_ENC_LOCALE : XF_ENC_UTF8; if (xbp == NULL) @@ -2310,11 +2438,11 @@ xo_format_data (xo_handle_t *xop, xo_buf /* Hidden fields are only visible to JSON and XML */ if (xop->xo_flags & XFF_ENCODE_ONLY) { if (style != XO_STYLE_XML - && xop->xo_style != XO_STYLE_JSON) + && xo_style(xop) != XO_STYLE_JSON) xf.xf_skip = 1; } else if (xop->xo_flags & XFF_DISPLAY_ONLY) { if (style != XO_STYLE_TEXT - && xop->xo_style != XO_STYLE_HTML) + && xo_style(xop) != XO_STYLE_HTML) xf.xf_skip = 1; } @@ -2420,8 +2548,8 @@ xo_format_data (xo_handle_t *xop, xo_buf rc = xo_format_string(xop, xbp, flags, &xf); if ((flags & XFF_TRIM_WS) - && (xop->xo_style == XO_STYLE_XML - || xop->xo_style == XO_STYLE_JSON)) + && (xo_style(xop) == XO_STYLE_XML + || xo_style(xop) == XO_STYLE_JSON)) rc = xo_trim_ws(xbp, rc); } else { @@ -2567,6 +2695,20 @@ xo_fix_encoding (xo_handle_t *xop UNUSED } static void +xo_color_append_html (xo_handle_t *xop) +{ + /* + * If the color buffer has content, we add it now. It's already + * prebuilt and ready, since we want to add it to every
. + */ + if (!xo_buf_is_empty(&xop->xo_color_buf)) { + xo_buffer_t *xbp = &xop->xo_color_buf; + + xo_data_append(xop, xbp->xb_bufp, xbp->xb_curp - xbp->xb_bufp); + } +} + +static void xo_buf_append_div (xo_handle_t *xop, const char *class, xo_xff_flags_t flags, const char *name, int nlen, const char *value, int vlen, @@ -2663,6 +2805,16 @@ xo_buf_append_div (xo_handle_t *xop, con xo_data_append(xop, div_start, sizeof(div_start) - 1); xo_data_append(xop, class, strlen(class)); + /* + * If the color buffer has content, we add it now. It's already + * prebuilt and ready, since we want to add it to every
. + */ + if (!xo_buf_is_empty(&xop->xo_color_buf)) { + xo_buffer_t *xbp = &xop->xo_color_buf; + + xo_data_append(xop, xbp->xb_bufp, xbp->xb_curp - xbp->xb_bufp); + } + if (name) { xo_data_append(xop, div_tag, sizeof(div_tag) - 1); xo_data_escape(xop, name, nlen); @@ -2753,7 +2905,7 @@ xo_buf_append_div (xo_handle_t *xop, con static void xo_format_text (xo_handle_t *xop, const char *str, int len) { - switch (xop->xo_style) { + switch (xo_style(xop)) { case XO_STYLE_TEXT: xo_buf_append_locale(xop, &xop->xo_data, str, len); break; @@ -2768,7 +2920,8 @@ static void xo_format_title (xo_handle_t *xop, const char *str, int len, const char *fmt, int flen) { - static char div_open[] = "
"; + static char div_open[] = "
"; static char div_close[] = "
"; if (flen == 0) { @@ -2776,7 +2929,7 @@ xo_format_title (xo_handle_t *xop, const flen = 2; } - switch (xop->xo_style) { + switch (xo_style(xop)) { case XO_STYLE_XML: case XO_STYLE_JSON: /* @@ -2794,12 +2947,14 @@ xo_format_title (xo_handle_t *xop, const int rc; int need_enc = XF_ENC_LOCALE; - if (xop->xo_style == XO_STYLE_HTML) { + if (xo_style(xop) == XO_STYLE_HTML) { need_enc = XF_ENC_UTF8; xo_line_ensure_open(xop, 0); if (xop->xo_flags & XOF_PRETTY) xo_buf_indent(xop, xop->xo_indent_by); xo_buf_append(&xop->xo_data, div_open, sizeof(div_open) - 1); + xo_color_append_html(xop); + xo_buf_append(&xop->xo_data, div_middle, sizeof(div_middle) - 1); } start = xbp->xb_curp - xbp->xb_bufp; /* Reset start */ @@ -2862,7 +3017,7 @@ xo_format_title (xo_handle_t *xop, const } /* If we're styling HTML, then we need to escape it */ - if (xop->xo_style == XO_STYLE_HTML) { + if (xo_style(xop) == XO_STYLE_HTML) { rc = xo_escape_xml(xbp, rc, 0); } @@ -2870,7 +3025,7 @@ xo_format_title (xo_handle_t *xop, const xbp->xb_curp += rc; move_along: - if (xop->xo_style == XO_STYLE_HTML) { + if (xo_style(xop) == XO_STYLE_HTML) { xo_data_append(xop, div_close, sizeof(div_close) - 1); if (xop->xo_flags & XOF_PRETTY) xo_data_append(xop, "\n", 1); @@ -2978,7 +3133,7 @@ xo_format_value (xo_handle_t *xop, const } } - switch (xop->xo_style) { + switch (xo_style(xop)) { case XO_STYLE_TEXT: if (flags & XFF_ENCODE_ONLY) flags |= XFF_NO_OUTPUT; @@ -3103,7 +3258,9 @@ xo_format_value (xo_handle_t *xop, const } if (flags & XFF_LEAF_LIST) { - if (first && pretty) + if (!first && pretty) + xo_data_append(xop, "\n", 1); + if (pretty) xo_buf_indent(xop, -1); } else { if (pretty) @@ -3122,10 +3279,10 @@ xo_format_value (xo_handle_t *xop, const xbp->xb_bufp[off] = '_'; } xo_data_append(xop, "\":", 2); + if (pretty) + xo_data_append(xop, " ", 1); } - if (pretty) - xo_data_append(xop, " ", 1); if (quote) xo_data_append(xop, "\"", 1); @@ -3142,7 +3299,7 @@ xo_format_content (xo_handle_t *xop, con const char *xml_tag, int display_only, const char *str, int len, const char *fmt, int flen) { - switch (xop->xo_style) { + switch (xo_style(xop)) { case XO_STYLE_TEXT: if (len) { xo_data_append_content(xop, str, len); @@ -3195,6 +3352,362 @@ xo_format_content (xo_handle_t *xop, con } } +static const char *xo_color_names[] = { + "default", /* XO_COL_DEFAULT */ + "black", /* XO_COL_BLACK */ + "red", /* XO_CLOR_RED */ + "green", /* XO_COL_GREEN */ + "yellow", /* XO_COL_YELLOW */ + "blue", /* XO_COL_BLUE */ + "magenta", /* XO_COL_MAGENTA */ + "cyan", /* XO_COL_CYAN */ + "white", /* XO_COL_WHITE */ + NULL +}; + +static int +xo_color_find (const char *str) +{ + int i; + + for (i = 0; xo_color_names[i]; i++) { + if (strcmp(xo_color_names[i], str) == 0) + return i; + } + + return -1; +} + +static const char *xo_effect_names[] = { + "reset", /* XO_EFF_RESET */ + "normal", /* XO_EFF_NORMAL */ + "bold", /* XO_EFF_BOLD */ + "underline", /* XO_EFF_UNDERLINE */ + "inverse", /* XO_EFF_INVERSE */ + NULL +}; + +static const char *xo_effect_on_codes[] = { + "0", /* XO_EFF_RESET */ + "0", /* XO_EFF_NORMAL */ + "1", /* XO_EFF_BOLD */ + "4", /* XO_EFF_UNDERLINE */ + "7", /* XO_EFF_INVERSE */ + NULL +}; + +#if 0 +/* + * See comment below re: joy of terminal standards. These can + * be use by just adding: + * if (newp->xoc_effects & bit) + * code = xo_effect_on_codes[i]; + * + else + * + code = xo_effect_off_codes[i]; + * in xo_color_handle_text. + */ +static const char *xo_effect_off_codes[] = { + "0", /* XO_EFF_RESET */ + "0", /* XO_EFF_NORMAL */ + "21", /* XO_EFF_BOLD */ + "24", /* XO_EFF_UNDERLINE */ + "27", /* XO_EFF_INVERSE */ + NULL +}; +#endif /* 0 */ + +static int +xo_effect_find (const char *str) +{ + int i; + + for (i = 0; xo_effect_names[i]; i++) { + if (strcmp(xo_effect_names[i], str) == 0) + return i; + } + + return -1; +} + +static void +xo_colors_parse (xo_handle_t *xop, xo_colors_t *xocp, char *str) +{ +#ifdef LIBXO_TEXT_ONLY + return; +#endif /* LIBXO_TEXT_ONLY */ + + char *cp, *ep, *np, *xp; + int len = strlen(str); + int rc; + + /* + * Possible tokens: colors, bg-colors, effects, no-effects, "reset". + */ + for (cp = str, ep = cp + len - 1; cp && cp < ep; cp = np) { + /* Trim leading whitespace */ + while (isspace((int) *cp)) + cp += 1; + + np = strchr(cp, ','); + if (np) + *np++ = '\0'; + + /* Trim trailing whitespace */ + xp = cp + strlen(cp) - 1; + while (isspace(*xp) && xp > cp) + *xp-- = '\0'; + + if (cp[0] == 'f' && cp[1] == 'g' && cp[2] == '-') { + rc = xo_color_find(cp + 3); + if (rc < 0) + goto unknown; + + xocp->xoc_col_fg = rc; + + } else if (cp[0] == 'b' && cp[1] == 'g' && cp[2] == '-') { + rc = xo_color_find(cp + 3); + if (rc < 0) + goto unknown; + xocp->xoc_col_bg = rc; + + } else if (cp[0] == 'n' && cp[1] == 'o' && cp[2] == '-') { + rc = xo_effect_find(cp + 3); + if (rc < 0) + goto unknown; + xocp->xoc_effects &= ~(1 << rc); + + } else { + rc = xo_effect_find(cp); + if (rc < 0) + goto unknown; + xocp->xoc_effects |= 1 << rc; + + switch (1 << rc) { + case XO_EFF_RESET: + xocp->xoc_col_fg = xocp->xoc_col_bg = 0; + /* Note: not "|=" since we want to wipe out the old value */ + xocp->xoc_effects = XO_EFF_RESET; + break; + + case XO_EFF_NORMAL: + xocp->xoc_effects &= ~(XO_EFF_BOLD | XO_EFF_UNDERLINE + | XO_EFF_INVERSE | XO_EFF_NORMAL); + break; + } + } + continue; + + unknown: + if (xop->xo_flags & XOF_WARN) + xo_failure(xop, "unknown color/effect string detected: '%s'", cp); + } +} + +static inline int +xo_colors_enabled (xo_handle_t *xop UNUSED) +{ +#ifdef LIBXO_TEXT_ONLY + return 0; +#else /* LIBXO_TEXT_ONLY */ + return ((xop->xo_flags & XOF_COLOR) ? 1 : 0); +#endif /* LIBXO_TEXT_ONLY */ +} + +static void +xo_colors_handle_text (xo_handle_t *xop UNUSED, xo_colors_t *newp) +{ + char buf[BUFSIZ]; + char *cp = buf, *ep = buf + sizeof(buf); + unsigned i, bit; + xo_colors_t *oldp = &xop->xo_colors; + const char *code; + + /* + * Start the buffer with an escape. We don't want to add the '[' + * now, since we let xo_effect_text_add unconditionally add the ';'. + * We'll replace the first ';' with a '[' when we're done. + */ + *cp++ = 0x1b; /* Escape */ + + /* + * Terminals were designed back in the age before "certainty" was + * invented, when standards were more what you'd call "guidelines" + * than actual rules. Anyway we can't depend on them to operate + * correctly. So when display attributes are changed, we punt, + * reseting them all and turning back on the ones we want to keep. + * Longer, but should be completely reliable. Savvy? + */ + if (oldp->xoc_effects != (newp->xoc_effects & oldp->xoc_effects)) { + newp->xoc_effects |= XO_EFF_RESET; + oldp->xoc_effects = 0; + } + + for (i = 0, bit = 1; xo_effect_names[i]; i++, bit <<= 1) { + if ((newp->xoc_effects & bit) == (oldp->xoc_effects & bit)) + continue; + + if (newp->xoc_effects & bit) + code = xo_effect_on_codes[i]; + + cp += snprintf(cp, ep - cp, ";%s", code); + if (cp >= ep) + return; /* Should not occur */ + + if (bit == XO_EFF_RESET) { + /* Mark up the old value so we can detect current values as new */ + oldp->xoc_effects = 0; + oldp->xoc_col_fg = oldp->xoc_col_bg = XO_COL_DEFAULT; + } + } + + if (newp->xoc_col_fg != oldp->xoc_col_fg) { + cp += snprintf(cp, ep - cp, ";3%u", + (newp->xoc_col_fg != XO_COL_DEFAULT) + ? newp->xoc_col_fg - 1 : 9); + } + + if (newp->xoc_col_bg != oldp->xoc_col_bg) { + cp += snprintf(cp, ep - cp, ";4%u", + (newp->xoc_col_bg != XO_COL_DEFAULT) + ? newp->xoc_col_bg - 1 : 9); + } + + if (cp - buf != 1 && cp < ep - 3) { + buf[1] = '['; /* Overwrite leading ';' */ + *cp++ = 'm'; + *cp = '\0'; + xo_buf_append(&xop->xo_data, buf, cp - buf); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 17:33:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7141A4C0; Mon, 27 Apr 2015 17:33:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD1F12EA; Mon, 27 Apr 2015 17:33:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RHX1TO086263; Mon, 27 Apr 2015 17:33:01 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RHX1tI086262; Mon, 27 Apr 2015 17:33:01 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504271733.t3RHX1tI086262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Mon, 27 Apr 2015 17:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282101 - head/libexec/casper/dns X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 17:33:01 -0000 Author: oshogbo Date: Mon Apr 27 17:33:00 2015 New Revision: 282101 URL: https://svnweb.freebsd.org/changeset/base/282101 Log: Fix potential memory leak. Pointed-out by: pfg Approved by: pjd (mentor) Modified: head/libexec/casper/dns/dns.c Modified: head/libexec/casper/dns/dns.c ============================================================================== --- head/libexec/casper/dns/dns.c Mon Apr 27 17:23:19 2015 (r282100) +++ head/libexec/casper/dns/dns.c Mon Apr 27 17:33:00 2015 (r282101) @@ -228,8 +228,10 @@ dns_getnameinfo(const nvlist_t *limits, goto out; } - if (!dns_allowed_family(limits, (int)sast.ss_family)) - return (NO_RECOVERY); + if (!dns_allowed_family(limits, (int)sast.ss_family)) { + error = NO_RECOVERY; + goto out; + } flags = (int)nvlist_get_number(nvlin, "flags"); From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 17:39:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE2806E5; Mon, 27 Apr 2015 17:39:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA8BB1339; Mon, 27 Apr 2015 17:39:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RHde0R087190; Mon, 27 Apr 2015 17:39:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RHdeCN087189; Mon, 27 Apr 2015 17:39:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504271739.t3RHdeCN087189@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 27 Apr 2015 17:39:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282102 - head/release/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 17:39:41 -0000 Author: gjb Date: Mon Apr 27 17:39:40 2015 New Revision: 282102 URL: https://svnweb.freebsd.org/changeset/base/282102 Log: Generate the arm64/aarch64 memstick image as MBR instead of GPT. Boot tested by: andrew Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/make-memstick.sh Modified: head/release/arm64/make-memstick.sh ============================================================================== --- head/release/arm64/make-memstick.sh Mon Apr 27 17:33:00 2015 (r282101) +++ head/release/arm64/make-memstick.sh Mon Apr 27 17:39:40 2015 (r282102) @@ -36,6 +36,8 @@ if [ $? -ne 0 ]; then fi rm ${1}/etc/fstab -mkimg -s gpt -p efi:=${1}/boot/boot1.efifat -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2} +mkimg -s bsd -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2}.tmp +mkimg -s mbr -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.tmp -o ${2} +rm ${2}.tmp rm ${2}.part From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 17:53:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 551C0CA4; Mon, 27 Apr 2015 17:53:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42A5B15B5; Mon, 27 Apr 2015 17:53:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RHrBkh096792; Mon, 27 Apr 2015 17:53:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RHr9Rj096787; Mon, 27 Apr 2015 17:53:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504271753.t3RHr9Rj096787@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 17:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282104 - in head: etc/mtree tests/sys tests/sys/kern tests/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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 17:53:11 -0000 Author: ngie Date: Mon Apr 27 17:53:09 2015 New Revision: 282104 URL: https://svnweb.freebsd.org/changeset/base/282104 Log: Move tests/sys/kern/mmap_test to tests/sys/vm/mmap_test As jhb noted, the actual mmap(2) implementation is under sys/vm, not sys/kern/, so the correct logical place is tests/sys/vm/, not tests/sys/kern/ X-MFC with: r282076 MFC after: 6 days Added: head/tests/sys/vm/ head/tests/sys/vm/Makefile (contents, props changed) head/tests/sys/vm/mmap_test.c - copied unchanged from r282097, head/tests/sys/kern/mmap_test.c Deleted: head/tests/sys/kern/mmap_test.c Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile head/tests/sys/kern/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Apr 27 17:47:08 2015 (r282103) +++ head/etc/mtree/BSD.tests.dist Mon Apr 27 17:53:09 2015 (r282104) @@ -404,6 +404,8 @@ unlink .. .. + vm + .. .. usr.bin apply Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Mon Apr 27 17:47:08 2015 (r282103) +++ head/tests/sys/Makefile Mon Apr 27 17:53:09 2015 (r282104) @@ -12,6 +12,7 @@ TESTS_SUBDIRS+= kqueue TESTS_SUBDIRS+= mqueue TESTS_SUBDIRS+= netinet TESTS_SUBDIRS+= opencrypto +TESTS_SUBDIRS+= vm # Items not integrated into kyua runs by default SUBDIR+= pjdfstest Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Mon Apr 27 17:47:08 2015 (r282103) +++ head/tests/sys/kern/Makefile Mon Apr 27 17:53:09 2015 (r282104) @@ -3,7 +3,6 @@ TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= kern_descrip_test -TAP_TESTS_C+= mmap_test ATF_TESTS_C+= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" Added: head/tests/sys/vm/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/vm/Makefile Mon Apr 27 17:53:09 2015 (r282104) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/vm + +TAP_TESTS_C+= mmap_test + +.include Copied: head/tests/sys/vm/mmap_test.c (from r282097, head/tests/sys/kern/mmap_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/vm/mmap_test.c Mon Apr 27 17:53:09 2015 (r282104, copy of r282097, head/tests/sys/kern/mmap_test.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2009 Simon L. Nielsen , + * Bjoern A. Zeeb + * + * 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 + +static const struct { + void *addr; + int ok[2]; /* Depending on security.bsd.map_at_zero {0, !=0}. */ +} tests[] = { + { (void *)0, { 0, 1 } }, /* Test sysctl. */ + { (void *)1, { 0, 0 } }, + { (void *)(PAGE_SIZE - 1), { 0, 0 } }, + { (void *)PAGE_SIZE, { 1, 1 } }, + { (void *)-1, { 0, 0 } }, + { (void *)(-PAGE_SIZE), { 0, 0 } }, + { (void *)(-1 - PAGE_SIZE), { 0, 0 } }, + { (void *)(-1 - PAGE_SIZE - 1), { 0, 0 } }, + { (void *)(0x1000 * PAGE_SIZE), { 1, 1 } }, +}; + +#define MAP_AT_ZERO "security.bsd.map_at_zero" + +int +main(void) +{ + void *p; + size_t len; + int i, error, mib[3], map_at_zero; + + error = 0; + + /* Get the current sysctl value of security.bsd.map_at_zero. */ + len = sizeof(mib) / sizeof(*mib); + if (sysctlnametomib(MAP_AT_ZERO, mib, &len) == -1) { + printf("1..0 # SKIP: sysctlnametomib(\"%s\") failed: %s\n", + MAP_AT_ZERO, strerror(errno)); + return (0); + } + + len = sizeof(map_at_zero); + if (sysctl(mib, 3, &map_at_zero, &len, NULL, 0) == -1) { + printf("1..0 # SKIP: sysctl for %s failed: %s\n", MAP_AT_ZERO, + strerror(errno)); + return (0); + } + + /* Normalize to 0 or 1 for array access. */ + map_at_zero = !!map_at_zero; + + printf("1..%zu\n", nitems(tests)); + for (i = 0; i < (int)nitems(tests); i++) { + p = mmap((void *)tests[i].addr, PAGE_SIZE, + PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_FIXED, + -1, 0); + if (p == MAP_FAILED) { + if (tests[i].ok[map_at_zero] != 0) + error++; + printf("%sok %d # mmap(%p, ...) failed\n", + tests[i].ok[map_at_zero] == 0 ? "" : "not ", + i + 1, + tests[i].addr); + } else { + if (tests[i].ok[map_at_zero] != 1) + error++; + printf("%sok %d # mmap(%p, ...) succeeded: p=%p\n", + tests[i].ok[map_at_zero] == 1 ? "" : "not ", + i + 1, + tests[i].addr, p); + } + } + + return (error != 0); +} From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 17:55:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED225E2E; Mon, 27 Apr 2015 17:55:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC29215C8; Mon, 27 Apr 2015 17:55:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RHtvmi097282; Mon, 27 Apr 2015 17:55:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RHtvkW097281; Mon, 27 Apr 2015 17:55:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504271755.t3RHtvkW097281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 17:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282105 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 17:55:58 -0000 Author: ngie Date: Mon Apr 27 17:55:57 2015 New Revision: 282105 URL: https://svnweb.freebsd.org/changeset/base/282105 Log: Add OLD_FILES entry for r282076 MFC after: never Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Apr 27 17:53:09 2015 (r282104) +++ head/ObsoleteFiles.inc Mon Apr 27 17:55:57 2015 (r282105) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20150427: test/sys/kern/mmap_test moved to test/sys/vm/mmap_test +OLD_FILES+=usr/tests/sys/kern/mmap_test # 20150418 OLD_FILES+=sbin/mount_oldnfs OLD_FILES+=usr/share/man/man8/mount_oldnfs.8.gz From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 18:01:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AF34AB; Mon, 27 Apr 2015 18:01:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79A2916B6; Mon, 27 Apr 2015 18:01:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RI1r0I002175; Mon, 27 Apr 2015 18:01:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RI1r57002174; Mon, 27 Apr 2015 18:01:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504271801.t3RI1r57002174@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 18:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282106 - head/lib/msun/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 18:01:53 -0000 Author: ngie Date: Mon Apr 27 18:01:52 2015 New Revision: 282106 URL: https://svnweb.freebsd.org/changeset/base/282106 Log: Remove per-architecture checks for enabling HAVE_FENV_H The conditional came from NetBSD, where only select architectures have this header/support All architectures on FreeBSD have the necessary support though, so the conditional's completely unnecessary make tinderbox done on all architectures (including arm64, where the issue occurred before) this time X-MFC with: r282057, r282092 MFC after: 6 days Modified: head/lib/msun/tests/Makefile Modified: head/lib/msun/tests/Makefile ============================================================================== --- head/lib/msun/tests/Makefile Mon Apr 27 17:55:57 2015 (r282105) +++ head/lib/msun/tests/Makefile Mon Apr 27 18:01:52 2015 (r282106) @@ -6,11 +6,8 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/ TESTSDIR= ${TESTSBASE}/lib/msun -.if ${MACHINE} == "sparc" || ${MACHINE} == "i386" \ - || ${MACHINE} == "amd64" || ${MACHINE_CPUARCH} == "arm" \ - || ${MACHINE} == "sparc64" +# All architectures on FreeBSD have fenv.h CFLAGS+= -DHAVE_FENV_H -.endif .if ${MACHINE} == "amd64" || ${MACHINE} == "i386" CFLAGS+= -D__HAVE_LONG_DOUBLE From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 18:07:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 024D12EB; Mon, 27 Apr 2015 18:07:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4CBD16F1; Mon, 27 Apr 2015 18:07:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RI7BWH003239; Mon, 27 Apr 2015 18:07:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RI7BRT003238; Mon, 27 Apr 2015 18:07:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504271807.t3RI7BRT003238@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 27 Apr 2015 18:07:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282107 - head/release/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 18:07:12 -0000 Author: gjb Date: Mon Apr 27 18:07:11 2015 New Revision: 282107 URL: https://svnweb.freebsd.org/changeset/base/282107 Log: Do not nest the BSD and MBR partitions, which produces an unbootable image. Use just an MBR scheme instead. Sponsored by: The FreeBSD Foundation Modified: head/release/arm64/make-memstick.sh Modified: head/release/arm64/make-memstick.sh ============================================================================== --- head/release/arm64/make-memstick.sh Mon Apr 27 18:01:52 2015 (r282106) +++ head/release/arm64/make-memstick.sh Mon Apr 27 18:07:11 2015 (r282107) @@ -36,8 +36,6 @@ if [ $? -ne 0 ]; then fi rm ${1}/etc/fstab -mkimg -s bsd -p freebsd-ufs:=${2}.part -p freebsd-swap::1M -o ${2}.tmp -mkimg -s mbr -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.tmp -o ${2} -rm ${2}.tmp +mkimg -s mbr -p efi:=${1}/boot/boot1.efifat -p freebsd:=${2}.part -o ${2} rm ${2}.part From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 18:21:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E63047F5; Mon, 27 Apr 2015 18:21:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4BFD18F8; Mon, 27 Apr 2015 18:21:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RILgK7010487; Mon, 27 Apr 2015 18:21:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RILg5W010486; Mon, 27 Apr 2015 18:21:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504271821.t3RILg5W010486@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 27 Apr 2015 18:21:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282108 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 18:21:43 -0000 Author: ngie Date: Mon Apr 27 18:21:42 2015 New Revision: 282108 URL: https://svnweb.freebsd.org/changeset/base/282108 Log: Fix a typo (linnker -> linker) Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Mon Apr 27 18:07:11 2015 (r282107) +++ head/Makefile Mon Apr 27 18:21:42 2015 (r282108) @@ -375,7 +375,7 @@ kernel-toolchains: .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) TARGETS?=amd64 arm i386 mips pc98 powerpc sparc64 # XXX Add arm64 to universe only if we have an external binutils installed. -# It does not build with the in-tree linnker. +# It does not build with the in-tree linker. .if exists(/usr/local/aarch64-freebsd/bin/ld) TARGETS+=arm64 TARGET_ARCHES_arm64?= aarch64 From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 18:41:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5291F0D; Mon, 27 Apr 2015 18:41:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C30991B24; Mon, 27 Apr 2015 18:41:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RIfVQM022729; Mon, 27 Apr 2015 18:41:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RIfVhf022728; Mon, 27 Apr 2015 18:41:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504271841.t3RIfVhf022728@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 27 Apr 2015 18:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282109 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 18:41:32 -0000 Author: kib Date: Mon Apr 27 18:41:31 2015 New Revision: 282109 URL: https://svnweb.freebsd.org/changeset/base/282109 Log: Change interpretation of the DF_ORIGIN and DF_1_ORIGIN flags. According to standard, the presence of the flags only means that the object path must be resolved at the time object loading, instead of my reading that the flag is required to enable token substitution at all. The consequence is that -z origin linker flag is no longer required for the token substitution in the run/rpath or the needed library soname. It is only recommended if token substition is needed at dlopen(3) time, since namecache might drop the required entries at the time of resolution. Found, reviewed and tested by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Mon Apr 27 18:21:42 2015 (r282108) +++ head/libexec/rtld-elf/rtld.c Mon Apr 27 18:41:31 2015 (r282109) @@ -148,8 +148,10 @@ static void unlink_object(Obj_Entry *); static void unload_object(Obj_Entry *); static void unref_dag(Obj_Entry *); static void ref_dag(Obj_Entry *); -static char *origin_subst_one(char *, const char *, const char *, bool); -static char *origin_subst(char *, const char *); +static char *origin_subst_one(Obj_Entry *, char *, const char *, + const char *, bool); +static char *origin_subst(Obj_Entry *, char *); +static bool obj_resolve_origin(Obj_Entry *obj); static void preinit_main(void); static int rtld_verify_versions(const Objlist *); static int rtld_verify_object_versions(Obj_Entry *); @@ -788,8 +790,8 @@ basename(const char *name) static struct utsname uts; static char * -origin_subst_one(char *real, const char *kw, const char *subst, - bool may_free) +origin_subst_one(Obj_Entry *obj, char *real, const char *kw, + const char *subst, bool may_free) { char *p, *p1, *res, *resp; int subst_len, kw_len, subst_count, old_len, new_len; @@ -808,9 +810,15 @@ origin_subst_one(char *real, const char /* * If the keyword is not found, just return. + * + * Return non-substituted string if resolution failed. We + * cannot do anything more reasonable, the failure mode of the + * caller is unresolved library anyway. */ - if (subst_count == 0) + if (subst_count == 0 || (obj != NULL && !obj_resolve_origin(obj))) return (may_free ? real : xstrdup(real)); + if (obj != NULL) + subst = obj->origin_path; /* * There is indeed something to substitute. Calculate the @@ -847,20 +855,22 @@ origin_subst_one(char *real, const char } static char * -origin_subst(char *real, const char *origin_path) +origin_subst(Obj_Entry *obj, char *real) { char *res1, *res2, *res3, *res4; + if (obj == NULL || !trust) + return (xstrdup(real)); if (uts.sysname[0] == '\0') { if (uname(&uts) != 0) { _rtld_error("utsname failed: %d", errno); return (NULL); } } - res1 = origin_subst_one(real, "$ORIGIN", origin_path, false); - res2 = origin_subst_one(res1, "$OSNAME", uts.sysname, true); - res3 = origin_subst_one(res2, "$OSREL", uts.release, true); - res4 = origin_subst_one(res3, "$PLATFORM", uts.machine, true); + res1 = origin_subst_one(obj, real, "$ORIGIN", NULL, false); + res2 = origin_subst_one(NULL, res1, "$OSNAME", uts.sysname, true); + res3 = origin_subst_one(NULL, res2, "$OSREL", uts.release, true); + res4 = origin_subst_one(NULL, res3, "$PLATFORM", uts.machine, true); return (res4); } @@ -1124,7 +1134,7 @@ digest_dynamic1(Obj_Entry *obj, int earl #endif case DT_FLAGS: - if ((dynp->d_un.d_val & DF_ORIGIN) && trust) + if (dynp->d_un.d_val & DF_ORIGIN) obj->z_origin = true; if (dynp->d_un.d_val & DF_SYMBOLIC) obj->symbolic = true; @@ -1156,7 +1166,7 @@ digest_dynamic1(Obj_Entry *obj, int earl case DT_FLAGS_1: if (dynp->d_un.d_val & DF_1_NOOPEN) obj->z_noopen = true; - if ((dynp->d_un.d_val & DF_1_ORIGIN) && trust) + if (dynp->d_un.d_val & DF_1_ORIGIN) obj->z_origin = true; if (dynp->d_un.d_val & DF_1_GLOBAL) obj->z_global = true; @@ -1207,30 +1217,33 @@ digest_dynamic1(Obj_Entry *obj, int earl } } +static bool +obj_resolve_origin(Obj_Entry *obj) +{ + + if (obj->origin_path != NULL) + return (true); + obj->origin_path = xmalloc(PATH_MAX); + return (rtld_dirname_abs(obj->path, obj->origin_path) != -1); +} + static void digest_dynamic2(Obj_Entry *obj, const Elf_Dyn *dyn_rpath, const Elf_Dyn *dyn_soname, const Elf_Dyn *dyn_runpath) { - if (obj->z_origin && obj->origin_path == NULL) { - obj->origin_path = xmalloc(PATH_MAX); - if (rtld_dirname_abs(obj->path, obj->origin_path) == -1) - rtld_die(); - } - - if (dyn_runpath != NULL) { - obj->runpath = (char *)obj->strtab + dyn_runpath->d_un.d_val; - if (obj->z_origin) - obj->runpath = origin_subst(obj->runpath, obj->origin_path); - } - else if (dyn_rpath != NULL) { - obj->rpath = (char *)obj->strtab + dyn_rpath->d_un.d_val; - if (obj->z_origin) - obj->rpath = origin_subst(obj->rpath, obj->origin_path); - } + if (obj->z_origin && !obj_resolve_origin(obj)) + rtld_die(); - if (dyn_soname != NULL) - object_add_name(obj, obj->strtab + dyn_soname->d_un.d_val); + if (dyn_runpath != NULL) { + obj->runpath = (char *)obj->strtab + dyn_runpath->d_un.d_val; + obj->runpath = origin_subst(obj, obj->runpath); + } else if (dyn_rpath != NULL) { + obj->rpath = (char *)obj->strtab + dyn_rpath->d_un.d_val; + obj->rpath = origin_subst(obj, obj->rpath); + } + if (dyn_soname != NULL) + object_add_name(obj, obj->strtab + dyn_soname->d_un.d_val); } static void @@ -1480,12 +1493,8 @@ find_library(const char *xname, const Ob xname); return NULL; } - if (objgiven && refobj->z_origin) { - return (origin_subst(__DECONST(char *, xname), - refobj->origin_path)); - } else { - return (xstrdup(xname)); - } + return (origin_subst(__DECONST(Obj_Entry *, refobj), + __DECONST(char *, xname))); } if (libmap_disable || !objgiven || From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 19:18:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F416B8E5; Mon, 27 Apr 2015 19:18:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E254D1F6D; Mon, 27 Apr 2015 19:18:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RJIp2b038732; Mon, 27 Apr 2015 19:18:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RJIp9w038731; Mon, 27 Apr 2015 19:18:51 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504271918.t3RJIp9w038731@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 27 Apr 2015 19:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282110 - head/etc/defaults X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 19:18:52 -0000 Author: adrian Date: Mon Apr 27 19:18:51 2015 New Revision: 282110 URL: https://svnweb.freebsd.org/changeset/base/282110 Log: Drop the default for performance_cx_lowest (ie, what to use when AC is connected) to ACPI C2. ACPI C3 ends up doing a lot more work before entering sleep, some of which requires grabbing a global ACPI hardware serialising mutex. Because of this, the more CPU cores you have, the more that lock contends under load, reaching close to the #1 lock contention (after VM, which is being worked on.) Tested: * Sandy bridge Xeon, 2 socket * 8 core * Ivy bridge Xeon v2, 2 socket * 8 core * Westmere-EX, 4 socket * 10 core * Ivybridge desktop * Sandybridge mobile * Ivybridge mobile MFC after: 2 weeks Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Apr 27 18:41:31 2015 (r282109) +++ head/etc/defaults/rc.conf Mon Apr 27 19:18:51 2015 (r282110) @@ -648,7 +648,7 @@ devfs_system_ruleset="" # The name (NOT devfs_set_rulesets="" # A list of /mount/dev=ruleset_name settings to # apply (must be mounted already, i.e. fstab(5)) devfs_load_rulesets="YES" # Enable to always load the default rulesets -performance_cx_lowest="Cmax" # Online CPU idle state +performance_cx_lowest="C2" # Online CPU idle state performance_cpu_freq="NONE" # Online CPU frequency economy_cx_lowest="Cmax" # Offline CPU idle state economy_cpu_freq="NONE" # Offline CPU frequency From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 19:19:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB8FEA2A; Mon, 27 Apr 2015 19:19:29 +0000 (UTC) Received: from mail-ie0-x233.google.com (mail-ie0-x233.google.com [IPv6:2607:f8b0:4001:c03::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A38971F74; Mon, 27 Apr 2015 19:19:29 +0000 (UTC) Received: by iedfl3 with SMTP id fl3so2169047ied.1; Mon, 27 Apr 2015 12:19:29 -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:message-id:subject :from:to:content-type; bh=n2Jg8hCN830P3+WERKeR1DNZ7UII2EXQJZjSJ5Szv/E=; b=VM7upqLBhsDMVFoHqNzWCQxyFaFl3B6yipv36wOv/aZDHpECM9uZe3PY5BnoRAeBYM dhj9eZUn/0GsIIln1F9vocwPrPSoEVBqB/3yM7Yp2xN2X4ErNs7QR46mDjgcy0snZn/Y ZXG3qvRHGh5VtBE7eFtfXe34YF95oGWjPFJUkjD8JUT+1LMdyGfboVwl0Ivx3aT4CE8A VVNDzItS6ArzwitH598RgU+pwZ882y4YntNWk/YP0mk0SiD5h0710X8Mt/znsFdwY9qZ WwmsPfeYviXQKSA9o9nXnbbeN2YllH39ICNVXJlQTESKM5AAWar64hIQWyW1sOL6Z5AZ f56A== MIME-Version: 1.0 X-Received: by 10.43.163.129 with SMTP id mo1mr13760464icc.61.1430162369209; Mon, 27 Apr 2015 12:19:29 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Mon, 27 Apr 2015 12:19:29 -0700 (PDT) In-Reply-To: <201504271918.t3RJIp9w038731@svn.freebsd.org> References: <201504271918.t3RJIp9w038731@svn.freebsd.org> Date: Mon, 27 Apr 2015 12:19:29 -0700 X-Google-Sender-Auth: Qf3T0Hh-V_9bYmLMQTxdH-vGiGk Message-ID: Subject: Re: svn commit: r282110 - head/etc/defaults From: Adrian Chadd To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 19:19:30 -0000 Damnit, missed: "Sponsored by: Norse Corp, Inc." -a From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 19:19:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91488B6B for ; Mon, 27 Apr 2015 19:19:34 +0000 (UTC) Received: from nm25-vm2.bullet.mail.gq1.yahoo.com (nm25-vm2.bullet.mail.gq1.yahoo.com [98.136.217.113]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C94D1F78 for ; Mon, 27 Apr 2015 19:19:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1430162182; bh=4bpoiTu2ei8YSB+X9zHqfp3KWXj90bgG9CyF5a7BjWU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=mCx9pfkO69q2PqUVkkL4S/KaAGdNFBxr5lMUs69uyhjpknFDFWYq3jaJ8p6d+/F2qEF/xi2+ZCgND94+jFjLIBALRKUMHYf3gEtGPNwxStJ6K/nXjmpLS+zxXWdyzHBTQziVMDCLCx+T32lqcUAap5MC9pbPyvj6SG7D1iFehMxEdIe/r4apV1MrFtlE3i/nWvnXfSRXMWe2uUPkJUNsg2UGYTGOmQYMqQDmJ0ZC88AoA/twPBSCdGeitRvHgtpSBpIvjQtI8rtm/6fB8evmXOa4MnBmUKDS+MikmAv3sUmbVScRgZeDDRwwjkIzCcghYF1AM8VO4VruCku7tUbRjg== Received: from [216.39.60.182] by nm25.bullet.mail.gq1.yahoo.com with NNFMP; 27 Apr 2015 19:16:22 -0000 Received: from [98.136.164.65] by tm18.bullet.mail.gq1.yahoo.com with NNFMP; 27 Apr 2015 19:16:22 -0000 Received: from [127.0.0.1] by smtp227.mail.gq1.yahoo.com with NNFMP; 27 Apr 2015 19:16:22 -0000 X-Yahoo-Newman-Id: 769202.69482.bm@smtp227.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 6p7UNGoVM1lrrsaLKP5CgLoWOuuLCGYEqk6zooPPROI9khH m6qiUoCcpb9UfIe6iiYlXnVriCKOf37fLN_oUaZYa0NeYinX79Q4Q8aBiVDQ 2HqNII2niWLM4eOg44_QVgUt4R7vhXnejPL5bVOG4hTyBXU4CU0evBNxzMg1 OzELDjlJRFArrCuUz5FNlQ2IA2aOJjxX28yVz65HlrXpHCZnWPvnGkcuRagp fFAaiZVtkQIrKN74c1GCGsVnI3JcfRwXz.KA3xws3u0YFFlao5JI7wzDjZ7U vVj1UBsuu2KzPh2yjdS9f1vvS2i_lGd0U3.M6M85KCZCaQKkVvkPObgdIhXA wUttZwTax.6xGc7WpcAFuaBQmF3fdwuqRe8F6xYd_1OhwdcDqSLScm7jNXH7 X0XOt1KJsyph0PAoAFc09SIaMthQ83N.KgXvjDZN74WYtZTA9nhHQKtHWe2j o6IXq_0EpJWWH3L29j.9qOrXKkkgSXht3RiN72dUJnDzYbLeUQUjnuSaxmZ8 zfgWFrjzfAGKz0jLw.e81XeQ6Bqlb986iJyY63mVI X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r281451 - head/sys/vm From: Scott Long In-Reply-To: <553DC562.8090902@freebsd.org> Date: Mon, 27 Apr 2015 13:15:40 -0600 Cc: Chagin Dmitry , Chris Torek , dim@FreeBSD.org, adrian@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1800207E-E936-4F85-9588-0C2758F092BE@yahoo.com> References: <695B6002-002A-406C-B843-0DCFE24F81BD@FreeBSD.org> <201504241237.t3OCbLmd039664@elf.torek.net> <20150425070658.GA3442@dchagin.static.corbina.net> <198D109A-08C1-4D02-87A2-5CAC4CBD069E@yahoo.com> <553DC562.8090902@freebsd.org> To: Julian Elischer X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 19:19:34 -0000 > On Apr 26, 2015, at 11:13 PM, Julian Elischer = wrote: >=20 > On 4/26/15 3:28 AM, Scott Long wrote: >>=20 >> Too early in boot to get a crashdump. > but not too early for gdb live. >=20 >=20 >=20 Guys, seriously, the amount of unproductive comments from the sidelines = is stupid. The commit was trivial optimization that proved to cause problems. = Nothing was lost in the revert. If anyone want to run this to ground, I can provide = hardware with a remote console. Scott From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 19:19:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D57E1CB7 for ; Mon, 27 Apr 2015 19:19:48 +0000 (UTC) Received: from nm27-vm10.bullet.mail.gq1.yahoo.com (nm27-vm10.bullet.mail.gq1.yahoo.com [98.136.216.153]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F5AF1F8A for ; Mon, 27 Apr 2015 19:19:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1430161984; bh=otXqvKra1qJMLz006JiJIZJBLgAuyCl9ANo8QhMOdpI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=Pbdcw0qBBllBtngTHHD8GTFgDlKuGSg2FPOwzuxyS7gq6/Oobp3g2R8jYdLPcdJDxME3QJvf0PisGBiX54Kk2JMalFmnXJF7TPnSmbB4rC0rltbqFRV/MvYY++oN3oDXH3S7BZ58E9oghw8TjE8P2aRONmZwXBNEkin0fnD/03K/wDE8KObsMmg6SEoNhp/5LSHuk+Nf7VOP78BGgF+I0TmVqGdD/J9kSV5dUDyPRaczxbfb04BQdy/GUs7jn3vRJ1bpmxfQqzgQbxEZGQK30eoMavo8FGSSQLvou6G5jCjeqozVkv2Zh1aoEhsKPfn5gC+tlSC9KS36wkK5GMn3jA== Received: from [98.137.12.191] by nm27.bullet.mail.gq1.yahoo.com with NNFMP; 27 Apr 2015 19:13:04 -0000 Received: from [208.71.42.203] by tm12.bullet.mail.gq1.yahoo.com with NNFMP; 27 Apr 2015 19:13:04 -0000 Received: from [127.0.0.1] by smtp214.mail.gq1.yahoo.com with NNFMP; 27 Apr 2015 19:13:04 -0000 X-Yahoo-Newman-Id: 321175.88667.bm@smtp214.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: lmo7F3wVM1kuCJAour26.efHuyteYDXtRkXScGvdovI8yPl 2PrWNRRroBPSNtyU6ar92e2_873ic1.7wVhqHV_VtAmjuVFTjUwV89dDg.Lq FWctKZqy2o8BH9AWmRQ2OuFRIofzIiI1Co47KmukrWPhYNLQANQvQggzSye8 4VovA7vYiOrMnMwZyPUD1K5H8_9Blx8aMaYDiGqwz1qhKc6UqoEa8ynJLsPz R86EozLZMe7CaZd1MZ2NHJv02gYM3iM6m9Q1pfhgCfB5f1SxL6S2SwqbUv2V Dw0BmoqkD0SEjXsUdmxFholRcW5tDVBiABNQChpARycSPePykD.XKEPVKkRt 4VRRqqKNUJtXetVUv1I..eMm7WYs3q4OFSYXDa4HC3ZGiPJeSXmmzq3ZEBCC bdWhsf8tapiIcQ8BC3bgOylJIhpz03rCyarrSCJc5uVdV4job99pUiTj_Qkn rJiRGJfwUTUl2lI1wiCxsTVpm7_ajVuSsfZGfC9phubDWMq492kjXWy5nbzr Qd_6FuOTr9c8maM4XEGlIbTg9V9pj5wMUUSDRowkn X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Subject: Re: svn commit: r282064 - head/sys/boot/common Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F26C741D-6911-4F17-84F5-6DCE8C7B3566"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 (7bf389b) From: Scott Long In-Reply-To: <00E0CFB6-FEEA-4260-9B8B-807353025D58@gmail.com> Date: Mon, 27 Apr 2015 13:12:51 -0600 Cc: Scott Long , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <2425CE48-8D65-4B9A-AED9-14E5414A8D23@yahoo.com> References: <201504270738.t3R7clxV079521@svn.freebsd.org> <00E0CFB6-FEEA-4260-9B8B-807353025D58@gmail.com> To: Garrett Cooper X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 19:19:49 -0000 --Apple-Mail=_F26C741D-6911-4F17-84F5-6DCE8C7B3566 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 27, 2015, at 1:40 AM, Garrett Cooper = wrote: >=20 > On Apr 27, 2015, at 0:38, Scott Long wrote: >=20 >> Author: scottl >> Date: Mon Apr 27 07:38:46 2015 >> New Revision: 282064 >> URL: https://svnweb.freebsd.org/changeset/base/282064 >>=20 >> Log: >> Small change in header order to allow this to compile. >>=20 >> Obtained from: Netflix, Inc. >> MFC after: 3 days >>=20 >> Modified: >> head/sys/boot/common/md.c >=20 > Hi Scott, > How was this broken before? > Thanks! > -NGie It didn=E2=80=99t compile. Note that you have to set MD_IMAGE_SIZE in = order to even attempt to compile it. Scott --Apple-Mail=_F26C741D-6911-4F17-84F5-6DCE8C7B3566 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVPoozAAoJEIxiMIkw8yo4BdwH/1BPhq/UOJYdrC6NbsJ0qx3g xBDvzEUpklrD5X/IcGwjRM7cYch/YK2bkwbUcFUyCqkKQJnzKcEvsStYIVlx7jXT 0lqYFlROI7mln+kjtgdZd0XGKZ1h/szXAxawOMdErG0Y6v1sqLqXhnplOEDgjA0t 7p5IRYPm1NHokZrt54bJetElBbQHNbgj/Wiz3mKwo11SaKDngfPRw1+fUnXRweNH lrVtI3o9CQarSM3jov99FZq2VVTVCypt8iLhfr2HCCuDX7qGZwaC+nGEGeO29/cU 1yrz9H/nYtsTxh7GRJSvRjEVGS99JiqgY8YaD9a1MHQDYz5vX3N9AzJKZJNRyis= =W9fv -----END PGP SIGNATURE----- --Apple-Mail=_F26C741D-6911-4F17-84F5-6DCE8C7B3566-- From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 19:49:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F024D7CD; Mon, 27 Apr 2015 19:49:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE676133A; Mon, 27 Apr 2015 19:49:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RJnoVL054027; Mon, 27 Apr 2015 19:49:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RJnoxr054026; Mon, 27 Apr 2015 19:49:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504271949.t3RJnoxr054026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 27 Apr 2015 19:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282112 - head/release/tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 19:49:51 -0000 Author: gjb Date: Mon Apr 27 19:49:50 2015 New Revision: 282112 URL: https://svnweb.freebsd.org/changeset/base/282112 Log: Fix a comment. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/tools/vmimage.subr Modified: head/release/tools/vmimage.subr ============================================================================== --- head/release/tools/vmimage.subr Mon Apr 27 19:41:40 2015 (r282111) +++ head/release/tools/vmimage.subr Mon Apr 27 19:49:50 2015 (r282112) @@ -181,8 +181,10 @@ vm_extra_install_ports() { } vm_extra_pre_umount() { - # Prototype. When overridden, installs additional ports within the - # virtual machine environment. + # Prototype. When overridden, performs additional tasks within the + # virtual machine environment prior to unmounting the filesystem. + # Note: When overriding this function, removing resolv.conf in the + # disk image must be included. rm -f ${DESTDIR}/etc/resolv.conf return 0 From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 20:17:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D87EA3E6; Mon, 27 Apr 2015 20:17:22 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 906751762; Mon, 27 Apr 2015 20:17:22 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 1FBDF25D385E; Mon, 27 Apr 2015 20:17:18 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 1BEB1C76FD0; Mon, 27 Apr 2015 20:17:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id zneX4mXlKOLq; Mon, 27 Apr 2015 20:17:16 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:7d29:688b:38e7:d90f] (unknown [IPv6:fde9:577b:c1a9:4410:7d29:688b:38e7:d90f]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B5B8CC76FCE; Mon, 27 Apr 2015 20:17:15 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r282100 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo contrib/libxo/m4 contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/xo contrib/libxo/xohtml con... From: "Bjoern A. Zeeb" In-Reply-To: <201504271723.t3RHNKbP081255@svn.freebsd.org> Date: Mon, 27 Apr 2015 20:16:42 +0000 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201504271723.t3RHNKbP081255@svn.freebsd.org> To: Marcel Moolenaar X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 20:17:23 -0000 > On 27 Apr 2015, at 17:23 , Marcel Moolenaar = wrote: >=20 > Author: marcel > Date: Mon Apr 27 17:23:19 2015 > New Revision: 282100 > URL: https://svnweb.freebsd.org/changeset/base/282100 >=20 > Log: > Upgrade libxo to 0.3.2. >=20 > Obtained from: https://github.com/Juniper/libxo/tree/0.3.2 > Requested by: Phil Shafer >=20 > This import incorporates local change 279966. > Local change 276260 has been merged-in. In-tree gcc builds (mips, sparc, powerpc at least) seem to be failing = with: /scratch/tmp/bz/head.svn/contrib/libxo/libxo/libxo.c: In function = 'xo_do_emit': /scratch/tmp/bz/head.svn/contrib/libxo/libxo/libxo.c:3523: note: = =E2=80=98code=E2=80=99 was declared here unless there was a follow-up commit which fixed this and I haven=E2=80=99t= seen yet (in which case please ignore :-) =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 20:21:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10E6367F; Mon, 27 Apr 2015 20:21:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D91151858; Mon, 27 Apr 2015 20:21:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RKLuGR073379; Mon, 27 Apr 2015 20:21:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RKLuLb073378; Mon, 27 Apr 2015 20:21:56 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201504272021.t3RKLuLb073378@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 27 Apr 2015 20:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282114 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 20:21:57 -0000 Author: delphij Date: Mon Apr 27 20:21:56 2015 New Revision: 282114 URL: https://svnweb.freebsd.org/changeset/base/282114 Log: Generate new UUID if system UUID is known bad or malformed and add a two seconds sleep if we found the system UUID be invalid. Obtained from: FreeNAS MFC after: 2 weeks Modified: head/etc/rc.d/hostid Modified: head/etc/rc.d/hostid ============================================================================== --- head/etc/rc.d/hostid Mon Apr 27 19:52:18 2015 (r282113) +++ head/etc/rc.d/hostid Mon Apr 27 20:21:56 2015 (r282114) @@ -1,6 +1,7 @@ #!/bin/sh # # Copyright (c) 2007 Pawel Jakub Dawidek +# Copyright (c) 2015 Xin LI # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -55,23 +56,66 @@ hostid_set() ${SYSCTL} kern.hostid=${id} >/dev/null } -hostid_hardware() +valid_hostid() { - uuid=`kenv -q smbios.system.uuid` + uuid=$1 + x="[0-9a-f]" y=$x$x$x$x + + # Check against a blacklist before + # accepting the UUID. case "${uuid}" in + 00000000-0000-0000-0000-000000000000) + ;; + 00020003-0004-0005-0006-000700080009) + ;; + 03000200-0400-0500-0006-000700080009) + ;; + 07090201-0103-0301-0807-060504030201) + ;; + 11111111-1111-1111-1111-111111111111) + ;; + 11111111-2222-3333-4444-555555555555) + ;; + 4c4c4544-0000-2010-8020-80c04f202020) + ;; + 58585858-5858-5858-5858-585858585858) + ;; + 890e2d14-cacd-45d1-ae66-bc80e8bfeb0f) + ;; + 8e275844-178f-44a8-aceb-a7d7e5178c63) + ;; + dc698397-fa54-4cf2-82c8-b1b5307a6a7f) + ;; + fefefefe-fefe-fefe-fefe-fefefefefefe) + ;; + *-ffff-ffff-ffff-ffffffffffff) + ;; $y$y-$y-$y-$y-$y$y$y) - echo "${uuid}" + return 0 ;; esac + + return 1 +} + +hostid_hardware() +{ + uuid=`kenv -q smbios.system.uuid` + + if valid_hostid $uuid; then + echo "${uuid}" + fi } hostid_generate() { # First look for UUID in hardware. uuid=`hostid_hardware` - if [ -z ${uuid} ]; then + if [ -z "${uuid}" ]; then + warn "hostid: unable to figure out a UUID from DMI data, generating a new one" + sleep 2 # If not found, fall back to software-generated UUID. uuid=`uuidgen` fi @@ -92,11 +136,15 @@ hostid_start() { # If ${hostid_file} already exists, we take UUID from there. if [ -r ${hostid_file} ]; then - hostid_set `cat ${hostid_file}` - else - # No hostid file, generate UUID. - hostid_generate + read saved_hostid < ${hostid_file} + if valid_hostid ${saved_hostid}; then + hostid_set `cat ${hostid_file}` + exit 0 + fi fi + + # No hostid file, generate UUID. + hostid_generate } load_rc_config $name From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 21:27:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37A79CEF; Mon, 27 Apr 2015 21:27:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 233921FD7; Mon, 27 Apr 2015 21:27:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RLRtIG005333; Mon, 27 Apr 2015 21:27:55 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RLRpvX005316; Mon, 27 Apr 2015 21:27:51 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504272127.t3RLRpvX005316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 27 Apr 2015 21:27:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282115 - in head: contrib/gcclibs/libgomp contrib/gcclibs/libgomp/config/linux contrib/gcclibs/libgomp/config/posix gnu/lib/libgomp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 21:27:55 -0000 Author: pfg Date: Mon Apr 27 21:27:51 2015 New Revision: 282115 URL: https://svnweb.freebsd.org/changeset/base/282115 Log: libgomp: bring early CPU affinity support from FSF GCC-4_3 branch. This is not likely to make it into a release and is basically disabled but should still be useful for testing. Obtained from: GCC pre-4.3 (rev. 123494, 125542; LGPLv2.1+) Added: head/contrib/gcclibs/libgomp/ChangeLog.gcc43 head/contrib/gcclibs/libgomp/config/linux/affinity.c (contents, props changed) head/contrib/gcclibs/libgomp/config/posix/affinity.c (contents, props changed) Modified: head/contrib/gcclibs/libgomp/Makefile.am head/contrib/gcclibs/libgomp/Makefile.in head/contrib/gcclibs/libgomp/config.h.in head/contrib/gcclibs/libgomp/configure head/contrib/gcclibs/libgomp/configure.ac head/contrib/gcclibs/libgomp/env.c head/contrib/gcclibs/libgomp/libgomp.h head/contrib/gcclibs/libgomp/team.c head/gnu/lib/libgomp/Makefile head/gnu/lib/libgomp/config.h Added: head/contrib/gcclibs/libgomp/ChangeLog.gcc43 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcclibs/libgomp/ChangeLog.gcc43 Mon Apr 27 21:27:51 2015 (r282115) @@ -0,0 +1,23 @@ +2007-06-07 Jakub Jelinek (r125542) + + * team.c (gomp_team_start): Fix setting up thread_attr + stack size. + +2007-04-04 Jakub Jelinek (r123494) + + * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern + decls. + (gomp_init_affinity, gomp_init_thread_affinity): New prototypes. + * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables. + (parse_affinity): New function. + (initialize_env): Call it and gomp_init_affinity. + * team.c (gomp_team_start): If gomp_cpu_affinity != NULL, + create new pthread_attr_t and call gomp_init_thread_affinity + on it for each thread before passing the attribute to pthread_create. + * config/linux/affinity.c: New file. + * config/posix/affinity.c: New file. + * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test. + * configure: Rebuilt. + * config.h.in: Rebuilt. + * Makefile.am (libgomp_la_SOURCES): Add affinity.c. + * Makefile.in: Rebuilt. Modified: head/contrib/gcclibs/libgomp/Makefile.am ============================================================================== --- head/contrib/gcclibs/libgomp/Makefile.am Mon Apr 27 20:21:56 2015 (r282114) +++ head/contrib/gcclibs/libgomp/Makefile.am Mon Apr 27 21:27:51 2015 (r282115) @@ -33,7 +33,7 @@ libgomp_la_LDFLAGS = $(libgomp_version_i libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \ loop.c ordered.c parallel.c sections.c single.c team.c work.c \ - lock.c mutex.c proc.c sem.c bar.c time.c fortran.c + lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c nodist_noinst_HEADERS = libgomp_f.h nodist_libsubinclude_HEADERS = omp.h Modified: head/contrib/gcclibs/libgomp/Makefile.in ============================================================================== --- head/contrib/gcclibs/libgomp/Makefile.in Mon Apr 27 20:21:56 2015 (r282114) +++ head/contrib/gcclibs/libgomp/Makefile.in Mon Apr 27 21:27:51 2015 (r282115) @@ -79,7 +79,7 @@ libgomp_la_LIBADD = am_libgomp_la_OBJECTS = alloc.lo barrier.lo critical.lo env.lo \ error.lo iter.lo loop.lo ordered.lo parallel.lo sections.lo \ single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo \ - bar.lo time.lo fortran.lo + bar.lo time.lo fortran.lo affinity.lo libgomp_la_OBJECTS = $(am_libgomp_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/../depcomp @@ -279,7 +279,7 @@ libgomp_version_info = -version-info $(l libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \ loop.c ordered.c parallel.c sections.c single.c team.c work.c \ - lock.c mutex.c proc.c sem.c bar.c time.c fortran.c + lock.c mutex.c proc.c sem.c bar.c time.c fortran.c affinity.c nodist_noinst_HEADERS = libgomp_f.h nodist_libsubinclude_HEADERS = omp.h @@ -406,6 +406,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affinity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/barrier.Plo@am__quote@ Modified: head/contrib/gcclibs/libgomp/config.h.in ============================================================================== --- head/contrib/gcclibs/libgomp/config.h.in Mon Apr 27 20:21:56 2015 (r282114) +++ head/contrib/gcclibs/libgomp/config.h.in Mon Apr 27 21:27:51 2015 (r282115) @@ -24,6 +24,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define if pthread_{,attr_}{g,s}etaffinity_np is supported. */ +#undef HAVE_PTHREAD_AFFINITY_NP + /* Define to 1 if you have the header file. */ #undef HAVE_SEMAPHORE_H Added: head/contrib/gcclibs/libgomp/config/linux/affinity.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcclibs/libgomp/config/linux/affinity.c Mon Apr 27 21:27:51 2015 (r282115) @@ -0,0 +1,107 @@ +/* Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Contributed by Jakub Jelinek . + + This file is part of the GNU OpenMP Library (libgomp). + + Libgomp is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for + more details. + + You should have received a copy of the GNU Lesser General Public License + along with libgomp; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* As a special exception, if you link this library with other files, some + of which are compiled with GCC, to produce an executable, this library + does not by itself cause the resulting executable to be covered by the + GNU General Public License. This exception does not however invalidate + any other reasons why the executable file might be covered by the GNU + General Public License. */ + +/* This is a Linux specific implementation of a CPU affinity setting. */ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif +#include "libgomp.h" +#include +#include +#include + +#ifdef HAVE_PTHREAD_AFFINITY_NP + +static unsigned int affinity_counter; +#ifndef HAVE_SYNC_BUILTINS +static gomp_mutex_t affinity_lock; +#endif + +void +gomp_init_affinity (void) +{ + cpu_set_t cpuset; + size_t idx, widx; + + if (pthread_getaffinity_np (pthread_self (), sizeof (cpuset), &cpuset)) + { + gomp_error ("could not get CPU affinity set"); + free (gomp_cpu_affinity); + gomp_cpu_affinity = NULL; + gomp_cpu_affinity_len = 0; + return; + } + + for (widx = idx = 0; idx < gomp_cpu_affinity_len; idx++) + if (gomp_cpu_affinity[idx] < CPU_SETSIZE + && CPU_ISSET (gomp_cpu_affinity[idx], &cpuset)) + gomp_cpu_affinity[widx++] = gomp_cpu_affinity[idx]; + + if (widx == 0) + { + gomp_error ("no CPUs left for affinity setting"); + free (gomp_cpu_affinity); + gomp_cpu_affinity = NULL; + gomp_cpu_affinity_len = 0; + return; + } + + gomp_cpu_affinity_len = widx; + CPU_ZERO (&cpuset); + CPU_SET (gomp_cpu_affinity[0], &cpuset); + pthread_setaffinity_np (pthread_self (), sizeof (cpuset), &cpuset); + affinity_counter = 1; +#ifndef HAVE_SYNC_BUILTINS + gomp_mutex_init (&affinity_lock); +#endif +} + +void +gomp_init_thread_affinity (pthread_attr_t *attr) +{ + unsigned int cpu; + cpu_set_t cpuset; + +#ifdef HAVE_SYNC_BUILTINS + cpu = __sync_fetch_and_add (&affinity_counter, 1); +#else + gomp_mutex_lock (&affinity_lock); + cpu = affinity_counter++; + gomp_mutex_unlock (&affinity_lock); +#endif + cpu %= gomp_cpu_affinity_len; + CPU_ZERO (&cpuset); + CPU_SET (gomp_cpu_affinity[cpu], &cpuset); + pthread_attr_setaffinity_np (attr, sizeof (cpu_set_t), &cpuset); +} + +#else + +#include "../posix/affinity.c" + +#endif Added: head/contrib/gcclibs/libgomp/config/posix/affinity.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcclibs/libgomp/config/posix/affinity.c Mon Apr 27 21:27:51 2015 (r282115) @@ -0,0 +1,41 @@ +/* Copyright (C) 2006 Free Software Foundation, Inc. + Contributed by Jakub Jelinek . + + This file is part of the GNU OpenMP Library (libgomp). + + Libgomp is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for + more details. + + You should have received a copy of the GNU Lesser General Public License + along with libgomp; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* As a special exception, if you link this library with other files, some + of which are compiled with GCC, to produce an executable, this library + does not by itself cause the resulting executable to be covered by the + GNU General Public License. This exception does not however invalidate + any other reasons why the executable file might be covered by the GNU + General Public License. */ + +/* This is a generic stub implementation of a CPU affinity setting. */ + +#include "libgomp.h" + +void +gomp_init_affinity (void) +{ +} + +void +gomp_init_thread_affinity (pthread_attr_t *attr) +{ + (void) attr; +} Modified: head/contrib/gcclibs/libgomp/configure ============================================================================== --- head/contrib/gcclibs/libgomp/configure Mon Apr 27 20:21:56 2015 (r282114) +++ head/contrib/gcclibs/libgomp/configure Mon Apr 27 21:27:51 2015 (r282115) @@ -8851,6 +8851,68 @@ rm -f conftest.err conftest.$ac_objext \ ;; esac +# Check for pthread_{,attr_}[sg]etaffinity_np. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _GNU_SOURCE + #include +int +main () +{ +cpu_set_t cpuset; + pthread_attr_t attr; + pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset); + if (CPU_ISSET (0, &cpuset)) + CPU_SET (1, &cpuset); + else + CPU_ZERO (&cpuset); + pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset); + pthread_attr_init (&attr); + pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset); + pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PTHREAD_AFFINITY_NP 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # At least for glibc, clock_gettime is in librt. But don't pull that # in if it still doesn't give us the function we want. if test $ac_cv_func_clock_gettime = no; then Modified: head/contrib/gcclibs/libgomp/configure.ac ============================================================================== --- head/contrib/gcclibs/libgomp/configure.ac Mon Apr 27 20:21:56 2015 (r282114) +++ head/contrib/gcclibs/libgomp/configure.ac Mon Apr 27 21:27:51 2015 (r282115) @@ -237,6 +237,25 @@ If so, please configure with --disable-l ;; esac +# Check for pthread_{,attr_}[sg]etaffinity_np. +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#define _GNU_SOURCE + #include ], + [cpu_set_t cpuset; + pthread_attr_t attr; + pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset); + if (CPU_ISSET (0, &cpuset)) + CPU_SET (1, &cpuset); + else + CPU_ZERO (&cpuset); + pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset); + pthread_attr_init (&attr); + pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset); + pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);])], + AC_DEFINE(HAVE_PTHREAD_AFFINITY_NP, 1, +[ Define if pthread_{,attr_}{g,s}etaffinity_np is supported.])) + # At least for glibc, clock_gettime is in librt. But don't pull that # in if it still doesn't give us the function we want. if test $ac_cv_func_clock_gettime = no; then Modified: head/contrib/gcclibs/libgomp/env.c ============================================================================== --- head/contrib/gcclibs/libgomp/env.c Mon Apr 27 20:21:56 2015 (r282114) +++ head/contrib/gcclibs/libgomp/env.c Mon Apr 27 21:27:51 2015 (r282115) @@ -1,4 +1,4 @@ -/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. Contributed by Richard Henderson . This file is part of the GNU OpenMP Library (libgomp). @@ -42,6 +42,8 @@ bool gomp_dyn_var = false; bool gomp_nest_var = false; enum gomp_schedule_type gomp_run_sched_var = GFS_DYNAMIC; unsigned long gomp_run_sched_chunk = 1; +unsigned short *gomp_cpu_affinity; +size_t gomp_cpu_affinity_len; /* Parse the OMP_SCHEDULE environment variable. */ @@ -177,6 +179,97 @@ parse_boolean (const char *name, bool *v gomp_error ("Invalid value for environment variable %s", name); } +/* Parse the GOMP_CPU_AFFINITY environment varible. Return true if one was + present and it was successfully parsed. */ + +static bool +parse_affinity (void) +{ + char *env, *end; + unsigned long cpu_beg, cpu_end, cpu_stride; + unsigned short *cpus = NULL; + size_t allocated = 0, used = 0, needed; + + env = getenv ("GOMP_CPU_AFFINITY"); + if (env == NULL) + return false; + + do + { + while (*env == ' ' || *env == '\t') + env++; + + cpu_beg = strtoul (env, &end, 0); + cpu_end = cpu_beg; + cpu_stride = 1; + if (env == end || cpu_beg >= 65536) + goto invalid; + + env = end; + if (*env == '-') + { + cpu_end = strtoul (++env, &end, 0); + if (env == end || cpu_end >= 65536 || cpu_end < cpu_beg) + goto invalid; + + env = end; + if (*env == ':') + { + cpu_stride = strtoul (++env, &end, 0); + if (env == end || cpu_stride == 0 || cpu_stride >= 65536) + goto invalid; + + env = end; + } + } + + needed = (cpu_end - cpu_beg) / cpu_stride + 1; + if (used + needed >= allocated) + { + unsigned short *new_cpus; + + if (allocated < 64) + allocated = 64; + if (allocated > needed) + allocated <<= 1; + else + allocated += 2 * needed; + new_cpus = realloc (cpus, allocated * sizeof (unsigned short)); + if (new_cpus == NULL) + { + free (cpus); + gomp_error ("not enough memory to store GOMP_CPU_AFFINITY list"); + return false; + } + + cpus = new_cpus; + } + + while (needed--) + { + cpus[used++] = cpu_beg; + cpu_beg += cpu_stride; + } + + while (*env == ' ' || *env == '\t') + env++; + + if (*env == ',') + env++; + else if (*env == '\0') + break; + } + while (1); + + gomp_cpu_affinity = cpus; + gomp_cpu_affinity_len = used; + return true; + + invalid: + gomp_error ("Invalid value for enviroment variable GOMP_CPU_AFFINITY"); + return false; +} + static void __attribute__((constructor)) initialize_env (void) { @@ -190,6 +283,8 @@ initialize_env (void) parse_boolean ("OMP_NESTED", &gomp_nest_var); if (!parse_unsigned_long ("OMP_NUM_THREADS", &gomp_nthreads_var)) gomp_init_num_threads (); + if (parse_affinity ()) + gomp_init_affinity (); /* Not strictly environment related, but ordering constructors is tricky. */ pthread_attr_init (&gomp_thread_attr); Modified: head/contrib/gcclibs/libgomp/libgomp.h ============================================================================== --- head/contrib/gcclibs/libgomp/libgomp.h Mon Apr 27 20:21:56 2015 (r282114) +++ head/contrib/gcclibs/libgomp/libgomp.h Mon Apr 27 21:27:51 2015 (r282115) @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2007 Free Software Foundation, Inc. Contributed by Richard Henderson . This file is part of the GNU OpenMP Library (libgomp). @@ -246,8 +246,18 @@ extern unsigned long gomp_run_sched_chun /* The attributes to be used during thread creation. */ extern pthread_attr_t gomp_thread_attr; +/* Other variables. */ + +extern unsigned short *gomp_cpu_affinity; +extern size_t gomp_cpu_affinity_len; + /* Function prototypes. */ +/* affinity.c */ + +extern void gomp_init_affinity (void); +extern void gomp_init_thread_affinity (pthread_attr_t *); + /* alloc.c */ extern void *gomp_malloc (size_t) __attribute__((malloc)); Modified: head/contrib/gcclibs/libgomp/team.c ============================================================================== --- head/contrib/gcclibs/libgomp/team.c Mon Apr 27 20:21:56 2015 (r282114) +++ head/contrib/gcclibs/libgomp/team.c Mon Apr 27 21:27:51 2015 (r282115) @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. Contributed by Richard Henderson . This file is part of the GNU OpenMP Library (libgomp). @@ -183,6 +183,7 @@ gomp_team_start (void (*fn) (void *), vo struct gomp_team *team; bool nested; unsigned i, n, old_threads_used = 0; + pthread_attr_t thread_attr, *attr; thr = gomp_thread (); nested = thr->ts.team != NULL; @@ -265,6 +266,17 @@ gomp_team_start (void (*fn) (void *), vo } } + attr = &gomp_thread_attr; + if (gomp_cpu_affinity != NULL) + { + size_t stacksize; + pthread_attr_init (&thread_attr); + pthread_attr_setdetachstate (&thread_attr, PTHREAD_CREATE_DETACHED); + if (! pthread_attr_getstacksize (&gomp_thread_attr, &stacksize)) + pthread_attr_setstacksize (&thread_attr, stacksize); + attr = &thread_attr; + } + start_data = gomp_alloca (sizeof (struct gomp_thread_start_data) * (nthreads-i)); @@ -283,12 +295,18 @@ gomp_team_start (void (*fn) (void *), vo start_data->fn_data = data; start_data->nested = nested; - err = pthread_create (&pt, &gomp_thread_attr, - gomp_thread_start, start_data); + if (gomp_cpu_affinity != NULL) + gomp_init_thread_affinity (attr); + + err = pthread_create (&pt, attr, gomp_thread_start, start_data); + if (err != 0) gomp_fatal ("Thread creation failed: %s", strerror (err)); } + if (gomp_cpu_affinity != NULL) + pthread_attr_destroy (&thread_attr); + do_release: gomp_barrier_wait (nested ? &team->barrier : &gomp_threads_dock); Modified: head/gnu/lib/libgomp/Makefile ============================================================================== --- head/gnu/lib/libgomp/Makefile Mon Apr 27 20:21:56 2015 (r282114) +++ head/gnu/lib/libgomp/Makefile Mon Apr 27 21:27:51 2015 (r282115) @@ -12,7 +12,7 @@ SHLIB_MAJOR= 1 SRCS= alloc.c barrier.c critical.c env.c \ error.c iter.c loop.c ordered.c parallel.c sections.c \ single.c team.c work.c lock.c mutex.c proc.c sem.c \ - bar.c time.c fortran.c + bar.c time.c fortran.c affinity.c SRCS+= gstdint.h libgomp_f.h omp.h omp_lib.h INCS+= omp.h Modified: head/gnu/lib/libgomp/config.h ============================================================================== --- head/gnu/lib/libgomp/config.h Mon Apr 27 20:21:56 2015 (r282114) +++ head/gnu/lib/libgomp/config.h Mon Apr 27 21:27:51 2015 (r282115) @@ -26,6 +26,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 +/* Define if pthread_{,attr_}{g,s}etaffinity_np is supported. */ +#undef HAVE_PTHREAD_AFFINITY_NP + /* Define to 1 if you have the header file. */ #define HAVE_SEMAPHORE_H 1 From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 21:38:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 317D1F3E; Mon, 27 Apr 2015 21:38:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FF0110E7; Mon, 27 Apr 2015 21:38:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RLcCLD010348; Mon, 27 Apr 2015 21:38:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RLcCLl010347; Mon, 27 Apr 2015 21:38:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504272138.t3RLcCLl010347@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 27 Apr 2015 21:38:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282116 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 21:38:13 -0000 Author: gjb Date: Mon Apr 27 21:38:12 2015 New Revision: 282116 URL: https://svnweb.freebsd.org/changeset/base/282116 Log: Add the cw-ec2-portinstall target to always install the net/bsdec2-image-upload port. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.ec2 Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Mon Apr 27 21:27:51 2015 (r282115) +++ head/release/Makefile.ec2 Mon Apr 27 21:38:12 2015 (r282116) @@ -12,13 +12,17 @@ AMINAMESUFFIX!= date +-%Y-%m-%d PUBLISH= --public .endif -ec2ami: cw-ec2 -.if !exists(/usr/local/bin/bsdec2-image-upload) - @echo "--------------------------------------------------------------" - @echo ">>> Creating EC2 AMIs requires bsdec2-image-upload" - @echo "--------------------------------------------------------------" - @false +cw-ec2-portinstall: +.if exists(${PORTSDIR}/net/bsdec2-image-upload/Makefile) + make -C ${PORTSDIR}/net/bsdec2-image-upload BATCH=1 all install clean +.else +. if !exists(/usr/local/sbin/pkg-static) + env ASSUME_ALWAYS_YES=yes pkg bootstrap -y +. endif + env ASSUME_ALWAYS_YES=yes pkg install -y net/bsdec2-image-upload .endif + +ec2ami: cw-ec2 cw-ec2-portinstall .if !defined(AWSKEYFILE) || !exists(${AWSKEYFILE}) @echo "--------------------------------------------------------------" @echo ">>> AWSKEYFILE must point at AWS keys for EC2 AMI creation" From owner-svn-src-head@FreeBSD.ORG Mon Apr 27 21:58:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2D877C1; Mon, 27 Apr 2015 21:58:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D10A61372; Mon, 27 Apr 2015 21:58:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3RLwfUV020280; Mon, 27 Apr 2015 21:58:41 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3RLwfJs020279; Mon, 27 Apr 2015 21:58:41 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201504272158.t3RLwfJs020279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 27 Apr 2015 21:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282117 - head/contrib/libxo/libxo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2015 21:58:42 -0000 Author: marcel Date: Mon Apr 27 21:58:41 2015 New Revision: 282117 URL: https://svnweb.freebsd.org/changeset/base/282117 Log: Fix build breakage with GCC. Pointed out by: bz@ Modified: head/contrib/libxo/libxo/libxo.c Modified: head/contrib/libxo/libxo/libxo.c ============================================================================== --- head/contrib/libxo/libxo/libxo.c Mon Apr 27 21:38:12 2015 (r282116) +++ head/contrib/libxo/libxo/libxo.c Mon Apr 27 21:58:41 2015 (r282117) @@ -3520,7 +3520,7 @@ xo_colors_handle_text (xo_handle_t *xop char *cp = buf, *ep = buf + sizeof(buf); unsigned i, bit; xo_colors_t *oldp = &xop->xo_colors; - const char *code; + const char *code = NULL; /* * Start the buffer with an escape. We don't want to add the '[' From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 03:24:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F9AFCE8; Tue, 28 Apr 2015 03:24:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1D451782; Tue, 28 Apr 2015 03:24:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S3OS0h082246; Tue, 28 Apr 2015 03:24:28 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S3OSch082244; Tue, 28 Apr 2015 03:24:28 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504280324.t3S3OSch082244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 28 Apr 2015 03:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282119 - in head/sys/dev/usb: . wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 03:24:29 -0000 Author: kevlo Date: Tue Apr 28 03:24:27 2015 New Revision: 282119 URL: https://svnweb.freebsd.org/changeset/base/282119 Log: - Add a new urtwn(4) device - Remove duplicate REALTEK RTL8188CU_0 entry. Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Apr 28 01:15:17 2015 (r282118) +++ head/sys/dev/usb/usbdevs Tue Apr 28 03:24:27 2015 (r282119) @@ -3755,6 +3755,7 @@ product REALTEK RTL8188CU_1 0x817a RTL81 product REALTEK RTL8188CU_2 0x817b RTL8188CU product REALTEK RTL8187 0x8187 RTL8187 Wireless Adapter product REALTEK RTL8187B_0 0x8189 RTL8187B Wireless Adapter +product REALTEK RTL8188CU_3 0x8191 RTL8188CU product REALTEK RTL8196EU 0x8196 RTL8196EU product REALTEK RTL8187B_1 0x8197 RTL8187B Wireless Adapter product REALTEK RTL8187B_2 0x8198 RTL8187B Wireless Adapter Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Tue Apr 28 01:15:17 2015 (r282118) +++ head/sys/dev/usb/wlan/if_urtwn.c Tue Apr 28 03:24:27 2015 (r282119) @@ -137,6 +137,7 @@ static const STRUCT_USB_HOST_ID urtwn_de URTWN_DEV(REALTEK, RTL8188CU_0), URTWN_DEV(REALTEK, RTL8188CU_1), URTWN_DEV(REALTEK, RTL8188CU_2), + URTWN_DEV(REALTEK, RTL8188CU_3), URTWN_DEV(REALTEK, RTL8188CU_COMBO), URTWN_DEV(REALTEK, RTL8188CUS), URTWN_DEV(REALTEK, RTL8188RU_1), @@ -145,7 +146,6 @@ static const STRUCT_USB_HOST_ID urtwn_de URTWN_DEV(REALTEK, RTL8191CU), URTWN_DEV(REALTEK, RTL8192CE), URTWN_DEV(REALTEK, RTL8192CU), - URTWN_DEV(REALTEK, RTL8188CU_0), URTWN_DEV(SITECOMEU, RTL8188CU_1), URTWN_DEV(SITECOMEU, RTL8188CU_2), URTWN_DEV(SITECOMEU, RTL8192CU), From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 06:12:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0C145B5; Tue, 28 Apr 2015 06:12:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD49F198E; Tue, 28 Apr 2015 06:12:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S6CdlW065617; Tue, 28 Apr 2015 06:12:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S6Cc5h065611; Tue, 28 Apr 2015 06:12:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201504280612.t3S6Cc5h065611@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 28 Apr 2015 06:12:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282120 - in head/sys: arm/arm mips/mips powerpc/powerpc x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 06:12:40 -0000 Author: hselasky Date: Tue Apr 28 06:12:37 2015 New Revision: 282120 URL: https://svnweb.freebsd.org/changeset/base/282120 Log: The add_bounce_page() function can be called when loading physical pages which pass a NULL virtual address. If the BUS_DMA_KEEP_PG_OFFSET flag is set, use the physical address to compute the page offset instead. The physical address should always be valid when adding bounce pages and should contain the same page offset like the virtual address. Submitted by: Svatopluk Kraus MFC after: 1 week Reviewed by: jhb@ Modified: head/sys/arm/arm/busdma_machdep-v6.c head/sys/arm/arm/busdma_machdep.c head/sys/mips/mips/busdma_machdep.c head/sys/powerpc/powerpc/busdma_machdep.c head/sys/x86/x86/busdma_bounce.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Tue Apr 28 03:24:27 2015 (r282119) +++ head/sys/arm/arm/busdma_machdep-v6.c Tue Apr 28 06:12:37 2015 (r282120) @@ -1685,8 +1685,8 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ if (dmat->flags & BUS_DMA_KEEP_PG_OFFSET) { /* Page offset needs to be preserved. */ - bpage->vaddr |= vaddr & PAGE_MASK; - bpage->busaddr |= vaddr & PAGE_MASK; + bpage->vaddr |= addr & PAGE_MASK; + bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; bpage->dataaddr = addr; Modified: head/sys/arm/arm/busdma_machdep.c ============================================================================== --- head/sys/arm/arm/busdma_machdep.c Tue Apr 28 03:24:27 2015 (r282119) +++ head/sys/arm/arm/busdma_machdep.c Tue Apr 28 06:12:37 2015 (r282120) @@ -1441,8 +1441,8 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ if (dmat->flags & BUS_DMA_KEEP_PG_OFFSET) { /* Page offset needs to be preserved. */ - bpage->vaddr |= vaddr & PAGE_MASK; - bpage->busaddr |= vaddr & PAGE_MASK; + bpage->vaddr |= addr & PAGE_MASK; + bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; bpage->dataaddr = addr; Modified: head/sys/mips/mips/busdma_machdep.c ============================================================================== --- head/sys/mips/mips/busdma_machdep.c Tue Apr 28 03:24:27 2015 (r282119) +++ head/sys/mips/mips/busdma_machdep.c Tue Apr 28 06:12:37 2015 (r282120) @@ -1359,8 +1359,8 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ if (dmat->flags & BUS_DMA_KEEP_PG_OFFSET) { /* Page offset needs to be preserved. */ - bpage->vaddr |= vaddr & PAGE_MASK; - bpage->busaddr |= vaddr & PAGE_MASK; + bpage->vaddr |= addr & PAGE_MASK; + bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; bpage->dataaddr = addr; Modified: head/sys/powerpc/powerpc/busdma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/busdma_machdep.c Tue Apr 28 03:24:27 2015 (r282119) +++ head/sys/powerpc/powerpc/busdma_machdep.c Tue Apr 28 06:12:37 2015 (r282120) @@ -1121,8 +1121,8 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ if (dmat->flags & BUS_DMA_KEEP_PG_OFFSET) { /* Page offset needs to be preserved. */ - bpage->vaddr |= vaddr & PAGE_MASK; - bpage->busaddr |= vaddr & PAGE_MASK; + bpage->vaddr |= addr & PAGE_MASK; + bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; bpage->dataaddr = addr; Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Tue Apr 28 03:24:27 2015 (r282119) +++ head/sys/x86/x86/busdma_bounce.c Tue Apr 28 06:12:37 2015 (r282120) @@ -994,8 +994,8 @@ add_bounce_page(bus_dma_tag_t dmat, bus_ if (dmat->common.flags & BUS_DMA_KEEP_PG_OFFSET) { /* Page offset needs to be preserved. */ - bpage->vaddr |= vaddr & PAGE_MASK; - bpage->busaddr |= vaddr & PAGE_MASK; + bpage->vaddr |= addr & PAGE_MASK; + bpage->busaddr |= addr & PAGE_MASK; } bpage->datavaddr = vaddr; bpage->dataaddr = addr; From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 06:33:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AD9EBA1; Tue, 28 Apr 2015 06:33:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48EE81BE3; Tue, 28 Apr 2015 06:33:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S6XhT9075606; Tue, 28 Apr 2015 06:33:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S6Xgqt075605; Tue, 28 Apr 2015 06:33:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201504280633.t3S6Xgqt075605@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 28 Apr 2015 06:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282121 - head/cddl/contrib/opensolaris/lib/libnvpair X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 06:33:43 -0000 Author: avg Date: Tue Apr 28 06:33:42 2015 New Revision: 282121 URL: https://svnweb.freebsd.org/changeset/base/282121 Log: dump_nvlist: handle DATA_TYPE_BOOLEAN_ARRAY To do: upstream (https://www.illumos.org/issues/5752) MFC after: 10 days Modified: head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Modified: head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Tue Apr 28 06:12:37 2015 (r282120) +++ head/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c Tue Apr 28 06:33:42 2015 (r282121) @@ -793,6 +793,7 @@ dump_nvlist(nvlist_t *list, int indent) { nvpair_t *elem = NULL; boolean_t bool_value; + boolean_t *bool_array_value; nvlist_t *nvlist_value; nvlist_t **nvlist_array_value; uint_t i, count; @@ -853,6 +854,16 @@ dump_nvlist(nvlist_t *list, int indent) NVP(elem, string, char *, char *, "'%s'"); break; + case DATA_TYPE_BOOLEAN_ARRAY: + (void) nvpair_value_boolean_array(elem, + &bool_array_value, &count); + for (i = 0; i < count; i++) { + (void) printf("%*s%s[%d]: %s\n", indent, "", + nvpair_name(elem), i, + bool_array_value[i] ? "true" : "false"); + } + break; + case DATA_TYPE_BYTE_ARRAY: NVPA(elem, byte_array, uchar_t, int, "%u"); break; From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 06:34:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D7C8CF3; Tue, 28 Apr 2015 06:34:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B51F1BF0; Tue, 28 Apr 2015 06:34:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S6YuTr075805; Tue, 28 Apr 2015 06:34:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S6YuqE075804; Tue, 28 Apr 2015 06:34:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201504280634.t3S6YuqE075804@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 28 Apr 2015 06:34:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282122 - head/sys/cddl/contrib/opensolaris/common/nvpair X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 06:34:56 -0000 Author: avg Date: Tue Apr 28 06:34:55 2015 New Revision: 282122 URL: https://svnweb.freebsd.org/changeset/base/282122 Log: nvpair_type_is_array: DATA_TYPE_INT8_ARRAY was not recognized To do: upstream (https://www.illumos.org/issues/5778) MFC after: 10 days Modified: head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Modified: head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Tue Apr 28 06:33:42 2015 (r282121) +++ head/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c Tue Apr 28 06:34:55 2015 (r282122) @@ -1227,6 +1227,7 @@ nvpair_type_is_array(nvpair_t *nvp) data_type_t type = NVP_TYPE(nvp); if ((type == DATA_TYPE_BYTE_ARRAY) || + (type == DATA_TYPE_INT8_ARRAY) || (type == DATA_TYPE_UINT8_ARRAY) || (type == DATA_TYPE_INT16_ARRAY) || (type == DATA_TYPE_UINT16_ARRAY) || From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 07:37:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B8988B1; Tue, 28 Apr 2015 07:37:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8956C125B; Tue, 28 Apr 2015 07:37:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S7bdRU005564; Tue, 28 Apr 2015 07:37:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S7bdSx005563; Tue, 28 Apr 2015 07:37:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201504280737.t3S7bdSx005563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 28 Apr 2015 07:37:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282125 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 07:37:39 -0000 Author: avg Date: Tue Apr 28 07:37:38 2015 New Revision: 282125 URL: https://svnweb.freebsd.org/changeset/base/282125 Log: MFV r282124: 5393 spurious failures from dsl_dataset_hold_obj() The actual bugfix was pro-actively committed in r275515. This MFV is cosmetic, it just aligns code style with the upstream. MFC after: 10 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Apr 28 07:15:34 2015 (r282124) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Apr 28 07:37:38 2015 (r282125) @@ -413,7 +413,8 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin offsetof(dmu_sendarg_t, dsa_link)); if (doi.doi_type == DMU_OTN_ZAP_METADATA) { - int zaperr = zap_contains(mos, dsobj, DS_FIELD_LARGE_BLOCKS); + int zaperr = zap_contains(mos, dsobj, + DS_FIELD_LARGE_BLOCKS); if (zaperr != ENOENT) { VERIFY0(zaperr); ds->ds_large_blocks = B_TRUE; From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 07:42:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99493ACC; Tue, 28 Apr 2015 07:42:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CD1B1345; Tue, 28 Apr 2015 07:42:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S7gTH5009802; Tue, 28 Apr 2015 07:42:29 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S7gTS0009799; Tue, 28 Apr 2015 07:42:29 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201504280742.t3S7gTS0009799@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 28 Apr 2015 07:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282126 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 07:42:29 -0000 Author: avg Date: Tue Apr 28 07:42:28 2015 New Revision: 282126 URL: https://svnweb.freebsd.org/changeset/base/282126 Log: MFV r282123: 5610 zfs clone from different source and target pools produces coredump MFC after: 10 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Apr 28 07:37:38 2015 (r282125) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Apr 28 07:42:28 2015 (r282126) @@ -23,6 +23,7 @@ * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -879,11 +880,7 @@ dmu_objset_clone_check(void *arg, dmu_tx dsl_dir_rele(pdd, FTAG); return (SET_ERROR(EEXIST)); } - /* You can't clone across pools. */ - if (pdd->dd_pool != dp) { - dsl_dir_rele(pdd, FTAG); - return (SET_ERROR(EXDEV)); - } + error = dsl_fs_ss_limit_check(pdd, 1, ZFS_PROP_FILESYSTEM_LIMIT, NULL, doca->doca_cred); if (error != 0) { @@ -896,12 +893,6 @@ dmu_objset_clone_check(void *arg, dmu_tx if (error != 0) return (error); - /* You can't clone across pools. */ - if (origin->ds_dir->dd_pool != dp) { - dsl_dataset_rele(origin, FTAG); - return (SET_ERROR(EXDEV)); - } - /* You can only clone snapshots, not the head datasets. */ if (!dsl_dataset_is_snapshot(origin)) { dsl_dataset_rele(origin, FTAG); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Apr 28 07:37:38 2015 (r282125) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Apr 28 07:42:28 2015 (r282126) @@ -24,6 +24,7 @@ * All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2014 Joyent, Inc. All rights reserved. + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. */ #include @@ -408,7 +409,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char /* Make sure the name is in the specified pool. */ spaname = spa_name(dp->dp_spa); if (strcmp(buf, spaname) != 0) - return (SET_ERROR(EINVAL)); + return (SET_ERROR(EXDEV)); ASSERT(dsl_pool_config_held(dp)); From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 08:04:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84AC224C; Tue, 28 Apr 2015 08:04:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72A5116B1; Tue, 28 Apr 2015 08:04:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S84HBo019940; Tue, 28 Apr 2015 08:04:17 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S84HTC019939; Tue, 28 Apr 2015 08:04:17 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201504280804.t3S84HTC019939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 28 Apr 2015 08:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282127 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 08:04:17 -0000 Author: avg Date: Tue Apr 28 08:04:16 2015 New Revision: 282127 URL: https://svnweb.freebsd.org/changeset/base/282127 Log: dsl_dir_rename_check: return EXDEV on cross-pool rename attempt Obtained from: zfsonlinux/zfs@9063f65476b7b7d78ccf096fec890b8727117e2a Obtained from: Boris Protopopov MFC after: 10 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Apr 28 07:42:28 2015 (r282126) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Apr 28 08:04:16 2015 (r282127) @@ -1707,7 +1707,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t if (dd->dd_pool != newparent->dd_pool) { dsl_dir_rele(newparent, FTAG); dsl_dir_rele(dd, FTAG); - return (SET_ERROR(ENXIO)); + return (SET_ERROR(EXDEV)); } /* new name should not already exist */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 08:20:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 671266A6; Tue, 28 Apr 2015 08:20:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55ABE181C; Tue, 28 Apr 2015 08:20:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S8KO7U026706; Tue, 28 Apr 2015 08:20:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S8KOAv026705; Tue, 28 Apr 2015 08:20:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504280820.t3S8KOAv026705@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 28 Apr 2015 08:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282128 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 08:20:24 -0000 Author: kib Date: Tue Apr 28 08:20:23 2015 New Revision: 282128 URL: https://svnweb.freebsd.org/changeset/base/282128 Log: Do not sleep waiting for the MAP_ENTRY_IN_TRANSITION state ending with the vnode locked. Review: https://reviews.freebsd.org/D2381 Submitted by: Conrad Meyer, Attilio Rao MFC after: 1 week Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Tue Apr 28 08:04:16 2015 (r282127) +++ head/sys/vm/vm_fault.c Tue Apr 28 08:20:23 2015 (r282128) @@ -348,6 +348,10 @@ RetryFault:; vm_map_lock(fs.map); if (vm_map_lookup_entry(fs.map, vaddr, &fs.entry) && (fs.entry->eflags & MAP_ENTRY_IN_TRANSITION)) { + if (fs.vp != NULL) { + vput(fs.vp); + fs.vp = NULL; + } fs.entry->eflags |= MAP_ENTRY_NEEDS_WAKEUP; vm_map_unlock_and_wait(fs.map, 0); } else From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 08:27:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DF2A896; Tue, 28 Apr 2015 08:27:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B94B1920; Tue, 28 Apr 2015 08:27:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S8Rj7V030228; Tue, 28 Apr 2015 08:27:45 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S8RiaD030225; Tue, 28 Apr 2015 08:27:44 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201504280827.t3S8RiaD030225@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 28 Apr 2015 08:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282129 - head/sys/arm/amlogic/aml8726 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 08:27:45 -0000 Author: ganbold Date: Tue Apr 28 08:27:44 2015 New Revision: 282129 URL: https://svnweb.freebsd.org/changeset/base/282129 Log: Update Amlogic MMC driver: 1) Advertise the actual min / max speeds the hardware is capable of supporting given the reference clock used by the board. 2) Rather than attempting to extend the hardware's timeout register in software (the hardware doesn't have sufficient bits to directly support long timeouts), simply implement the same timeout approach used in the SDXC driver. 3) Set the timeout for a linked command (e.g. STOP TRANSMISSION) based on the previous multiblock read / write. The changes have been smoke tested on both the ODROID-C1 and the VSATV102-M6 using the following cards: * PQI 2GB microSD * SanDisk 2GB microSD * PQI 8GB SDHC (not a microSD so only tested on the ATV-102) * PNY 8GB microSDHC * SanDisk Ultra 32GB microSDHC Submitted by: John Wehle Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.c head/sys/arm/amlogic/aml8726/aml8726_mmc.h Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mmc.c Tue Apr 28 08:20:23 2015 (r282128) +++ head/sys/arm/amlogic/aml8726/aml8726_mmc.c Tue Apr 28 08:27:44 2015 (r282129) @@ -70,6 +70,7 @@ struct aml8726_mmc_softc { device_t dev; struct resource *res[2]; struct mtx mtx; + struct callout ch; uint32_t port; unsigned int ref_freq; struct aml8726_mmc_gpio pwr_en; @@ -81,7 +82,7 @@ struct aml8726_mmc_softc { struct mmc_host host; int bus_busy; struct mmc_command *cmd; - unsigned int timeout_remaining; + uint32_t stop_timeout; }; static struct resource_spec aml8726_mmc_spec[] = { @@ -92,6 +93,7 @@ static struct resource_spec aml8726_mmc_ #define AML_MMC_LOCK(sc) mtx_lock(&(sc)->mtx) #define AML_MMC_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +#define AML_MMC_LOCK_ASSERT(sc) mtx_assert(&(sc)->mtx, MA_OWNED) #define AML_MMC_LOCK_INIT(sc) \ mtx_init(&(sc)->mtx, device_get_nameunit((sc)->dev), \ "mmc", MTX_DEF) @@ -107,6 +109,10 @@ static struct resource_spec aml8726_mmc_ #define PWR_OFF_FLAG(pol) ((pol) == 0 ? GPIO_PIN_HIGH : \ GPIO_PIN_LOW) +#define MSECS_TO_TICKS(ms) (((ms)*hz)/1000 + 1) + +static void aml8726_mmc_timeout(void *arg); + static unsigned int aml8726_mmc_clk(phandle_t node) { @@ -126,6 +132,37 @@ aml8726_mmc_clk(phandle_t node) return ((unsigned int)prop); } +static uint32_t +aml8726_mmc_freq(struct aml8726_mmc_softc *sc, uint32_t divisor) +{ + + return (sc->ref_freq / ((divisor + 1) * 2)); +} + +static uint32_t +aml8726_mmc_div(struct aml8726_mmc_softc *sc, uint32_t desired_freq) +{ + uint32_t divisor; + + divisor = sc->ref_freq / (desired_freq * 2); + + if (divisor == 0) + divisor = 1; + + divisor -= 1; + + if (aml8726_mmc_freq(sc, divisor) > desired_freq) + divisor += 1; + + if (divisor > (AML_MMC_CONFIG_CMD_CLK_DIV_MASK >> + AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT)) { + divisor = AML_MMC_CONFIG_CMD_CLK_DIV_MASK >> + AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT; + } + + return (divisor); +} + static void aml8726_mmc_mapmem(void *arg, bus_dma_segment_t *segs, int nseg, int error) { @@ -162,25 +199,18 @@ aml8726_mmc_power_on(struct aml8726_mmc_ PWR_ON_FLAG(sc->pwr_en.pol))); } -static int -aml8726_mmc_restart_timer(struct aml8726_mmc_softc *sc) +static void +aml8726_mmc_soft_reset(struct aml8726_mmc_softc *sc, boolean_t enable_irq) { - uint32_t count; - uint32_t isr; - - if (sc->cmd == NULL || sc->timeout_remaining == 0) - return (0); - - count = (sc->timeout_remaining > 0x1fff) ? 0x1fff : - sc->timeout_remaining; - sc->timeout_remaining -= count; + uint32_t icr; - isr = (count << AML_MMC_IRQ_STATUS_TIMER_CNT_SHIFT) | - AML_MMC_IRQ_STATUS_TIMER_EN | AML_MMC_IRQ_STATUS_TIMEOUT_IRQ; + icr = AML_MMC_IRQ_CONFIG_SOFT_RESET; - CSR_WRITE_4(sc, AML_MMC_IRQ_STATUS_REG, isr); + if (enable_irq == true) + icr |= AML_MMC_IRQ_CONFIG_CMD_DONE_EN; - return (1); + CSR_WRITE_4(sc, AML_MMC_IRQ_CONFIG_REG, icr); + CSR_BARRIER(sc, AML_MMC_IRQ_CONFIG_REG); } static int @@ -191,7 +221,6 @@ aml8726_mmc_start_command(struct aml8726 uint32_t block_size; uint32_t bus_width; uint32_t cmdr; - uint32_t cycles_per_msec; uint32_t extr; uint32_t mcfgr; uint32_t nbits_per_pkg; @@ -203,14 +232,9 @@ aml8726_mmc_start_command(struct aml8726 return (MMC_ERR_INVALID); /* - * Ensure the hardware state machine is in a known state, - * the command done interrupt is enabled, and previous - * IRQ status bits have been cleared. + * Ensure the hardware state machine is in a known state. */ - CSR_WRITE_4(sc, AML_MMC_IRQ_CONFIG_REG, - (AML_MMC_IRQ_CONFIG_SOFT_RESET | AML_MMC_IRQ_CONFIG_CMD_DONE_EN)); - CSR_BARRIER(sc, AML_MMC_IRQ_CONFIG_REG); - CSR_WRITE_4(sc, AML_MMC_IRQ_STATUS_REG, AML_MMC_IRQ_STATUS_CLEAR_IRQ); + aml8726_mmc_soft_reset(sc, true); /* * Start and transmission bits are per section 4.7.2 of the: @@ -225,6 +249,13 @@ aml8726_mmc_start_command(struct aml8726 mcfgr = sc->port; timeout = AML_MMC_CMD_TIMEOUT; + /* + * If this is a linked command, then use the previous timeout. + */ + if (cmd == cmd->mrq->stop && sc->stop_timeout) + timeout = sc->stop_timeout; + sc->stop_timeout = 0; + if ((cmd->flags & MMC_RSP_136) != 0) { cmdr |= AML_MMC_CMD_RESP_CRC7_FROM_8; cmdr |= (133 << AML_MMC_CMD_RESP_BITS_SHIFT); @@ -291,32 +322,24 @@ aml8726_mmc_start_command(struct aml8726 timeout = AML_MMC_WRITE_TIMEOUT * (data->len / block_size); } + + /* + * Stop terminates a multiblock read / write and thus + * can take as long to execute as an actual read / write. + */ + if (cmd->mrq->stop != NULL) + sc->stop_timeout = timeout; } sc->cmd = cmd; cmd->error = MMC_ERR_NONE; - /* - * Round up while calculating the number of cycles which - * correspond to a millisecond. Use that to determine - * the count from the desired timeout in milliseconds. - * - * The counter has a limited range which is not sufficient - * for directly implementing worst case timeouts at high clock - * rates so a 32 bit counter is implemented in software. - * - * The documentation isn't clear on when the timer starts - * so add 48 cycles for the command and 136 cycles for the - * response (the values are from the previously mentioned - * standard). - */ if (timeout > AML_MMC_MAX_TIMEOUT) timeout = AML_MMC_MAX_TIMEOUT; - cycles_per_msec = (ios->clock + 1000 - 1) / 1000; - sc->timeout_remaining = 48 + 136 + timeout * cycles_per_msec; - aml8726_mmc_restart_timer(sc); + callout_reset(&sc->ch, MSECS_TO_TICKS(timeout), + aml8726_mmc_timeout, sc); CSR_WRITE_4(sc, AML_MMC_CMD_ARGUMENT_REG, cmd->arg); CSR_WRITE_4(sc, AML_MMC_MULT_CONFIG_REG, mcfgr); @@ -330,20 +353,96 @@ aml8726_mmc_start_command(struct aml8726 } static void -aml8726_mmc_intr(void *arg) +aml8726_mmc_finish_command(struct aml8726_mmc_softc *sc, int mmc_error) { - struct aml8726_mmc_softc *sc = (struct aml8726_mmc_softc *)arg; + int mmc_stop_error; struct mmc_command *cmd; struct mmc_command *stop_cmd; struct mmc_data *data; + + AML_MMC_LOCK_ASSERT(sc); + + /* Clear all interrupts since the request is no longer in flight. */ + CSR_WRITE_4(sc, AML_MMC_IRQ_STATUS_REG, AML_MMC_IRQ_STATUS_CLEAR_IRQ); + CSR_BARRIER(sc, AML_MMC_IRQ_STATUS_REG); + + /* In some cases (e.g. finish called via timeout) this is a NOP. */ + callout_stop(&sc->ch); + + cmd = sc->cmd; + sc->cmd = NULL; + + cmd->error = mmc_error; + + data = cmd->data; + + if (data && data->len && + (data->flags & (MMC_DATA_READ | MMC_DATA_WRITE)) != 0) { + if ((data->flags & MMC_DATA_READ) != 0) + bus_dmamap_sync(sc->dmatag, sc->dmamap, + BUS_DMASYNC_POSTREAD); + else + bus_dmamap_sync(sc->dmatag, sc->dmamap, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->dmatag, sc->dmamap); + } + + /* + * If there's a linked stop command, then start the stop command. + * In order to establish a known state attempt the stop command + * even if the original request encountered an error. + */ + + stop_cmd = (cmd->mrq->stop != cmd) ? cmd->mrq->stop : NULL; + + if (stop_cmd != NULL) { + mmc_stop_error = aml8726_mmc_start_command(sc, stop_cmd); + if (mmc_stop_error == MMC_ERR_NONE) { + AML_MMC_UNLOCK(sc); + return; + } + stop_cmd->error = mmc_stop_error; + } + + AML_MMC_UNLOCK(sc); + + /* Execute the callback after dropping the lock. */ + if (cmd->mrq) + cmd->mrq->done(cmd->mrq); +} + +static void +aml8726_mmc_timeout(void *arg) +{ + struct aml8726_mmc_softc *sc = (struct aml8726_mmc_softc *)arg; + + /* + * The command failed to complete in time so forcefully + * terminate it. + */ + aml8726_mmc_soft_reset(sc, false); + + /* + * Ensure the command has terminated before continuing on + * to things such as bus_dmamap_sync / bus_dmamap_unload. + */ + while ((CSR_READ_4(sc, AML_MMC_IRQ_STATUS_REG) & + AML_MMC_IRQ_STATUS_CMD_BUSY) != 0) + cpu_spinwait(); + + aml8726_mmc_finish_command(sc, MMC_ERR_TIMEOUT); +} + +static void +aml8726_mmc_intr(void *arg) +{ + struct aml8726_mmc_softc *sc = (struct aml8726_mmc_softc *)arg; uint32_t cmdr; - uint32_t icr; uint32_t isr; uint32_t mcfgr; uint32_t previous_byte; uint32_t resp; int mmc_error; - int mmc_stop_error; unsigned int i; AML_MMC_LOCK(sc); @@ -367,12 +466,6 @@ aml8726_mmc_intr(void *arg) if ((cmdr & AML_MMC_CMD_CMD_HAS_DATA) != 0 && (isr & AML_MMC_IRQ_STATUS_WR_CRC16_OK) == 0) mmc_error = MMC_ERR_BADCRC; - } else if ((isr & AML_MMC_IRQ_STATUS_TIMEOUT_IRQ) != 0) { - if (aml8726_mmc_restart_timer(sc) != 0) { - AML_MMC_UNLOCK(sc); - return; - } - mmc_error = MMC_ERR_TIMEOUT; } else { spurious: @@ -389,49 +482,12 @@ spurious: return; } - if ((isr & AML_MMC_IRQ_STATUS_CMD_BUSY) != 0 && - /* - * A multiblock operation may keep the hardware - * busy until stop transmission is executed. - */ - (isr & AML_MMC_IRQ_STATUS_CMD_DONE_IRQ) == 0) { - if (mmc_error == MMC_ERR_NONE) - mmc_error = MMC_ERR_FAILED; - - /* - * Issue a soft reset (while leaving the command complete - * interrupt enabled) to terminate the command. - * - * Ensure the command has terminated before continuing on - * to things such as bus_dmamap_sync / bus_dmamap_unload. - */ - - icr = AML_MMC_IRQ_CONFIG_SOFT_RESET | - AML_MMC_IRQ_CONFIG_CMD_DONE_EN; - - CSR_WRITE_4(sc, AML_MMC_IRQ_CONFIG_REG, icr); - - while ((CSR_READ_4(sc, AML_MMC_IRQ_STATUS_REG) & - AML_MMC_IRQ_STATUS_CMD_BUSY) != 0) - cpu_spinwait(); - } - - /* Clear all interrupts since the request is no longer in flight. */ - CSR_WRITE_4(sc, AML_MMC_IRQ_STATUS_REG, AML_MMC_IRQ_STATUS_CLEAR_IRQ); - CSR_BARRIER(sc, AML_MMC_IRQ_STATUS_REG); - - cmd = sc->cmd; - sc->cmd = NULL; - - cmd->error = mmc_error; - - if ((cmd->flags & MMC_RSP_PRESENT) != 0 && - mmc_error == MMC_ERR_NONE) { + if ((cmdr & AML_MMC_CMD_RESP_BITS_MASK) != 0) { mcfgr = sc->port; mcfgr |= AML_MMC_MULT_CONFIG_RESP_READOUT_EN; CSR_WRITE_4(sc, AML_MMC_MULT_CONFIG_REG, mcfgr); - if ((cmd->flags & MMC_RSP_136) != 0) { + if ((cmdr & AML_MMC_CMD_RESP_CRC7_FROM_8) != 0) { /* * Controller supplies 135:8 instead of @@ -444,48 +500,39 @@ spurious: for (i = 0; i < 4; i++) { resp = CSR_READ_4(sc, AML_MMC_CMD_ARGUMENT_REG); - cmd->resp[3 - i] = (resp << 8) | previous_byte; + sc->cmd->resp[3 - i] = (resp << 8) | + previous_byte; previous_byte = (resp >> 24) & 0xff; } } else - cmd->resp[0] = CSR_READ_4(sc, AML_MMC_CMD_ARGUMENT_REG); + sc->cmd->resp[0] = CSR_READ_4(sc, + AML_MMC_CMD_ARGUMENT_REG); } - data = cmd->data; - - if (data && data->len && - (data->flags & (MMC_DATA_READ | MMC_DATA_WRITE)) != 0) { - if ((data->flags & MMC_DATA_READ) != 0) - bus_dmamap_sync(sc->dmatag, sc->dmamap, - BUS_DMASYNC_POSTREAD); - else - bus_dmamap_sync(sc->dmatag, sc->dmamap, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(sc->dmatag, sc->dmamap); - } + if ((isr & AML_MMC_IRQ_STATUS_CMD_BUSY) != 0 && + /* + * A multiblock operation may keep the hardware + * busy until stop transmission is executed. + */ + (isr & AML_MMC_IRQ_STATUS_CMD_DONE_IRQ) == 0) { + if (mmc_error == MMC_ERR_NONE) + mmc_error = MMC_ERR_FAILED; - /* - * If there's a linked stop command, then start the stop command. - * In order to establish a known state attempt the stop command - * even if the original request encountered an error. - */ + /* + * Issue a soft reset to terminate the command. + * + * Ensure the command has terminated before continuing on + * to things such as bus_dmamap_sync / bus_dmamap_unload. + */ - stop_cmd = (cmd->mrq->stop != cmd) ? cmd->mrq->stop : NULL; + aml8726_mmc_soft_reset(sc, false); - if (stop_cmd != NULL) { - mmc_stop_error = aml8726_mmc_start_command(sc, stop_cmd); - if (mmc_stop_error == MMC_ERR_NONE) { - AML_MMC_UNLOCK(sc); - return; - } - stop_cmd->error = mmc_stop_error; + while ((CSR_READ_4(sc, AML_MMC_IRQ_STATUS_REG) & + AML_MMC_IRQ_STATUS_CMD_BUSY) != 0) + cpu_spinwait(); } - AML_MMC_UNLOCK(sc); - - /* Execute the callback after dropping the lock. */ - if (cmd->mrq) - cmd->mrq->done(cmd->mrq); + aml8726_mmc_finish_command(sc, mmc_error); } static int @@ -698,8 +745,10 @@ aml8726_mmc_attach(device_t dev) goto fail; } - sc->host.f_min = 200000; - sc->host.f_max = 50000000; + callout_init_mtx(&sc->ch, &sc->mtx, CALLOUT_RETURNUNLOCKED); + + sc->host.f_min = aml8726_mmc_freq(sc, aml8726_mmc_div(sc, 200000)); + sc->host.f_max = aml8726_mmc_freq(sc, aml8726_mmc_div(sc, 50000000)); sc->host.host_ocr = sc->voltages[0] | sc->voltages[1]; sc->host.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_HSPEED; @@ -756,10 +805,12 @@ aml8726_mmc_detach(device_t dev) * disable the interrupts, and clear the interrupts. */ (void)aml8726_mmc_power_off(sc); - CSR_WRITE_4(sc, AML_MMC_IRQ_CONFIG_REG, AML_MMC_IRQ_CONFIG_SOFT_RESET); - CSR_BARRIER(sc, AML_MMC_IRQ_CONFIG_REG); + aml8726_mmc_soft_reset(sc, false); CSR_WRITE_4(sc, AML_MMC_IRQ_STATUS_REG, AML_MMC_IRQ_STATUS_CLEAR_IRQ); + /* This should be a NOP since no command was in flight. */ + callout_stop(&sc->ch); + AML_MMC_UNLOCK(sc); bus_generic_detach(dev); @@ -787,8 +838,7 @@ aml8726_mmc_shutdown(device_t dev) * disable the interrupts, and clear the interrupts. */ (void)aml8726_mmc_power_off(sc); - CSR_WRITE_4(sc, AML_MMC_IRQ_CONFIG_REG, AML_MMC_IRQ_CONFIG_SOFT_RESET); - CSR_BARRIER(sc, AML_MMC_IRQ_CONFIG_REG); + aml8726_mmc_soft_reset(sc, false); CSR_WRITE_4(sc, AML_MMC_IRQ_STATUS_REG, AML_MMC_IRQ_STATUS_CLEAR_IRQ); return (0); @@ -799,7 +849,6 @@ aml8726_mmc_update_ios(device_t bus, dev { struct aml8726_mmc_softc *sc = device_get_softc(bus); struct mmc_ios *ios = &sc->host.ios; - unsigned int divisor; int error; int i; uint32_t cfgr; @@ -820,15 +869,8 @@ aml8726_mmc_update_ios(device_t bus, dev return (EINVAL); } - divisor = sc->ref_freq / (ios->clock * 2) - 1; - if (divisor == 0 || divisor == -1) - divisor = 1; - if ((sc->ref_freq / ((divisor + 1) * 2)) > ios->clock) - divisor += 1; - if (divisor > 0x3ff) - divisor = 0x3ff; - - cfgr |= divisor; + cfgr |= aml8726_mmc_div(sc, ios->clock) << + AML_MMC_CONFIG_CMD_CLK_DIV_SHIFT; CSR_WRITE_4(sc, AML_MMC_CONFIG_REG, cfgr); Modified: head/sys/arm/amlogic/aml8726/aml8726_mmc.h ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_mmc.h Tue Apr 28 08:20:23 2015 (r282128) +++ head/sys/arm/amlogic/aml8726/aml8726_mmc.h Tue Apr 28 08:27:44 2015 (r282129) @@ -47,20 +47,6 @@ #define AML_MMC_WRITE_TIMEOUT 500 #define AML_MMC_MAX_TIMEOUT 5000 -/* - * Internally the timeout is implemented by counting clock cycles. - * - * Since the hardware implements timeouts by counting cycles - * the minimum read / write timeout (assuming the minimum - * conversion factor of 1 cycle per usec) is: - * - * (8 bits * 512 bytes per block + 16 bits CRC) = 4112 usec - */ -#if ((AML_MMC_READ_TIMEOUT * 1000) < 4112 || \ - (AML_MMC_WRITE_TIMEOUT * 1000) < 4112) -#error "Single block timeout is smaller than supported" -#endif - #define AML_MMC_CMD_ARGUMENT_REG 0 #define AML_MMC_CMD_SEND_REG 4 From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 09:11:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5183F4A0; Tue, 28 Apr 2015 09:11:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FB091E97; Tue, 28 Apr 2015 09:11:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S9BmPm054741; Tue, 28 Apr 2015 09:11:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S9BmTh054740; Tue, 28 Apr 2015 09:11:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201504280911.t3S9BmTh054740@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 28 Apr 2015 09:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282130 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 09:11:48 -0000 Author: avg Date: Tue Apr 28 09:11:47 2015 New Revision: 282130 URL: https://svnweb.freebsd.org/changeset/base/282130 Log: zfs_onexit_fd_hold: return EBADF even if devfs_get_cdevpriv gave ENOENT /dev/zfs always has per-open data, so when it is missing the file descriptor is for some other file. Returning ENOENT in this case is confusing as a variety of other conditions (like a missing dataset) may result in the same error. It's better to consistently return EBADF for any problems with the file descriptor. Note that zfs_onexit_fd_hold() is used with 'automatic cleanup fd' - when that fd is closed, typically because a process is terminated, some cleanup action is taken by ZFS driver. E.g. a temporary snapshot hold is released. Perhaps, it would even be worthwhile changing devfs_get_cdevpriv() to return EBADF if there is no associated data. Differential Revision: https://reviews.freebsd.org/D2370 Reviewed by: delphij, smh MFC after: 12 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Tue Apr 28 08:27:44 2015 (r282129) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c Tue Apr 28 09:11:47 2015 (r282130) @@ -137,7 +137,7 @@ zfs_onexit_fd_hold(int fd, minor_t *mino *minorp = (minor_t)(uintptr_t)data; curthread->td_fpop = tmpfp; if (error != 0) - return (error); + return (SET_ERROR(EBADF)); return (zfs_onexit_minor_to_state(*minorp, &zo)); } From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 09:19:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1330D84E; Tue, 28 Apr 2015 09:19:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBB8C1F25; Tue, 28 Apr 2015 09:19:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S9JekE056433; Tue, 28 Apr 2015 09:19:40 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S9Jexd056432; Tue, 28 Apr 2015 09:19:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201504280919.t3S9Jexd056432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 28 Apr 2015 09:19:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282131 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 09:19:41 -0000 Author: avg Date: Tue Apr 28 09:19:40 2015 New Revision: 282131 URL: https://svnweb.freebsd.org/changeset/base/282131 Log: replace a comment about zfs recv -F corner case with a longer, more detailed one The old comment in zfs_rezget explains what situation the code handles, the new comment also describes how the situation can arise. Also, re-join a line that became sufficiently shorti some time ago. Differential Revision: https://reviews.freebsd.org/D2352 Reviewed by: delphij, smh MFC after: 12 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c 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 Tue Apr 28 09:11:47 2015 (r282130) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Tue Apr 28 09:19:40 2015 (r282131) @@ -1320,15 +1320,25 @@ zfs_rezget(znode_t *zp) } /* - * XXXPJD: Not sure how is that possible, but under heavy - * zfs recv -F load it happens that z_gen is the same, but - * vnode type is different than znode type. This would mean - * that for example regular file was replaced with directory - * which has the same object number. + * It is highly improbable but still quite possible that two + * objects in different datasets are created with the same + * object numbers and in transaction groups with the same + * numbers. znodes corresponding to those objects would + * have the same z_id and z_gen, but their other attributes + * may be different. + * zfs recv -F may replace one of such objects with the other. + * As a result file properties recorded in the replaced + * object's vnode may no longer match the received object's + * properties. At present the only cached property is the + * files type recorded in v_type. + * So, handle this case by leaving the old vnode and znode + * disassociated from the actual object. A new vnode and a + * znode will be created if the object is accessed + * (e.g. via a look-up). The old vnode and znode will be + * recycled when the last vnode reference is dropped. */ vp = ZTOV(zp); - if (vp != NULL && - vp->v_type != IFTOVT((mode_t)zp->z_mode)) { + if (vp != NULL && vp->v_type != IFTOVT((mode_t)zp->z_mode)) { zfs_znode_dmu_fini(zp); ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num); return (EIO); From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 09:29:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DE1FBDD; Tue, 28 Apr 2015 09:29:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CAA91041; Tue, 28 Apr 2015 09:29:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3S9TTUX061281; Tue, 28 Apr 2015 09:29:29 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3S9TTE6061279; Tue, 28 Apr 2015 09:29:29 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504280929.t3S9TTE6061279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 28 Apr 2015 09:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282132 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 09:29:30 -0000 Author: ae Date: Tue Apr 28 09:29:28 2015 New Revision: 282132 URL: https://svnweb.freebsd.org/changeset/base/282132 Log: Since PFIL can change mbuf pointer, we should update pointers after calling ipsec_filter(). Sponsored by: Yandex LLC Modified: head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Tue Apr 28 09:19:40 2015 (r282131) +++ head/sys/netipsec/ipsec_input.c Tue Apr 28 09:29:28 2015 (r282132) @@ -391,6 +391,7 @@ ipsec4_common_input_cb(struct mbuf *m, s ipsec_bpf(m, sav, AF_INET, ENC_IN|ENC_BEFORE); if ((error = ipsec_filter(&m, PFIL_IN, ENC_IN|ENC_BEFORE)) != 0) return (error); + ip = mtod(m, struct ip *); #endif /* DEV_ENC */ /* IP-in-IP encapsulation */ Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Tue Apr 28 09:19:40 2015 (r282131) +++ head/sys/netipsec/ipsec_output.c Tue Apr 28 09:29:28 2015 (r282132) @@ -578,6 +578,7 @@ ipsec4_process_packet(struct mbuf *m, st /* pass the mbuf to enc0 for packet filtering */ if ((error = ipsec_filter(&m, PFIL_OUT, ENC_OUT|ENC_BEFORE)) != 0) goto bad; + ip = mtod(m, struct ip *); #endif /* Do the appropriate encapsulation, if necessary */ if (isr->saidx.mode == IPSEC_MODE_TUNNEL || /* Tunnel requ'd */ @@ -699,6 +700,7 @@ ipsec6_process_packet(struct mbuf *m, st /* pass the mbuf to enc0 for packet filtering */ if ((error = ipsec_filter(&m, PFIL_OUT, ENC_OUT|ENC_BEFORE)) != 0) goto bad; + ip6 = mtod(m, struct ip6_hdr *); #endif /* DEV_ENC */ /* Do the appropriate encapsulation, if necessary */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 10:29:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE531DAD; Tue, 28 Apr 2015 10:29:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8305B1785; Tue, 28 Apr 2015 10:29:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SAThHe090533; Tue, 28 Apr 2015 10:29:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SAThbQ090532; Tue, 28 Apr 2015 10:29:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504281029.t3SAThbQ090532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 28 Apr 2015 10:29:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282133 - head/tests/sys/mqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 10:29:43 -0000 Author: ngie Date: Tue Apr 28 10:29:42 2015 New Revision: 282133 URL: https://svnweb.freebsd.org/changeset/base/282133 Log: Fill in the copyright boilerplate for the test program MFC after: 6 days Modified: head/tests/sys/mqueue/mqueue_test.sh Modified: head/tests/sys/mqueue/mqueue_test.sh ============================================================================== --- head/tests/sys/mqueue/mqueue_test.sh Tue Apr 28 09:29:28 2015 (r282132) +++ head/tests/sys/mqueue/mqueue_test.sh Tue Apr 28 10:29:42 2015 (r282133) @@ -1,3 +1,30 @@ +# +# Copyright (c) 2015 EMC / Isilon Storage Division +# 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$ +# mqtest1_head() { From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 10:50:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2146A293; Tue, 28 Apr 2015 10:50:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA19B1A2B; Tue, 28 Apr 2015 10:50:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SAoVXU000593; Tue, 28 Apr 2015 10:50:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SAoVeX000592; Tue, 28 Apr 2015 10:50:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504281050.t3SAoVeX000592@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 28 Apr 2015 10:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282134 - head/tests/freebsd_test_suite X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 10:50:32 -0000 Author: ngie Date: Tue Apr 28 10:50:31 2015 New Revision: 282134 URL: https://svnweb.freebsd.org/changeset/base/282134 Log: Add initial (unpolished) macros for interfacing with the FreeBSD test suite This is very rough, but will be replaced/redesigned some time soon after I fix the Jenkins breakage I introduced MFC after: 6 days Added: head/tests/freebsd_test_suite/ head/tests/freebsd_test_suite/macros.h (contents, props changed) Added: head/tests/freebsd_test_suite/macros.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/freebsd_test_suite/macros.h Tue Apr 28 10:50:31 2015 (r282134) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2015 EMC / Isilon Storage Division + * 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$ + */ + +#ifndef _FREEBSD_TEST_MACROS_H_ +#define _FREEBSD_TEST_MACROS_H_ + +#include +#include +#include +#include +#include + +#include + +#define ATF_REQUIRE_KERNEL_MODULE(_mod_name) do { \ + ATF_REQUIRE_MSG(modfind(_mod_name) != -1, \ + "module %s could not be resolved: %s", \ + _mod_name, strerror(errno)); \ +} while(0) + +#define PLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ + if (modfind(_mod_name) == -1) { \ + err(_exit_code, "module %s could not be resolved", \ + _mod_name); \ + } \ +} while(0) + +#endif From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 10:51:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11B733E6; Tue, 28 Apr 2015 10:51:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E77E91A3E; Tue, 28 Apr 2015 10:51:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SApCkY001742; Tue, 28 Apr 2015 10:51:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SApCcY001741; Tue, 28 Apr 2015 10:51:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504281051.t3SApCcY001741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 28 Apr 2015 10:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282135 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 10:51:13 -0000 Author: ngie Date: Tue Apr 28 10:51:12 2015 New Revision: 282135 URL: https://svnweb.freebsd.org/changeset/base/282135 Log: Use ATF_REQUIRE_KERNEL_MODULE instead of aio_available function MFC after: 6 days Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c ============================================================================== --- head/tests/sys/aio/aio_test.c Tue Apr 28 10:50:31 2015 (r282134) +++ head/tests/sys/aio/aio_test.c Tue Apr 28 10:51:12 2015 (r282135) @@ -59,6 +59,8 @@ #include +#include "freebsd_test_suite/macros.h" + #define PATH_TEMPLATE "aio.XXXXXXXXXX" /* @@ -82,15 +84,6 @@ struct aio_context { static int aio_timedout; -static void -aio_available(void) -{ - - if (modfind("aio") == -1) - atf_tc_skip("aio support not available in the kernel; " - "skipping testcases"); -} - /* * Each test run specifies a timeout in seconds. Use the somewhat obsoleted * signal(3) and alarm(3) APIs to set this up. @@ -211,7 +204,7 @@ aio_write_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -263,7 +256,7 @@ aio_read_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); bzero(ac->ac_buffer, ac->ac_buflen); bzero(&aio, sizeof(aio)); @@ -346,7 +339,7 @@ ATF_TC_BODY(aio_file_test, tc) struct aio_context ac; int fd; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); strcpy(pathname, PATH_TEMPLATE); fd = mkstemp(pathname); @@ -392,7 +385,7 @@ ATF_TC_BODY(aio_fifo_test, tc) char pathname[PATH_MAX]; struct aio_context ac; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); /* * In theory, mkstemp() can return a name that is then collided with. @@ -461,7 +454,7 @@ ATF_TC_BODY(aio_unix_socketpair_test, tc struct aio_context ac; int sockets[2]; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_MSG(socketpair(PF_UNIX, SOCK_STREAM, 0, sockets) != -1, "socketpair failed: %s", strerror(errno)); @@ -503,7 +496,7 @@ ATF_TC_BODY(aio_pty_test, tc) struct termios ts; int error; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_MSG(openpty(&read_fd, &write_fd, NULL, NULL, NULL) == 0, "openpty failed: %s", strerror(errno)); @@ -550,7 +543,7 @@ ATF_TC_BODY(aio_pipe_test, tc) struct aio_context ac; int pipes[2]; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); ATF_REQUIRE_MSG(pipe(pipes) != -1, "pipe failed: %s", strerror(errno)); @@ -613,7 +606,7 @@ ATF_TC_BODY(aio_md_test, tc) struct aio_context ac; struct md_ioctl mdio; - aio_available(); + ATF_REQUIRE_KERNEL_MODULE("aio"); mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); ATF_REQUIRE_MSG(mdctl_fd != -1, From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 10:53:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A6E5554; Tue, 28 Apr 2015 10:53:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BD281AF7; Tue, 28 Apr 2015 10:53:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SAr7IO004578; Tue, 28 Apr 2015 10:53:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SAr7lr004573; Tue, 28 Apr 2015 10:53:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504281053.t3SAr7lr004573@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 28 Apr 2015 10:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282136 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 10:53:07 -0000 Author: ngie Date: Tue Apr 28 10:53:06 2015 New Revision: 282136 URL: https://svnweb.freebsd.org/changeset/base/282136 Log: - Use ATF_REQUIRE_KERNEL_MDOULE to require aio(4) - Don't use /tmp as a basis for temporary files as it's outside of the ATF sandbox - Don't override MAX macro in sys/param.h MFC after: 6 days Modified: head/tests/sys/aio/aio_kqueue_test.c head/tests/sys/aio/lio_kqueue_test.c Modified: head/tests/sys/aio/aio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/aio_kqueue_test.c Tue Apr 28 10:51:12 2015 (r282135) +++ head/tests/sys/aio/aio_kqueue_test.c Tue Apr 28 10:53:06 2015 (r282136) @@ -46,25 +46,29 @@ #include #include -#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" +#include "freebsd_test_suite/macros.h" -#define MAX 128 +#define PATH_TEMPLATE "aio.XXXXXXXXXX" + +#define MAX_IOCBS 128 #define MAX_RUNS 300 /* #define DEBUG */ int main (int argc, char *argv[]) { - int fd; - struct aiocb *iocb[MAX], *kq_iocb; - int i, result, run, error, j; - char buffer[32768]; - int kq = kqueue(); + struct aiocb *iocb[MAX_IOCBS], *kq_iocb; + char *file, pathname[sizeof(PATH_TEMPLATE)+1]; struct kevent ke, kq_returned; struct timespec ts; - int cancel, pending, tmp_file = 0, failed = 0; - char *file, pathname[sizeof(PATH_TEMPLATE)+1]; + char buffer[32768]; + int cancel, error, failed = 0, fd, kq, pending, result, run; + int tmp_file = 0; + unsigned i, j; + + PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); + kq = kqueue(); if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -86,7 +90,7 @@ main (int argc, char *argv[]) #ifdef DEBUG printf("Run %d\n", run); #endif - for (i = 0; i < MAX; i++) { + for (i = 0; i < nitems(iocb); i++) { iocb[i] = (struct aiocb *)calloc(1, sizeof(struct aiocb)); if (iocb[i] == NULL) @@ -94,7 +98,7 @@ main (int argc, char *argv[]) } pending = 0; - for (i = 0; i < MAX; i++) { + for (i = 0; i < nitems(iocb); i++) { pending++; iocb[i]->aio_nbytes = sizeof(buffer); iocb[i]->aio_buf = buffer; @@ -129,8 +133,8 @@ main (int argc, char *argv[]) } } } - cancel = MAX - pending; - + cancel = nitems(iocb) - pending; + i = 0; while (pending) { @@ -159,11 +163,11 @@ main (int argc, char *argv[]) break; #ifdef DEBUG printf("Try again left %d out of %d %d\n", - pending, MAX, cancel); + pending, nitems(iocb), cancel); #endif } - for (j = 0; j < MAX && iocb[j] != kq_iocb; + for (j = 0; j < nitems(iocb) && iocb[j] != kq_iocb; j++) ; #ifdef DEBUG printf("kq_iocb %p\n", kq_iocb); @@ -190,7 +194,7 @@ main (int argc, char *argv[]) i++; } - for (i = 0; i < MAX; i++) + for (i = 0; i < nitems(iocb); i++) free(iocb[i]); } Modified: head/tests/sys/aio/lio_kqueue_test.c ============================================================================== --- head/tests/sys/aio/lio_kqueue_test.c Tue Apr 28 10:51:12 2015 (r282135) +++ head/tests/sys/aio/lio_kqueue_test.c Tue Apr 28 10:53:06 2015 (r282136) @@ -48,16 +48,18 @@ #include #include -#define PATH_TEMPLATE "/tmp/aio.XXXXXXXXXX" +#include "freebsd_test_suite/macros.h" + +#define PATH_TEMPLATE "aio.XXXXXXXXXX" #define LIO_MAX 5 -#define MAX LIO_MAX * 16 +#define MAX_IOCBS LIO_MAX * 16 #define MAX_RUNS 300 int main(int argc, char *argv[]){ int fd; - struct aiocb *iocb[MAX]; + struct aiocb *iocb[MAX_IOCBS]; struct aiocb **lio[LIO_MAX], **lio_element, **kq_lio; int i, result, run, error, j, k; char buffer[32768]; @@ -69,6 +71,8 @@ main(int argc, char *argv[]){ char *file, pathname[sizeof(PATH_TEMPLATE)-1]; int tmp_file = 0, failed = 0; + PLAIN_REQUIRE_KERNEL_MODULE("aio", 0); + if (kq < 0) { perror("No kqeueue\n"); exit(1); @@ -99,9 +103,9 @@ main(int argc, char *argv[]){ #endif for (j = 0; j < LIO_MAX; j++) { lio[j] = (struct aiocb **) - malloc(sizeof(struct aiocb *) * MAX/LIO_MAX); - for(i = 0; i < MAX / LIO_MAX; i++) { - k = (MAX / LIO_MAX * j) + i; + malloc(sizeof(struct aiocb *) * MAX_IOCBS/LIO_MAX); + for(i = 0; i < MAX_IOCBS / LIO_MAX; i++) { + k = (MAX_IOCBS / LIO_MAX * j) + i; lio_element = lio[j]; lio[j][i] = iocb[k] = (struct aiocb *) malloc(sizeof(struct aiocb)); @@ -123,7 +127,7 @@ main(int argc, char *argv[]){ sig.sigev_notify = SIGEV_KEVENT; time(&time1); result = lio_listio(LIO_NOWAIT, lio[j], - MAX / LIO_MAX, &sig); + MAX_IOCBS / LIO_MAX, &sig); error = errno; time(&time2); #ifdef DEBUG @@ -203,7 +207,7 @@ main(int argc, char *argv[]){ } else { printf("PASS: run %d, operation %d result %d \n", run, LIO_MAX - i -1, result); } - for(k = 0; k < MAX / LIO_MAX; k++){ + for(k = 0; k < MAX_IOCBS / LIO_MAX; k++){ result = aio_return(kq_lio[k]); #ifdef DEBUG printf("Return Resulto for %d %d is %d\n", j, k, result); @@ -220,7 +224,7 @@ main(int argc, char *argv[]){ printf("\n"); #endif - for(k = 0; k < MAX / LIO_MAX; k++) { + for(k = 0; k < MAX_IOCBS / LIO_MAX; k++) { free(lio[j][k]); } free(lio[j]); From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 10:57:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2756A809; Tue, 28 Apr 2015 10:57:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 133D61B3C; Tue, 28 Apr 2015 10:57:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SAv1nb005152; Tue, 28 Apr 2015 10:57:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SAv04U005137; Tue, 28 Apr 2015 10:57:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504281057.t3SAv04U005137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 28 Apr 2015 10:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282137 - head/tests/sys/mqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 10:57:02 -0000 Author: ngie Date: Tue Apr 28 10:56:59 2015 New Revision: 282137 URL: https://svnweb.freebsd.org/changeset/base/282137 Log: Use PLAIN_REQUIRE_KERNEL_MODULE to require "mqueuefs" MFC after: 6 days Modified: head/tests/sys/mqueue/Makefile head/tests/sys/mqueue/mqtest1.c head/tests/sys/mqueue/mqtest2.c head/tests/sys/mqueue/mqtest3.c head/tests/sys/mqueue/mqtest4.c head/tests/sys/mqueue/mqtest5.c Modified: head/tests/sys/mqueue/Makefile ============================================================================== --- head/tests/sys/mqueue/Makefile Tue Apr 28 10:53:06 2015 (r282136) +++ head/tests/sys/mqueue/Makefile Tue Apr 28 10:56:59 2015 (r282137) @@ -6,6 +6,8 @@ ATF_TESTS_SH= mqueue_test BINDIR= ${TESTSDIR} +CFLAGS+= -I${.CURDIR:H:H} + PROGS+= mqtest1 PROGS+= mqtest2 PROGS+= mqtest3 Modified: head/tests/sys/mqueue/mqtest1.c ============================================================================== --- head/tests/sys/mqueue/mqtest1.c Tue Apr 28 10:53:06 2015 (r282136) +++ head/tests/sys/mqueue/mqtest1.c Tue Apr 28 10:56:59 2015 (r282137) @@ -7,6 +7,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue1" int @@ -17,6 +19,8 @@ main(void) mqd_t mq; int status; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + attr.mq_maxmsg = 2; attr.mq_msgsize = 100; mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr); Modified: head/tests/sys/mqueue/mqtest2.c ============================================================================== --- head/tests/sys/mqueue/mqtest2.c Tue Apr 28 10:53:06 2015 (r282136) +++ head/tests/sys/mqueue/mqtest2.c Tue Apr 28 10:56:59 2015 (r282137) @@ -10,6 +10,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue2" #define LOOPS 1000 #define PRIO 10 @@ -29,6 +31,8 @@ main(void) int status; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; Modified: head/tests/sys/mqueue/mqtest3.c ============================================================================== --- head/tests/sys/mqueue/mqtest3.c Tue Apr 28 10:53:06 2015 (r282136) +++ head/tests/sys/mqueue/mqtest3.c Tue Apr 28 10:56:59 2015 (r282137) @@ -11,6 +11,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue3" #define LOOPS 1000 #define PRIO 10 @@ -31,6 +33,8 @@ main(void) mqd_t mq; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; Modified: head/tests/sys/mqueue/mqtest4.c ============================================================================== --- head/tests/sys/mqueue/mqtest4.c Tue Apr 28 10:53:06 2015 (r282136) +++ head/tests/sys/mqueue/mqtest4.c Tue Apr 28 10:56:59 2015 (r282137) @@ -12,6 +12,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue4" #define LOOPS 1000 #define PRIO 10 @@ -32,6 +34,8 @@ main(void) int kq, status; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); attr.mq_maxmsg = 5; Modified: head/tests/sys/mqueue/mqtest5.c ============================================================================== --- head/tests/sys/mqueue/mqtest5.c Tue Apr 28 10:53:06 2015 (r282136) +++ head/tests/sys/mqueue/mqtest5.c Tue Apr 28 10:56:59 2015 (r282137) @@ -12,6 +12,8 @@ #include #include +#include "freebsd_test_suite/macros.h" + #define MQNAME "/mytstqueue5" #define LOOPS 1000 #define PRIO 10 @@ -34,6 +36,8 @@ main(void) mqd_t mq; pid_t pid; + PLAIN_REQUIRE_KERNEL_MODULE("mqueuefs", 0); + mq_unlink(MQNAME); sigemptyset(&set); From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 10:59:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63836971; Tue, 28 Apr 2015 10:59:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 527651B65; Tue, 28 Apr 2015 10:59:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SAx7s2005457; Tue, 28 Apr 2015 10:59:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SAx72W005456; Tue, 28 Apr 2015 10:59:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504281059.t3SAx72W005456@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 28 Apr 2015 10:59:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282138 - head/tests/sys/aio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 10:59:07 -0000 Author: ngie Date: Tue Apr 28 10:59:06 2015 New Revision: 282138 URL: https://svnweb.freebsd.org/changeset/base/282138 Log: Adjust CFLAGS to find freebsd_test_suite/macros.h MFC after: 6 days Modified: head/tests/sys/aio/Makefile Modified: head/tests/sys/aio/Makefile ============================================================================== --- head/tests/sys/aio/Makefile Tue Apr 28 10:56:59 2015 (r282137) +++ head/tests/sys/aio/Makefile Tue Apr 28 10:59:06 2015 (r282138) @@ -9,6 +9,8 @@ ATF_TESTS_C+= aio_test DPADD.aio_test+= ${LIBUTIL} LDADD.aio_test+= -lutil +CFLAGS+= -I${.CURDIR:H:H} + WARNS?= 6 .include From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 11:03:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFCD1B7C; Tue, 28 Apr 2015 11:03:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F68B1C4D; Tue, 28 Apr 2015 11:03:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SB3mpv009803; Tue, 28 Apr 2015 11:03:48 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SB3mWY009802; Tue, 28 Apr 2015 11:03:48 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504281103.t3SB3mWY009802@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 28 Apr 2015 11:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282139 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 11:03:48 -0000 Author: ae Date: Tue Apr 28 11:03:47 2015 New Revision: 282139 URL: https://svnweb.freebsd.org/changeset/base/282139 Log: Fix the comment. We will not do SPD lookup again, because ip[6]_ipsec_output() will find PACKET_TAG_IPSEC_OUT_DONE mbuf tag. Sponsored by: Yandex LLC Modified: head/sys/netipsec/ipsec_output.c Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Tue Apr 28 10:59:06 2015 (r282138) +++ head/sys/netipsec/ipsec_output.c Tue Apr 28 11:03:47 2015 (r282139) @@ -206,8 +206,7 @@ ipsec_process_done(struct mbuf *m, struc /* * We're done with IPsec processing, transmit the packet using the - * appropriate network protocol (IP or IPv6). SPD lookup will be - * performed again there. + * appropriate network protocol (IP or IPv6). */ switch (saidx->dst.sa.sa_family) { #ifdef INET From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 13:04:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF27AD9B; Tue, 28 Apr 2015 13:04:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C47D81AA6; Tue, 28 Apr 2015 13:04:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SD4pkR069783; Tue, 28 Apr 2015 13:04:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SD4pLU069782; Tue, 28 Apr 2015 13:04:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504281304.t3SD4pLU069782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 28 Apr 2015 13:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282144 - head/usr.sbin/crunch/crunchide X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 13:04:52 -0000 Author: emaste Date: Tue Apr 28 13:04:51 2015 New Revision: 282144 URL: https://svnweb.freebsd.org/changeset/base/282144 Log: crunchide: add basic string table sanity checks Reported by: Coverity Scan CID: 978805, 980919 Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- head/usr.sbin/crunch/crunchide/exec_elf32.c Tue Apr 28 12:52:08 2015 (r282143) +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Tue Apr 28 13:04:51 2015 (r282144) @@ -321,11 +321,14 @@ ELFNAMEEND(hide)(int fd, const char *fn) */ /* load section string table for debug use */ - if ((shstrtabp = xmalloc(xewtoh(shstrtabshdr->sh_size), fn, - "section string table")) == NULL) + if ((size = xewtoh(shstrtabshdr->sh_size)) == 0) + goto bad; + if ((shstrtabp = xmalloc(size, fn, "section string table")) == NULL) goto bad; if ((size_t)xreadatoff(fd, shstrtabp, xewtoh(shstrtabshdr->sh_offset), - xewtoh(shstrtabshdr->sh_size), fn) != xewtoh(shstrtabshdr->sh_size)) + size, fn) != size) + goto bad; + if (shstrtabp[size - 1] != '\0') goto bad; /* we need symtab, strtab, and everything behind strtab */ @@ -346,7 +349,8 @@ ELFNAMEEND(hide)(int fd, const char *fn) strtabidx = i; if (layoutp[i].shdr == symtabshdr || i >= strtabidx) { off = xewtoh(layoutp[i].shdr->sh_offset); - size = xewtoh(layoutp[i].shdr->sh_size); + if ((size = xewtoh(layoutp[i].shdr->sh_size)) == 0) + goto bad; layoutp[i].bufp = xmalloc(size, fn, shstrtabp + xewtoh(layoutp[i].shdr->sh_name)); if (layoutp[i].bufp == NULL) @@ -356,10 +360,13 @@ ELFNAMEEND(hide)(int fd, const char *fn) goto bad; /* set symbol table and string table */ - if (layoutp[i].shdr == symtabshdr) + if (layoutp[i].shdr == symtabshdr) { symtabp = layoutp[i].bufp; - else if (layoutp[i].shdr == strtabshdr) + } else if (layoutp[i].shdr == strtabshdr) { strtabp = layoutp[i].bufp; + if (strtabp[size - 1] != '\0') + goto bad; + } } } From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 13:13:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1048F97; Tue, 28 Apr 2015 13:13:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F14A1BD9; Tue, 28 Apr 2015 13:13:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SDDOvd074558; Tue, 28 Apr 2015 13:13:24 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SDDOr1074557; Tue, 28 Apr 2015 13:13:24 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201504281313.t3SDDOr1074557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 28 Apr 2015 13:13:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282145 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 13:13:24 -0000 Author: glebius Date: Tue Apr 28 13:13:23 2015 New Revision: 282145 URL: https://svnweb.freebsd.org/changeset/base/282145 Log: Require "ldconfig" for "devd". It is possible that user puts into devd.conf execution of third-party software, that needs libraries from /usr/local. Since devd is launched before ldconfig script, if the hardware that has associated software is attached on boot, then execution would fail. Differential Revision: https://reviews.freebsd.org/D2332 Reviewed by: imp Modified: head/etc/rc.d/devd Modified: head/etc/rc.d/devd ============================================================================== --- head/etc/rc.d/devd Tue Apr 28 13:04:51 2015 (r282144) +++ head/etc/rc.d/devd Tue Apr 28 13:13:23 2015 (r282145) @@ -4,7 +4,7 @@ # # PROVIDE: devd -# REQUIRE: netif +# REQUIRE: netif ldconfig # BEFORE: NETWORKING mountcritremote # KEYWORD: nojail shutdown From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 13:28:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1347F844; Tue, 28 Apr 2015 13:28:51 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1A9F1DA6; Tue, 28 Apr 2015 13:28:50 +0000 (UTC) Received: by wizk4 with SMTP id k4so140566389wiz.1; Tue, 28 Apr 2015 06:28:49 -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:message-id:subject :from:to:cc:content-type; bh=7grXg0TVBPuIBUvYvG8r9yqaljTU6Y81zVeAmMttU6g=; b=t19OkTfjpJTzj/Oqqp6+TkbdXcjD74gtaESo4+eggxumXHojpOVrh78aLxChhItqKd 8ijcOqiGMkCi3vIceMjQaYdja1jgI+9mErIPCcmQ4AnAxkeooRcjMKroS2tYTcRTUw/a qZ1JZbWzKBR8fKTe7ApeSWL3TUx63fPoPWX595sOAUxlzYX+wqPI1Xl/neF7FglupFi+ H9O83ALjt4leqB6j4bUVinA4zITNsT1q1UFtWrPlUSCPOnUL71h+AyTYBZg3MWlsYQV5 eOzSes3smljPDIdd4MfirL/mV51AcyJVxkDmCFZdUOAEH2zGfIOfseXOdvqyq7AIF94h iUyg== MIME-Version: 1.0 X-Received: by 10.180.72.230 with SMTP id g6mr30195506wiv.39.1430227729138; Tue, 28 Apr 2015 06:28:49 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.194.87.100 with HTTP; Tue, 28 Apr 2015 06:28:49 -0700 (PDT) In-Reply-To: <201504251615.t3PGF2Z1096937@svn.freebsd.org> References: <201504251615.t3PGF2Z1096937@svn.freebsd.org> Date: Tue, 28 Apr 2015 13:28:49 +0000 X-Google-Sender-Auth: Q0ccArLTYMlTsORpoUM4slhnKBs Message-ID: Subject: Re: svn commit: r281985 - in head: share/man/man4 sys/dev/smbus usr.sbin/smbmsg From: Antoine Brodin To: Michael Gmelin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 13:28:51 -0000 On Sat, Apr 25, 2015 at 4:15 PM, Michael Gmelin wrote: > Author: grembo (ports committer) > Date: Sat Apr 25 16:15:01 2015 > New Revision: 281985 > URL: https://svnweb.freebsd.org/changeset/base/281985 > > Log: > Expand SMBUS API to add smbus_trans() function. > > Differential Revision: https://reviews.freebsd.org/D1955 > Reviewed by: adrian, jhb, wblock > Approved by: adrian, jhb Hi, Some ports used the previous API, see error logs at: http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/bsdhwmon-20120702.log http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/consolehm-1.31_1.log http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/gkrellm2-2.3.5_6.log http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/healthd-0.7.9_2.log http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/lmmon-0.65_1.log http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/xmbmon-205_14.log Normally you should request an exp-run before doing a change like this. Cheers, Antoine (with hat: portmgr) From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 14:14:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A3BC65D; Tue, 28 Apr 2015 14:14:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57CF01309; Tue, 28 Apr 2015 14:14:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SEE7kj004976; Tue, 28 Apr 2015 14:14:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SEE7mx004975; Tue, 28 Apr 2015 14:14:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201504281414.t3SEE7mx004975@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 28 Apr 2015 14:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282146 - head/lib/msun/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 14:14:07 -0000 Author: imp Date: Tue Apr 28 14:14:06 2015 New Revision: 282146 URL: https://svnweb.freebsd.org/changeset/base/282146 Log: The presence/absence of CPU features should be tested with MACHINE_CPUARCH or MACHINE_ARCH, not MACHINE. The latter is for kernel only things. Also, I think this should be unconditional since all our architectures have long double support, but I don't have time to test that thoroughly so just add a comment to that effect. Modified: head/lib/msun/tests/Makefile Modified: head/lib/msun/tests/Makefile ============================================================================== --- head/lib/msun/tests/Makefile Tue Apr 28 13:13:23 2015 (r282145) +++ head/lib/msun/tests/Makefile Tue Apr 28 14:14:06 2015 (r282146) @@ -9,7 +9,9 @@ TESTSDIR= ${TESTSBASE}/lib/msun # All architectures on FreeBSD have fenv.h CFLAGS+= -DHAVE_FENV_H -.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +# Not sure why this isn't defined for all architectures, since most +# have long double. +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 15:33:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9163018B; Tue, 28 Apr 2015 15:33:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 722051D7B; Tue, 28 Apr 2015 15:33:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SFX1If045198; Tue, 28 Apr 2015 15:33:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SFX0La045182; Tue, 28 Apr 2015 15:33:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281533.t3SFX0La045182@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 15:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282148 - head/release/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 15:33:01 -0000 Author: gjb Date: Tue Apr 28 15:32:59 2015 New Revision: 282148 URL: https://svnweb.freebsd.org/changeset/base/282148 Log: Fix CROCHETBRANCH, forgotten in r280640. Submitted by: ruben.kerkhof@gmail.com PR: 199760 MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BEAGLEBONE.conf head/release/arm/PANDABOARD.conf head/release/arm/RPI-B.conf head/release/arm/WANDBOARD-QUAD.conf head/release/arm/ZEDBOARD.conf Modified: head/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Tue Apr 28 15:00:45 2015 (r282147) +++ head/release/arm/BEAGLEBONE.conf Tue Apr 28 15:32:59 2015 (r282148) @@ -33,5 +33,5 @@ load_target_env() { export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="BEAGLEBONE" export CROCHETSRC="https://github.com/freebsd/crochet" - export CROCHETBRANCH="trunk@r744" + export CROCHETBRANCH="trunk@rHEAD" } Modified: head/release/arm/PANDABOARD.conf ============================================================================== --- head/release/arm/PANDABOARD.conf Tue Apr 28 15:00:45 2015 (r282147) +++ head/release/arm/PANDABOARD.conf Tue Apr 28 15:32:59 2015 (r282148) @@ -33,5 +33,5 @@ load_target_env() { export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="PANDABOARD" export CROCHETSRC="https://github.com/freebsd/crochet" - export CROCHETBRANCH="trunk@r744" + export CROCHETBRANCH="trunk@rHEAD" } Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Tue Apr 28 15:00:45 2015 (r282147) +++ head/release/arm/RPI-B.conf Tue Apr 28 15:32:59 2015 (r282148) @@ -33,7 +33,7 @@ load_target_env() { export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="RPI-B" export CROCHETSRC="https://github.com/freebsd/crochet" - export CROCHETBRANCH="trunk@r744" + export CROCHETBRANCH="trunk@rHEAD" export UBOOTSRC="https://github.com/gonzoua/u-boot-pi" export UBOOTBRANCH="trunk" export UBOOTDIR="/tmp/crochet/u-boot-rpi" Modified: head/release/arm/WANDBOARD-QUAD.conf ============================================================================== --- head/release/arm/WANDBOARD-QUAD.conf Tue Apr 28 15:00:45 2015 (r282147) +++ head/release/arm/WANDBOARD-QUAD.conf Tue Apr 28 15:32:59 2015 (r282148) @@ -33,5 +33,5 @@ load_target_env() { export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="WANDBOARD-QUAD" export CROCHETSRC="https://github.com/freebsd/crochet" - export CROCHETBRANCH="trunk@r744" + export CROCHETBRANCH="trunk@rHEAD" } Modified: head/release/arm/ZEDBOARD.conf ============================================================================== --- head/release/arm/ZEDBOARD.conf Tue Apr 28 15:00:45 2015 (r282147) +++ head/release/arm/ZEDBOARD.conf Tue Apr 28 15:32:59 2015 (r282148) @@ -32,5 +32,5 @@ load_target_env() { export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="ZEDBOARD" export CROCHETSRC="https://github.com/freebsd/crochet" - export CROCHETBRANCH="trunk@r744" + export CROCHETBRANCH="trunk@rHEAD" } From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 16:06:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 972FD3DE; Tue, 28 Apr 2015 16:06:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 853D011CE; Tue, 28 Apr 2015 16:06:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SG6xbw060727; Tue, 28 Apr 2015 16:06:59 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SG6xYm060726; Tue, 28 Apr 2015 16:06:59 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504281606.t3SG6xYm060726@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 28 Apr 2015 16:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282149 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 16:06:59 -0000 Author: andrew Date: Tue Apr 28 16:06:58 2015 New Revision: 282149 URL: https://svnweb.freebsd.org/changeset/base/282149 Log: There may not be an FACS table, check for this before accessing it. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/acpica/acpi.c Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Tue Apr 28 15:32:59 2015 (r282148) +++ head/sys/dev/acpica/acpi.c Tue Apr 28 16:06:58 2015 (r282149) @@ -606,7 +606,7 @@ acpi_attach(device_t dev) sc->acpi_handle_reboot = 1; /* Only enable S4BIOS by default if the FACS says it is available. */ - if (AcpiGbl_FACS->Flags & ACPI_FACS_S4_BIOS_PRESENT) + if (AcpiGbl_FACS != NULL && AcpiGbl_FACS->Flags & ACPI_FACS_S4_BIOS_PRESENT) sc->acpi_s4bios = 1; /* Probe all supported sleep states. */ From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 16:47:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 388D9599; Tue, 28 Apr 2015 16:47:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 276F81704; Tue, 28 Apr 2015 16:47:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SGlZ9V081409; Tue, 28 Apr 2015 16:47:35 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SGlZP8081408; Tue, 28 Apr 2015 16:47:35 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504281647.t3SGlZP8081408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 28 Apr 2015 16:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282151 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 16:47:35 -0000 Author: andrew Date: Tue Apr 28 16:47:34 2015 New Revision: 282151 URL: https://svnweb.freebsd.org/changeset/base/282151 Log: Fix pmap_dcache_wb_pou in the new armv6 pmap to correctly achieve icache consistency from ptrace. PR: 199739 Submitted by: Jurgen Weiss (original version) Submitted by: Svatopluk Kraus Modified: head/sys/arm/arm/pmap-v6-new.c Modified: head/sys/arm/arm/pmap-v6-new.c ============================================================================== --- head/sys/arm/arm/pmap-v6-new.c Tue Apr 28 16:28:29 2015 (r282150) +++ head/sys/arm/arm/pmap-v6-new.c Tue Apr 28 16:47:34 2015 (r282151) @@ -6094,13 +6094,13 @@ pmap_set_pcb_pagedir(pmap_t pmap, struct /* - * Clean L1 data cache range on a single page, which is not mapped yet. + * Clean L1 data cache range by physical address. + * The range must be within a single page. */ static void pmap_dcache_wb_pou(vm_paddr_t pa, vm_size_t size, vm_memattr_t ma) { struct sysmaps *sysmaps; - vm_offset_t va; KASSERT(((pa & PAGE_MASK) + size) <= PAGE_SIZE, ("%s: not on single page", __func__)); @@ -6111,9 +6111,8 @@ pmap_dcache_wb_pou(vm_paddr_t pa, vm_siz if (*sysmaps->CMAP3) panic("%s: CMAP3 busy", __func__); pte2_store(sysmaps->CMAP3, PTE2_KERN_NG(pa, PTE2_AP_KRW, ma)); - va = (vm_offset_t)sysmaps->CADDR3; - tlb_flush_local(va); - dcache_wb_pou(va, size); + tlb_flush_local((vm_offset_t)sysmaps->CADDR3); + dcache_wb_pou((vm_offset_t)sysmaps->CADDR3 + (pa & PAGE_MASK), size); pte2_clear(sysmaps->CMAP3); sched_unpin(); mtx_unlock(&sysmaps->lock); From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 16:47:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F927724; Tue, 28 Apr 2015 16:47:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B78C1710; Tue, 28 Apr 2015 16:47:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SGlwmr081526; Tue, 28 Apr 2015 16:47:58 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SGluBF081519; Tue, 28 Apr 2015 16:47:56 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504281647.t3SGluBF081519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 28 Apr 2015 16:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282152 - in head/contrib/gcclibs/libgomp: . config/linux config/mingw32 config/posix X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 16:47:58 -0000 Author: pfg Date: Tue Apr 28 16:47:56 2015 New Revision: 282152 URL: https://svnweb.freebsd.org/changeset/base/282152 Log: MFV r282150 libgomp: Update to version 4.3.5. This is a partial revert of r282115, to bring the fromal upstream libgomp from GCC 4.3.5 Release under LGPLv2.1+. This is only brought to ease the ongoing development of the CPU affinity support. This shall not be MFC'd. Added: head/contrib/gcclibs/libgomp/config/linux/proc.c - copied unchanged from r282150, vendor/gcc/dist/libgomp/config/linux/proc.c head/contrib/gcclibs/libgomp/config/mingw32/proc.c - copied unchanged from r282150, vendor/gcc/dist/libgomp/config/mingw32/proc.c Replaced: head/contrib/gcclibs/libgomp/config/linux/affinity.c - copied unchanged from r282150, vendor/gcc/dist/libgomp/config/linux/affinity.c head/contrib/gcclibs/libgomp/config/posix/affinity.c - copied unchanged from r282150, vendor/gcc/dist/libgomp/config/posix/affinity.c Deleted: head/contrib/gcclibs/libgomp/ChangeLog.gcc43 Modified: head/contrib/gcclibs/libgomp/ChangeLog head/contrib/gcclibs/libgomp/Makefile.am head/contrib/gcclibs/libgomp/Makefile.in head/contrib/gcclibs/libgomp/aclocal.m4 head/contrib/gcclibs/libgomp/config.h.in head/contrib/gcclibs/libgomp/configure head/contrib/gcclibs/libgomp/configure.ac head/contrib/gcclibs/libgomp/configure.tgt head/contrib/gcclibs/libgomp/iter.c head/contrib/gcclibs/libgomp/libgomp.texi head/contrib/gcclibs/libgomp/omp.h.in head/contrib/gcclibs/libgomp/omp_lib.h.in head/contrib/gcclibs/libgomp/team.c Directory Properties: head/contrib/gcclibs/libgomp/ (props changed) Modified: head/contrib/gcclibs/libgomp/ChangeLog ============================================================================== --- head/contrib/gcclibs/libgomp/ChangeLog Tue Apr 28 16:47:34 2015 (r282151) +++ head/contrib/gcclibs/libgomp/ChangeLog Tue Apr 28 16:47:56 2015 (r282152) @@ -1,6 +1,223 @@ -2007-07-19 Release Manager +2010-05-22 Release Manager - * GCC 4.2.1 released. + * GCC 4.3.5 released. + +2010-05-06 Ralf Wildenhues + + PR other/43620 + * configure.ac (AM_INIT_AUTOMAKE): Add no-dist. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + * Makefile.in: Regenerate. + * testsuite/Makefile.in: Regenerate. + +2009-08-19 Tobias Burnus + + PR fortran/41102 + omp_lib.h.in: Fix -std=f95 errors. + +2009-08-14 Uros Bizjak + + Backport from mainline: + 2008-12-26 Uros Bizjak + + * testsuite/libgomp.c/atomic-6.c: Add -mieee for alpha*-*-* targets. + +2009-08-04 Release Manager + + * GCC 4.3.4 released. + +2009-01-24 Release Manager + + * GCC 4.3.3 released. + +2008-12-05 Janis Johnson + + Backport from mainline: + 2008-05-15 Janis Johnson + + * testsuite/lib/libgomp.exp: Load new torture support. + +2008-12-02 Janis Johnson + + Backport from mainline: + 2008-11-26 Janis Johnson + + PR testsuite/28870 + * testsuite/lib/libgomp.exp: Include new timeout library files. + (libgomp_target_compile): Set timeout value from new proc. + +2008-08-27 Release Manager + + * GCC 4.3.2 released. + +2008-06-12 Jakub Jelinek + + PR middle-end/36506 + * testsuite/libgomp.c/reduction-5.c: New test. + +2008-06-06 Release Manager + + * GCC 4.3.1 released. + +2008-05-23 Jakub Jelinek + + PR c++/36308 + * testsuite/libgomp.c++/ctor-11.C: New test. + * testsuite/libgomp.c++/ctor-12.C: New test. + +2008-05-07 Jakub Jelinek + + PR middle-end/36106 + * testsuite/libgomp.c/atomic-5.c: New test. + * testsuite/libgomp.c/atomic-6.c: New test. + * testsuite/libgomp.c/autopar-1.c: New test. + +2008-03-18 Jakub Jelinek + + PR middle-end/35611 + * testsuite/libgomp.c/atomic-4.c: New test. + + PR libgomp/35625 + * iter.c (gomp_iter_guided_next_locked): If q > n, set end to ws->end. + (gomp_iter_guided_next): Likewise. + * testsuite/libgomp.c/pr35625.c: New test. + +2008-03-13 Jakub Jelinek + + PR middle-end/35185 + * testsuite/libgomp.c++/pr35185.C: New test. + +2008-03-12 Jakub Jelinek + + PR middle-end/35549 + * testsuite/libgomp.c/pr35549.c: New test. + +2008-03-06 Jakub Jelinek + + * testsuite/libgomp.c/atomic-3.c: New test. + +2008-03-05 Release Manager + + * GCC 4.3.0 released. + +2008-02-15 Jakub Jelinek + + PR middle-end/35196 + * testsuite/libgomp.c/pr35196.c: New test. + + PR middle-end/35130 + * testsuite/libgomp.fortran/pr35130.f90: New test. + * testsuite/libgomp.c/pr35130.c: New test. + +2008-01-25 Jakub Jelinek + + PR middle-end/33880 + * testsuite/libgomp.c/pr33880.c: New test. + * testsuite/libgomp.fortran/pr33880.f90: New test. + +2008-01-24 David Edelsohn + + * configure: Regenerate. + +2008-01-08 Jakub Jelinek + + * configure.ac: Move futex checking into ../config/futex.m4. + * configure: Rebuilt. + * aclocal.m4: Rebuilt. + * Makefile.in: Rebuilt. + + * configure.tgt: Rename have_tls to gcc_cv_have_tls to match + 2007-10-15 ../config/tls.m4 change. + +2007-12-19 Jakub Jelinek + + PR c++/34513 + * testsuite/libgomp.c/pr34513.c: New test. + * testsuite/libgomp.c++/pr34513.C: New test. + +2007-12-17 Jack Howarth + + PR target/32765 + * testsuite/libgomp.fortran/crayptr2.f90: Move dg-options for darwin. + +2007-12-04 Jakub Jelinek + + * omp.h.in (__GOMP_NOTHROW): Define. Use it on omp_* prototypes. + +2007-12-03 Jakub Jelinek + + * testsuite/libgomp.c/private-1.c: New test. + +2007-11-29 Andris Pavenis + Paolo Bonzini + + * Makefile.am: Use space as vpath separator. Use 'vpath %' + instead of 'VPATH ='. + * Makefile.in: Regenerate. + +2007-11-23 Matthias Klose + + * configure.ac: Adjust makeinfo version check. + * configure: Regenerate. + +2007-11-10 Jakub Jelinek + + PR fortran/34020 + * testsuite/libgomp.fortran/pr34020.f90: New test. + +2007-11-06 Jakub Jelinek + + PR c++/33894 + * testsuite/libgomp.c++/atomic-1.C: New test. + +2007-10-25 Jakub Jelinek + + PR libgomp/33275 + * testsuite/libgomp.fortran/omp_parse3.f90 (test_threadprivate): + Make x and y integers rather than (implicit) reals. Add private (j) + clause to the last omp parallel. + +2007-10-15 Maciej W. Rozycki + + * configure: Regenerate following changes to ../config/tls.m4. + +2007-09-28 Jakub Jelinek + + * testsuite/libgomp.fortran/stack.f90: New test. + +2007-09-10 Danny Smith + + * config/mingw32/proc.c: New file. + +2007-09-05 Uros Bizjak + + * testsuite/libgomp.c/atomic-1.c: Include cpuid.h for i386 targets. + (main): Use __get_cpuid to get i386 target fetaures. + * testsuite/libgomp.c/atomic-2.c: Include cpuid.h for x86_64 targets. + (main): Use __get_cpuid to get x86_64 target fetaures. + +2007-08-15 Jack Howarth + + PR target/32765 + * testsuite/libgomp.fortran/pr32550.f90: Use -static-libgcc on Darwin. + * testsuite/libgomp.fortran/crayptr2.f90: Likwise. + +2007-07-12 Jakub Jelinek + + PR fortran/32550 + * testsuite/libgomp.fortran/pr32550.f90: New test. + * testsuite/libgomp.fortran/crayptr2.f90: New test. + +2007-07-05 H.J. Lu + + * aclocal.m4: Regenerated. + +2007-07-05 Tobias Burnus + + PR fortran/32359 + * testsuite/libgomp.fortran/pr32359.f90: New. 2007-07-02 Jakub Jelinek @@ -21,9 +238,117 @@ * testsuite/libgomp.c/pr32362-2.c: New test. * testsuite/libgomp.c/pr32362-3.c: New test. -2007-05-13 Release Manager +2007-06-07 Jakub Jelinek + + * team.c (gomp_team_start): Fix setting up thread_attr + stack size. + +2007-06-02 Paolo Bonzini + + * configure: Regenerate. + +2007-05-23 Steve Ellcey + + * Makefile.in: Regenerate. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * testsuite/Makefile.in: Regenerate. + +2007-05-04 Jakub Jelinek + + * config/linux/proc.c: New file. + + PR libgomp/28482 + * configure.tgt: Don't link with -Wl,-z,nodlopen even on Linux. + +2007-04-19 Daniel Franke + + * libgomp.texi (GOMP_CPU_AFFINITY): Updated. - * GCC 4.2.0 released. +2007-04-16 Matthias Klose + + * configure.tgt (i[456]86-*-linux*): Only add ia32 specific + flags if not building with -m64. + * testsuite/lib/libgomp-dg.exp (libgomp_init): Don't add -march + flag for i?86-*-* targets, if current target matches -m64. + +2007-04-14 Steve Ellcey + + * Makefile.am: Add -I .. to ACLOCAL_AMFLAGS. + * Makefile.in: Regenerate. + +2007-04-07 John David Anglin + + PR testsuite/31369 + * testsuite/libgomp.c++/c++.exp: Don't use concat when setting + ld_library_path. + * testsuite/libgomp.fortran/fortran.exp: Likewise. + +2007-04-04 Jakub Jelinek + + * libgomp.h (gomp_cpu_affinity, gomp_cpu_affinity_len): New extern + decls. + (gomp_init_affinity, gomp_init_thread_affinity): New prototypes. + * env.c (gomp_cpu_affinity, gomp_cpu_affinity_len): New variables. + (parse_affinity): New function. + (initialize_env): Call it and gomp_init_affinity. + * team.c (gomp_team_start): If gomp_cpu_affinity != NULL, + create new pthread_attr_t and call gomp_init_thread_affinity + on it for each thread before passing the attribute to pthread_create. + * config/linux/affinity.c: New file. + * config/posix/affinity.c: New file. + * configure.ac (HAVE_PTHREAD_AFFINITY_NP): New test. + * configure: Rebuilt. + * config.h.in: Rebuilt. + * Makefile.am (libgomp_la_SOURCES): Add affinity.c. + * Makefile.in: Rebuilt. + +2007-03-23 Andreas Tobler + + * testsuite/lib/libgomp.exp (libgomp_init): Add -shared-libgcc for + *-*-darwin*. + * testsuite/libgomp.c++/c++.exp: Look for shared libstdc++ library + and use it if found. + +2007-03-18 Uros Bizjak + + * testsuite/config/default.exp: New file. + * testsuite/lib/libgomp.exp: New file. + * testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init, + libgomp_target_compile, libgomp_option_help, libgomp_option_proc, + load_lib *, load_gcc_lib *): Move to libgomp.exp. + (libgomp_load): Remove. + * testsuite/lib/libgomp.exp (libgomp_init): Compute + always_ld_library_path, not ld_library_path. Set additional_flags + to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets. + (target_compile): Do not call libgomp_init. Append lang_library_path + and lang_link_flags to options. + * testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2. Set + ld_library_path from always_ld_library_path. Set LD_LIBRARY_PATH + here. + * testsuite/libgomp.c++/c++.exp: Set ld_library_path from + always_ld_library_path. Set LD_LIBRARY_PATH here. + * testsuite/libgomp.fortran/fortran.exp: Ditto. + * testsuite/libgomp.c/atomic-1.c: Set dg-options to + "-O2 -march=pentium" for ilp32 x86 targets. Simplify check for + CX8 flag. + * testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for + lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3. + * testsuite/libgomp.c/pr29947-1.c: Remove default dg-options. + * testsuite/libgomp.c/pr29947-1.c: Ditto. + * testsuite/libgomp.c/atomic-10.c: Ditto. + +2007-03-21 Jakub Jelinek + + * testsuite/libgomp.fortran/appendix-a/a.22.8.f90: Add + dg-final cleanup-modules line. + * testsuite/libgomp.fortran/appendix-a/a.40.1.f90: Likewise. + * testsuite/libgomp.fortran/appendix-a/a.31.5.f90: Likewise. + * testsuite/libgomp.fortran/appendix-a/a.31.4.f90: Likewise. + * testsuite/libgomp.fortran/threadprivate2.f90: Likewise. + * testsuite/libgomp.fortran/reduction5.f90: Likewise. + * testsuite/libgomp.fortran/threadprivate3.f90: Likewise. + * testsuite/libgomp.fortran/threadprivate1.f90: Likewise. 2007-03-18 Andreas Schwab @@ -31,15 +356,32 @@ extraction. * configure: Regenerate. +2007-03-01 Brooks Moses + + * Makefile.am: Add install-pdf target as copied from + automake v1.10 rules. + * Makefile.in: Regenerate + 2007-02-07 Jakub Jelinek + PR libgomp/28486 + * configure: Regenerate. + PR c++/30703 * testsuite/libgomp.c++/pr30703.C: New test. -2007-02-07 Daniel Franke +2007-02-02 Jakub Jelinek - Backport from mainline: - 2007-01-31 Daniel Franke + Revert: + 2006-07-05 Eric Christopher + * configure.ac: Depend addition of -pthread on host OS. + * configure: Regenerate. + +2007-01-31 Ralf Wildenhues + + * libgomp.texi: Fix spacing after abbreviations. + +2007-01-31 Daniel Franke PR libgomp/30546 * configure.ac: Add check for makeinfo @@ -50,74 +392,47 @@ * Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. -2007-02-07 Daniel Franke - - Backport from mainline: - 2007-01-31 Ralf Wildenhues - - * libgomp.texi: Fix spacing after abbreviations. - - Backport from mainline: - 2007-01-29 Daniel Franke +2007-01-29 Daniel Franke PR libgomp/30540 * libgomp.texi: More about implementation-dependent settings. -2007-02-06 Roger Sayle +2007-01-26 Tobias Burnus - PR libgomp/28296 - Backport from mainline. - Revert: - 2006-07-05 Eric Christopher - * configure.ac: Depend addition of -pthread on host OS. - * configure: Regenerate. + * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension. -2007-01-30 Tobias Burnus +2007-01-24 Jakub Jelinek - Backport from mainline. - 2007-01-26 Tobias Burnus + PR middle-end/30494 + * testsuite/libgomp.c/pr30494.c: New test. - * testsuite/libgomp.fortran/fortran.exp: Support .f03 extension. +2007-01-15 Tom Tromey -2007-01-25 Daniel Franke + * configure: Rebuilt. + * configure.ac: Fixed comment. - Backport from mainline: - 2006-12-21 Daniel Franke +2007-01-14 Daniel Franke + + * libgomp.texi: Document implementation specific default values of + environment variables. + +2006-12-21 Daniel Franke PR libgomp/28209 * libgomp.texi: New file. * configure.ac: Add --enable-generated-files-in-srcdir option. - * Makefile.am: Add info, dvi, pdf, html targets. On request, - copy files to srcdir. + * Makefile.am: Add info, dvi, pdf, html targets. On request, copy + files to srcdir. * Makefile.in: Regenerated. + * config.h.in: Regenerated. * testsuite/Makefile.in: Regenerated. * NOTES: Removed. - Backport from mainline: - 2007-01-14 Daniel Franke - * libgomp.texi: Document implementation specific default values of - environment variables. - -2007-01-24 Jakub Jelinek - - PR middle-end/30494 - * testsuite/libgomp.c/pr30494.c: New test. - -2006-12-18 Daniel Franke - - Backport from mainline: - 2006-12-04 Daniel Franke +2006-12-04 Daniel Franke PR libgomp/29949 * env.c (omp_set_num_threads): Set illegal thread count to 1. - Backport from mainline: - 2006-11-09 Uros Bizjak - - * env.c (parse_schedule): Reject out of range values. - (parse_unsigned_long): Reject out of range, negative - or zero values. - 2006-12-04 Eric Botcazou * configure: Regenerate. @@ -135,6 +450,15 @@ * configure.tgt: Force initial-exec TLS model on Linux only. +2006-11-13 Daniel Jacobowitz + + * configure: Regenerated. + +2006-11-09 Uros Bizjak + + * env.c (parse_schedule): Reject out of range values. + (parse_unsigned_long): Reject out of range, negative or zero values. + 2006-10-29 Jakub Jelinek PR fortran/29629 Modified: head/contrib/gcclibs/libgomp/Makefile.am ============================================================================== --- head/contrib/gcclibs/libgomp/Makefile.am Tue Apr 28 16:47:34 2015 (r282151) +++ head/contrib/gcclibs/libgomp/Makefile.am Tue Apr 28 16:47:56 2015 (r282152) @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -ACLOCAL_AMFLAGS = -I ../config +ACLOCAL_AMFLAGS = -I .. -I ../config SUBDIRS = testsuite ## May be used by toolexeclibdir. @@ -12,9 +12,7 @@ search_path = $(addprefix $(top_srcdir)/ fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include -empty = -space = $(empty) $(empty) -VPATH = $(subst $(space),:,$(strip $(search_path))) +vpath % $(strip $(search_path)) AM_CPPFLAGS = $(addprefix -I, $(search_path)) AM_CFLAGS = $(XCFLAGS) @@ -51,10 +49,19 @@ env.lo: libgomp_f.h env.o: libgomp_f.h -# No install-html target -.PHONY: install-html +# No install-html or install-pdf support in automake yet +.PHONY: install-html install-pdf install-html: +install-pdf: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done # Automake Documentation: # If your package has Texinfo files in many directories, you can use the Modified: head/contrib/gcclibs/libgomp/Makefile.in ============================================================================== --- head/contrib/gcclibs/libgomp/Makefile.in Tue Apr 28 16:47:34 2015 (r282151) +++ head/contrib/gcclibs/libgomp/Makefile.in Tue Apr 28 16:47:56 2015 (r282152) @@ -17,6 +17,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -37,24 +38,27 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(am__configure_deps) $(srcdir)/../config.guess \ - $(srcdir)/../config.sub $(srcdir)/../depcomp \ - $(srcdir)/../install-sh $(srcdir)/../ltmain.sh \ - $(srcdir)/../missing $(srcdir)/../mkinstalldirs \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(srcdir)/libgomp.spec.in \ - $(srcdir)/libgomp_f.h.in $(srcdir)/omp.h.in \ - $(srcdir)/omp_lib.f90.in $(srcdir)/omp_lib.h.in \ - $(top_srcdir)/configure ChangeLog +DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub \ + ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/../mkinstalldirs \ + $(srcdir)/omp.h.in $(srcdir)/omp_lib.h.in \ + $(srcdir)/omp_lib.f90.in $(srcdir)/libgomp_f.h.in \ + $(srcdir)/libgomp.spec.in $(srcdir)/../depcomp \ + $(srcdir)/../ltmain.sh $(srcdir)/../config.guess \ + $(srcdir)/../config.sub subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ $(top_srcdir)/../config/depstand.m4 \ $(top_srcdir)/../config/enable.m4 \ + $(top_srcdir)/../config/futex.m4 \ $(top_srcdir)/../config/lead-dot.m4 \ $(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/stdint.m4 \ - $(top_srcdir)/../config/tls.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../ltoptions.m4 \ + $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ + $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/../libtool.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -86,14 +90,13 @@ depcomp = $(SHELL) $(top_srcdir)/../depc am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libgomp_la_SOURCES) -DIST_SOURCES = $(libgomp_la_SOURCES) MULTISRCTOP = MULTIBUILDTOP = MULTIDIRS = @@ -126,18 +129,6 @@ HEADERS = $(nodist_finclude_HEADERS) $(n ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -VPATH = $(subst $(space),:,$(strip $(search_path))) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ @@ -157,6 +148,7 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -164,12 +156,15 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FC = @FC@ FCFLAGS = @FCFLAGS@ +FGREP = @FGREP@ GENINSRC_FALSE = @GENINSRC_FALSE@ GENINSRC_TRUE = @GENINSRC_TRUE@ +GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE = @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@ LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE = @LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@ @@ -182,6 +177,7 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +NM = @NM@ OBJEXT = @OBJEXT@ OMP_LOCK_ALIGN = @OMP_LOCK_ALIGN@ OMP_LOCK_KIND = @OMP_LOCK_KIND@ @@ -200,6 +196,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ RANLIB = @RANLIB@ SECTION_LDFLAGS = @SECTION_LDFLAGS@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ @@ -210,6 +207,7 @@ XCFLAGS = @XCFLAGS@ XLDFLAGS = @XLDFLAGS@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ ac_ct_FC = @ac_ct_FC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ @@ -244,6 +242,7 @@ libexecdir = @libexecdir@ libtool_VERSION = @libtool_VERSION@ link_gomp = @link_gomp@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ multi_basedir = @multi_basedir@ @@ -260,14 +259,12 @@ target_os = @target_os@ target_vendor = @target_vendor@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ -ACLOCAL_AMFLAGS = -I ../config +ACLOCAL_AMFLAGS = -I .. -I ../config SUBDIRS = testsuite gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) search_path = $(addprefix $(top_srcdir)/config/, $(config_path)) $(top_srcdir) fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/finclude libsubincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include -empty = -space = $(empty) $(empty) AM_CPPFLAGS = $(addprefix -I, $(search_path)) AM_CFLAGS = $(XCFLAGS) AM_LDFLAGS = $(XLDFLAGS) $(SECTION_LDFLAGS) $(OPT_LDFLAGS) @@ -734,152 +731,6 @@ GTAGS: distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../config - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-info - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) all-multi $(HEADERS) \ @@ -1012,16 +863,13 @@ uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local \ all-multi am--refresh check check-am clean clean-generic \ clean-libtool clean-multi clean-recursive \ - clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist \ - dist-all dist-bzip2 dist-gzip dist-info dist-shar dist-tarZ \ - dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-multi distclean-recursive distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-multi \ - install-nodist_fincludeHEADERS \ + clean-toolexeclibLTLIBRARIES ctags ctags-recursive dist-info \ + distclean distclean-compile distclean-generic distclean-hdr \ + distclean-libtool distclean-multi distclean-recursive \ + distclean-tags dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-multi install-nodist_fincludeHEADERS \ install-nodist_libsubincludeHEADERS \ install-nodist_toolexeclibHEADERS install-strip \ install-toolexeclibLTLIBRARIES installcheck installcheck-am \ @@ -1037,6 +885,8 @@ uninstall-info: uninstall-info-recursive uninstall-toolexeclibLTLIBRARIES +vpath % $(strip $(search_path)) + omp_lib_kinds.mod: omp_lib.mod : omp_lib.mod: omp_lib.f90 @@ -1046,10 +896,20 @@ fortran.o: libgomp_f.h env.lo: libgomp_f.h env.o: libgomp_f.h -# No install-html target -.PHONY: install-html +# No install-html or install-pdf support in automake yet +.PHONY: install-html install-pdf install-html: +install-pdf: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done + all-local: $(STAMP_GENINSRC) stamp-geninsrc: libgomp.info Modified: head/contrib/gcclibs/libgomp/aclocal.m4 ============================================================================== --- head/contrib/gcclibs/libgomp/aclocal.m4 Tue Apr 28 16:47:34 2015 (r282151) +++ head/contrib/gcclibs/libgomp/aclocal.m4 Tue Apr 28 16:47:56 2015 (r282152) @@ -859,8 +859,13 @@ AC_SUBST([am__untar]) m4_include([../config/acx.m4]) m4_include([../config/depstand.m4]) m4_include([../config/enable.m4]) +m4_include([../config/futex.m4]) m4_include([../config/lead-dot.m4]) m4_include([../config/multi.m4]) m4_include([../config/stdint.m4]) m4_include([../config/tls.m4]) +m4_include([../ltoptions.m4]) +m4_include([../ltsugar.m4]) +m4_include([../ltversion.m4]) +m4_include([../lt~obsolete.m4]) m4_include([acinclude.m4]) Modified: head/contrib/gcclibs/libgomp/config.h.in ============================================================================== --- head/contrib/gcclibs/libgomp/config.h.in Tue Apr 28 16:47:34 2015 (r282151) +++ head/contrib/gcclibs/libgomp/config.h.in Tue Apr 28 16:47:56 2015 (r282152) @@ -12,9 +12,15 @@ /* Define if the POSIX Semaphores do not work on your system. */ #undef HAVE_BROKEN_POSIX_SEMAPHORES +/* Define to 1 if the target assembler supports thread-local storage. */ +#undef HAVE_CC_TLS + /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + /* Define to 1 if you have the `getloadavg' function. */ #undef HAVE_GETLOADAVG @@ -63,6 +69,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Name of package */ #undef PACKAGE Copied: head/contrib/gcclibs/libgomp/config/linux/affinity.c (from r282150, vendor/gcc/dist/libgomp/config/linux/affinity.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcclibs/libgomp/config/linux/affinity.c Tue Apr 28 16:47:56 2015 (r282152, copy of r282150, vendor/gcc/dist/libgomp/config/linux/affinity.c) @@ -0,0 +1,107 @@ +/* Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Contributed by Jakub Jelinek . + + This file is part of the GNU OpenMP Library (libgomp). + + Libgomp is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for + more details. + + You should have received a copy of the GNU Lesser General Public License + along with libgomp; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* As a special exception, if you link this library with other files, some + of which are compiled with GCC, to produce an executable, this library + does not by itself cause the resulting executable to be covered by the + GNU General Public License. This exception does not however invalidate + any other reasons why the executable file might be covered by the GNU + General Public License. */ + +/* This is a Linux specific implementation of a CPU affinity setting. */ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif +#include "libgomp.h" +#include +#include +#include + +#ifdef HAVE_PTHREAD_AFFINITY_NP + +static unsigned int affinity_counter; +#ifndef HAVE_SYNC_BUILTINS +static gomp_mutex_t affinity_lock; +#endif + +void +gomp_init_affinity (void) +{ + cpu_set_t cpuset; + size_t idx, widx; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 16:51:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 273F4A02; Tue, 28 Apr 2015 16:51:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F00D8184D; Tue, 28 Apr 2015 16:51:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SGpnTs085719; Tue, 28 Apr 2015 16:51:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SGpnfG085715; Tue, 28 Apr 2015 16:51:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504281651.t3SGpnfG085715@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 28 Apr 2015 16:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282153 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 16:51:50 -0000 Author: andrew Date: Tue Apr 28 16:51:48 2015 New Revision: 282153 URL: https://svnweb.freebsd.org/changeset/base/282153 Log: Only enable the hpet driver on x86 hardware, it doesn't exist on arm64. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Apr 28 16:47:56 2015 (r282152) +++ head/sys/conf/files Tue Apr 28 16:51:48 2015 (r282153) @@ -584,7 +584,6 @@ dev/acpica/acpi_button.c optional acpi dev/acpica/acpi_cmbat.c optional acpi dev/acpica/acpi_cpu.c optional acpi dev/acpica/acpi_ec.c optional acpi -dev/acpica/acpi_hpet.c optional acpi dev/acpica/acpi_isab.c optional acpi isa dev/acpica/acpi_lid.c optional acpi dev/acpica/acpi_package.c optional acpi Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Apr 28 16:47:56 2015 (r282152) +++ head/sys/conf/files.amd64 Tue Apr 28 16:51:48 2015 (r282153) @@ -145,6 +145,7 @@ crypto/via/padlock.c optional padlock crypto/via/padlock_cipher.c optional padlock crypto/via/padlock_hash.c optional padlock dev/acpica/acpi_if.m standard +dev/acpica/acpi_hpet.c optional acpi dev/acpi_support/acpi_wmi_if.m standard dev/agp/agp_amd64.c optional agp dev/agp/agp_i810.c optional agp Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Apr 28 16:47:56 2015 (r282152) +++ head/sys/conf/files.i386 Tue Apr 28 16:51:48 2015 (r282153) @@ -285,6 +285,7 @@ dev/uart/uart_cpu_x86.c optional uart dev/viawd/viawd.c optional viawd dev/vmware/vmxnet3/if_vmx.c optional vmx dev/acpica/acpi_if.m standard +dev/acpica/acpi_hpet.c optional acpi dev/acpi_support/acpi_wmi_if.m standard dev/wbwd/wbwd.c optional wbwd dev/wpi/if_wpi.c optional wpi From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 17:02:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5942F4C; Tue, 28 Apr 2015 17:02:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9421B199F; Tue, 28 Apr 2015 17:02:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SH2iaW091764; Tue, 28 Apr 2015 17:02:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SH2in3091763; Tue, 28 Apr 2015 17:02:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504281702.t3SH2in3091763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 28 Apr 2015 17:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282154 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 17:02:44 -0000 Author: andrew Date: Tue Apr 28 17:02:43 2015 New Revision: 282154 URL: https://svnweb.freebsd.org/changeset/base/282154 Log: Allow the arm64 config file to define SOCDEV_PA and SOCDEV_VA that may be used in locore.S to map an extra range when enabling the MMU. Modified: head/sys/conf/options.arm64 Modified: head/sys/conf/options.arm64 ============================================================================== --- head/sys/conf/options.arm64 Tue Apr 28 16:51:48 2015 (r282153) +++ head/sys/conf/options.arm64 Tue Apr 28 17:02:43 2015 (r282154) @@ -1,4 +1,6 @@ # $FreeBSD$ ARM64 opt_global.h +SOCDEV_PA opt_global.h +SOCDEV_VA opt_global.h VFP opt_global.h From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 17:05:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D07712AF; Tue, 28 Apr 2015 17:05:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEC9819DF; Tue, 28 Apr 2015 17:05:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SH5unA092230; Tue, 28 Apr 2015 17:05:56 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SH5u8B092228; Tue, 28 Apr 2015 17:05:56 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201504281705.t3SH5u8B092228@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 28 Apr 2015 17:05:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282155 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 17:05:56 -0000 Author: melifaro Date: Tue Apr 28 17:05:55 2015 New Revision: 282155 URL: https://svnweb.freebsd.org/changeset/base/282155 Log: Fix panic introduced by r282070. Arm friendly KASSERT() to ease debug of similar crashes. Submitted by: Olivier Cochard-Labbé Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/netpfil/ipfw/ip_fw_table.c Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Apr 28 17:02:43 2015 (r282154) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Apr 28 17:05:55 2015 (r282155) @@ -1647,7 +1647,6 @@ check_ipfw_rule_body(ipfw_insn *cmd, int return EINVAL; if (cmdlen != F_INSN_SIZE(ipfw_insn_nat)) goto bad_size; - ci->object_opcodes++; goto check_action; case O_FORWARD_MAC: /* XXX not implemented yet */ case O_CHECK_STATE: Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Tue Apr 28 17:02:43 2015 (r282154) +++ head/sys/netpfil/ipfw/ip_fw_table.c Tue Apr 28 17:05:55 2015 (r282155) @@ -3399,6 +3399,10 @@ ref_rule_objects(struct ip_fw_chain *ch, IPFW_UH_WUNLOCK(ch); + KASSERT(found + unresolved == ci->object_opcodes, + ("refcount incosistency: found: %d unr: %d total: %d", + found, unresolved, ci->object_opcodes)); + /* Perform auto-creation for non-existing objects */ if (numnew != 0) error = create_objects_compat(ch, rule->cmd, oib, pidx, ti); From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 17:13:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CD954C4; Tue, 28 Apr 2015 17:13:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF8531AD5; Tue, 28 Apr 2015 17:13:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SHD5oR096784; Tue, 28 Apr 2015 17:13:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SHD5UW096783; Tue, 28 Apr 2015 17:13:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504281713.t3SHD5UW096783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 28 Apr 2015 17:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282156 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 17:13:06 -0000 Author: emaste Date: Tue Apr 28 17:13:05 2015 New Revision: 282156 URL: https://svnweb.freebsd.org/changeset/base/282156 Log: Don't add arm64 to universe builds if the user provided a TARGETS list Differential Revision: https://reviews.freebsd.org/D2375 Reported by: andrew Reviewed by: andrew, imp Sponsored by: The FreeBSD Foundation Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Tue Apr 28 17:05:55 2015 (r282155) +++ head/Makefile Tue Apr 28 17:13:05 2015 (r282156) @@ -373,19 +373,19 @@ kernel-toolchains: # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) -TARGETS?=amd64 arm i386 mips pc98 powerpc sparc64 # XXX Add arm64 to universe only if we have an external binutils installed. # It does not build with the in-tree linker. .if exists(/usr/local/aarch64-freebsd/bin/ld) -TARGETS+=arm64 -TARGET_ARCHES_arm64?= aarch64 -.else +UNIVERSE_arm64=arm64 +.elif empty(${TARGETS}) universe: universe_arm64_skip universe_epilogue: universe_arm64_skip universe_arm64_skip: universe_prologue @echo ">> arm64 skipped - install aarch64-binutils port or package to build" .endif +TARGETS?=amd64 arm ${UNIVERSE_arm64} i386 mips pc98 powerpc sparc64 TARGET_ARCHES_arm?= arm armeb armv6 armv6hf +TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 TARGET_ARCHES_powerpc?= powerpc powerpc64 TARGET_ARCHES_pc98?= i386 From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 17:54:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1663B774; Tue, 28 Apr 2015 17:54:00 +0000 (UTC) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DAC9C1FE3; Tue, 28 Apr 2015 17:53:59 +0000 (UTC) Received: by pacwv17 with SMTP id wv17so2341215pac.0; Tue, 28 Apr 2015 10:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=uJFIp1kkdpL4sN0tBVTodCDUqd/2t/ekPN7UHvFvDys=; b=BFSzz3Do1S7n832o9UFzqM+vsc+eWKpXg9GWEFB0aN4oFgglqGdugDaUiHynfYHTfV JWIBCaxlUnyT1akyofw2195bhX9krHWhj6aLybQjaA7iFTpxDHpnMhXOYf+GvotDknal STK0S6HHHwLja3LkjIyGmxsjbIZFvRJPAmhtorAJR6gHqw72/V8HI0ms/Zt3IG1X1kNu X+d0I/kYJkW7scHSo5u/AzwbTyxNEPAFBUM/30Hm0hNfXuEniPbwJKytYndXSYGSrf0J PeJ7LMBn5P6B+4WIiJzLE+ktV2zPhnIbP5TA/dGm6wsJIOmBc32YGFxDIFexGAdmQ4FJ +Kug== X-Received: by 10.70.126.225 with SMTP id nb1mr34720474pdb.71.1430243639438; Tue, 28 Apr 2015 10:53:59 -0700 (PDT) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id qm2sm23078539pdb.57.2015.04.28.10.53.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 Apr 2015 10:53:58 -0700 (PDT) References: <201504281713.t3SHD5UW096783@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201504281713.t3SHD5UW096783@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <42F6A579-082C-4159-8E16-1C8B69B0A3AE@gmail.com> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: svn commit: r282156 - head Date: Tue, 28 Apr 2015 10:53:57 -0700 To: Ed Maste X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 17:54:00 -0000 > On Apr 28, 2015, at 10:13, Ed Maste wrote: >=20 > Author: emaste > Date: Tue Apr 28 17:13:05 2015 > New Revision: 282156 > URL: https://svnweb.freebsd.org/changeset/base/282156 >=20 > Log: > Don't add arm64 to universe builds if the user provided a TARGETS list >=20 > Differential Revision: https://reviews.freebsd.org/D2375 > Reported by: andrew > Reviewed by: andrew, imp > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/Makefile >=20 > Modified: head/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/Makefile Tue Apr 28 17:05:55 2015 (r282155) > +++ head/Makefile Tue Apr 28 17:13:05 2015 (r282156) > @@ -373,19 +373,19 @@ kernel-toolchains: > # existing system is. > # > .if make(universe) || make(universe_kernels) || make(tinderbox) || make(ta= rgets) > -TARGETS?=3Damd64 arm i386 mips pc98 powerpc sparc64 > # XXX Add arm64 to universe only if we have an external binutils installed= . > # It does not build with the in-tree linker. > .if exists(/usr/local/aarch64-freebsd/bin/ld) > -TARGETS+=3Darm64 > -TARGET_ARCHES_arm64?=3D aarch64 > -.else > +UNIVERSE_arm64=3Darm64 > +.elif empty(${TARGETS}) > universe: universe_arm64_skip > universe_epilogue: universe_arm64_skip > universe_arm64_skip: universe_prologue > @echo ">> arm64 skipped - install aarch64-binutils port or package to b= uild" > .endif > +TARGETS?=3Damd64 arm Why just amd64/arm here?= From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 17:59:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 711F2E81; Tue, 28 Apr 2015 17:59:12 +0000 (UTC) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33D621047; Tue, 28 Apr 2015 17:59:12 +0000 (UTC) Received: by obfe9 with SMTP id e9so2196560obf.1; Tue, 28 Apr 2015 10:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=/SGUjNpeFMQwsMpshBVE40EtQZfZNG7EE5wkrGlmxjE=; b=QlEGaRPYa3Ur93Tk2kgpTKiW9RyHQXM6y9304+hos8OQvnH9RHHdCwhWA94gwC+cMq DokO9j30QCZhUzcGYpa9CwtxiQY80BTmb/g6YI90hI2DPbLVRNlKQ79pGXqxUWriF96i 99czfAP+0ovcWu3ohzTbaTQKDLF+4Auxnh/R7nbCk0+QxZP9BuP6K8iDyNEcJXYBAfBT gZWhdMw9+0YCpXlL3naj4YHrLBesRFEwokRyMPcdUWvxLs0pFWYn5KuRxx4Qy+STP9se k617SJ+U6yp9IzY35mUkloh+xqGmvaVXu+ckmk7tSszFQIkxQdLc8TOG4QYEYMtozidN +R5Q== X-Received: by 10.60.133.206 with SMTP id pe14mr15443205oeb.84.1430243951460; Tue, 28 Apr 2015 10:59:11 -0700 (PDT) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id a76sm13601054oig.11.2015.04.28.10.59.10 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 Apr 2015 10:59:10 -0700 (PDT) References: <201504281705.t3SH5u8B092228@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201504281705.t3SH5u8B092228@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <83FEDDDF-069E-40A1-8AA3-68ABA5C0F5C6@gmail.com> Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: svn commit: r282155 - head/sys/netpfil/ipfw Date: Tue, 28 Apr 2015 10:59:09 -0700 To: "Alexander V. Chernikov" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 17:59:12 -0000 > On Apr 28, 2015, at 10:05, Alexander V. Chernikov w= rote: ... > + KASSERT(found + unresolved =3D=3D ci->object_opcodes, > + ("refcount incosistency: found: %d unr: %d total: %d", > + found, unresolved, ci->object_opcodes)); Typo (incosistency -> inconsistency) From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:05:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44E8C1A1; Tue, 28 Apr 2015 18:05:23 +0000 (UTC) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 109491130; Tue, 28 Apr 2015 18:05:22 +0000 (UTC) Received: from bender (bender.sec.cl.cam.ac.uk [IPv6:2001:630:212:2a8:4e72:b9ff:fe93:61bf]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 8BC1BD7A6F; Tue, 28 Apr 2015 18:04:45 +0000 (UTC) Date: Tue, 28 Apr 2015 19:04:45 +0100 From: Andrew Turner To: Garrett Cooper Cc: Ed Maste , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r282156 - head Message-ID: <20150428190445.798316bb@bender> In-Reply-To: <42F6A579-082C-4159-8E16-1C8B69B0A3AE@gmail.com> References: <201504281713.t3SHD5UW096783@svn.freebsd.org> <42F6A579-082C-4159-8E16-1C8B69B0A3AE@gmail.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:05:23 -0000 On Tue, 28 Apr 2015 10:53:57 -0700 Garrett Cooper wrote: > > > On Apr 28, 2015, at 10:13, Ed Maste wrote: > > > > Author: emaste > > Date: Tue Apr 28 17:13:05 2015 > > New Revision: 282156 > > URL: https://svnweb.freebsd.org/changeset/base/282156 > > > > Log: > > Don't add arm64 to universe builds if the user provided a TARGETS > > list > > > > Differential Revision: https://reviews.freebsd.org/D2375 > > Reported by: andrew > > Reviewed by: andrew, imp > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/Makefile > > > > Modified: head/Makefile > > ============================================================================== > > --- head/Makefile Tue Apr 28 17:05:55 2015 (r282155) > > +++ head/Makefile Tue Apr 28 17:13:05 2015 (r282156) > > @@ -373,19 +373,19 @@ kernel-toolchains: > > # existing system is. > > # > > .if make(universe) || make(universe_kernels) || make(tinderbox) || > > make(targets) -TARGETS?=amd64 arm i386 mips pc98 powerpc sparc64 > > # XXX Add arm64 to universe only if we have an external binutils > > installed. # It does not build with the in-tree linker. > > .if exists(/usr/local/aarch64-freebsd/bin/ld) > > -TARGETS+=arm64 > > -TARGET_ARCHES_arm64?= aarch64 > > -.else > > +UNIVERSE_arm64=arm64 > > +.elif empty(${TARGETS}) > > universe: universe_arm64_skip > > universe_epilogue: universe_arm64_skip > > universe_arm64_skip: universe_prologue > > @echo ">> arm64 skipped - install aarch64-binutils port or > > package to build" .endif > > +TARGETS?=amd64 arm > > Why just amd64/arm here? You're missing part of the line, it contains all architectures with arm64 being optional: +TARGETS?=amd64 arm ${UNIVERSE_arm64} i386 mips pc98 powerpc sparc64 Andrew From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0FE534E; Tue, 28 Apr 2015 18:10:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFE441173; Tue, 28 Apr 2015 18:10:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAX3q023944; Tue, 28 Apr 2015 18:10:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAXOD023941; Tue, 28 Apr 2015 18:10:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAXOD023941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282157 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:33 -0000 Author: gjb Date: Tue Apr 28 18:10:32 2015 New Revision: 282157 URL: https://svnweb.freebsd.org/changeset/base/282157 Log: Document r273562, libxo(3) import. Add Juniper Networks to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 17:13:05 2015 (r282156) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:32 2015 (r282157) @@ -481,6 +481,10 @@ ELF object in the dlpi_name structure member. + The &man.libxo.3; library has been + imported to the base system. + A userland library for Chelsio Terminator 5 based iWARP cards has been added, allowing userland RDMA Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Tue Apr 28 17:13:05 2015 (r282156) +++ head/release/doc/share/xml/sponsor.ent Tue Apr 28 18:10:32 2015 (r282157) @@ -23,6 +23,8 @@ + + From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1967D446; Tue, 28 Apr 2015 18:10:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08EED1174; Tue, 28 Apr 2015 18:10:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAZCn024004; Tue, 28 Apr 2015 18:10:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAZLR024003; Tue, 28 Apr 2015 18:10:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAZLR024003@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282158 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:36 -0000 Author: gjb Date: Tue Apr 28 18:10:35 2015 New Revision: 282158 URL: https://svnweb.freebsd.org/changeset/base/282158 Log: Document r279122, netstat(1) updated to use libxo(3). Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:32 2015 (r282157) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:35 2015 (r282158) @@ -317,6 +317,11 @@ sponsor="&scaleengine;">The &man.freebsd-update.8; utility has been updated to prevent fetching updated binary patches when a previous upgrade has not been throughly completed. + + The &man.netstat.1; utility has been + updated to link against the &man.libxo.3; shared + library. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55635573; Tue, 28 Apr 2015 18:10:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44B6F1175; Tue, 28 Apr 2015 18:10:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAcFG024048; Tue, 28 Apr 2015 18:10:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAc4d024047; Tue, 28 Apr 2015 18:10:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAc4d024047@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282159 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:38 -0000 Author: gjb Date: Tue Apr 28 18:10:37 2015 New Revision: 282159 URL: https://svnweb.freebsd.org/changeset/base/282159 Log: Document r282089, unbound(8) update to 1.5.3. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:35 2015 (r282158) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:37 2015 (r282159) @@ -404,6 +404,9 @@ The &man.acpi.4; subsystem has been updated to version 20150204. + + The &man.unbound.8; utility has been + updated to version 1.5.3. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C89237B2; Tue, 28 Apr 2015 18:10:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7F91117A; Tue, 28 Apr 2015 18:10:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAgMK024146; Tue, 28 Apr 2015 18:10:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAgmB024145; Tue, 28 Apr 2015 18:10:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAgmB024145@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282161 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:42 -0000 Author: gjb Date: Tue Apr 28 18:10:41 2015 New Revision: 282161 URL: https://svnweb.freebsd.org/changeset/base/282161 Log: Document r281806, wpa_supplicant(8)/hostapd(8) update to version 2.4. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:39 2015 (r282160) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:41 2015 (r282161) @@ -402,6 +402,10 @@ The &man.acpi.4; subsystem has been updated to version 20150204. + The &man.wpa.supplicant.8; and + &man.hostapd.8; utilties have been updated to version + 2.4. + bmake has been updated to version 20150418. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9173E6A6; Tue, 28 Apr 2015 18:10:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8149B1177; Tue, 28 Apr 2015 18:10:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAeHd024100; Tue, 28 Apr 2015 18:10:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAeTW024098; Tue, 28 Apr 2015 18:10:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAeTW024098@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282160 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:40 -0000 Author: gjb Date: Tue Apr 28 18:10:39 2015 New Revision: 282160 URL: https://svnweb.freebsd.org/changeset/base/282160 Log: Document r281812, make(1) update to version 20150418. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:37 2015 (r282159) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:39 2015 (r282160) @@ -340,9 +340,6 @@ &man.jemalloc.3; has been updated to version 3.5.0. - bmake has - been updated to version 20140101. - libc++ has been updated to version 3.4. @@ -405,6 +402,9 @@ The &man.acpi.4; subsystem has been updated to version 20150204. + bmake has + been updated to version 20150418. + The &man.unbound.8; utility has been updated to version 1.5.3. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E9EA8D4; Tue, 28 Apr 2015 18:10:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F297F117E; Tue, 28 Apr 2015 18:10:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAiXh024197; Tue, 28 Apr 2015 18:10:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAi7J024196; Tue, 28 Apr 2015 18:10:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAi7J024196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282162 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:45 -0000 Author: gjb Date: Tue Apr 28 18:10:44 2015 New Revision: 282162 URL: https://svnweb.freebsd.org/changeset/base/282162 Log: Document r281373, nvi(1) update to version 2.1.3. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:41 2015 (r282161) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:44 2015 (r282162) @@ -402,6 +402,9 @@ The &man.acpi.4; subsystem has been updated to version 20150204. + The &man.nvi.1; utility has been updated + to version 2.1.3. + The &man.wpa.supplicant.8; and &man.hostapd.8; utilties have been updated to version 2.4. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A285D94; Tue, 28 Apr 2015 18:10:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7944E122A; Tue, 28 Apr 2015 18:10:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAsgB024445; Tue, 28 Apr 2015 18:10:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAsRo024443; Tue, 28 Apr 2015 18:10:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAsRo024443@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282166 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:54 -0000 Author: gjb Date: Tue Apr 28 18:10:53 2015 New Revision: 282166 URL: https://svnweb.freebsd.org/changeset/base/282166 Log: Document r280259, initial support for arm64/aarch64. Add arch.arm64 entity to release.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/release.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:50 2015 (r282165) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:53 2015 (r282166) @@ -861,6 +861,10 @@ driver has been added, which supports CPU frequency and voltage control on the Raspberry Pi SOC. + + Initial + support for the ARM AArch64 architecture has been + added. Modified: head/release/doc/share/xml/release.ent ============================================================================== --- head/release/doc/share/xml/release.ent Tue Apr 28 18:10:50 2015 (r282165) +++ head/release/doc/share/xml/release.ent Tue Apr 28 18:10:53 2015 (r282166) @@ -70,6 +70,7 @@ + From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44521A0D; Tue, 28 Apr 2015 18:10:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 341F51181; Tue, 28 Apr 2015 18:10:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAl6W024250; Tue, 28 Apr 2015 18:10:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAllC024249; Tue, 28 Apr 2015 18:10:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAllC024249@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282163 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:47 -0000 Author: gjb Date: Tue Apr 28 18:10:46 2015 New Revision: 282163 URL: https://svnweb.freebsd.org/changeset/base/282163 Log: Document r281316, xz(1) update to version 5.2.1. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:44 2015 (r282162) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:46 2015 (r282163) @@ -393,15 +393,15 @@ OpenSSL has been updated to version 1.0.1l. - The &man.xz.1; utility has been udpated - to version 5.2.0. - The &man.xz.1; utility has been updated to support multi-threaded compression. The &man.acpi.4; subsystem has been updated to version 20150204. + The &man.xz.1; utility has been udpated + to version 5.2.1. + The &man.nvi.1; utility has been updated to version 2.1.3. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 824AFB0F; Tue, 28 Apr 2015 18:10:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 719C01221; Tue, 28 Apr 2015 18:10:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAnqF024308; Tue, 28 Apr 2015 18:10:49 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAne1024307; Tue, 28 Apr 2015 18:10:49 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAne1024307@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282164 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:49 -0000 Author: gjb Date: Tue Apr 28 18:10:48 2015 New Revision: 282164 URL: https://svnweb.freebsd.org/changeset/base/282164 Log: Document r279957, DSM TRIM support for virtual AHCI disks. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:46 2015 (r282163) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:48 2015 (r282164) @@ -838,6 +838,10 @@ The &man.virtio.console.4; driver has been added, which provides an interface to VirtIO console devices through a &man.tty.4; device. + + The &man.bhyve.8; hypervisor has been + updated to support DSM TRIM commands for + virtual AHCI disks. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 496C1361; Tue, 28 Apr 2015 18:11:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38C62123F; Tue, 28 Apr 2015 18:11:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIB6qL024800; Tue, 28 Apr 2015 18:11:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIB6jP024799; Tue, 28 Apr 2015 18:11:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIB6jP024799@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282171 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:06 -0000 Author: gjb Date: Tue Apr 28 18:11:05 2015 New Revision: 282171 URL: https://svnweb.freebsd.org/changeset/base/282171 Log: Document r280938, GELI passphrase prompt support added to the boot loader. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:03 2015 (r282170) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:05 2015 (r282171) @@ -969,6 +969,12 @@ Alternatively, &man.syscons.4; can be enabled at boot time by entering set kern.vty=sc at the &man.loader.8; prompt. + + The boot loader has been updated to + support entering the GELI passphrase before + loading the kernel. To enable this behavior, add + geom_eli_passphrase_prompt="YES" to + &man.loader.conf.5;. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB8B0B51; Tue, 28 Apr 2015 18:11:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAC771256; Tue, 28 Apr 2015 18:11:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBH4g025060; Tue, 28 Apr 2015 18:11:17 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBHOr025059; Tue, 28 Apr 2015 18:11:17 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBHOr025059@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282176 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:18 -0000 Author: gjb Date: Tue Apr 28 18:11:17 2015 New Revision: 282176 URL: https://svnweb.freebsd.org/changeset/base/282176 Log: Document r281130, gcc attributes added to standard include headers. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:14 2015 (r282175) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:17 2015 (r282176) @@ -533,6 +533,12 @@ updated to be able to handle 32-bit aligned data on 64-bit platforms, also providing a significant improvement in 32-bit workloads. + + Several standard include headers have + been updated to use of gcc + attributes, such as __result_use_check(), + __alloc_size(), and + __nonnull(). From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 592FEE26; Tue, 28 Apr 2015 18:11:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25A44125E; Tue, 28 Apr 2015 18:11:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBMth025217; Tue, 28 Apr 2015 18:11:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBMSP025216; Tue, 28 Apr 2015 18:11:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBMSP025216@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282178 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:22 -0000 Author: gjb Date: Tue Apr 28 18:11:21 2015 New Revision: 282178 URL: https://svnweb.freebsd.org/changeset/base/282178 Log: Document r281311, disallow directory traversal in ar(1). Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:19 2015 (r282177) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:21 2015 (r282178) @@ -322,6 +322,13 @@ sponsor="&juniper;">The &man.netstat.1; utility has been updated to link against the &man.libxo.3; shared library. + + The + &man.ar.1; utility has been updated to set + ARCHIVE_EXTRACT_SECURE_SYMLINKS and + ARCHIVE_EXTRACT_SECURE_NODOTDOT to disallow + directory traversal when extracting an archive, similar to + &man.tar.1;. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11233CD1; Tue, 28 Apr 2015 18:11:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00698125A; Tue, 28 Apr 2015 18:11:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBJON025136; Tue, 28 Apr 2015 18:11:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBJTi025135; Tue, 28 Apr 2015 18:11:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBJTi025135@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282177 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:20 -0000 Author: gjb Date: Tue Apr 28 18:11:19 2015 New Revision: 282177 URL: https://svnweb.freebsd.org/changeset/base/282177 Log: Document r281261, DTrace support for the Book-E. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:17 2015 (r282176) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:19 2015 (r282177) @@ -597,6 +597,10 @@ Fixes an integer overflow and signedness bugs. + + Support for + &man.dtrace.1; has been added for the + Book-E ™. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC33EC5C; Tue, 28 Apr 2015 18:10:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC02B1224; Tue, 28 Apr 2015 18:10:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIApMF024383; Tue, 28 Apr 2015 18:10:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIApef024382; Tue, 28 Apr 2015 18:10:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIApef024382@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282165 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:51 -0000 Author: gjb Date: Tue Apr 28 18:10:50 2015 New Revision: 282165 URL: https://svnweb.freebsd.org/changeset/base/282165 Log: Document r280183, drm update to match Linux 3.8.13. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:48 2015 (r282164) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:50 2015 (r282165) @@ -661,6 +661,9 @@ /dev/hpetN device, providing access to HPET from userspace. + + The drm code has + been updated to match &linux; version 3.8.13. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA595E9C; Tue, 28 Apr 2015 18:10:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8FA5122E; Tue, 28 Apr 2015 18:10:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAuSl024492; Tue, 28 Apr 2015 18:10:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAuQn024491; Tue, 28 Apr 2015 18:10:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAuQn024491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282167 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:56 -0000 Author: gjb Date: Tue Apr 28 18:10:55 2015 New Revision: 282167 URL: https://svnweb.freebsd.org/changeset/base/282167 Log: Document r280308, devfs(5) timestamp updates for read/write operations is now disabled by default. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:53 2015 (r282166) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:55 2015 (r282167) @@ -623,6 +623,13 @@ The kern.osrelease and kern.osreldate are now configurable &man.jail.8; parameters. + + The + &man.devfs.5; device filesystem has been changed to disable + updating timestamps for read/write operations. A new + &man.sysctl.8;, vfs.devfs.dotimes has been + added, which when set to a non-zero value, enables updating + timestamps for these operations. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:10:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D713A5; Tue, 28 Apr 2015 18:10:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F16D91234; Tue, 28 Apr 2015 18:10:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIAwBP024542; Tue, 28 Apr 2015 18:10:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIAw05024541; Tue, 28 Apr 2015 18:10:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281810.t3SIAw05024541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282168 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:10:59 -0000 Author: gjb Date: Tue Apr 28 18:10:58 2015 New Revision: 282168 URL: https://svnweb.freebsd.org/changeset/base/282168 Log: Partially document r280859, readelf(1) is now switched to the ELF toolchain version. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:55 2015 (r282167) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:58 2015 (r282168) @@ -381,6 +381,7 @@ addr2line, elfcopy (strip), nm, + readelf, size, and strings were switched to the versions from the ELF Tool Chain project. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07CF42F0; Tue, 28 Apr 2015 18:11:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBC341238; Tue, 28 Apr 2015 18:11:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIB3FT024711; Tue, 28 Apr 2015 18:11:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIB3xt024709; Tue, 28 Apr 2015 18:11:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIB3xt024709@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282170 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:04 -0000 Author: gjb Date: Tue Apr 28 18:11:03 2015 New Revision: 282170 URL: https://svnweb.freebsd.org/changeset/base/282170 Log: Document r280932, elftoolchain update to version 3179. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:00 2015 (r282169) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:03 2015 (r282170) @@ -400,6 +400,10 @@ The &man.acpi.4; subsystem has been updated to version 20150204. + The + elftoolchain utilities have been + updated to version 3179. + The &man.xz.1; utility has been udpated to version 5.2.1. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88104BB; Tue, 28 Apr 2015 18:11:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77BFF1269; Tue, 28 Apr 2015 18:11:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBQKC027225; Tue, 28 Apr 2015 18:11:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBQvC027224; Tue, 28 Apr 2015 18:11:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBQvC027224@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282180 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:26 -0000 Author: gjb Date: Tue Apr 28 18:11:25 2015 New Revision: 282180 URL: https://svnweb.freebsd.org/changeset/base/282180 Log: Document r281713, hwpmc(4) support for Freescale e500 core. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:23 2015 (r282179) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:25 2015 (r282180) @@ -839,6 +839,10 @@ driver has been updated to correct performance counter sampling on G4 (MPC74xxx) and G5 class processors. + The &man.hwpmc.4; + driver has been updated to support the Freescale e500 + core. + The OpenCrypto framework has been From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78A628B1; Tue, 28 Apr 2015 18:11:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A8151250; Tue, 28 Apr 2015 18:11:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBDEc024956; Tue, 28 Apr 2015 18:11:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBDRB024955; Tue, 28 Apr 2015 18:11:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBDRB024955@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282174 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:13 -0000 Author: gjb Date: Tue Apr 28 18:11:12 2015 New Revision: 282174 URL: https://svnweb.freebsd.org/changeset/base/282174 Log: Typo/spelling fixes. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:10 2015 (r282173) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:12 2015 (r282174) @@ -316,7 +316,7 @@ The &man.freebsd-update.8; utility has been updated to prevent fetching updated binary patches when - a previous upgrade has not been throughly completed. + a previous upgrade has not been thoroughly completed. The &man.netstat.1; utility has been @@ -583,7 +583,7 @@ - Avoids unecessary throttling by not deferring + Avoids unnecessary throttling by not deferring accounting for completed requests. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E03DA273; Tue, 28 Apr 2015 18:11:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B69B51236; Tue, 28 Apr 2015 18:11:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIB1IU024651; Tue, 28 Apr 2015 18:11:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIB1gN024646; Tue, 28 Apr 2015 18:11:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIB1gN024646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282169 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:02 -0000 Author: gjb Date: Tue Apr 28 18:11:00 2015 New Revision: 282169 URL: https://svnweb.freebsd.org/changeset/base/282169 Log: Document r280930, several RPC fixes. Add MIT AI Lab to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:10:58 2015 (r282168) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:00 2015 (r282169) @@ -567,6 +567,26 @@ A bug in &man.ipfw.4; that could potentially lead to a kernel panic when using &man.dummynet.4; at layer 2 has been fixed. + + The + kernel RPC has been updated to include + several enhancements: + + + + The 45 MiB limit on requests queued for + &man.nfsd.8; threads has been removed. + + + + Avoids unecessary throttling by not deferring + accounting for completed requests. + + + + Fixes an integer overflow and signedness bugs. + + Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Tue Apr 28 18:10:58 2015 (r282168) +++ head/release/doc/share/xml/sponsor.ent Tue Apr 28 18:11:00 2015 (r282169) @@ -30,6 +30,8 @@ + + From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 922814A4; Tue, 28 Apr 2015 18:11:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 816641243; Tue, 28 Apr 2015 18:11:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIB8uB024849; Tue, 28 Apr 2015 18:11:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIB8rw024848; Tue, 28 Apr 2015 18:11:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIB8rw024848@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282172 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:08 -0000 Author: gjb Date: Tue Apr 28 18:11:07 2015 New Revision: 282172 URL: https://svnweb.freebsd.org/changeset/base/282172 Log: Fix revision for GELI prompt support in the loader. The initial commit was reverted (without a useful commit message), and committed again as r281616. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:05 2015 (r282171) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:07 2015 (r282172) @@ -970,7 +970,7 @@ entering set kern.vty=sc at the &man.loader.8; prompt. - The boot loader has been updated to + The boot loader has been updated to support entering the GELI passphrase before loading the kernel. To enable this behavior, add geom_eli_passphrase_prompt="YES" to From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 585A768F; Tue, 28 Apr 2015 18:11:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 477E8124C; Tue, 28 Apr 2015 18:11:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBBUj024907; Tue, 28 Apr 2015 18:11:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBAHE024905; Tue, 28 Apr 2015 18:11:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBAHE024905@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282173 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:11 -0000 Author: gjb Date: Tue Apr 28 18:11:10 2015 New Revision: 282173 URL: https://svnweb.freebsd.org/changeset/base/282173 Log: Document r280971, support for RFC6864. Add Netflix and Nginx to the sponsors.ent file. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:07 2015 (r282172) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:10 2015 (r282173) @@ -1070,6 +1070,13 @@ + + Support for IP + identification for atomic datagrams (RFC + 6864) has been added. Support for this feature can be toggled + with the net.inet.ip.rfc6864 + &man.sysctl.8;, which is enabled by default. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Tue Apr 28 18:11:07 2015 (r282172) +++ head/release/doc/share/xml/sponsor.ent Tue Apr 28 18:11:10 2015 (r282173) @@ -32,7 +32,9 @@ + + From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBB49289; Tue, 28 Apr 2015 18:11:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAD761272; Tue, 28 Apr 2015 18:11:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBUaf027314; Tue, 28 Apr 2015 18:11:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBUrG027313; Tue, 28 Apr 2015 18:11:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBUrG027313@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282182 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:31 -0000 Author: gjb Date: Tue Apr 28 18:11:30 2015 New Revision: 282182 URL: https://svnweb.freebsd.org/changeset/base/282182 Log: Update the svn revision marker. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:27 2015 (r282181) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:30 2015 (r282182) @@ -22,7 +22,7 @@ $FreeBSD$ - + 2015 From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3C02A07; Tue, 28 Apr 2015 18:11:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9395B1251; Tue, 28 Apr 2015 18:11:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBF11025004; Tue, 28 Apr 2015 18:11:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBFWV025003; Tue, 28 Apr 2015 18:11:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBFWV025003@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282175 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:15 -0000 Author: gjb Date: Tue Apr 28 18:11:14 2015 New Revision: 282175 URL: https://svnweb.freebsd.org/changeset/base/282175 Log: Fix a whitespace nit. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:12 2015 (r282174) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:14 2015 (r282175) @@ -908,6 +908,7 @@ General Storage + The &man.ctl.4; LUN mapping has been rewritten, replacing iSCSI-specific mapping mechanisms From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5301E32A; Tue, 28 Apr 2015 18:11:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 426B61277; Tue, 28 Apr 2015 18:11:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBXGU028007; Tue, 28 Apr 2015 18:11:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBX5P028006; Tue, 28 Apr 2015 18:11:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBX5P028006@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282183 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:33 -0000 Author: gjb Date: Tue Apr 28 18:11:32 2015 New Revision: 282183 URL: https://svnweb.freebsd.org/changeset/base/282183 Log: Document r280870, fix directory inclusion when '--one-file-system' is specified. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:30 2015 (r282182) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:32 2015 (r282183) @@ -323,6 +323,11 @@ updated to link against the &man.libxo.3; shared library. + A regression in the &man.libarchive.3; + library that would prevent a directory from being included in + the archive when --one-file-system is used + has been fixed. + The &man.ar.1; utility has been updated to set ARCHIVE_EXTRACT_SECURE_SYMLINKS and From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FABE422; Tue, 28 Apr 2015 18:11:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EED3127A; Tue, 28 Apr 2015 18:11:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBZD1028077; Tue, 28 Apr 2015 18:11:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBZBe028076; Tue, 28 Apr 2015 18:11:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBZBe028076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282184 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:35 -0000 Author: gjb Date: Tue Apr 28 18:11:34 2015 New Revision: 282184 URL: https://svnweb.freebsd.org/changeset/base/282184 Log: Document r281396, ACPI update to 20150410. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:32 2015 (r282183) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:34 2015 (r282184) @@ -409,9 +409,6 @@ The &man.xz.1; utility has been updated to support multi-threaded compression. - The &man.acpi.4; subsystem has been - updated to version 20150204. - The elftoolchain utilities have been updated to version 3179. @@ -422,6 +419,9 @@ The &man.nvi.1; utility has been updated to version 2.1.3. + The &man.acpi.4; subsystem has been + updated to version 20150410. + The &man.wpa.supplicant.8; and &man.hostapd.8; utilties have been updated to version 2.4. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 896645F9; Tue, 28 Apr 2015 18:11:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BCA4127E; Tue, 28 Apr 2015 18:11:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBbQ3028158; Tue, 28 Apr 2015 18:11:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBbcJ028156; Tue, 28 Apr 2015 18:11:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBbcJ028156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282185 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:37 -0000 Author: gjb Date: Tue Apr 28 18:11:36 2015 New Revision: 282185 URL: https://svnweb.freebsd.org/changeset/base/282185 Log: Document r281387, hptnr(4) driver updated to version 1.1.1. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:34 2015 (r282184) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:36 2015 (r282185) @@ -755,6 +755,9 @@ The asr(4) driver has been removed, and is no longer supported. + + The &man.hptnr.4; driver has been + updated to version 1.1.1. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:24 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4929CF07; Tue, 28 Apr 2015 18:11:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38D4C1261; Tue, 28 Apr 2015 18:11:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBO1C025280; Tue, 28 Apr 2015 18:11:24 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBOMF025279; Tue, 28 Apr 2015 18:11:24 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBOMF025279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282179 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:24 -0000 Author: gjb Date: Tue Apr 28 18:11:23 2015 New Revision: 282179 URL: https://svnweb.freebsd.org/changeset/base/282179 Log: Document r281439, support for the 'virt' QEMU SoC. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:21 2015 (r282178) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:23 2015 (r282179) @@ -894,6 +894,10 @@ The &man.bhyve.8; hypervisor has been updated to support DSM TRIM commands for virtual AHCI disks. + + Support for the + QEMU virt system + has been added. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 18:11:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF1B321A; Tue, 28 Apr 2015 18:11:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF00B126D; Tue, 28 Apr 2015 18:11:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SIBSEE027273; Tue, 28 Apr 2015 18:11:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SIBSiM027272; Tue, 28 Apr 2015 18:11:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504281811.t3SIBSiM027272@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 18:11:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282181 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 18:11:28 -0000 Author: gjb Date: Tue Apr 28 18:11:27 2015 New Revision: 282181 URL: https://svnweb.freebsd.org/changeset/base/282181 Log: Document r281845, file verification support in MAC. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:25 2015 (r282180) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 18:11:27 2015 (r282181) @@ -546,6 +546,9 @@ attributes, such as __result_use_check(), __alloc_size(), and __nonnull(). + + Support for file verification in + MAC has been added. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 19:15:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15C03921; Tue, 28 Apr 2015 19:15:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04A511A2D; Tue, 28 Apr 2015 19:15:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SJFSgK060860; Tue, 28 Apr 2015 19:15:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SJFS9p060859; Tue, 28 Apr 2015 19:15:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504281915.t3SJFS9p060859@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 28 Apr 2015 19:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282198 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 19:15:29 -0000 Author: ngie Date: Tue Apr 28 19:15:28 2015 New Revision: 282198 URL: https://svnweb.freebsd.org/changeset/base/282198 Log: Followup to r282083: add GCC_BOOTSTRAP to the list of broken options on arm64 Differential Revision: https://reviews.freebsd.org/D2379 Reviewed by: imp Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Tue Apr 28 18:12:10 2015 (r282197) +++ head/share/mk/src.opts.mk Tue Apr 28 19:15:28 2015 (r282198) @@ -233,7 +233,7 @@ __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .endif .if ${__T} == "aarch64" -BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GDB +BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB .endif # LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 .if ${__T} == "arm" || ${__T} == "armeb" From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 19:21:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA46BC17; Tue, 28 Apr 2015 19:21:34 +0000 (UTC) Received: from mail-ob0-x235.google.com (mail-ob0-x235.google.com [IPv6:2607:f8b0:4003:c01::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 876CF1B25; Tue, 28 Apr 2015 19:21:34 +0000 (UTC) Received: by obbeb7 with SMTP id eb7so3931058obb.3; Tue, 28 Apr 2015 12:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=9q9xSW31J/PsbTKSn0Y8QCHb5ePelfz2HLtBBL6L8H4=; b=TazZQcWb9aW5yt7VS7RwJ4dunLbIyEwS9pvFfOfxa7rATtGdOCCT3gWFZokHhDvN1q +QUfHfKIjhv8NRHdNuo1bnidIu5Qdp0fuusdhZOCjL4HTw1SZ77g5tPO7+TTIWMK7tOb +a9dxYjjqViZ+q553/7S9u58cs0CkeHL9bO+8CV2Zv9Ky8e56GierR7h1eAPNentq8ik nPLYQ5XjPYNR+DtR1NrOq88C23jw1YVsLAuduAEKdiKkh47lFtqGnAdexCEmJbQaej6b WfSC6kvd1W/rgXFo6pvTloUPhKp+/xxuwDLAIltxslwj19XBLpIVNAGpgGxgybefrK9s FYDw== X-Received: by 10.202.78.66 with SMTP id c63mr15055561oib.0.1430248893728; Tue, 28 Apr 2015 12:21:33 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:18c2:d415:1263:eb4c? ([2601:8:ab80:7d6:18c2:d415:1263:eb4c]) by mx.google.com with ESMTPSA id w81sm13732577oia.6.2015.04.28.12.21.32 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 Apr 2015 12:21:33 -0700 (PDT) Subject: Re: svn commit: r282156 - head Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F687196A-608A-4961-84AE-28BB09776064"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <20150428190445.798316bb@bender> Date: Tue, 28 Apr 2015 12:21:29 -0700 Cc: Ed Maste , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <201504281713.t3SHD5UW096783@svn.freebsd.org> <42F6A579-082C-4159-8E16-1C8B69B0A3AE@gmail.com> <20150428190445.798316bb@bender> To: Andrew Turner X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 19:21:34 -0000 --Apple-Mail=_F687196A-608A-4961-84AE-28BB09776064 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Apr 28, 2015, at 11:04, Andrew Turner wrote: > On Tue, 28 Apr 2015 10:53:57 -0700 > Garrett Cooper wrote: =85 >> Why just amd64/arm here? >=20 > You're missing part of the line, it contains all architectures with > arm64 being optional: >=20 > +TARGETS?=3Damd64 arm ${UNIVERSE_arm64} i386 mips pc98 powerpc sparc64 Hi Andrew, Oh, ok. It was a bit hard for me to read :/... I had a different change I was going to post up on Phabricator (pasted = below). The goal of my diff was two-fold: - allow people to override the universe target (in this case = universe_arm64) to skip the one generated for make universe below. - always add arm64, but enable universe_arm64 only if binutils was = installed on the build host. I could do the equivalent for the TARGET_ARCHES loop if desired. Thanks! -NGie $ svn diff Makefile Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile (revision 282108) +++ Makefile (working copy) @@ -373,19 +373,15 @@ # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) || = make(targets) -TARGETS?=3Damd64 arm i386 mips pc98 powerpc sparc64 +TARGETS?=3Damd64 arm arm64 i386 mips pc98 powerpc sparc64 # XXX Add arm64 to universe only if we have an external binutils = installed. # It does not build with the in-tree linker. -.if exists(/usr/local/aarch64-freebsd/bin/ld) -TARGETS+=3Darm64 -TARGET_ARCHES_arm64?=3D aarch64 -.else -universe: universe_arm64_skip -universe_epilogue: universe_arm64_skip -universe_arm64_skip: universe_prologue +.if !exists(/usr/local/aarch64-freebsd/bin/ld) +universe_arm64: @echo ">> arm64 skipped - install aarch64-binutils port or = package to build" .endif TARGET_ARCHES_arm?=3D arm armeb armv6 armv6hf +TARGET_ARCHES_arm64?=3D aarch64 TARGET_ARCHES_mips?=3D mipsel mips mips64el mips64 mipsn32 TARGET_ARCHES_powerpc?=3D powerpc powerpc64 TARGET_ARCHES_pc98?=3D i386 @@ -427,6 +423,7 @@ .for target in ${TARGETS} universe: universe_${target} universe_epilogue: universe_${target} +.if !target(universe_${target}) universe_${target}: universe_${target}_prologue universe_${target}_prologue: universe_prologue @echo ">> ${target} started on `LC_ALL=3DC date`" @@ -454,6 +451,7 @@ .endfor .endif universe_${target}: universe_${target}_kernels +.endif universe_${target}_kernels: universe_${target}_prologue .MAKE .if exists(${KERNSRCDIR}/${target}/conf/NOTES) @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=3D/dev/null = \ --Apple-Mail=_F687196A-608A-4961-84AE-28BB09776064 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVP926AAoJEMZr5QU6S73e+TwH/1nvWNYNlGcsTp51m75fzRyE IXSCMoXjddDS3aJ7s7uR/VumQPeoYX/I0fqlMTPNQoQug8oiRukDHgW82BUyhaN0 23cSYWomqrCZBIOgjlWgWxIP4LS/1BkxrSC6LJgXSB2rEZrV9+FgFENq1+Wdcq5B jYHGyqhWFU/T1dLF0hDi6nlvF/I4P8OlLUGBiD+QIo4OdIRGO9VCMyk3ePjF2o5o o96LS/hkhmxFw8AEUZwHR/f+Xx8wEgvGm3fo6OCKSQvagNKT9nCtX58JiICgMlpf 0DmCteQ1iz+4OnLJYV6avnC0WCHCqRNCDIHHLtJVMjIfJgWn7xApuMasw/acABI= =BlYZ -----END PGP SIGNATURE----- --Apple-Mail=_F687196A-608A-4961-84AE-28BB09776064-- From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 20:33:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A7A6FEE; Tue, 28 Apr 2015 20:33:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EF3C1324; Tue, 28 Apr 2015 20:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SKXWhd000418; Tue, 28 Apr 2015 20:33:32 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SKXVmO000415; Tue, 28 Apr 2015 20:33:31 GMT (envelope-from br@FreeBSD.org) Message-Id: <201504282033.t3SKXVmO000415@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 28 Apr 2015 20:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282200 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 20:33:32 -0000 Author: br Date: Tue Apr 28 20:33:31 2015 New Revision: 282200 URL: https://svnweb.freebsd.org/changeset/base/282200 Log: o Fix bus_space_read_multi functions: correct increment value o Use these functions for streaming Tested with ATA (PCI bus) / Gem5 simulator Reviewed by: andrew Sponsored by: HEIF5 Modified: head/sys/arm64/arm64/bus_machdep.c head/sys/arm64/arm64/bus_space_asm.S Modified: head/sys/arm64/arm64/bus_machdep.c ============================================================================== --- head/sys/arm64/arm64/bus_machdep.c Tue Apr 28 19:35:05 2015 (r282199) +++ head/sys/arm64/arm64/bus_machdep.c Tue Apr 28 20:33:31 2015 (r282200) @@ -169,10 +169,10 @@ struct bus_space memmap_bus = { .bs_r_8_s = NULL, /* read multiple stream */ - .bs_rm_1_s = NULL, - .bs_rm_2_s = NULL, - .bs_rm_4_s = NULL, - .bs_rm_8_s = NULL, + .bs_rm_1_s = generic_bs_rm_1, + .bs_rm_2_s = generic_bs_rm_2, + .bs_rm_4_s = generic_bs_rm_4, + .bs_rm_8_s = generic_bs_rm_8, /* read region stream */ .bs_rr_1_s = NULL, @@ -187,10 +187,10 @@ struct bus_space memmap_bus = { .bs_w_8_s = NULL, /* write multiple stream */ - .bs_wm_1_s = NULL, - .bs_wm_2_s = NULL, - .bs_wm_4_s = NULL, - .bs_wm_8_s = NULL, + .bs_wm_1_s = generic_bs_wm_1, + .bs_wm_2_s = generic_bs_wm_2, + .bs_wm_4_s = generic_bs_wm_4, + .bs_wm_8_s = generic_bs_wm_8, /* write region stream */ .bs_wr_1_s = NULL, Modified: head/sys/arm64/arm64/bus_space_asm.S ============================================================================== --- head/sys/arm64/arm64/bus_space_asm.S Tue Apr 28 19:35:05 2015 (r282199) +++ head/sys/arm64/arm64/bus_space_asm.S Tue Apr 28 20:33:31 2015 (r282200) @@ -63,7 +63,7 @@ ENTRY(generic_bs_rm_1) /* Read the data. */ 1: ldrb w1, [x0] - strb w1, [x3], #2 + strb w1, [x3], #1 subs x4, x4, #1 b.ne 1b @@ -105,7 +105,7 @@ ENTRY(generic_bs_rm_4) /* Read the data. */ 1: ldr w1, [x0] - str w1, [x3], #2 + str w1, [x3], #4 subs x4, x4, #1 b.ne 1b @@ -126,7 +126,7 @@ ENTRY(generic_bs_rm_8) /* Read the data. */ 1: ldr x1, [x0] - str x1, [x3], #2 + str x1, [x3], #8 subs x4, x4, #1 b.ne 1b From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 21:32:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A0E28BB; Tue, 28 Apr 2015 21:32:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AFB719CB; Tue, 28 Apr 2015 21:32:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SLWUIS029660; Tue, 28 Apr 2015 21:32:30 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SLWSfR029647; Tue, 28 Apr 2015 21:32:28 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504282132.t3SLWSfR029647@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 28 Apr 2015 21:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282201 - in head: contrib/gcclibs/libgomp contrib/gcclibs/libgomp/config/bsd gnu/lib/libgomp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 21:32:30 -0000 Author: pfg Date: Tue Apr 28 21:32:27 2015 New Revision: 282201 URL: https://svnweb.freebsd.org/changeset/base/282201 Log: libgomp: bring initial BSD support from upstream. Initial support for FreeBSD specific routines related to counting online processors and dynamic load balancing. Fix "detection" of the header which upstream seems to have done wrong. Obtained from: GCC pre-4.4 branch (rev. 140497; LGPLv2.1+) Added: head/contrib/gcclibs/libgomp/ChangeLog.gcc44 head/contrib/gcclibs/libgomp/config/bsd/ head/contrib/gcclibs/libgomp/config/bsd/proc.c (contents, props changed) Modified: head/contrib/gcclibs/libgomp/config.h.in head/contrib/gcclibs/libgomp/configure head/contrib/gcclibs/libgomp/configure.ac head/contrib/gcclibs/libgomp/configure.tgt head/gnu/lib/libgomp/config.h Added: head/contrib/gcclibs/libgomp/ChangeLog.gcc44 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcclibs/libgomp/ChangeLog.gcc44 Tue Apr 28 21:32:27 2015 (r282201) @@ -0,0 +1,8 @@ +2008-09-19 Jakub Jelinek (r140497) + Andreas Tobler + + * config/bsd/proc.c: New file. + * configure.tgt (*-*-darwin*): Use config_path "darwin posix". + * configure.ac: Check for header + * configure: Regenerate. + * config.h.in: Likewise. Modified: head/contrib/gcclibs/libgomp/config.h.in ============================================================================== --- head/contrib/gcclibs/libgomp/config.h.in Tue Apr 28 20:33:31 2015 (r282200) +++ head/contrib/gcclibs/libgomp/config.h.in Tue Apr 28 21:32:27 2015 (r282201) @@ -57,6 +57,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSCTL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H Added: head/contrib/gcclibs/libgomp/config/bsd/proc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcclibs/libgomp/config/bsd/proc.c Tue Apr 28 21:32:27 2015 (r282201) @@ -0,0 +1,117 @@ +/* Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. + Contributed by Richard Henderson . + + This file is part of the GNU OpenMP Library (libgomp). + + Libgomp is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for + more details. + + You should have received a copy of the GNU Lesser General Public License + along with libgomp; see the file COPYING.LIB. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ + +/* As a special exception, if you link this library with other files, some + of which are compiled with GCC, to produce an executable, this library + does not by itself cause the resulting executable to be covered by the + GNU General Public License. This exception does not however invalidate + any other reasons why the executable file might be covered by the GNU + General Public License. */ + +/* This file contains system specific routines related to counting + online processors and dynamic load balancing. It is expected that + a system may well want to write special versions of each of these. + + The following implementation uses a mix of POSIX and BSD routines. */ + +#include "libgomp.h" +#include +#include +#ifdef HAVE_GETLOADAVG +# ifdef HAVE_SYS_LOADAVG_H +# include +# endif +#endif +#ifdef HAVE_SYS_SYSCTL_H +# include +#endif + +static int +get_num_procs (void) +{ +#ifdef _SC_NPROCESSORS_ONLN + return sysconf (_SC_NPROCESSORS_ONLN); +#elif defined HW_NCPU + int ncpus = 1; + size_t len = sizeof(ncpus); + sysctl((int[2]) {CTL_HW, HW_NCPU}, 2, &ncpus, &len, NULL, 0); + return ncpus; +#else + return 0; +#endif +} + +/* At startup, determine the default number of threads. It would seem + this should be related to the number of cpus online. */ + +void +gomp_init_num_threads (void) +{ + int ncpus = get_num_procs (); + + if (ncpus > 0) + gomp_global_icv.nthreads_var = ncpus; +} + +/* When OMP_DYNAMIC is set, at thread launch determine the number of + threads we should spawn for this team. */ +/* ??? I have no idea what best practice for this is. Surely some + function of the number of processors that are *still* online and + the load average. Here I use the number of processors online + minus the 15 minute load average. */ + +unsigned +gomp_dynamic_max_threads (void) +{ + unsigned n_onln, loadavg; + unsigned nthreads_var = gomp_icv (false)->nthreads_var; + + n_onln = get_num_procs (); + if (!n_onln || n_onln > nthreads_var) + n_onln = nthreads_var; + + loadavg = 0; +#ifdef HAVE_GETLOADAVG + { + double dloadavg[3]; + if (getloadavg (dloadavg, 3) == 3) + { + /* Add 0.1 to get a kind of biased rounding. */ + loadavg = dloadavg[2] + 0.1; + } + } +#endif + + if (loadavg >= n_onln) + return 1; + else + return n_onln - loadavg; +} + +int +omp_get_num_procs (void) +{ + int ncpus = get_num_procs (); + if (ncpus <= 0) + ncpus = gomp_icv (false)->nthreads_var; + return ncpus; +} + +ialias (omp_get_num_procs) Modified: head/contrib/gcclibs/libgomp/configure ============================================================================== --- head/contrib/gcclibs/libgomp/configure Tue Apr 28 20:33:31 2015 (r282200) +++ head/contrib/gcclibs/libgomp/configure Tue Apr 28 21:32:27 2015 (r282201) @@ -13428,7 +13428,7 @@ fi -for ac_header in unistd.h semaphore.h sys/loadavg.h sys/time.h +for ac_header in unistd.h semaphore.h sys/loadavg.h sys/sysctl.h sys/time.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then Modified: head/contrib/gcclibs/libgomp/configure.ac ============================================================================== --- head/contrib/gcclibs/libgomp/configure.ac Tue Apr 28 20:33:31 2015 (r282200) +++ head/contrib/gcclibs/libgomp/configure.ac Tue Apr 28 21:32:27 2015 (r282201) @@ -154,7 +154,7 @@ AC_SUBST(libtool_VERSION) # Check header files. AC_STDC_HEADERS AC_HEADER_TIME -AC_CHECK_HEADERS(unistd.h semaphore.h sys/loadavg.h sys/time.h) +AC_CHECK_HEADERS(unistd.h semaphore.h sys/loadavg.h sys/sysctl.h sys/time.h) GCC_HEADER_STDINT(gstdint.h) Modified: head/contrib/gcclibs/libgomp/configure.tgt ============================================================================== --- head/contrib/gcclibs/libgomp/configure.tgt Tue Apr 28 20:33:31 2015 (r282200) +++ head/contrib/gcclibs/libgomp/configure.tgt Tue Apr 28 21:32:27 2015 (r282201) @@ -107,6 +107,10 @@ case "${target}" in XLDFLAGS="${XLDFLAGS} -lposix4" ;; + *-*-darwin*) + config_path="bsd posix" + ;; + *) ;; Modified: head/gnu/lib/libgomp/config.h ============================================================================== --- head/gnu/lib/libgomp/config.h Tue Apr 28 20:33:31 2015 (r282200) +++ head/gnu/lib/libgomp/config.h Tue Apr 28 21:32:27 2015 (r282201) @@ -55,6 +55,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SYSCTL_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 21:57:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70718E28; Tue, 28 Apr 2015 21:57:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E7061C42; Tue, 28 Apr 2015 21:57:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SLvr9g040041; Tue, 28 Apr 2015 21:57:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SLvraW040040; Tue, 28 Apr 2015 21:57:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504282157.t3SLvraW040040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 28 Apr 2015 21:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282202 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 21:57:53 -0000 Author: gjb Date: Tue Apr 28 21:57:52 2015 New Revision: 282202 URL: https://svnweb.freebsd.org/changeset/base/282202 Log: Refine the entry regarding devfs(5) timestamps, as of r280949, devfs(5) updates default to seconds precision. Submitted by: jilles Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 21:32:27 2015 (r282201) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Tue Apr 28 21:57:52 2015 (r282202) @@ -674,11 +674,12 @@ and kern.osreldate are now configurable &man.jail.8; parameters. - The - &man.devfs.5; device filesystem has been changed to disable - updating timestamps for read/write operations. A new - &man.sysctl.8;, vfs.devfs.dotimes has been - added, which when set to a non-zero value, enables updating + The &man.devfs.5; device filesystem has + been changed to update timestamps for read/write operations + using seconds precision. A new &man.sysctl.8;, + vfs.devfs.dotimes has been added, which + when set to a non-zero value, enables default precision timestamps for these operations. From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 22:46:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6EDEC0F; Tue, 28 Apr 2015 22:46:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4C971156; Tue, 28 Apr 2015 22:46:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SMkwin065270; Tue, 28 Apr 2015 22:46:58 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SMkwVd065269; Tue, 28 Apr 2015 22:46:58 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201504282246.t3SMkwVd065269@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 28 Apr 2015 22:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282205 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 22:46:59 -0000 Author: smh Date: Tue Apr 28 22:46:58 2015 New Revision: 282205 URL: https://svnweb.freebsd.org/changeset/base/282205 Log: Fix misuse of input argument in traverse_visitbp In traverse_visitbp(), the input argument dnp is modified in the middle to point to a temporary buffer. Originally this doesn't matter, because no user of TRAVERSE_POST dereferences it. However, in fbeddd6 a piece of code is added dereferencing dnp after the modification, creating a possible bug. We fix this by creating a new local variable cdnp for the DMU_OT_DNODE case, so we don't modify the input argument. Also we introduce different local variables in the DMU_OT_OBJSET case to prevent confusion between the input argument. Obtained from: zfsonlinux (a585f2f844ed3d4270221fed88f5e494eb55d932) MFC after: 2 weeks Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue Apr 28 22:32:52 2015 (r282204) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Tue Apr 28 22:46:58 2015 (r282205) @@ -306,21 +306,22 @@ traverse_visitbp(traverse_data_t *td, co arc_flags_t flags = ARC_FLAG_WAIT; int i; int epb = BP_GET_LSIZE(bp) >> DNODE_SHIFT; + dnode_phys_t *cdnp; err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); if (err != 0) goto post; - dnp = buf->b_data; + cdnp = buf->b_data; for (i = 0; i < epb; i++) { - prefetch_dnode_metadata(td, &dnp[i], zb->zb_objset, + prefetch_dnode_metadata(td, &cdnp[i], zb->zb_objset, zb->zb_blkid * epb + i); } /* recursively visitbp() blocks below this */ for (i = 0; i < epb; i++) { - err = traverse_dnode(td, &dnp[i], zb->zb_objset, + err = traverse_dnode(td, &cdnp[i], zb->zb_objset, zb->zb_blkid * epb + i); if (err != 0) break; @@ -328,7 +329,7 @@ traverse_visitbp(traverse_data_t *td, co } else if (BP_GET_TYPE(bp) == DMU_OT_OBJSET) { arc_flags_t flags = ARC_FLAG_WAIT; objset_phys_t *osp; - dnode_phys_t *dnp; + dnode_phys_t *mdnp, *gdnp, *udnp; err = arc_read(NULL, td->td_spa, bp, arc_getbuf_func, &buf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &flags, zb); @@ -336,26 +337,27 @@ traverse_visitbp(traverse_data_t *td, co goto post; osp = buf->b_data; - dnp = &osp->os_meta_dnode; - prefetch_dnode_metadata(td, dnp, zb->zb_objset, + mdnp = &osp->os_meta_dnode; + gdnp = &osp->os_groupused_dnode; + udnp = &osp->os_userused_dnode; + + prefetch_dnode_metadata(td, mdnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (arc_buf_size(buf) >= sizeof (objset_phys_t)) { - prefetch_dnode_metadata(td, &osp->os_groupused_dnode, - zb->zb_objset, DMU_GROUPUSED_OBJECT); - prefetch_dnode_metadata(td, &osp->os_userused_dnode, - zb->zb_objset, DMU_USERUSED_OBJECT); + prefetch_dnode_metadata(td, gdnp, zb->zb_objset, + DMU_GROUPUSED_OBJECT); + prefetch_dnode_metadata(td, udnp, zb->zb_objset, + DMU_USERUSED_OBJECT); } - err = traverse_dnode(td, dnp, zb->zb_objset, + err = traverse_dnode(td, mdnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { - dnp = &osp->os_groupused_dnode; - err = traverse_dnode(td, dnp, zb->zb_objset, + err = traverse_dnode(td, gdnp, zb->zb_objset, DMU_GROUPUSED_OBJECT); } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { - dnp = &osp->os_userused_dnode; - err = traverse_dnode(td, dnp, zb->zb_objset, + err = traverse_dnode(td, udnp, zb->zb_objset, DMU_USERUSED_OBJECT); } } From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 23:44:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C2C990C; Tue, 28 Apr 2015 23:44:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E162178E; Tue, 28 Apr 2015 23:44:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SNimm4095524; Tue, 28 Apr 2015 23:44:48 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SNil3P095522; Tue, 28 Apr 2015 23:44:47 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504282344.t3SNil3P095522@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 28 Apr 2015 23:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282206 - in head: sys/amd64/vmm/io usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 23:44:48 -0000 Author: neel Date: Tue Apr 28 23:44:47 2015 New Revision: 282206 URL: https://svnweb.freebsd.org/changeset/base/282206 Log: Implement the century byte in the RTC. Some guests require this field to be properly set. Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/sys/amd64/vmm/io/vrtc.c head/usr.sbin/bhyve/acpi.c Modified: head/sys/amd64/vmm/io/vrtc.c ============================================================================== --- head/sys/amd64/vmm/io/vrtc.c Tue Apr 28 22:46:58 2015 (r282205) +++ head/sys/amd64/vmm/io/vrtc.c Tue Apr 28 23:44:47 2015 (r282206) @@ -63,9 +63,12 @@ struct rtcdev { uint8_t reg_b; uint8_t reg_c; uint8_t reg_d; - uint8_t nvram[128 - 14]; + uint8_t nvram[36]; + uint8_t century; + uint8_t nvram2[128 - 51]; } __packed; CTASSERT(sizeof(struct rtcdev) == 128); +CTASSERT(offsetof(struct rtcdev, century) == RTC_CENTURY); struct vrtc { struct vm *vm; @@ -245,6 +248,7 @@ secs_to_rtc(time_t rtctime, struct vrtc rtc->day_of_month = rtcset(rtc, ct.day); rtc->month = rtcset(rtc, ct.mon); rtc->year = rtcset(rtc, ct.year % 100); + rtc->century = rtcset(rtc, ct.year / 100); } static int @@ -274,7 +278,7 @@ rtc_to_secs(struct vrtc *vrtc) struct timespec ts; struct rtcdev *rtc; struct vm *vm; - int error, hour, pm, year; + int century, error, hour, pm, year; KASSERT(VRTC_LOCKED(vrtc), ("%s: vrtc not locked", __func__)); @@ -358,10 +362,14 @@ rtc_to_secs(struct vrtc *vrtc) VM_CTR2(vm, "Invalid RTC year %#x/%d", rtc->year, year); goto fail; } - if (year >= 70) - ct.year = 1900 + year; - else - ct.year = 2000 + year; + + error = rtcget(rtc, rtc->century, ¢ury); + ct.year = century * 100 + year; + if (error || ct.year < POSIX_BASE_YEAR) { + VM_CTR2(vm, "Invalid RTC century %#x/%d", rtc->century, + ct.year); + goto fail; + } error = clock_ct_to_ts(&ct, &ts); if (error || ts.tv_sec < 0) { @@ -373,7 +381,12 @@ rtc_to_secs(struct vrtc *vrtc) } return (ts.tv_sec); /* success */ fail: - return (VRTC_BROKEN_TIME); /* failure */ + /* + * Stop updating the RTC if the date/time fields programmed by + * the guest are invalid. + */ + VM_CTR0(vrtc->vm, "Invalid RTC date/time programming detected"); + return (VRTC_BROKEN_TIME); } static int @@ -628,13 +641,6 @@ vrtc_set_reg_b(struct vrtc *vrtc, uint8_ if ((newval & RTCSB_HALT) == 0) { rtctime = rtc_to_secs(vrtc); if (rtctime == VRTC_BROKEN_TIME) { - /* - * Stop updating the RTC if the date/time - * programmed by the guest is not correct. - */ - VM_CTR0(vrtc->vm, "Invalid RTC date/time " - "programming detected"); - if (rtc_flag_broken_time) return (-1); } @@ -777,7 +783,7 @@ vrtc_nvram_write(struct vm *vm, int offs * Don't allow writes to RTC control registers or the date/time fields. */ if (offset < offsetof(struct rtcdev, nvram[0]) || - offset >= sizeof(struct rtcdev)) { + offset == RTC_CENTURY || offset >= sizeof(struct rtcdev)) { VM_CTR1(vrtc->vm, "RTC nvram write to invalid offset %d", offset); return (EINVAL); @@ -811,7 +817,7 @@ vrtc_nvram_read(struct vm *vm, int offse /* * Update RTC date/time fields if necessary. */ - if (offset < 10) { + if (offset < 10 || offset == RTC_CENTURY) { curtime = vrtc_curtime(vrtc); secs_to_rtc(curtime, vrtc, 0); } @@ -872,13 +878,17 @@ vrtc_data_handler(struct vm *vm, int vcp curtime = vrtc_curtime(vrtc); vrtc_time_update(vrtc, curtime); - if (in) { - /* - * Update RTC date/time fields if necessary. - */ - if (offset < 10) - secs_to_rtc(curtime, vrtc, 0); + /* + * Update RTC date/time fields if necessary. + * + * This is not just for reads of the RTC. The side-effect of writing + * the century byte requires other RTC date/time fields (e.g. sec) + * to be updated here. + */ + if (offset < 10 || offset == RTC_CENTURY) + secs_to_rtc(curtime, vrtc, 0); + if (in) { if (offset == 12) { /* * XXX @@ -922,6 +932,18 @@ vrtc_data_handler(struct vm *vm, int vcp *((uint8_t *)rtc + offset) = *val; break; } + + /* + * XXX some guests (e.g. OpenBSD) write the century byte + * outside of RTCSB_HALT so re-calculate the RTC date/time. + */ + if (offset == RTC_CENTURY && !rtc_halted(vrtc)) { + curtime = rtc_to_secs(vrtc); + error = vrtc_time_update(vrtc, curtime); + KASSERT(!error, ("vrtc_time_update error %d", error)); + if (curtime == VRTC_BROKEN_TIME && rtc_flag_broken_time) + error = -1; + } } VRTC_UNLOCK(vrtc); return (error); Modified: head/usr.sbin/bhyve/acpi.c ============================================================================== --- head/usr.sbin/bhyve/acpi.c Tue Apr 28 22:46:58 2015 (r282205) +++ head/usr.sbin/bhyve/acpi.c Tue Apr 28 23:44:47 2015 (r282206) @@ -386,7 +386,7 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, "[0001]\t\tDuty Cycle Width : 00\n"); EFPRINTF(fp, "[0001]\t\tRTC Day Alarm Index : 00\n"); EFPRINTF(fp, "[0001]\t\tRTC Month Alarm Index : 00\n"); - EFPRINTF(fp, "[0001]\t\tRTC Century Index : 00\n"); + EFPRINTF(fp, "[0001]\t\tRTC Century Index : 32\n"); EFPRINTF(fp, "[0002]\t\tBoot Flags (decoded below) : 0000\n"); EFPRINTF(fp, "\t\t\tLegacy Devices Supported (V2) : 0\n"); EFPRINTF(fp, "\t\t\t8042 Present on ports 60/64 (V2) : 0\n"); From owner-svn-src-head@FreeBSD.ORG Tue Apr 28 23:54:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30DA7B68; Tue, 28 Apr 2015 23:54:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F04E18B7; Tue, 28 Apr 2015 23:54:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3SNstIh000568; Tue, 28 Apr 2015 23:54:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3SNstLT000566; Tue, 28 Apr 2015 23:54:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201504282354.t3SNstLT000566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 28 Apr 2015 23:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282207 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 23:54:56 -0000 Author: imp Date: Tue Apr 28 23:54:55 2015 New Revision: 282207 URL: https://svnweb.freebsd.org/changeset/base/282207 Log: Only include CWARNFLAGS once to reduce command line size from ~1400 characters to "only" ~900 for kernel builds. Modified: head/sys/conf/kern.mk head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Apr 28 23:44:47 2015 (r282206) +++ head/sys/conf/kern.mk Tue Apr 28 23:54:55 2015 (r282207) @@ -187,7 +187,7 @@ CFLAGS+= -fstack-protector CFLAGS+= -gdwarf-2 .endif -CFLAGS+= ${CWARNEXTRA} ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}} +CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}} CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC:T}} # Tell bmake not to mistake standard targets for things to be searched for Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Apr 28 23:44:47 2015 (r282206) +++ head/sys/conf/kern.pre.mk Tue Apr 28 23:54:55 2015 (r282207) @@ -87,7 +87,7 @@ INCLUDES+= -I$S/dev/cxgb -I$S/dev/cxgbe .endif -CFLAGS= ${COPTFLAGS} ${DEBUG} ${CWARNFLAGS} +CFLAGS= ${COPTFLAGS} ${DEBUG} CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 00:49:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C0D1531; Wed, 29 Apr 2015 00:49:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68EA71E04; Wed, 29 Apr 2015 00:49:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3T0n36G026879; Wed, 29 Apr 2015 00:49:03 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3T0n1Bx026860; Wed, 29 Apr 2015 00:49:01 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201504290049.t3T0n1Bx026860@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 29 Apr 2015 00:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282208 - in head: . bin/chflags bin/chmod usr.sbin/chown X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 00:49:03 -0000 Author: smh Date: Wed Apr 29 00:49:00 2015 New Revision: 282208 URL: https://svnweb.freebsd.org/changeset/base/282208 Log: Standardise chmod, chflags, chown and chgrp recursive symlink processing chmod, chflags, chgrp, chmod and chown now affect symlinks in -R mode as defined in symlink(7); previously symlinks were silently ignored. Differential Revision: https://reviews.freebsd.org/D2316 Reviewed by: jilles MFC after: 1 month Relnotes: yes Sponsored by: Multiplay Modified: head/UPDATING head/bin/chflags/chflags.1 head/bin/chflags/chflags.c head/bin/chmod/chmod.1 head/bin/chmod/chmod.c head/usr.sbin/chown/chgrp.1 head/usr.sbin/chown/chown.8 head/usr.sbin/chown/chown.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Apr 28 23:54:55 2015 (r282207) +++ head/UPDATING Wed Apr 29 00:49:00 2015 (r282208) @@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150523: + chmod, chflags, chown and chgrp now affect symlinks in -R mode as + defined in symlink(7); previously symlinks were silently ignored. + 20150415: The const qualifier has been removed from iconv(3) to comply with POSIX. The ports tree is aware of this from r384038 onwards. Modified: head/bin/chflags/chflags.1 ============================================================================== --- head/bin/chflags/chflags.1 Tue Apr 28 23:54:55 2015 (r282207) +++ head/bin/chflags/chflags.1 Wed Apr 29 00:49:00 2015 (r282208) @@ -32,7 +32,7 @@ .\" @(#)chflags.1 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd April 8, 2013 +.Dd April 20, 2015 .Dt CHFLAGS 1 .Os .Sh NAME @@ -66,8 +66,9 @@ nor modify the exit status to reflect su .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during traversal are not followed.) .It Fl h If the .Ar file @@ -83,8 +84,12 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the file flags for the file hierarchies rooted -in the files instead of just the files themselves. +Change the file flags of the file hierarchies rooted in the files, +instead of just the files themselves. +Beware of unintentionally matching the +.Dq Pa ".." +hard link to the parent directory when using wildcards like +.Dq Li ".*" . .It Fl v Cause .Nm Modified: head/bin/chflags/chflags.c ============================================================================== --- head/bin/chflags/chflags.c Tue Apr 28 23:54:55 2015 (r282207) +++ head/bin/chflags/chflags.c Wed Apr 29 00:49:00 2015 (r282208) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -65,7 +66,6 @@ main(int argc, char *argv[]) int Hflag, Lflag, Rflag, fflag, hflag, vflag; int ch, fts_options, oct, rval; char *flags, *ep; - int (*change_flags)(const char *, unsigned long); Hflag = Lflag = Rflag = fflag = hflag = vflag = 0; while ((ch = getopt(argc, argv, "HLPRfhv")) != -1) @@ -104,20 +104,23 @@ main(int argc, char *argv[]) usage(); if (Rflag) { - fts_options = FTS_PHYSICAL; if (hflag) - errx(1, "the -R and -h options " - "may not be specified together"); - if (Hflag) - fts_options |= FTS_COMFOLLOW; + errx(1, "the -R and -h options may not be " + "specified together."); if (Lflag) { - fts_options &= ~FTS_PHYSICAL; - fts_options |= FTS_LOGICAL; + fts_options = FTS_LOGICAL; + } else { + fts_options = FTS_PHYSICAL; + + if (Hflag) { + fts_options |= FTS_COMFOLLOW; + } } - } else - fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; - - change_flags = hflag ? lchflags : chflags; + } else if (hflag) { + fts_options = FTS_PHYSICAL; + } else { + fts_options = FTS_LOGICAL; + } flags = *argv; if (*flags >= '0' && *flags <= '7') { @@ -142,12 +145,21 @@ main(int argc, char *argv[]) err(1, NULL); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + int atflag; + + if ((fts_options & FTS_LOGICAL) || + ((fts_options & FTS_COMFOLLOW) && + p->fts_level == FTS_ROOTLEVEL)) + atflag = 0; + else + atflag = AT_SYMLINK_NOFOLLOW; + switch (p->fts_info) { case FTS_D: /* Change it at FTS_DP if we're recursive. */ if (!Rflag) fts_set(ftsp, p, FTS_SKIP); continue; - case FTS_DNR: /* Warn, chflag, continue. */ + case FTS_DNR: /* Warn, chflags. */ warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; @@ -156,16 +168,6 @@ main(int argc, char *argv[]) warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; continue; - case FTS_SL: /* Ignore. */ - case FTS_SLNONE: - /* - * The only symlinks that end up here are ones that - * don't point to anything and ones that we found - * doing a physical walk. - */ - if (!hflag) - continue; - /* FALLTHROUGH */ default: break; } @@ -175,7 +177,8 @@ main(int argc, char *argv[]) newflags = (p->fts_statp->st_flags | set) & clear; if (newflags == p->fts_statp->st_flags) continue; - if ((*change_flags)(p->fts_accpath, newflags) && !fflag) { + if (chflagsat(AT_FDCWD, p->fts_accpath, newflags, + atflag) == -1 && !fflag) { warn("%s", p->fts_path); rval = 1; } else if (vflag) { Modified: head/bin/chmod/chmod.1 ============================================================================== --- head/bin/chmod/chmod.1 Tue Apr 28 23:54:55 2015 (r282207) +++ head/bin/chmod/chmod.1 Wed Apr 29 00:49:00 2015 (r282208) @@ -32,7 +32,7 @@ .\" @(#)chmod.1 8.4 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd January 26, 2009 +.Dd April 20, 2015 .Dt CHMOD 1 .Os .Sh NAME @@ -63,9 +63,9 @@ nor modify the exit status to reflect su .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed by -default.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during tree traversal are not followed.) .It Fl h If the file is a symbolic link, change the mode of the link itself rather than the file that the link points to. @@ -79,8 +79,12 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the modes of the file hierarchies rooted in the files +Change the modes of the file hierarchies rooted in the files, instead of just the files themselves. +Beware of unintentionally matching the +.Dq Pa ".." +hard link to the parent directory when using wildcards like +.Dq Li ".*" . .It Fl v Cause .Nm Modified: head/bin/chmod/chmod.c ============================================================================== --- head/bin/chmod/chmod.c Tue Apr 28 23:54:55 2015 (r282207) +++ head/bin/chmod/chmod.c Wed Apr 29 00:49:00 2015 (r282208) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -62,7 +63,7 @@ main(int argc, char *argv[]) FTS *ftsp; FTSENT *p; mode_t *set; - int Hflag, Lflag, Rflag, ch, error, fflag, fts_options, hflag, rval; + int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval; int vflag; char *mode; mode_t newmode; @@ -126,18 +127,23 @@ done: argv += optind; usage(); if (Rflag) { - fts_options = FTS_PHYSICAL; if (hflag) - errx(1, - "the -R and -h options may not be specified together."); - if (Hflag) - fts_options |= FTS_COMFOLLOW; + errx(1, "the -R and -h options may not be " + "specified together."); if (Lflag) { - fts_options &= ~FTS_PHYSICAL; - fts_options |= FTS_LOGICAL; + fts_options = FTS_LOGICAL; + } else { + fts_options = FTS_PHYSICAL; + + if (Hflag) { + fts_options |= FTS_COMFOLLOW; + } } - } else - fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; + } else if (hflag) { + fts_options = FTS_PHYSICAL; + } else { + fts_options = FTS_LOGICAL; + } mode = *argv; if ((set = setmode(mode)) == NULL) @@ -146,12 +152,21 @@ done: argv += optind; if ((ftsp = fts_open(++argv, fts_options, 0)) == NULL) err(1, "fts_open"); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + int atflag; + + if ((fts_options & FTS_LOGICAL) || + ((fts_options & FTS_COMFOLLOW) && + p->fts_level == FTS_ROOTLEVEL)) + atflag = 0; + else + atflag = AT_SYMLINK_NOFOLLOW; + switch (p->fts_info) { case FTS_D: /* Change it at FTS_DP. */ if (!Rflag) fts_set(ftsp, p, FTS_SKIP); continue; - case FTS_DNR: /* Warn, chmod, continue. */ + case FTS_DNR: /* Warn, chmod. */ warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; break; @@ -160,16 +175,6 @@ done: argv += optind; warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; continue; - case FTS_SL: /* Ignore. */ - case FTS_SLNONE: - /* - * The only symlinks that end up here are ones that - * don't point to anything and ones that we found - * doing a physical walk. - */ - if (!hflag) - continue; - /* FALLTHROUGH */ default: break; } @@ -182,32 +187,25 @@ done: argv += optind; if (may_have_nfs4acl(p, hflag) == 0 && (newmode & ALLPERMS) == (p->fts_statp->st_mode & ALLPERMS)) continue; - if (hflag) - error = lchmod(p->fts_accpath, newmode); - else - error = chmod(p->fts_accpath, newmode); - if (error) { - if (!fflag) { - warn("%s", p->fts_path); - rval = 1; - } - } else { - if (vflag) { - (void)printf("%s", p->fts_path); + if (fchmodat(AT_FDCWD, p->fts_accpath, newmode, atflag) == -1 + && !fflag) { + warn("%s", p->fts_path); + rval = 1; + } else if (vflag) { + (void)printf("%s", p->fts_path); - if (vflag > 1) { - char m1[12], m2[12]; + if (vflag > 1) { + char m1[12], m2[12]; - strmode(p->fts_statp->st_mode, m1); - strmode((p->fts_statp->st_mode & - S_IFMT) | newmode, m2); - (void)printf(": 0%o [%s] -> 0%o [%s]", - p->fts_statp->st_mode, m1, - (p->fts_statp->st_mode & S_IFMT) | - newmode, m2); - } - (void)printf("\n"); + strmode(p->fts_statp->st_mode, m1); + strmode((p->fts_statp->st_mode & + S_IFMT) | newmode, m2); + (void)printf(": 0%o [%s] -> 0%o [%s]", + p->fts_statp->st_mode, m1, + (p->fts_statp->st_mode & S_IFMT) | + newmode, m2); } + (void)printf("\n"); } } if (errno) Modified: head/usr.sbin/chown/chgrp.1 ============================================================================== --- head/usr.sbin/chown/chgrp.1 Tue Apr 28 23:54:55 2015 (r282207) +++ head/usr.sbin/chown/chgrp.1 Wed Apr 29 00:49:00 2015 (r282208) @@ -31,7 +31,7 @@ .\" @(#)chgrp.1 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd February 21, 2010 +.Dd April 20, 2015 .Dt CHGRP 1 .Os .Sh NAME @@ -60,8 +60,9 @@ The following options are available: .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during traversal are not followed.) .It Fl L If the .Fl R @@ -72,8 +73,12 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the group ID for the file hierarchies rooted -in the files instead of just the files themselves. +Change the group ID of the file hierarchies rooted in the files, +instead of just the files themselves. +Beware of unintentionally matching the +.Dq Pa ".." +hard link to the parent directory when using wildcards like +.Dq Li ".*" . .It Fl f The force option ignores errors, except for usage errors and does not query about strange modes (unless the user does not have proper permissions). Modified: head/usr.sbin/chown/chown.8 ============================================================================== --- head/usr.sbin/chown/chown.8 Tue Apr 28 23:54:55 2015 (r282207) +++ head/usr.sbin/chown/chown.8 Wed Apr 29 00:49:00 2015 (r282208) @@ -28,7 +28,7 @@ .\" @(#)chown.8 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd February 21, 2010 +.Dd April 20, 2015 .Dt CHOWN 8 .Os .Sh NAME @@ -64,8 +64,9 @@ The options are as follows: .It Fl H If the .Fl R -option is specified, symbolic links on the command line are followed. -(Symbolic links encountered in the tree traversal are not followed.) +option is specified, symbolic links on the command line are followed +and hence unaffected by the command. +(Symbolic links encountered during traversal are not followed.) .It Fl L If the .Fl R @@ -76,8 +77,8 @@ If the option is specified, no symbolic links are followed. This is the default. .It Fl R -Change the user ID and/or the group ID of the specified directory trees -(recursively, including their contents) and files. +Change the user ID and/or the group ID of the file hierarchies rooted +in the files, instead of just the files themselves. Beware of unintentionally matching the .Dq Pa ".." hard link to the parent directory when using wildcards like Modified: head/usr.sbin/chown/chown.c ============================================================================== --- head/usr.sbin/chown/chown.c Tue Apr 28 23:54:55 2015 (r282207) +++ head/usr.sbin/chown/chown.c Wed Apr 29 00:49:00 2015 (r282208) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -119,18 +120,24 @@ main(int argc, char **argv) usage(); if (Rflag) { - fts_options = FTS_PHYSICAL; if (hflag && (Hflag || Lflag)) errx(1, "the -R%c and -h options may not be " "specified together", Hflag ? 'H' : 'L'); - if (Hflag) - fts_options |= FTS_COMFOLLOW; - else if (Lflag) { - fts_options &= ~FTS_PHYSICAL; - fts_options |= FTS_LOGICAL; + if (Lflag) { + fts_options = FTS_LOGICAL; + } else { + fts_options = FTS_PHYSICAL; + + if (Hflag) { + fts_options |= FTS_COMFOLLOW; + } } - } else - fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; + } else if (hflag) { + fts_options = FTS_PHYSICAL; + } else { + fts_options = FTS_LOGICAL; + } + if (xflag) fts_options |= FTS_XDEV; @@ -156,6 +163,15 @@ main(int argc, char **argv) err(1, NULL); for (rval = 0; (p = fts_read(ftsp)) != NULL;) { + int atflag; + + if ((fts_options & FTS_LOGICAL) || + ((fts_options & FTS_COMFOLLOW) && + p->fts_level == FTS_ROOTLEVEL)) + atflag = 0; + else + atflag = AT_SYMLINK_NOFOLLOW; + switch (p->fts_info) { case FTS_D: /* Change it at FTS_DP. */ if (!Rflag) @@ -170,58 +186,44 @@ main(int argc, char **argv) warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1; continue; - case FTS_SL: - case FTS_SLNONE: - /* - * The only symlinks that end up here are ones that - * don't point to anything and ones that we found - * doing a physical walk. - */ - if (hflag) - break; - else - continue; default: break; } if ((uid == (uid_t)-1 || uid == p->fts_statp->st_uid) && (gid == (gid_t)-1 || gid == p->fts_statp->st_gid)) continue; - if ((hflag ? lchown : chown)(p->fts_accpath, uid, gid) == -1) { - if (!fflag) { - chownerr(p->fts_path); - rval = 1; - } - } else { - if (vflag) { - printf("%s", p->fts_path); - if (vflag > 1) { - if (ischown) { - printf(": %ju:%ju -> %ju:%ju", - (uintmax_t) - p->fts_statp->st_uid, - (uintmax_t) - p->fts_statp->st_gid, - (uid == (uid_t)-1) ? - (uintmax_t) - p->fts_statp->st_uid : - (uintmax_t)uid, - (gid == (gid_t)-1) ? - (uintmax_t) - p->fts_statp->st_gid : - (uintmax_t)gid); - } else { - printf(": %ju -> %ju", - (uintmax_t) - p->fts_statp->st_gid, - (gid == (gid_t)-1) ? - (uintmax_t) - p->fts_statp->st_gid : - (uintmax_t)gid); - } + if (fchownat(AT_FDCWD, p->fts_accpath, uid, gid, atflag) + == -1 && !fflag) { + chownerr(p->fts_path); + rval = 1; + } else if (vflag) { + printf("%s", p->fts_path); + if (vflag > 1) { + if (ischown) { + printf(": %ju:%ju -> %ju:%ju", + (uintmax_t) + p->fts_statp->st_uid, + (uintmax_t) + p->fts_statp->st_gid, + (uid == (uid_t)-1) ? + (uintmax_t) + p->fts_statp->st_uid : + (uintmax_t)uid, + (gid == (gid_t)-1) ? + (uintmax_t) + p->fts_statp->st_gid : + (uintmax_t)gid); + } else { + printf(": %ju -> %ju", + (uintmax_t) + p->fts_statp->st_gid, + (gid == (gid_t)-1) ? + (uintmax_t) + p->fts_statp->st_gid : + (uintmax_t)gid); } - printf("\n"); } + printf("\n"); } } if (errno) From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 02:01:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03F75DB9; Wed, 29 Apr 2015 02:01:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCCB215D1; Wed, 29 Apr 2015 02:01:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3T21kZD065109; Wed, 29 Apr 2015 02:01:46 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3T21kMv065108; Wed, 29 Apr 2015 02:01:46 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504290201.t3T21kMv065108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Wed, 29 Apr 2015 02:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282209 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 02:01:47 -0000 Author: neel Date: Wed Apr 29 02:01:46 2015 New Revision: 282209 URL: https://svnweb.freebsd.org/changeset/base/282209 Log: Emulate the 'bit test' instruction. Windows 7 uses 'bit test' to check the 'Delivery Status' bit in APIC ICR register. Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Wed Apr 29 00:49:00 2015 (r282208) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Wed Apr 29 02:01:46 2015 (r282209) @@ -73,6 +73,7 @@ enum { VIE_OP_TYPE_MOVS, VIE_OP_TYPE_GROUP1, VIE_OP_TYPE_STOS, + VIE_OP_TYPE_BITTEST, VIE_OP_TYPE_LAST }; @@ -92,6 +93,11 @@ static const struct vie_op two_byte_opco .op_byte = 0xB7, .op_type = VIE_OP_TYPE_MOVZX, }, + [0xBA] = { + .op_byte = 0xBA, + .op_type = VIE_OP_TYPE_BITTEST, + .op_flags = VIE_OP_F_IMM8, + }, [0xBE] = { .op_byte = 0xBE, .op_type = VIE_OP_TYPE_MOVSX, @@ -1335,6 +1341,48 @@ emulate_group1(void *vm, int vcpuid, uin return (error); } +static int +emulate_bittest(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, + mem_region_read_t memread, mem_region_write_t memwrite, void *memarg) +{ + uint64_t val, rflags; + int error, bitmask, bitoff; + + /* + * 0F BA is a Group 8 extended opcode. + * + * Currently we only emulate the 'Bit Test' instruction which is + * identified by a ModR/M:reg encoding of 100b. + */ + if ((vie->reg & 7) != 4) + return (EINVAL); + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RFLAGS, &rflags); + KASSERT(error == 0, ("%s: error %d getting rflags", __func__, error)); + + error = memread(vm, vcpuid, gpa, &val, vie->opsize, memarg); + if (error) + return (error); + + /* + * Intel SDM, Vol 2, Table 3-2: + * "Range of Bit Positions Specified by Bit Offset Operands" + */ + bitmask = vie->opsize * 8 - 1; + bitoff = vie->immediate & bitmask; + + /* Copy the bit into the Carry flag in %rflags */ + if (val & (1UL << bitoff)) + rflags |= PSL_C; + else + rflags &= ~PSL_C; + + error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RFLAGS, rflags, 8); + KASSERT(error == 0, ("%s: error %d updating rflags", __func__, error)); + + return (0); +} + int vmm_emulate_instruction(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, struct vm_guest_paging *paging, mem_region_read_t memread, @@ -1391,6 +1439,10 @@ vmm_emulate_instruction(void *vm, int vc error = emulate_sub(vm, vcpuid, gpa, vie, memread, memwrite, memarg); break; + case VIE_OP_TYPE_BITTEST: + error = emulate_bittest(vm, vcpuid, gpa, vie, + memread, memwrite, memarg); + break; default: error = EINVAL; break; From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 04:08:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19D90F15; Wed, 29 Apr 2015 04:08:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07D22126D; Wed, 29 Apr 2015 04:08:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3T48HPM027644; Wed, 29 Apr 2015 04:08:17 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3T48Ha7027642; Wed, 29 Apr 2015 04:08:17 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504290408.t3T48Ha7027642@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 29 Apr 2015 04:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282210 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 04:08:18 -0000 Author: adrian Date: Wed Apr 29 04:08:17 2015 New Revision: 282210 URL: https://svnweb.freebsd.org/changeset/base/282210 Log: Constify some const parameters in seq.h. The NUMA work I'm doing uses const for read-only parameters, which requires the seq.h API to also use const for read-only parameters. Reviewed by: mjg Modified: head/sys/sys/seq.h Modified: head/sys/sys/seq.h ============================================================================== --- head/sys/sys/seq.h Wed Apr 29 02:01:46 2015 (r282209) +++ head/sys/sys/seq.h Wed Apr 29 04:08:17 2015 (r282210) @@ -79,7 +79,7 @@ typedef uint32_t seq_t; * on amd64 but still has unnecessary cost. */ static __inline int -atomic_load_rmb_int(volatile u_int *p) +atomic_load_rmb_int(volatile const u_int *p) { volatile u_int v; @@ -89,7 +89,7 @@ atomic_load_rmb_int(volatile u_int *p) } static __inline int -atomic_rmb_load_int(volatile u_int *p) +atomic_rmb_load_int(volatile const u_int *p) { volatile u_int v = 0; @@ -122,7 +122,7 @@ seq_write_end(seq_t *seqp) } static __inline seq_t -seq_read(seq_t *seqp) +seq_read(const seq_t *seqp) { seq_t ret; @@ -139,7 +139,7 @@ seq_read(seq_t *seqp) } static __inline seq_t -seq_consistent(seq_t *seqp, seq_t oldseq) +seq_consistent(const seq_t *seqp, seq_t oldseq) { return (atomic_rmb_load_int(seqp) == oldseq); From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 08:56:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA5D512C; Wed, 29 Apr 2015 08:56:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8E351096; Wed, 29 Apr 2015 08:56:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3T8uuTT070909; Wed, 29 Apr 2015 08:56:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3T8uuHF070908; Wed, 29 Apr 2015 08:56:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504290856.t3T8uuHF070908@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 29 Apr 2015 08:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282211 - head/tests/freebsd_test_suite X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 08:56:57 -0000 Author: ngie Date: Wed Apr 29 08:56:56 2015 New Revision: 282211 URL: https://svnweb.freebsd.org/changeset/base/282211 Log: ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so the testcase no longer bombs out PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the testcase no longer bombs out if it prints to stderr MFC after: 5 days Modified: head/tests/freebsd_test_suite/macros.h Modified: head/tests/freebsd_test_suite/macros.h ============================================================================== --- head/tests/freebsd_test_suite/macros.h Wed Apr 29 04:08:17 2015 (r282210) +++ head/tests/freebsd_test_suite/macros.h Wed Apr 29 08:56:56 2015 (r282211) @@ -32,21 +32,24 @@ #include #include #include -#include #include +#include +#include #include #define ATF_REQUIRE_KERNEL_MODULE(_mod_name) do { \ - ATF_REQUIRE_MSG(modfind(_mod_name) != -1, \ - "module %s could not be resolved: %s", \ - _mod_name, strerror(errno)); \ + if (modfind(_mod_name) == -1) { \ + atf_skip("module %s could not be resolved: %s", \ + _mod_name, strerror(errno)); \ + } \ } while(0) -#define PLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ +#define PLAIN_REQUIRE_KERNEL_MODULE(_mod_name, _exit_code) do { \ if (modfind(_mod_name) == -1) { \ - err(_exit_code, "module %s could not be resolved", \ - _mod_name); \ + printf("module %s could not be resolved: %s\n", \ + _mod_name, strerror(errno)); \ + _exit(_exit_code); \ } \ } while(0) From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 10:12:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C85A9333; Wed, 29 Apr 2015 10:12:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B581419A3; Wed, 29 Apr 2015 10:12:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TACak4009666; Wed, 29 Apr 2015 10:12:36 GMT (envelope-from whu@FreeBSD.org) Received: (from whu@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TACYm0009657; Wed, 29 Apr 2015 10:12:34 GMT (envelope-from whu@FreeBSD.org) Message-Id: <201504291012.t3TACYm0009657@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: whu set sender to whu@FreeBSD.org using -f From: Wei Hu Date: Wed, 29 Apr 2015 10:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282212 - in head/sys: amd64/amd64 amd64/conf conf dev/hyperv/include dev/hyperv/storvsc dev/hyperv/utilities dev/hyperv/vmbus i386/conf i386/i386 x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 10:12:36 -0000 Author: whu Date: Wed Apr 29 10:12:34 2015 New Revision: 282212 URL: https://svnweb.freebsd.org/changeset/base/282212 Log: Microsoft vmbus, storage and other related driver enhancements for HyperV. - Vmbus multi channel support. - Vector interrupt support. - Signal optimization. - Storvsc driver performance improvement. - Scatter and gather support for storvsc driver. - Minor bug fix for KVP driver. Thanks royger, jhb and delphij from FreeBSD community for the reviews and comments. Also thanks Hovy Xu from NetApp for the contributions to the storvsc driver. PR: 195238 Submitted by: whu Reviewed by: royger, jhb, delphij Approved by: royger MFC after: 2 weeks Relnotes: yes Sponsored by: Microsoft OSTC Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/conf/GENERIC head/sys/amd64/conf/NOTES head/sys/conf/options.amd64 head/sys/conf/options.i386 head/sys/dev/hyperv/include/hyperv.h head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c head/sys/dev/hyperv/storvsc/hv_vstorage.h head/sys/dev/hyperv/utilities/hv_kvp.c head/sys/dev/hyperv/utilities/hv_util.c head/sys/dev/hyperv/vmbus/hv_channel.c head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c (contents, props changed) head/sys/dev/hyperv/vmbus/hv_connection.c (contents, props changed) head/sys/dev/hyperv/vmbus/hv_hv.c head/sys/dev/hyperv/vmbus/hv_ring_buffer.c (contents, props changed) head/sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c head/sys/dev/hyperv/vmbus/hv_vmbus_priv.h head/sys/i386/conf/GENERIC head/sys/i386/i386/apic_vector.s head/sys/x86/include/apicvar.h Modified: head/sys/amd64/amd64/apic_vector.S ============================================================================== --- head/sys/amd64/amd64/apic_vector.S Wed Apr 29 08:56:56 2015 (r282211) +++ head/sys/amd64/amd64/apic_vector.S Wed Apr 29 10:12:34 2015 (r282212) @@ -174,6 +174,22 @@ IDTVEC(xen_intr_upcall) jmp doreti #endif +#ifdef HYPERV +/* + * This is the Hyper-V vmbus channel direct callback interrupt. + * Only used when it is running on Hyper-V. + */ + .text + SUPERALIGN_TEXT +IDTVEC(hv_vmbus_callback) + PUSH_FRAME + FAKE_MCOUNT(TF_RIP(%rsp)) + movq %rsp, %rdi + call hv_vector_handler + MEXITCOUNT + jmp doreti +#endif + #ifdef SMP /* * Global address space TLB shootdown. Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed Apr 29 08:56:56 2015 (r282211) +++ head/sys/amd64/conf/GENERIC Wed Apr 29 10:12:34 2015 (r282212) @@ -340,7 +340,9 @@ device virtio_blk # VirtIO Block devic device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device -# HyperV drivers +# HyperV drivers and enchancement support +# NOTE: HYPERV depends on hyperv. They must be added or removed together. +options HYPERV # Hyper-V kernel infrastructure device hyperv # HyperV drivers # Xen HVM Guest Optimizations Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Wed Apr 29 08:56:56 2015 (r282211) +++ head/sys/amd64/conf/NOTES Wed Apr 29 10:12:34 2015 (r282212) @@ -494,6 +494,8 @@ device virtio_balloon # VirtIO Memory B device virtio_random # VirtIO Entropy device device virtio_console # VirtIO Console device +# Microsoft Hyper-V enchancement support +options HYPERV # Hyper-V kernel infrastructure device hyperv # HyperV drivers # Xen HVM Guest Optimizations Modified: head/sys/conf/options.amd64 ============================================================================== --- head/sys/conf/options.amd64 Wed Apr 29 08:56:56 2015 (r282211) +++ head/sys/conf/options.amd64 Wed Apr 29 10:12:34 2015 (r282212) @@ -63,5 +63,7 @@ BPF_JITTER opt_bpf.h XENHVM opt_global.h +HYPERV opt_global.h + # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h Modified: head/sys/conf/options.i386 ============================================================================== --- head/sys/conf/options.i386 Wed Apr 29 08:56:56 2015 (r282211) +++ head/sys/conf/options.i386 Wed Apr 29 10:12:34 2015 (r282212) @@ -125,5 +125,7 @@ NATIVE opt_global.h XEN opt_global.h XENHVM opt_global.h +HYPERV opt_global.h + # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h Modified: head/sys/dev/hyperv/include/hyperv.h ============================================================================== --- head/sys/dev/hyperv/include/hyperv.h Wed Apr 29 08:56:56 2015 (r282211) +++ head/sys/dev/hyperv/include/hyperv.h Wed Apr 29 10:12:34 2015 (r282212) @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -63,11 +64,22 @@ typedef uint8_t hv_bool_uint8_t; #define HV_ERROR_MACHINE_LOCKED 0x800704F7 /* - * A revision number of vmbus that is used for ensuring both ends on a - * partition are using compatible versions. - */ + * VMBUS version is 32 bit, upper 16 bit for major_number and lower + * 16 bit for minor_number. + * + * 0.13 -- Windows Server 2008 + * 1.1 -- Windows 7 + * 2.4 -- Windows 8 + * 3.0 -- Windows 8.1 + */ +#define HV_VMBUS_VERSION_WS2008 ((0 << 16) | (13)) +#define HV_VMBUS_VERSION_WIN7 ((1 << 16) | (1)) +#define HV_VMBUS_VERSION_WIN8 ((2 << 16) | (4)) +#define HV_VMBUS_VERSION_WIN8_1 ((3 << 16) | (0)) -#define HV_VMBUS_REVISION_NUMBER 13 +#define HV_VMBUS_VERSION_INVALID -1 + +#define HV_VMBUS_VERSION_CURRENT HV_VMBUS_VERSION_WIN8_1 /* * Make maximum size of pipe payload of 16K @@ -112,6 +124,18 @@ typedef struct hv_guid { unsigned char data[16]; } __packed hv_guid; +#define HV_NIC_GUID \ + .data = {0x63, 0x51, 0x61, 0xF8, 0x3E, 0xDF, 0xc5, 0x46, \ + 0x91, 0x3F, 0xF2, 0xD2, 0xF9, 0x65, 0xED, 0x0E} + +#define HV_IDE_GUID \ + .data = {0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44, \ + 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5} + +#define HV_SCSI_GUID \ + .data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, \ + 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f} + /* * At the center of the Channel Management library is * the Channel Offer. This struct contains the @@ -147,7 +171,11 @@ typedef struct hv_vmbus_channel_offer { } __packed pipe; } u; - uint32_t padding; + /* + * Sub_channel_index, newly added in Win8. + */ + uint16_t sub_channel_index; + uint16_t padding; } __packed hv_vmbus_channel_offer; @@ -344,7 +372,25 @@ typedef struct { hv_vmbus_channel_offer offer; uint32_t child_rel_id; uint8_t monitor_id; - hv_bool_uint8_t monitor_allocated; + /* + * This field has been split into a bit field on Win7 + * and higher. + */ + uint8_t monitor_allocated:1; + uint8_t reserved:7; + /* + * Following fields were added in win7 and higher. + * Make sure to check the version before accessing these fields. + * + * If "is_dedicated_interrupt" is set, we must not set the + * associated bit in the channel bitmap while sending the + * interrupt to the host. + * + * connection_id is used in signaling the host. + */ + uint16_t is_dedicated_interrupt:1; + uint16_t reserved1:15; + uint32_t connection_id; } __packed hv_vmbus_channel_offer_channel; /* @@ -394,9 +440,11 @@ typedef struct hv_gpadl_handle ring_buffer_gpadl_handle; /* - * GPADL for the channel's server context save area. + * Before win8, all incoming channel interrupts are only + * delivered on cpu 0. Setting this value to 0 would + * preserve the earlier behavior. */ - hv_gpadl_handle server_context_area_gpadl_handle; + uint32_t target_vcpu; /* * The upstream ring buffer begins at offset zero in the memory described @@ -646,14 +694,42 @@ typedef struct { } hv_vmbus_ring_buffer_info; typedef void (*hv_vmbus_pfn_channel_callback)(void *context); +typedef void (*hv_vmbus_sc_creation_callback)(void *context); typedef enum { HV_CHANNEL_OFFER_STATE, HV_CHANNEL_OPENING_STATE, HV_CHANNEL_OPEN_STATE, + HV_CHANNEL_OPENED_STATE, HV_CHANNEL_CLOSING_NONDESTRUCTIVE_STATE, } hv_vmbus_channel_state; +/* + * Connection identifier type + */ +typedef union { + uint32_t as_uint32_t; + struct { + uint32_t id:24; + uint32_t reserved:8; + } u; + +} __packed hv_vmbus_connection_id; + +/* + * Definition of the hv_vmbus_signal_event hypercall input structure + */ +typedef struct { + hv_vmbus_connection_id connection_id; + uint16_t flag_number; + uint16_t rsvd_z; +} __packed hv_vmbus_input_signal_event; + +typedef struct { + uint64_t align8; + hv_vmbus_input_signal_event event; +} __packed hv_vmbus_input_signal_event_buffer; + typedef struct hv_vmbus_channel { TAILQ_ENTRY(hv_vmbus_channel) list_entry; struct hv_device* device; @@ -688,8 +764,82 @@ typedef struct hv_vmbus_channel { hv_vmbus_pfn_channel_callback on_channel_callback; void* channel_callback_context; + /* + * If batched_reading is set to "true", mask the interrupt + * and read until the channel is empty. + * If batched_reading is set to "false", the channel is not + * going to perform batched reading. + * + * Batched reading is enabled by default; specific + * drivers that don't want this behavior can turn it off. + */ + boolean_t batched_reading; + + boolean_t is_dedicated_interrupt; + + /* + * Used as an input param for HV_CALL_SIGNAL_EVENT hypercall. + */ + hv_vmbus_input_signal_event_buffer signal_event_buffer; + /* + * 8-bytes aligned of the buffer above + */ + hv_vmbus_input_signal_event *signal_event_param; + + /* + * From Win8, this field specifies the target virtual process + * on which to deliver the interupt from the host to guest. + * Before Win8, all channel interrupts would only be + * delivered on cpu 0. Setting this value to 0 would preserve + * the earlier behavior. + */ + uint32_t target_vcpu; + /* The corresponding CPUID in the guest */ + uint32_t target_cpu; + + /* + * Support for multi-channels. + * The initial offer is considered the primary channel and this + * offer message will indicate if the host supports multi-channels. + * The guest is free to ask for multi-channels to be offerred and can + * open these multi-channels as a normal "primary" channel. However, + * all multi-channels will have the same type and instance guids as the + * primary channel. Requests sent on a given channel will result in a + * response on the same channel. + */ + + /* + * Multi-channel creation callback. This callback will be called in + * process context when a Multi-channel offer is received from the host. + * The guest can open the Multi-channel in the context of this callback. + */ + hv_vmbus_sc_creation_callback sc_creation_callback; + + struct mtx sc_lock; + + /* + * Link list of all the multi-channels if this is a primary channel + */ + TAILQ_HEAD(, hv_vmbus_channel) sc_list_anchor; + TAILQ_ENTRY(hv_vmbus_channel) sc_list_entry; + + /* + * The primary channel this sub-channle belongs to. + * This will be NULL for the primary channel. + */ + struct hv_vmbus_channel *primary_channel; + /* + * Support per channel state for use by vmbus drivers. + */ + void *per_channel_state; } hv_vmbus_channel; +static inline void +hv_set_channel_read_state(hv_vmbus_channel* channel, boolean_t state) +{ + channel->batched_reading = state; +} + typedef struct hv_device { hv_guid class_id; hv_guid device_id; @@ -760,6 +910,8 @@ int hv_vmbus_channel_teardown_gpdal( hv_vmbus_channel* channel, uint32_t gpadl_handle); +struct hv_vmbus_channel* vmbus_select_outgoing_channel(struct hv_vmbus_channel *promary); + /* * Work abstraction defines */ @@ -819,6 +971,7 @@ typedef struct hv_vmbus_service { extern uint8_t* receive_buffer[]; extern hv_vmbus_service service_table[]; +extern uint32_t hv_vmbus_protocal_version; void hv_kvp_callback(void *context); int hv_kvp_init(hv_vmbus_service *serv); Modified: head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Apr 29 08:56:56 2015 (r282211) +++ head/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Wed Apr 29 10:12:34 2015 (r282212) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -53,8 +54,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include +#include +#include #include #include @@ -66,7 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include - #include #include "hv_vstorage.h" @@ -77,8 +81,29 @@ __FBSDID("$FreeBSD$"); #define BLKVSC_MAX_IO_REQUESTS STORVSC_MAX_IO_REQUESTS #define STORVSC_MAX_TARGETS (2) +#define STORVSC_WIN7_MAJOR 4 +#define STORVSC_WIN7_MINOR 2 + +#define STORVSC_WIN8_MAJOR 5 +#define STORVSC_WIN8_MINOR 1 + +#define HV_ALIGN(x, a) roundup2(x, a) + struct storvsc_softc; +struct hv_sgl_node { + LIST_ENTRY(hv_sgl_node) link; + struct sglist *sgl_data; +}; + +struct hv_sgl_page_pool{ + LIST_HEAD(, hv_sgl_node) in_use_sgl_list; + LIST_HEAD(, hv_sgl_node) free_sgl_list; + boolean_t is_init; +} g_hv_sgl_page_pool; + +#define STORVSC_MAX_SG_PAGE_CNT STORVSC_MAX_IO_REQUESTS * HV_MAX_MULTIPAGE_BUFFER_COUNT + enum storvsc_request_type { WRITE_TYPE, READ_TYPE, @@ -96,20 +121,24 @@ struct hv_storvsc_request { struct storvsc_softc *softc; struct callout callout; struct sema synch_sema; /*Synchronize the request/response if needed */ + struct sglist *bounce_sgl; + unsigned int bounce_sgl_count; + uint64_t not_aligned_seg_bits; }; struct storvsc_softc { struct hv_device *hs_dev; - LIST_HEAD(, hv_storvsc_request) hs_free_list; - struct mtx hs_lock; - struct storvsc_driver_props *hs_drv_props; - int hs_unit; - uint32_t hs_frozen; - struct cam_sim *hs_sim; - struct cam_path *hs_path; + LIST_HEAD(, hv_storvsc_request) hs_free_list; + struct mtx hs_lock; + struct storvsc_driver_props *hs_drv_props; + int hs_unit; + uint32_t hs_frozen; + struct cam_sim *hs_sim; + struct cam_path *hs_path; uint32_t hs_num_out_reqs; boolean_t hs_destroy; boolean_t hs_drain_notify; + boolean_t hs_open_multi_channel; struct sema hs_drain_sema; struct hv_storvsc_request hs_init_req; struct hv_storvsc_request hs_reset_req; @@ -124,7 +153,7 @@ struct storvsc_softc { * The first can be tested by "sg_senddiag -vv /dev/daX", * and the second and third can be done by * "sg_wr_mode -v -p 08 -c 0,1a -m 0,ff /dev/daX". - */ + */ #define HVS_TIMEOUT_TEST 0 /* @@ -138,7 +167,7 @@ struct storvsc_driver_props { char *drv_name; char *drv_desc; uint8_t drv_max_luns_per_target; - uint8_t drv_max_ios_per_target; + uint8_t drv_max_ios_per_target; uint32_t drv_ringbuffer_size; }; @@ -150,6 +179,8 @@ enum hv_storage_type { #define HS_MAX_ADAPTERS 10 +#define HV_STORAGE_SUPPORTS_MULTI_CHANNEL 0x1 + /* {ba6163d9-04a1-4d29-b605-72e2ffb1dc7f} */ static const hv_guid gStorVscDeviceType={ .data = {0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d, @@ -171,13 +202,16 @@ static struct storvsc_driver_props g_drv STORVSC_RINGBUFFER_SIZE} }; +static int storvsc_current_major; +static int storvsc_current_minor; + /* static functions */ static int storvsc_probe(device_t dev); static int storvsc_attach(device_t dev); static int storvsc_detach(device_t dev); static void storvsc_poll(struct cam_sim * sim); static void storvsc_action(struct cam_sim * sim, union ccb * ccb); -static void create_storvsc_request(union ccb *ccb, struct hv_storvsc_request *reqp); +static int create_storvsc_request(union ccb *ccb, struct hv_storvsc_request *reqp); static void storvsc_free_request(struct storvsc_softc *sc, struct hv_storvsc_request *reqp); static enum hv_storage_type storvsc_get_storage_type(device_t dev); static void hv_storvsc_on_channel_callback(void *context); @@ -186,6 +220,14 @@ static void hv_storvsc_on_iocompletion( struct hv_storvsc_request *request); static int hv_storvsc_connect_vsp(struct hv_device *device); static void storvsc_io_done(struct hv_storvsc_request *reqp); +static void storvsc_copy_sgl_to_bounce_buf(struct sglist *bounce_sgl, + bus_dma_segment_t *orig_sgl, + unsigned int orig_sgl_count, + uint64_t seg_bits); +void storvsc_copy_from_bounce_buf_to_sgl(bus_dma_segment_t *dest_sgl, + unsigned int dest_sgl_count, + struct sglist* src_sgl, + uint64_t seg_bits); static device_method_t storvsc_methods[] = { /* Device interface */ @@ -207,7 +249,7 @@ MODULE_DEPEND(storvsc, vmbus, 1, 1, 1); /** - * The host is capable of sending messages to us that are + * The host is capable of sending messages to us that are * completely unsolicited. So, we need to address the race * condition where we may be in the process of unloading the * driver when the host may send us an unsolicited message. @@ -223,7 +265,7 @@ MODULE_DEPEND(storvsc, vmbus, 1, 1, 1); * destroyed. * * 3. Once the device is marked as being destroyed, we only - * permit incoming traffic to properly account for + * permit incoming traffic to properly account for * packets already sent out. */ static inline struct storvsc_softc * @@ -260,6 +302,113 @@ get_stor_device(struct hv_device *device } /** + * @brief Callback handler, will be invoked when receive mutil-channel offer + * + * @param context new multi-channel + */ +static void +storvsc_handle_sc_creation(void *context) +{ + hv_vmbus_channel *new_channel; + struct hv_device *device; + struct storvsc_softc *sc; + struct vmstor_chan_props props; + int ret = 0; + + new_channel = (hv_vmbus_channel *)context; + device = new_channel->primary_channel->device; + sc = get_stor_device(device, TRUE); + if (sc == NULL) + return; + + if (FALSE == sc->hs_open_multi_channel) + return; + + memset(&props, 0, sizeof(props)); + + ret = hv_vmbus_channel_open(new_channel, + sc->hs_drv_props->drv_ringbuffer_size, + sc->hs_drv_props->drv_ringbuffer_size, + (void *)&props, + sizeof(struct vmstor_chan_props), + hv_storvsc_on_channel_callback, + new_channel); + + return; +} + +/** + * @brief Send multi-channel creation request to host + * + * @param device a Hyper-V device pointer + * @param max_chans the max channels supported by vmbus + */ +static void +storvsc_send_multichannel_request(struct hv_device *dev, int max_chans) +{ + struct storvsc_softc *sc; + struct hv_storvsc_request *request; + struct vstor_packet *vstor_packet; + int request_channels_cnt = 0; + int ret; + + /* get multichannels count that need to create */ + request_channels_cnt = MIN(max_chans, mp_ncpus); + + sc = get_stor_device(dev, TRUE); + if (sc == NULL) { + printf("Storvsc_error: get sc failed while send mutilchannel " + "request\n"); + return; + } + + request = &sc->hs_init_req; + + /* Establish a handler for multi-channel */ + dev->channel->sc_creation_callback = storvsc_handle_sc_creation; + + /* request the host to create multi-channel */ + memset(request, 0, sizeof(struct hv_storvsc_request)); + + sema_init(&request->synch_sema, 0, ("stor_synch_sema")); + + vstor_packet = &request->vstor_packet; + + vstor_packet->operation = VSTOR_OPERATION_CREATE_MULTI_CHANNELS; + vstor_packet->flags = REQUEST_COMPLETION_FLAG; + vstor_packet->u.multi_channels_cnt = request_channels_cnt; + + ret = hv_vmbus_channel_send_packet( + dev->channel, + vstor_packet, + sizeof(struct vstor_packet), + (uint64_t)(uintptr_t)request, + HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, + HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); + + /* wait for 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); + if (ret != 0) { + printf("Storvsc_error: create multi-channel timeout, %d\n", + ret); + return; + } + + if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || + vstor_packet->status != 0) { + printf("Storvsc_error: create multi-channel invalid operation " + "(%d) or statue (%u)\n", + vstor_packet->operation, vstor_packet->status); + return; + } + + sc->hs_open_multi_channel = TRUE; + + if (bootverbose) + printf("Storvsc create multi-channel success!\n"); +} + +/** * @brief initialize channel connection to parent partition * * @param dev a Hyper-V device pointer @@ -272,11 +421,15 @@ hv_storvsc_channel_init(struct hv_device struct hv_storvsc_request *request; struct vstor_packet *vstor_packet; struct storvsc_softc *sc; + uint16_t max_chans = 0; + boolean_t support_multichannel = FALSE; + + max_chans = 0; + support_multichannel = FALSE; sc = get_stor_device(dev, TRUE); - if (sc == NULL) { - return ENODEV; - } + if (sc == NULL) + return (ENODEV); request = &sc->hs_init_req; memset(request, 0, sizeof(struct hv_storvsc_request)); @@ -300,15 +453,13 @@ hv_storvsc_channel_init(struct hv_device HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); - if (ret != 0) { + if (ret != 0) goto cleanup; - } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ - - if (ret != 0) { + /* wait 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); + if (ret != 0) goto cleanup; - } if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || vstor_packet->status != 0) { @@ -321,7 +472,8 @@ hv_storvsc_channel_init(struct hv_device vstor_packet->operation = VSTOR_OPERATION_QUERYPROTOCOLVERSION; vstor_packet->flags = REQUEST_COMPLETION_FLAG; - vstor_packet->u.version.major_minor = VMSTOR_PROTOCOL_VERSION_CURRENT; + vstor_packet->u.version.major_minor = + VMSTOR_PROTOCOL_VERSION(storvsc_current_major, storvsc_current_minor); /* revision is only significant for Windows guests */ vstor_packet->u.version.revision = 0; @@ -334,21 +486,19 @@ hv_storvsc_channel_init(struct hv_device HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); - if (ret != 0) { + if (ret != 0) goto cleanup; - } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ + /* wait 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); - if (ret) { + if (ret) goto cleanup; - } /* TODO: Check returned version */ if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || - vstor_packet->status != 0) { + vstor_packet->status != 0) goto cleanup; - } /** * Query channel properties @@ -365,22 +515,30 @@ hv_storvsc_channel_init(struct hv_device HV_VMBUS_PACKET_TYPE_DATA_IN_BAND, HV_VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED); - if ( ret != 0) { + if ( ret != 0) goto cleanup; - } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ + /* wait 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); - if (ret != 0) { + if (ret != 0) goto cleanup; - } /* TODO: Check returned version */ if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || - vstor_packet->status != 0) { + vstor_packet->status != 0) { goto cleanup; } + /* multi-channels feature is supported by WIN8 and above version */ + max_chans = vstor_packet->u.chan_props.max_channel_cnt; + if ((hv_vmbus_protocal_version != HV_VMBUS_VERSION_WIN7) && + (hv_vmbus_protocal_version != HV_VMBUS_VERSION_WS2008) && + (vstor_packet->u.chan_props.flags & + HV_STORAGE_SUPPORTS_MULTI_CHANNEL)) { + support_multichannel = TRUE; + } + memset(vstor_packet, 0, sizeof(struct vstor_packet)); vstor_packet->operation = VSTOR_OPERATION_ENDINITIALIZATION; vstor_packet->flags = REQUEST_COMPLETION_FLAG; @@ -397,16 +555,22 @@ hv_storvsc_channel_init(struct hv_device goto cleanup; } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ + /* wait 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); - if (ret != 0) { + if (ret != 0) goto cleanup; - } if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || - vstor_packet->status != 0) { + vstor_packet->status != 0) goto cleanup; - } + + /* + * If multi-channel is supported, send multichannel create + * request to host. + */ + if (support_multichannel) + storvsc_send_multichannel_request(dev, max_chans); cleanup: sema_destroy(&request->synch_sema); @@ -443,8 +607,7 @@ hv_storvsc_connect_vsp(struct hv_device (void *)&props, sizeof(struct vmstor_chan_props), hv_storvsc_on_channel_callback, - dev); - + dev->channel); if (ret != 0) { return ret; @@ -490,7 +653,7 @@ hv_storvsc_host_reset(struct hv_device * goto cleanup; } - ret = sema_timedwait(&request->synch_sema, 500); /* KYS 5 seconds */ + ret = sema_timedwait(&request->synch_sema, 5 * hz); /* KYS 5 seconds */ if (ret) { goto cleanup; @@ -498,7 +661,7 @@ hv_storvsc_host_reset(struct hv_device * /* - * At this point, all outstanding requests in the adapter + * At this point, all outstanding requests in the adapter * should have been flushed out and return to us */ @@ -521,6 +684,7 @@ hv_storvsc_io_request(struct hv_device * { struct storvsc_softc *sc; struct vstor_packet *vstor_packet = &request->vstor_packet; + struct hv_vmbus_channel* outgoing_channel = NULL; int ret = 0; sc = get_stor_device(device, TRUE); @@ -539,19 +703,20 @@ hv_storvsc_io_request(struct hv_device * vstor_packet->operation = VSTOR_OPERATION_EXECUTESRB; + outgoing_channel = vmbus_select_outgoing_channel(device->channel); mtx_unlock(&request->softc->hs_lock); if (request->data_buf.length) { ret = hv_vmbus_channel_send_packet_multipagebuffer( - device->channel, + outgoing_channel, &request->data_buf, - vstor_packet, - sizeof(struct vstor_packet), + vstor_packet, + sizeof(struct vstor_packet), (uint64_t)(uintptr_t)request); } else { ret = hv_vmbus_channel_send_packet( - device->channel, + outgoing_channel, vstor_packet, sizeof(struct vstor_packet), (uint64_t)(uintptr_t)request, @@ -610,7 +775,8 @@ static void hv_storvsc_on_channel_callback(void *context) { int ret = 0; - struct hv_device *device = (struct hv_device *)context; + hv_vmbus_channel *channel = (hv_vmbus_channel *)context; + struct hv_device *device = NULL; struct storvsc_softc *sc; uint32_t bytes_recvd; uint64_t request_id; @@ -618,15 +784,22 @@ hv_storvsc_on_channel_callback(void *con struct hv_storvsc_request *request; struct vstor_packet *vstor_packet; + if (channel->primary_channel != NULL){ + device = channel->primary_channel->device; + } else { + device = channel->device; + } + + KASSERT(device, ("device is NULL")); + sc = get_stor_device(device, FALSE); if (sc == NULL) { + printf("Storvsc_error: get stor device failed.\n"); return; } - KASSERT(device, ("device")); - ret = hv_vmbus_channel_recv_packet( - device->channel, + channel, packet, roundup2(sizeof(struct vstor_packet), 8), &bytes_recvd, @@ -634,21 +807,28 @@ hv_storvsc_on_channel_callback(void *con while ((ret == 0) && (bytes_recvd > 0)) { request = (struct hv_storvsc_request *)(uintptr_t)request_id; - KASSERT(request, ("request")); if ((request == &sc->hs_init_req) || (request == &sc->hs_reset_req)) { memcpy(&request->vstor_packet, packet, sizeof(struct vstor_packet)); - sema_post(&request->synch_sema); + sema_post(&request->synch_sema); } else { vstor_packet = (struct vstor_packet *)packet; switch(vstor_packet->operation) { case VSTOR_OPERATION_COMPLETEIO: + if (request == NULL) + panic("VMBUS: storvsc received a " + "packet with NULL request id in " + "COMPLETEIO operation."); + hv_storvsc_on_iocompletion(sc, vstor_packet, request); break; case VSTOR_OPERATION_REMOVEDEVICE: + case VSTOR_OPERATION_ENUMERATE_BUS: + printf("VMBUS: storvsc operation %d not " + "implemented.\n", vstor_packet->operation); /* TODO: implement */ break; default: @@ -656,7 +836,7 @@ hv_storvsc_on_channel_callback(void *con } } ret = hv_vmbus_channel_recv_packet( - device->channel, + channel, packet, roundup2(sizeof(struct vstor_packet), 8), &bytes_recvd, @@ -680,7 +860,16 @@ storvsc_probe(device_t dev) { int ata_disk_enable = 0; int ret = ENXIO; - + + if ((HV_VMBUS_VERSION_WIN8 == hv_vmbus_protocal_version) || + (HV_VMBUS_VERSION_WIN8_1 == hv_vmbus_protocal_version)){ + storvsc_current_major = STORVSC_WIN8_MAJOR; + storvsc_current_minor = STORVSC_WIN8_MINOR; + } else { + storvsc_current_major = STORVSC_WIN7_MAJOR; + storvsc_current_minor = STORVSC_WIN7_MINOR; + } + switch (storvsc_get_storage_type(dev)) { case DRIVER_BLKVSC: if(bootverbose) @@ -721,9 +910,11 @@ storvsc_attach(device_t dev) enum hv_storage_type stor_type; struct storvsc_softc *sc; struct cam_devq *devq; - int ret, i; + int ret, i, j; struct hv_storvsc_request *reqp; struct root_hold_token *root_mount_token = NULL; + struct hv_sgl_node *sgl_node = NULL; + void *tmp_buff = NULL; /* * We need to serialize storvsc attach calls. @@ -764,8 +955,41 @@ storvsc_attach(device_t dev) LIST_INSERT_HEAD(&sc->hs_free_list, reqp, link); } + /* create sg-list page pool */ + if (FALSE == g_hv_sgl_page_pool.is_init) { + g_hv_sgl_page_pool.is_init = TRUE; + LIST_INIT(&g_hv_sgl_page_pool.in_use_sgl_list); + LIST_INIT(&g_hv_sgl_page_pool.free_sgl_list); + + /* + * Pre-create SG list, each SG list with + * HV_MAX_MULTIPAGE_BUFFER_COUNT segments, each + * segment has one page buffer + */ + for (i = 0; i < STORVSC_MAX_IO_REQUESTS; i++) { + sgl_node = malloc(sizeof(struct hv_sgl_node), + M_DEVBUF, M_WAITOK|M_ZERO); + + sgl_node->sgl_data = + sglist_alloc(HV_MAX_MULTIPAGE_BUFFER_COUNT, + M_WAITOK|M_ZERO); + + for (j = 0; j < HV_MAX_MULTIPAGE_BUFFER_COUNT; j++) { + tmp_buff = malloc(PAGE_SIZE, + M_DEVBUF, M_WAITOK|M_ZERO); + + sgl_node->sgl_data->sg_segs[j].ss_paddr = + (vm_paddr_t)tmp_buff; + } + + LIST_INSERT_HEAD(&g_hv_sgl_page_pool.free_sgl_list, + sgl_node, link); + } + } + sc->hs_destroy = FALSE; sc->hs_drain_notify = FALSE; + sc->hs_open_multi_channel = FALSE; sema_init(&sc->hs_drain_sema, 0, "Store Drain Sema"); ret = hv_storvsc_connect_vsp(hv_dev); @@ -834,6 +1058,20 @@ cleanup: LIST_REMOVE(reqp, link); free(reqp, M_DEVBUF); } + + while (!LIST_EMPTY(&g_hv_sgl_page_pool.free_sgl_list)) { + sgl_node = LIST_FIRST(&g_hv_sgl_page_pool.free_sgl_list); + LIST_REMOVE(sgl_node, link); + for (j = 0; j < HV_MAX_MULTIPAGE_BUFFER_COUNT; j++) { + if (NULL != + (void*)sgl_node->sgl_data->sg_segs[j].ss_paddr) { + free((void*)sgl_node->sgl_data->sg_segs[j].ss_paddr, M_DEVBUF); + } + } + sglist_free(sgl_node->sgl_data); + free(sgl_node, M_DEVBUF); + } + return (ret); } @@ -853,6 +1091,8 @@ storvsc_detach(device_t dev) struct storvsc_softc *sc = device_get_softc(dev); struct hv_storvsc_request *reqp = NULL; struct hv_device *hv_device = vmbus_get_devctx(dev); + struct hv_sgl_node *sgl_node = NULL; + int j = 0; mtx_lock(&hv_device->channel->inbound_lock); sc->hs_destroy = TRUE; @@ -884,6 +1124,20 @@ storvsc_detach(device_t dev) free(reqp, M_DEVBUF); } mtx_unlock(&sc->hs_lock); + + while (!LIST_EMPTY(&g_hv_sgl_page_pool.free_sgl_list)) { + sgl_node = LIST_FIRST(&g_hv_sgl_page_pool.free_sgl_list); + LIST_REMOVE(sgl_node, link); + for (j = 0; j < HV_MAX_MULTIPAGE_BUFFER_COUNT; j++){ + if (NULL != + (void*)sgl_node->sgl_data->sg_segs[j].ss_paddr) { + free((void*)sgl_node->sgl_data->sg_segs[j].ss_paddr, M_DEVBUF); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 10:23:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE0F67BB; Wed, 29 Apr 2015 10:23:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB82B1AF3; Wed, 29 Apr 2015 10:23:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TAN5tj014782; Wed, 29 Apr 2015 10:23:05 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TAN22I014763; Wed, 29 Apr 2015 10:23:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504291023.t3TAN22I014763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 29 Apr 2015 10:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282213 - in head/sys: conf kern 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 10:23:05 -0000 Author: trasz Date: Wed Apr 29 10:23:02 2015 New Revision: 282213 URL: https://svnweb.freebsd.org/changeset/base/282213 Log: Add kern.racct.enable tunable and RACCT_DISABLED config option. The point of this is to be able to add RACCT (with RACCT_DISABLED) to GENERIC, to avoid having to rebuild the kernel to use rctl(8). Differential Revision: https://reviews.freebsd.org/D2369 Reviewed by: kib@ MFC after: 1 month Relnotes: yes Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/options head/sys/kern/imgact_elf.c head/sys/kern/kern_descrip.c head/sys/kern/kern_exit.c head/sys/kern/kern_jail.c head/sys/kern/kern_racct.c head/sys/kern/kern_rctl.c head/sys/kern/kern_thr.c head/sys/kern/sched_4bsd.c head/sys/kern/subr_trap.c head/sys/kern/sysv_msg.c head/sys/kern/sysv_sem.c head/sys/kern/sysv_shm.c head/sys/sys/racct.h head/sys/vm/swap_pager.c head/sys/vm/vm_map.c head/sys/vm/vm_mmap.c head/sys/vm/vm_pageout.c head/sys/vm/vm_unix.c Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/conf/options Wed Apr 29 10:23:02 2015 (r282213) @@ -928,6 +928,7 @@ IPOIB_CM opt_ofed.h # Resource Accounting RACCT opt_global.h +RACCT_DISABLED opt_global.h # Resource Limits RCTL opt_global.h Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/imgact_elf.c Wed Apr 29 10:23:02 2015 (r282213) @@ -1238,12 +1238,14 @@ __elfN(coredump)(struct thread *td, stru coresize = round_page(hdrsize + notesz) + seginfo.size; #ifdef RACCT - PROC_LOCK(td->td_proc); - error = racct_add(td->td_proc, RACCT_CORE, coresize); - PROC_UNLOCK(td->td_proc); - if (error != 0) { - error = EFAULT; - goto done; + if (racct_enable) { + PROC_LOCK(td->td_proc); + error = racct_add(td->td_proc, RACCT_CORE, coresize); + PROC_UNLOCK(td->td_proc); + if (error != 0) { + error = EFAULT; + goto done; + } } #endif if (coresize >= limit) { Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/kern_descrip.c Wed Apr 29 10:23:02 2015 (r282213) @@ -857,13 +857,15 @@ do_dup(struct thread *td, int flags, int * the limit on the size of the file descriptor table. */ #ifdef RACCT - PROC_LOCK(p); - error = racct_set(p, RACCT_NOFILE, new + 1); - PROC_UNLOCK(p); - if (error != 0) { - FILEDESC_XUNLOCK(fdp); - fdrop(fp, td); - return (EMFILE); + if (racct_enable) { + PROC_LOCK(p); + error = racct_set(p, RACCT_NOFILE, new + 1); + PROC_UNLOCK(p); + if (error != 0) { + FILEDESC_XUNLOCK(fdp); + fdrop(fp, td); + return (EMFILE); + } } #endif fdgrowtable_exp(fdp, new + 1); @@ -1631,11 +1633,13 @@ fdalloc(struct thread *td, int minfd, in if (fd >= fdp->fd_nfiles) { allocfd = min(fd * 2, maxfd); #ifdef RACCT - PROC_LOCK(p); - error = racct_set(p, RACCT_NOFILE, allocfd); - PROC_UNLOCK(p); - if (error != 0) - return (EMFILE); + if (racct_enable) { + PROC_LOCK(p); + error = racct_set(p, RACCT_NOFILE, allocfd); + PROC_UNLOCK(p); + if (error != 0) + return (EMFILE); + } #endif /* * fd is already equal to first free descriptor >= minfd, so @@ -2042,9 +2046,11 @@ fdescfree(struct thread *td) MPASS(fdp != NULL); #ifdef RACCT - PROC_LOCK(td->td_proc); - racct_set(td->td_proc, RACCT_NOFILE, 0); - PROC_UNLOCK(td->td_proc); + if (racct_enable) { + PROC_LOCK(td->td_proc); + racct_set(td->td_proc, RACCT_NOFILE, 0); + PROC_UNLOCK(td->td_proc); + } #endif if (td->td_proc->p_fdtol != NULL) Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/kern_exit.c Wed Apr 29 10:23:02 2015 (r282213) @@ -907,9 +907,11 @@ proc_reap(struct thread *td, struct proc * Destroy resource accounting information associated with the process. */ #ifdef RACCT - PROC_LOCK(p); - racct_sub(p, RACCT_NPROC, 1); - PROC_UNLOCK(p); + if (racct_enable) { + PROC_LOCK(p); + racct_sub(p, RACCT_NPROC, 1); + PROC_UNLOCK(p); + } #endif racct_proc_exit(p); Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/kern_jail.c Wed Apr 29 10:23:02 2015 (r282213) @@ -1778,7 +1778,7 @@ kern_jail_set(struct thread *td, struct mtx_unlock(&pr->pr_mtx); #ifdef RACCT - if (created) + if (racct_enable && created) prison_racct_attach(pr); #endif @@ -1862,7 +1862,7 @@ kern_jail_set(struct thread *td, struct } #ifdef RACCT - if (!created) { + if (racct_enable && !created) { if (!(flags & JAIL_ATTACH)) sx_sunlock(&allprison_lock); prison_racct_modify(pr); @@ -2652,7 +2652,8 @@ prison_deref(struct prison *pr, int flag cpuset_rel(pr->pr_cpuset); osd_jail_exit(pr); #ifdef RACCT - prison_racct_detach(pr); + if (racct_enable) + prison_racct_detach(pr); #endif free(pr, M_PRISON); @@ -4460,12 +4461,15 @@ SYSCTL_JAIL_PARAM(_allow_mount, tmpfs, C SYSCTL_JAIL_PARAM(_allow_mount, zfs, CTLTYPE_INT | CTLFLAG_RW, "B", "Jail may mount the zfs file system"); +#ifdef RACCT void prison_racct_foreach(void (*callback)(struct racct *racct, void *arg2, void *arg3), void *arg2, void *arg3) { struct prison_racct *prr; + ASSERT_RACCT_ENABLED(); + sx_slock(&allprison_lock); LIST_FOREACH(prr, &allprison_racct, prr_next) (callback)(prr->prr_racct, arg2, arg3); @@ -4477,6 +4481,7 @@ prison_racct_find_locked(const char *nam { struct prison_racct *prr; + ASSERT_RACCT_ENABLED(); sx_assert(&allprison_lock, SA_XLOCKED); if (name[0] == '\0' || strlen(name) >= MAXHOSTNAMELEN) @@ -4507,6 +4512,8 @@ prison_racct_find(const char *name) { struct prison_racct *prr; + ASSERT_RACCT_ENABLED(); + sx_xlock(&allprison_lock); prr = prison_racct_find_locked(name); sx_xunlock(&allprison_lock); @@ -4517,6 +4524,8 @@ void prison_racct_hold(struct prison_racct *prr) { + ASSERT_RACCT_ENABLED(); + refcount_acquire(&prr->prr_refcount); } @@ -4524,6 +4533,7 @@ static void prison_racct_free_locked(struct prison_racct *prr) { + ASSERT_RACCT_ENABLED(); sx_assert(&allprison_lock, SA_XLOCKED); if (refcount_release(&prr->prr_refcount)) { @@ -4538,6 +4548,7 @@ prison_racct_free(struct prison_racct *p { int old; + ASSERT_RACCT_ENABLED(); sx_assert(&allprison_lock, SA_UNLOCKED); old = prr->prr_refcount; @@ -4549,12 +4560,12 @@ prison_racct_free(struct prison_racct *p sx_xunlock(&allprison_lock); } -#ifdef RACCT static void prison_racct_attach(struct prison *pr) { struct prison_racct *prr; + ASSERT_RACCT_ENABLED(); sx_assert(&allprison_lock, SA_XLOCKED); prr = prison_racct_find_locked(pr->pr_name); @@ -4574,6 +4585,8 @@ prison_racct_modify(struct prison *pr) struct ucred *cred; struct prison_racct *oldprr; + ASSERT_RACCT_ENABLED(); + sx_slock(&allproc_lock); sx_xlock(&allprison_lock); @@ -4613,6 +4626,7 @@ static void prison_racct_detach(struct prison *pr) { + ASSERT_RACCT_ENABLED(); sx_assert(&allprison_lock, SA_UNLOCKED); if (pr->pr_prison_racct == NULL) Modified: head/sys/kern/kern_racct.c ============================================================================== --- head/sys/kern/kern_racct.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/kern_racct.c Wed Apr 29 10:23:02 2015 (r282213) @@ -70,8 +70,15 @@ FEATURE(racct, "Resource Accounting"); * Do not block processes that have their %cpu usage <= pcpu_threshold. */ static int pcpu_threshold = 1; +#ifdef RACCT_DISABLED +int racct_enable = 0; +#else +int racct_enable = 1; +#endif SYSCTL_NODE(_kern, OID_AUTO, racct, CTLFLAG_RW, 0, "Resource Accounting"); +SYSCTL_UINT(_kern_racct, OID_AUTO, enable, CTLFLAG_RDTUN, &racct_enable, + 0, "Enable RACCT/RCTL"); SYSCTL_UINT(_kern_racct, OID_AUTO, pcpu_threshold, CTLFLAG_RW, &pcpu_threshold, 0, "Processes with higher %cpu usage than this value can be throttled."); @@ -313,6 +320,8 @@ racct_getpcpu(struct proc *p, u_int pcpu fixpt_t p_pctcpu; struct thread *td; + ASSERT_RACCT_ENABLED(); + /* * If the process is swapped out, we count its %cpu usage as zero. * This behaviour is consistent with the userland ps(1) tool. @@ -377,6 +386,7 @@ racct_add_racct(struct racct *dest, cons { int i; + ASSERT_RACCT_ENABLED(); mtx_assert(&racct_lock, MA_OWNED); /* @@ -398,6 +408,7 @@ racct_sub_racct(struct racct *dest, cons { int i; + ASSERT_RACCT_ENABLED(); mtx_assert(&racct_lock, MA_OWNED); /* @@ -431,6 +442,9 @@ void racct_create(struct racct **racctp) { + if (!racct_enable) + return; + SDT_PROBE(racct, kernel, racct, create, racctp, 0, 0, 0, 0); KASSERT(*racctp == NULL, ("racct already allocated")); @@ -444,6 +458,8 @@ racct_destroy_locked(struct racct **racc int i; struct racct *racct; + ASSERT_RACCT_ENABLED(); + SDT_PROBE(racct, kernel, racct, destroy, racctp, 0, 0, 0, 0); mtx_assert(&racct_lock, MA_OWNED); @@ -470,6 +486,9 @@ void racct_destroy(struct racct **racct) { + if (!racct_enable) + return; + mtx_lock(&racct_lock); racct_destroy_locked(racct); mtx_unlock(&racct_lock); @@ -485,6 +504,7 @@ racct_alloc_resource(struct racct *racct uint64_t amount) { + ASSERT_RACCT_ENABLED(); mtx_assert(&racct_lock, MA_OWNED); KASSERT(racct != NULL, ("NULL racct")); @@ -516,6 +536,8 @@ racct_add_locked(struct proc *p, int res int error; #endif + ASSERT_RACCT_ENABLED(); + SDT_PROBE(racct, kernel, rusage, add, p, resource, amount, 0, 0); /* @@ -546,6 +568,9 @@ racct_add(struct proc *p, int resource, { int error; + if (!racct_enable) + return (0); + mtx_lock(&racct_lock); error = racct_add_locked(p, resource, amount); mtx_unlock(&racct_lock); @@ -557,6 +582,8 @@ racct_add_cred_locked(struct ucred *cred { struct prison *pr; + ASSERT_RACCT_ENABLED(); + SDT_PROBE(racct, kernel, rusage, add__cred, cred, resource, amount, 0, 0); @@ -577,6 +604,9 @@ void racct_add_cred(struct ucred *cred, int resource, uint64_t amount) { + if (!racct_enable) + return; + mtx_lock(&racct_lock); racct_add_cred_locked(cred, resource, amount); mtx_unlock(&racct_lock); @@ -590,6 +620,9 @@ void racct_add_force(struct proc *p, int resource, uint64_t amount) { + if (!racct_enable) + return; + SDT_PROBE(racct, kernel, rusage, add__force, p, resource, amount, 0, 0); /* @@ -612,6 +645,8 @@ racct_set_locked(struct proc *p, int res int error; #endif + ASSERT_RACCT_ENABLED(); + SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0); /* @@ -671,6 +706,9 @@ racct_set(struct proc *p, int resource, { int error; + if (!racct_enable) + return (0); + mtx_lock(&racct_lock); error = racct_set_locked(p, resource, amount); mtx_unlock(&racct_lock); @@ -683,6 +721,8 @@ racct_set_force_locked(struct proc *p, i int64_t old_amount, decayed_amount; int64_t diff_proc, diff_cred; + ASSERT_RACCT_ENABLED(); + SDT_PROBE(racct, kernel, rusage, set, p, resource, amount, 0, 0); /* @@ -717,6 +757,10 @@ racct_set_force_locked(struct proc *p, i void racct_set_force(struct proc *p, int resource, uint64_t amount) { + + if (!racct_enable) + return; + mtx_lock(&racct_lock); racct_set_force_locked(p, resource, amount); mtx_unlock(&racct_lock); @@ -732,6 +776,9 @@ uint64_t racct_get_limit(struct proc *p, int resource) { + if (!racct_enable) + return (UINT64_MAX); + #ifdef RCTL return (rctl_get_limit(p, resource)); #else @@ -749,6 +796,9 @@ uint64_t racct_get_available(struct proc *p, int resource) { + if (!racct_enable) + return (UINT64_MAX); + #ifdef RCTL return (rctl_get_available(p, resource)); #else @@ -765,6 +815,8 @@ static int64_t racct_pcpu_available(struct proc *p) { + ASSERT_RACCT_ENABLED(); + #ifdef RCTL return (rctl_pcpu_available(p)); #else @@ -779,6 +831,9 @@ void racct_sub(struct proc *p, int resource, uint64_t amount) { + if (!racct_enable) + return; + SDT_PROBE(racct, kernel, rusage, sub, p, resource, amount, 0, 0); /* @@ -804,6 +859,8 @@ racct_sub_cred_locked(struct ucred *cred { struct prison *pr; + ASSERT_RACCT_ENABLED(); + SDT_PROBE(racct, kernel, rusage, sub__cred, cred, resource, amount, 0, 0); @@ -827,6 +884,9 @@ void racct_sub_cred(struct ucred *cred, int resource, uint64_t amount) { + if (!racct_enable) + return; + mtx_lock(&racct_lock); racct_sub_cred_locked(cred, resource, amount); mtx_unlock(&racct_lock); @@ -840,6 +900,9 @@ racct_proc_fork(struct proc *parent, str { int i, error = 0; + if (!racct_enable) + return (0); + /* * Create racct for the child process. */ @@ -896,6 +959,9 @@ racct_proc_fork_done(struct proc *child) { #ifdef RCTL + if (!racct_enable) + return; + PROC_LOCK(child); mtx_lock(&racct_lock); rctl_enforce(child, RACCT_NPROC, 0); @@ -913,6 +979,9 @@ racct_proc_exit(struct proc *p) struct timeval wallclock; uint64_t pct_estimate, pct; + if (!racct_enable) + return; + PROC_LOCK(p); /* * We don't need to calculate rux, proc_reap() has already done this. @@ -967,6 +1036,9 @@ racct_proc_ucred_changed(struct proc *p, struct loginclass *oldlc, *newlc; struct prison *oldpr, *newpr, *pr; + if (!racct_enable) + return; + PROC_LOCK_ASSERT(p, MA_NOTOWNED); newuip = newcred->cr_ruidinfo; @@ -1004,6 +1076,8 @@ void racct_move(struct racct *dest, struct racct *src) { + ASSERT_RACCT_ENABLED(); + mtx_lock(&racct_lock); racct_add_racct(dest, src); @@ -1020,6 +1094,7 @@ racct_proc_throttle(struct proc *p) int cpuid; #endif + ASSERT_RACCT_ENABLED(); PROC_LOCK_ASSERT(p, MA_OWNED); /* @@ -1065,6 +1140,9 @@ racct_proc_throttle(struct proc *p) static void racct_proc_wakeup(struct proc *p) { + + ASSERT_RACCT_ENABLED(); + PROC_LOCK_ASSERT(p, MA_OWNED); if (p->p_throttled) { @@ -1079,6 +1157,8 @@ racct_decay_resource(struct racct *racct int resource; int64_t r_old, r_new; + ASSERT_RACCT_ENABLED(); + resource = *(int *)res; r_old = racct->r_resources[resource]; @@ -1095,6 +1175,9 @@ racct_decay_resource(struct racct *racct static void racct_decay(int resource) { + + ASSERT_RACCT_ENABLED(); + ui_racct_foreach(racct_decay_resource, &resource, NULL); loginclass_racct_foreach(racct_decay_resource, &resource, NULL); prison_racct_foreach(racct_decay_resource, &resource, NULL); @@ -1109,6 +1192,8 @@ racctd(void) uint64_t runtime; uint64_t pct, pct_estimate; + ASSERT_RACCT_ENABLED(); + for (;;) { racct_decay(RACCT_PCTCPU); @@ -1188,11 +1273,22 @@ static struct kproc_desc racctd_kp = { racctd, NULL }; -SYSINIT(racctd, SI_SUB_RACCTD, SI_ORDER_FIRST, kproc_start, &racctd_kp); + +static void +racctd_init(void) +{ + if (!racct_enable) + return; + + kproc_start(&racctd_kp); +} +SYSINIT(racctd, SI_SUB_RACCTD, SI_ORDER_FIRST, racctd_init, NULL); static void racct_init(void) { + if (!racct_enable) + return; racct_zone = uma_zcreate("racct", sizeof(struct racct), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); Modified: head/sys/kern/kern_rctl.c ============================================================================== --- head/sys/kern/kern_rctl.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/kern_rctl.c Wed Apr 29 10:23:02 2015 (r282213) @@ -225,6 +225,7 @@ rctl_available_resource(const struct pro int64_t available = INT64_MAX; struct ucred *cred = p->p_ucred; + ASSERT_RACCT_ENABLED(); rw_assert(&rctl_lock, RA_LOCKED); resource = rule->rr_resource; @@ -264,6 +265,8 @@ rctl_would_exceed(const struct proc *p, { int64_t available; + ASSERT_RACCT_ENABLED(); + rw_assert(&rctl_lock, RA_LOCKED); available = rctl_available_resource(p, rule); @@ -283,6 +286,8 @@ rctl_pcpu_available(const struct proc *p struct rctl_rule_link *link; int64_t available, minavailable, limit; + ASSERT_RACCT_ENABLED(); + minavailable = INT64_MAX; limit = 0; @@ -334,6 +339,8 @@ rctl_enforce(struct proc *p, int resourc static int curtime = 0; static struct timeval lasttime; + ASSERT_RACCT_ENABLED(); + rw_rlock(&rctl_lock); /* @@ -457,6 +464,8 @@ rctl_get_limit(struct proc *p, int resou struct rctl_rule_link *link; uint64_t amount = UINT64_MAX; + ASSERT_RACCT_ENABLED(); + rw_rlock(&rctl_lock); /* @@ -487,6 +496,8 @@ rctl_get_available(struct proc *p, int r minavailable = INT64_MAX; + ASSERT_RACCT_ENABLED(); + rw_rlock(&rctl_lock); /* @@ -521,6 +532,8 @@ static int rctl_rule_matches(const struct rctl_rule *rule, const struct rctl_rule *filter) { + ASSERT_RACCT_ENABLED(); + if (filter->rr_subject_type != RCTL_SUBJECT_TYPE_UNDEFINED) { if (rule->rr_subject_type != filter->rr_subject_type) return (0); @@ -635,6 +648,7 @@ rctl_racct_add_rule(struct racct *racct, { struct rctl_rule_link *link; + ASSERT_RACCT_ENABLED(); KASSERT(rctl_rule_fully_specified(rule), ("rule not fully specified")); rctl_rule_acquire(rule); @@ -652,6 +666,7 @@ rctl_racct_add_rule_locked(struct racct { struct rctl_rule_link *link; + ASSERT_RACCT_ENABLED(); KASSERT(rctl_rule_fully_specified(rule), ("rule not fully specified")); rw_assert(&rctl_lock, RA_WLOCKED); @@ -678,6 +693,7 @@ rctl_racct_remove_rules(struct racct *ra int removed = 0; struct rctl_rule_link *link, *linktmp; + ASSERT_RACCT_ENABLED(); rw_assert(&rctl_lock, RA_WLOCKED); LIST_FOREACH_SAFE(link, &racct->r_rule_links, rrl_next, linktmp) { @@ -696,6 +712,8 @@ static void rctl_rule_acquire_subject(struct rctl_rule *rule) { + ASSERT_RACCT_ENABLED(); + switch (rule->rr_subject_type) { case RCTL_SUBJECT_TYPE_UNDEFINED: case RCTL_SUBJECT_TYPE_PROCESS: @@ -722,6 +740,8 @@ static void rctl_rule_release_subject(struct rctl_rule *rule) { + ASSERT_RACCT_ENABLED(); + switch (rule->rr_subject_type) { case RCTL_SUBJECT_TYPE_UNDEFINED: case RCTL_SUBJECT_TYPE_PROCESS: @@ -749,6 +769,8 @@ rctl_rule_alloc(int flags) { struct rctl_rule *rule; + ASSERT_RACCT_ENABLED(); + rule = uma_zalloc(rctl_rule_zone, flags); if (rule == NULL) return (NULL); @@ -771,6 +793,8 @@ rctl_rule_duplicate(const struct rctl_ru { struct rctl_rule *copy; + ASSERT_RACCT_ENABLED(); + copy = uma_zalloc(rctl_rule_zone, flags); if (copy == NULL) return (NULL); @@ -793,6 +817,7 @@ void rctl_rule_acquire(struct rctl_rule *rule) { + ASSERT_RACCT_ENABLED(); KASSERT(rule->rr_refcount > 0, ("rule->rr_refcount <= 0")); refcount_acquire(&rule->rr_refcount); @@ -805,6 +830,7 @@ rctl_rule_free(void *context, int pendin rule = (struct rctl_rule *)context; + ASSERT_RACCT_ENABLED(); KASSERT(rule->rr_refcount == 0, ("rule->rr_refcount != 0")); /* @@ -819,6 +845,7 @@ void rctl_rule_release(struct rctl_rule *rule) { + ASSERT_RACCT_ENABLED(); KASSERT(rule->rr_refcount > 0, ("rule->rr_refcount <= 0")); if (refcount_release(&rule->rr_refcount)) { @@ -838,6 +865,8 @@ static int rctl_rule_fully_specified(const struct rctl_rule *rule) { + ASSERT_RACCT_ENABLED(); + switch (rule->rr_subject_type) { case RCTL_SUBJECT_TYPE_UNDEFINED: return (0); @@ -882,6 +911,8 @@ rctl_string_to_rule(char *rulestr, struc struct rctl_rule *rule; id_t id; + ASSERT_RACCT_ENABLED(); + rule = rctl_rule_alloc(M_WAITOK); subjectstr = strsep(&rulestr, ":"); @@ -1008,6 +1039,7 @@ rctl_rule_add(struct rctl_rule *rule) struct rctl_rule *rule2; int match; + ASSERT_RACCT_ENABLED(); KASSERT(rctl_rule_fully_specified(rule), ("rule not fully specified")); /* @@ -1118,6 +1150,8 @@ rctl_rule_remove_callback(struct racct * struct rctl_rule *filter = (struct rctl_rule *)arg2; int found = 0; + ASSERT_RACCT_ENABLED(); + rw_wlock(&rctl_lock); found += rctl_racct_remove_rules(racct, filter); rw_wunlock(&rctl_lock); @@ -1134,6 +1168,8 @@ rctl_rule_remove(struct rctl_rule *filte int found = 0; struct proc *p; + ASSERT_RACCT_ENABLED(); + if (filter->rr_subject_type == RCTL_SUBJECT_TYPE_PROCESS && filter->rr_subject.rs_proc != NULL) { p = filter->rr_subject.rs_proc; @@ -1172,6 +1208,8 @@ rctl_rule_to_sbuf(struct sbuf *sb, const { int64_t amount; + ASSERT_RACCT_ENABLED(); + sbuf_printf(sb, "%s:", rctl_subject_type_name(rule->rr_subject_type)); switch (rule->rr_subject_type) { @@ -1231,6 +1269,8 @@ rctl_read_inbuf(char **inputstr, const c int error; char *str; + ASSERT_RACCT_ENABLED(); + if (inbuflen <= 0) return (EINVAL); if (inbuflen > RCTL_MAX_INBUFLEN) @@ -1256,6 +1296,8 @@ rctl_write_outbuf(struct sbuf *outputsbu { int error; + ASSERT_RACCT_ENABLED(); + if (outputsbuf == NULL) return (0); @@ -1277,6 +1319,8 @@ rctl_racct_to_sbuf(struct racct *racct, int64_t amount; struct sbuf *sb; + ASSERT_RACCT_ENABLED(); + sb = sbuf_new_auto(); for (i = 0; i <= RACCT_MAX; i++) { if (sloppy == 0 && RACCT_IS_SLOPPY(i)) @@ -1302,6 +1346,9 @@ sys_rctl_get_racct(struct thread *td, st struct loginclass *lc; struct prison_racct *prr; + if (!racct_enable) + return (ENOSYS); + error = priv_check(td, PRIV_RCTL_GET_RACCT); if (error != 0) return (error); @@ -1372,6 +1419,8 @@ rctl_get_rules_callback(struct racct *ra struct rctl_rule_link *link; struct sbuf *sb = (struct sbuf *)arg3; + ASSERT_RACCT_ENABLED(); + rw_rlock(&rctl_lock); LIST_FOREACH(link, &racct->r_rule_links, rrl_next) { if (!rctl_rule_matches(link->rrl_rule, filter)) @@ -1393,6 +1442,9 @@ sys_rctl_get_rules(struct thread *td, st struct rctl_rule_link *link; struct proc *p; + if (!racct_enable) + return (ENOSYS); + error = priv_check(td, PRIV_RCTL_GET_RULES); if (error != 0) return (error); @@ -1467,6 +1519,9 @@ sys_rctl_get_limits(struct thread *td, s struct rctl_rule *filter; struct rctl_rule_link *link; + if (!racct_enable) + return (ENOSYS); + error = priv_check(td, PRIV_RCTL_GET_LIMITS); if (error != 0) return (error); @@ -1538,6 +1593,9 @@ sys_rctl_add_rule(struct thread *td, str struct rctl_rule *rule; char *inputstr; + if (!racct_enable) + return (ENOSYS); + error = priv_check(td, PRIV_RCTL_ADD_RULE); if (error != 0) return (error); @@ -1580,6 +1638,9 @@ sys_rctl_remove_rule(struct thread *td, struct rctl_rule *filter; char *inputstr; + if (!racct_enable) + return (ENOSYS); + error = priv_check(td, PRIV_RCTL_REMOVE_RULE); if (error != 0) return (error); @@ -1616,6 +1677,8 @@ rctl_proc_ucred_changed(struct proc *p, struct prison_racct *newprr; LIST_HEAD(, rctl_rule_link) newrules; + ASSERT_RACCT_ENABLED(); + newuip = newcred->cr_ruidinfo; newlc = newcred->cr_loginclass; newprr = newcred->cr_prison->pr_prison_racct; @@ -1756,6 +1819,7 @@ rctl_proc_fork(struct proc *parent, stru LIST_INIT(&child->p_racct->r_rule_links); + ASSERT_RACCT_ENABLED(); KASSERT(parent->p_racct != NULL, ("process without racct; p = %p", parent)); rw_wlock(&rctl_lock); @@ -1809,6 +1873,8 @@ rctl_racct_release(struct racct *racct) { struct rctl_rule_link *link; + ASSERT_RACCT_ENABLED(); + rw_wlock(&rctl_lock); while (!LIST_EMPTY(&racct->r_rule_links)) { link = LIST_FIRST(&racct->r_rule_links); @@ -1823,6 +1889,9 @@ static void rctl_init(void) { + if (!racct_enable) + return; + rctl_rule_link_zone = uma_zcreate("rctl_rule_link", sizeof(struct rctl_rule_link), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); Modified: head/sys/kern/kern_thr.c ============================================================================== --- head/sys/kern/kern_thr.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/kern_thr.c Wed Apr 29 10:23:02 2015 (r282213) @@ -187,11 +187,13 @@ create_thread(struct thread *td, mcontex } #ifdef RACCT - PROC_LOCK(p); - error = racct_add(p, RACCT_NTHR, 1); - PROC_UNLOCK(p); - if (error != 0) - return (EPROCLIM); + if (racct_enable) { + PROC_LOCK(p); + error = racct_add(p, RACCT_NTHR, 1); + PROC_UNLOCK(p); + if (error != 0) + return (EPROCLIM); + } #endif /* Initialize our td */ @@ -280,9 +282,11 @@ create_thread(struct thread *td, mcontex fail: #ifdef RACCT - PROC_LOCK(p); - racct_sub(p, RACCT_NTHR, 1); - PROC_UNLOCK(p); + if (racct_enable) { + PROC_LOCK(p); + racct_sub(p, RACCT_NTHR, 1); + PROC_UNLOCK(p); + } #endif return (error); } Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/sched_4bsd.c Wed Apr 29 10:23:02 2015 (r282213) @@ -1585,7 +1585,7 @@ sched_pctcpu(struct thread *td) return (ts->ts_pctcpu); } -#ifdef RACCT +#ifdef RACCT /* * Calculates the contribution to the thread cpu usage for the latest * (unfinished) second. Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/subr_trap.c Wed Apr 29 10:23:02 2015 (r282213) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -172,11 +173,13 @@ 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) - msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); - PROC_UNLOCK(p); +#ifdef RACCT + if (racct_enable) { + PROC_LOCK(p); + while (p->p_throttled == 1) + msleep(p->p_racct, &p->p_mtx, 0, "racct", 0); + PROC_UNLOCK(p); + } #endif } Modified: head/sys/kern/sysv_msg.c ============================================================================== --- head/sys/kern/sysv_msg.c Wed Apr 29 10:12:34 2015 (r282212) +++ head/sys/kern/sysv_msg.c Wed Apr 29 10:23:02 2015 (r282213) @@ -617,12 +617,14 @@ sys_msgget(td, uap) goto done2; } #ifdef RACCT - PROC_LOCK(td->td_proc); - error = racct_add(td->td_proc, RACCT_NMSGQ, 1); - PROC_UNLOCK(td->td_proc); - if (error != 0) { - error = ENOSPC; - goto done2; + if (racct_enable) { + PROC_LOCK(td->td_proc); + error = racct_add(td->td_proc, RACCT_NMSGQ, 1); + PROC_UNLOCK(td->td_proc); + if (error != 0) { + error = ENOSPC; + goto done2; + } } #endif DPRINTF(("msqid %d is available\n", msqid)); @@ -724,20 +726,22 @@ kern_msgsnd(td, msqid, msgp, msgsz, msgf #endif #ifdef RACCT - PROC_LOCK(td->td_proc); - if (racct_add(td->td_proc, RACCT_MSGQQUEUED, 1)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 11:29:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C482A2AF; Wed, 29 Apr 2015 11:29:48 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 50DC911D3; Wed, 29 Apr 2015 11:29:47 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3TBTiMY014420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 29 Apr 2015 14:29:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3TBTiSn014419; Wed, 29 Apr 2015 14:29:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 29 Apr 2015 14:29:44 +0300 From: Gleb Smirnoff To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282211 - head/tests/freebsd_test_suite Message-ID: <20150429112944.GI546@FreeBSD.org> References: <201504290856.t3T8uuHF070908@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504290856.t3T8uuHF070908@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 11:29:48 -0000 On Wed, Apr 29, 2015 at 08:56:56AM +0000, Garrett Cooper wrote: G> Author: ngie G> Date: Wed Apr 29 08:56:56 2015 G> New Revision: 282211 G> URL: https://svnweb.freebsd.org/changeset/base/282211 G> G> Log: G> ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so the testcase G> no longer bombs out G> PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the testcase no G> longer bombs out if it prints to stderr G> G> MFC after: 5 days This breaks buildworld since atf_skip() is a shell function, not a C one: glebius@behemoth:/usr/src/head/contrib/atf:|>grep -r atf_skip atf-c glebius@behemoth:/usr/src/head/contrib/atf:|>grep -r atf_skip atf-sh/ atf-sh/atf-sh.3:.Nm atf_skip , -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 12:07:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A86F0F8A; Wed, 29 Apr 2015 12:07:38 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3EDF41689; Wed, 29 Apr 2015 12:07:38 +0000 (UTC) Received: by widdi4 with SMTP id di4so63175291wid.0; Wed, 29 Apr 2015 05:07:36 -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:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=T5S8dN3wrwlIAsmqfWAWivHFzWWwseUs6EDAOM1a4fI=; b=r3rFniBd5UkBx0s1SaQ8DXs6pB99dUpJQdnKA7IA7oTbKyANJjJU26ENUzdQ/b5c33 5AkwtRJI/VZdQenAIRt1BYTVcoRtSAlObyh6jlcC0exrijnBdx+h49kA/sJ9F0tEb6tL 8Up5SrJ3xEnjakLob1/hFFXMHsWV/IL1Mrp6JsqScUjSVbvWZxPdUol5qgatyBPx7LX9 l5JtLxWxd1kCk5W7eRC3fZLKQUsVRfsYlV50JnewbzMcak3Tx8awTacmKztS2kCdoBne azz4Cr1NIHznlMXK0J31Kkv5osVkBvIU0tx2UdIVLTfK7qJvrzZ70mLnUnZ69iBoIuw0 Joyg== X-Received: by 10.194.61.208 with SMTP id s16mr42391945wjr.135.1430309256746; Wed, 29 Apr 2015 05:07:36 -0700 (PDT) Received: from [172.16.1.30] (53.Red-88-9-170.dynamicIP.rima-tde.net. [88.9.170.53]) by mx.google.com with ESMTPSA id xb3sm34263931wjc.38.2015.04.29.05.07.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 05:07:35 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <5540C981.3070103@FreeBSD.org> Date: Wed, 29 Apr 2015 14:07:29 +0200 From: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281789 - head References: <201504202033.t3KKXMPW019822@svn.freebsd.org> In-Reply-To: <201504202033.t3KKXMPW019822@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 12:07:38 -0000 Hello, El 20/04/15 a les 22.33, Eitan Adler ha escrit: > Author: eadler > Date: Mon Apr 20 20:33:22 2015 > New Revision: 281789 > URL: https://svnweb.freebsd.org/changeset/base/281789 > > Log: > phabricator related changes: > - don't lint either contrib or crypto: these are both externally written > directories > - add additional linters for spelling (check common typos like teh -> > the) > - chmod linter checks for executible bit on bad files > - merge-conflict checks for merge conflict tokens then may have been > resolved incorrectly > - filename checks for back characters in filenames > - json for json syntax correctness > > - remove history.immutable: it is meaningless on subversion, and causes > workflow problems when trying to use git. It it set to 'true' by > default with hg I've never had workflow problems with it when using git. Now every time I use arc diff... arc mangles my commit message by adding "Reviewers:" and "Subscribers:" tags. Could we leave "history.immutable" : true please? Roger. From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 12:31:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5585C455; Wed, 29 Apr 2015 12:31:29 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EEC261948; Wed, 29 Apr 2015 12:31:28 +0000 (UTC) Received: by wgen6 with SMTP id n6so26391037wge.3; Wed, 29 Apr 2015 05:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=lKPEY8dCP1MsKVSlrVVr+ZZ0GIbulcTVq3vAQkkbDLs=; b=M5o1I4a7gUyJQ8actMgdwuvOdTYHbcwTvfGAZeEDwFgBbXGymatG2fMPP6zrrquyXU yGM59z2E7Cc5HUq1yYqbNcC41jJVtYx9QhoKz0F8qhWXxXxzI6KrAeFeFLm2nt5A/SJl x6/lkPdahIWfz7vVsP/uGCXx2ucHg+Y5z47x4N1I53WRadtaXyaV6SZm9g0nd0+G/oBm S9uTRUU0Md9R65GUMQ2aX0mcGjllMLyjGp8ANKiuMSxkUnrmlgPf3tBRToKxxogGv4c9 nSFNnmUR+UkGNidvMoJwFhFF+WfWWSwvWF/JrIxj0Oobf89sgTdo/6xjZZKmKxKGJDHS dcGw== X-Received: by 10.194.60.173 with SMTP id i13mr41081987wjr.124.1430310687395; Wed, 29 Apr 2015 05:31:27 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id k9sm21025110wia.6.2015.04.29.05.31.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 05:31:26 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 29 Apr 2015 14:31:24 +0200 From: Baptiste Daroussin To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281789 - head Message-ID: <20150429123124.GJ13141@ivaldir.etoilebsd.net> References: <201504202033.t3KKXMPW019822@svn.freebsd.org> <5540C981.3070103@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liqSWPDvh3eyfZ9k" Content-Disposition: inline In-Reply-To: <5540C981.3070103@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 12:31:29 -0000 --liqSWPDvh3eyfZ9k Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 29, 2015 at 02:07:29PM +0200, Roger Pau Monn=E9 wrote: > Hello, >=20 > El 20/04/15 a les 22.33, Eitan Adler ha escrit: > > Author: eadler > > Date: Mon Apr 20 20:33:22 2015 > > New Revision: 281789 > > URL: https://svnweb.freebsd.org/changeset/base/281789 > >=20 > > Log: > > phabricator related changes: > > - don't lint either contrib or crypto: these are both externally wri= tten > > directories > > - add additional linters for spelling (check common typos like teh -> > > the) > > - chmod linter checks for executible bit on bad files > > - merge-conflict checks for merge conflict tokens then may have been > > resolved incorrectly > > - filename checks for back characters in filenames > > - json for json syntax correctness > > =20 > > - remove history.immutable: it is meaningless on subversion, and cau= ses > > workflow problems when trying to use git. It it set to 'true' by > > default with hg >=20 > I've never had workflow problems with it when using git. Now every time > I use arc diff... arc mangles my commit message by adding "Reviewers:" > and "Subscribers:" tags. Could we leave "history.immutable" : true please? @eadler: That is the reason why I set history.immutable in the first place (note tha= t I could not remember since :)) so yes my commit message at the time should ha= ve been more informational, that would have helped. Best regards, Bapt --liqSWPDvh3eyfZ9k Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVAzxwACgkQ8kTtMUmk6Ey9bACgsFiMoAm/2y6QNGk0QN+UKZs1 5rAAn0CyCoNhooxTU/i1pC6oY69RhKmv =PSpm -----END PGP SIGNATURE----- --liqSWPDvh3eyfZ9k-- From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 12:33:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CA265C0; Wed, 29 Apr 2015 12:33:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D86A195A; Wed, 29 Apr 2015 12:33:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TCX1ux078173; Wed, 29 Apr 2015 12:33:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TCX0S7078170; Wed, 29 Apr 2015 12:33:00 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504291233.t3TCX0S7078170@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 29 Apr 2015 12:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282214 - head/usr.sbin/mountd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 12:33:01 -0000 Author: trasz Date: Wed Apr 29 12:33:00 2015 New Revision: 282214 URL: https://svnweb.freebsd.org/changeset/base/282214 Log: Remove oldnfs leftovers from mountd(8). Reviewed by: rmacklem@ Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/mountd/mountd.8 head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.8 ============================================================================== --- head/usr.sbin/mountd/mountd.8 Wed Apr 29 10:23:02 2015 (r282213) +++ head/usr.sbin/mountd/mountd.8 Wed Apr 29 12:33:00 2015 (r282214) @@ -38,7 +38,7 @@ mount requests .Sh SYNOPSIS .Nm -.Op Fl 2delnorS +.Op Fl 2delnrS .Op Fl h Ar bindip .Op Fl p Ar port .Op Ar exportsfile ... @@ -69,8 +69,7 @@ Output debugging information. will not detach from the controlling terminal and will print debugging messages to stderr. .It Fl e -The new NFS server that includes NFSv4 support is now the default, so this -option is now a no-op and should be considered deprecated. +Ignored; included for backward compatibility. .It Fl h Ar bindip Specify specific IP addresses to bind to for TCP and UDP requests. This option may be specified multiple times. @@ -98,9 +97,6 @@ This should only be specified if there a that require it. It will automatically clear the vfs.nfsrv.nfs_privport sysctl flag, which controls if the kernel will accept NFS requests from reserved ports only. -.It Fl o -This flag forces the system to run the old NFS server, which does not -have NFSv4 support in it. .It Fl p Ar port Force .Nm Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Wed Apr 29 10:23:02 2015 (r282213) +++ head/usr.sbin/mountd/mountd.c Wed Apr 29 12:33:00 2015 (r282214) @@ -253,7 +253,6 @@ static int have_v6 = 1; int v4root_phase = 0; char v4root_dirpath[PATH_MAX + 1]; -int run_v4server = 1; int has_publicfh = 0; struct pidfh *pfh = NULL; @@ -312,7 +311,7 @@ main(int argc, char **argv) else close(s); - while ((c = getopt(argc, argv, "2deh:lnop:rS")) != -1) + while ((c = getopt(argc, argv, "2deh:lnp:rS")) != -1) switch (c) { case '2': force_v2 = 1; @@ -332,9 +331,6 @@ main(int argc, char **argv) case 'l': dolog = 1; break; - case 'o': - run_v4server = 0; - break; case 'p': endptr = NULL; svcport = (in_port_t)strtoul(optarg, &endptr, 10); @@ -371,19 +367,9 @@ main(int argc, char **argv) usage(); }; - /* - * Unless the "-o" option was specified, try and run "nfsd". - * If "-o" was specified, try and run "nfsserver". - */ - if (run_v4server > 0) { - if (modfind("nfsd") < 0) { - /* Not present in kernel, try loading it */ - if (kldload("nfsd") < 0 || modfind("nfsd") < 0) - errx(1, "NFS server is not available"); - } - } else if (modfind("nfsserver") < 0) { + if (modfind("nfsd") < 0) { /* Not present in kernel, try loading it */ - if (kldload("nfsserver") < 0 || modfind("nfsserver") < 0) + if (kldload("nfsd") < 0 || modfind("nfsd") < 0) errx(1, "NFS server is not available"); } @@ -1697,8 +1683,7 @@ get_exportlist(void) */ bzero(&eargs, sizeof (eargs)); eargs.export.ex_flags = MNT_DELEXPORT; - if (run_v4server > 0 && - nfssvc(NFSSVC_V4ROOTEXPORT, (caddr_t)&eargs) < 0 && + if (nfssvc(NFSSVC_V4ROOTEXPORT, (caddr_t)&eargs) < 0 && errno != ENOENT) syslog(LOG_ERR, "Can't delete exports for V4:"); @@ -1803,7 +1788,7 @@ get_exportlist(void) /* * If there was no public fh, clear any previous one set. */ - if (run_v4server > 0 && has_publicfh == 0) + if (has_publicfh == 0) (void) nfssvc(NFSSVC_NOPUBLICFH, NULL); /* Resume the nfsd. If they weren't suspended, this is harmless. */ @@ -2400,7 +2385,7 @@ do_mount(struct exportlist *ep, struct g { struct statfs fsb1; struct addrinfo *ai; - struct export_args ea, *eap; + struct export_args *eap; char errmsg[255]; char *cp; int done; @@ -2410,10 +2395,7 @@ do_mount(struct exportlist *ep, struct g int ret; struct nfsex_args nfsea; - if (run_v4server > 0) - eap = &nfsea.export; - else - eap = &ea; + eap = &nfsea.export; cp = NULL; savedc = '\0'; @@ -2493,8 +2475,7 @@ do_mount(struct exportlist *ep, struct g */ if (v4root_phase == 2) { nfsea.fspec = v4root_dirpath; - if (run_v4server > 0 && - nfssvc(NFSSVC_V4ROOTEXPORT, (caddr_t)&nfsea) < 0) { + if (nfssvc(NFSSVC_V4ROOTEXPORT, (caddr_t)&nfsea) < 0) { syslog(LOG_ERR, "Exporting V4: failed"); return (2); } @@ -2583,7 +2564,7 @@ do_mount(struct exportlist *ep, struct g * If this is the public directory, get the file handle * and load it into the kernel via the nfssvc() syscall. */ - if (run_v4server > 0 && (exflags & MNT_EXPUBLIC) != 0) { + if ((exflags & MNT_EXPUBLIC) != 0) { fhandle_t fh; char *public_name; From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 12:37:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B956A7AA; Wed, 29 Apr 2015 12:37:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7CAB19A0; Wed, 29 Apr 2015 12:37:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TCbk6x078838; Wed, 29 Apr 2015 12:37:46 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TCbkKi078834; Wed, 29 Apr 2015 12:37:46 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201504291237.t3TCbkKi078834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 29 Apr 2015 12:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282215 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 12:37:46 -0000 Author: gnn Date: Wed Apr 29 12:37:45 2015 New Revision: 282215 URL: https://svnweb.freebsd.org/changeset/base/282215 Log: Make it possible to statically link SIFTR into the kernel as a new option. Reviewed by: bz Discussed with: lstewart MFC after: 2 weeks Modified: head/sys/conf/files head/sys/conf/options Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 29 12:33:00 2015 (r282214) +++ head/sys/conf/files Wed Apr 29 12:37:45 2015 (r282215) @@ -3502,6 +3502,7 @@ netinet/sctp_sysctl.c optional inet sct netinet/sctp_timer.c optional inet sctp | inet6 sctp netinet/sctp_usrreq.c optional inet sctp | inet6 sctp netinet/sctputil.c optional inet sctp | inet6 sctp +netinet/siftr.c optional inet siftr alq | inet6 siftr alq netinet/tcp_debug.c optional tcpdebug netinet/tcp_hostcache.c optional inet | inet6 netinet/tcp_input.c optional inet | inet6 Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Apr 29 12:33:00 2015 (r282214) +++ head/sys/conf/options Wed Apr 29 12:37:45 2015 (r282215) @@ -432,6 +432,7 @@ ROUTETABLES opt_route.h RSS opt_rss.h SLIP_IFF_OPTS opt_slip.h TCPDEBUG +SIFTR TCP_OFFLOAD opt_inet.h # Enable code to dispatch TCP offloading TCP_SIGNATURE opt_inet.h VLAN_ARRAY opt_vlan.h From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 12:53:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6082EC83; Wed, 29 Apr 2015 12:53:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34A461BB7; Wed, 29 Apr 2015 12:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TCrg6c088052; Wed, 29 Apr 2015 12:53:42 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TCrgL4088051; Wed, 29 Apr 2015 12:53:42 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201504291253.t3TCrgL4088051@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Wed, 29 Apr 2015 12:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282216 - head/sys/dev/vt/hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 12:53:42 -0000 Author: royger Date: Wed Apr 29 12:53:41 2015 New Revision: 282216 URL: https://svnweb.freebsd.org/changeset/base/282216 Log: vt_vga: add a timeout while waiting for vertical retrace On one of my systems FreeBSD will fail to boot because vt_vga gets stuck waiting for the vertical retrace if there's no monitor attached. Fix this by adding a timeout and exiting if the vertical retrace times out. Sponsored by: Citrix Systems R&D Reviewed by: emaste, dumbbell Differential Revision: https://reviews.freebsd.org/D2397 Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Wed Apr 29 12:37:45 2015 (r282215) +++ head/sys/dev/vt/hw/vga/vt_vga.c Wed Apr 29 12:53:41 2015 (r282216) @@ -1035,11 +1035,12 @@ vga_initialize_graphics(struct vt_device REG_WRITE1(sc, VGA_GC_DATA, 0xff); } -static void +static int vga_initialize(struct vt_device *vd, int textmode) { struct vga_softc *sc = vd->vd_softc; uint8_t x; + int timeout; /* Make sure the VGA adapter is not in monochrome emulation mode. */ x = REG_READ1(sc, VGA_GEN_MISC_OUTPUT_R); @@ -1060,10 +1061,16 @@ vga_initialize(struct vt_device *vd, int * code therefore also removes that guarantee and appropriate measures * need to be taken. */ + timeout = 10000; do { + DELAY(10); x = REG_READ1(sc, VGA_GEN_INPUT_STAT_1); x &= VGA_GEN_IS1_VR | VGA_GEN_IS1_DE; - } while (x != (VGA_GEN_IS1_VR | VGA_GEN_IS1_DE)); + } while (x != (VGA_GEN_IS1_VR | VGA_GEN_IS1_DE) && --timeout != 0); + if (timeout == 0) { + printf("Timeout initializing vt_vga\n"); + return (ENXIO); + } /* Now, disable the sync. signals. */ REG_WRITE1(sc, VGA_CRTC_ADDRESS, VGA_CRTC_MODE_CONTROL); @@ -1194,6 +1201,8 @@ vga_initialize(struct vt_device *vd, int */ sc->vga_curfg = sc->vga_curbg = 0xff; } + + return (0); } static int @@ -1235,7 +1244,8 @@ vga_init(struct vt_device *vd) vd->vd_width = VT_VGA_WIDTH; vd->vd_height = VT_VGA_HEIGHT; } - vga_initialize(vd, textmode); + if (vga_initialize(vd, textmode) != 0) + return (CN_DEAD); sc->vga_enabled = true; return (CN_INTERNAL); From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 12:57:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CFBFF73; Wed, 29 Apr 2015 12:57:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D50EE1BFF; Wed, 29 Apr 2015 12:57:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TCvvVS088813; Wed, 29 Apr 2015 12:57:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TCvuk9088807; Wed, 29 Apr 2015 12:57:56 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504291257.t3TCvuk9088807@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 29 Apr 2015 12:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282218 - in head/share/doc/usd: 06.bc 10.exref/exref 18.msdiffs 22.trofftut contents X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 12:57:58 -0000 Author: bapt Date: Wed Apr 29 12:57:55 2015 New Revision: 282218 URL: https://svnweb.freebsd.org/changeset/base/282218 Log: Explicitly declare to not print the current date Found with heirloom-doctools which uses the original AT&T macros Modified: head/share/doc/usd/06.bc/bc head/share/doc/usd/10.exref/exref/ex.rm head/share/doc/usd/18.msdiffs/ms.diffs head/share/doc/usd/22.trofftut/tt00 head/share/doc/usd/contents/contents.ms Modified: head/share/doc/usd/06.bc/bc ============================================================================== --- head/share/doc/usd/06.bc/bc Wed Apr 29 12:54:21 2015 (r282217) +++ head/share/doc/usd/06.bc/bc Wed Apr 29 12:57:55 2015 (r282218) @@ -42,6 +42,7 @@ .EH 'USD:6-%''BC \- An Arbitrary Precision Desk-Calculator Language' .OH 'BC \- An Arbitrary Precision Desk-Calculator Language''USD:6-%' .\".RP +.ND .TL BC \- An Arbitrary Precision Desk-Calculator Language .AU Modified: head/share/doc/usd/10.exref/exref/ex.rm ============================================================================== --- head/share/doc/usd/10.exref/exref/ex.rm Wed Apr 29 12:54:21 2015 (r282217) +++ head/share/doc/usd/10.exref/exref/ex.rm Wed Apr 29 12:57:55 2015 (r282218) @@ -30,11 +30,13 @@ .\" SUCH DAMAGE. .\" .\" @(#)ex.rm 8.5 (Berkeley) 8/18/96 +.\" $FreeBSD$ .\" .nr LL 6.5i .nr FL 6.5i .EH 'USD:12-%''Ex Reference Manual' .OH 'Ex Reference Manual''USD:12-%' +.ND .nr )P 0 .de ZP .nr pd \\n()P Modified: head/share/doc/usd/18.msdiffs/ms.diffs ============================================================================== --- head/share/doc/usd/18.msdiffs/ms.diffs Wed Apr 29 12:54:21 2015 (r282217) +++ head/share/doc/usd/18.msdiffs/ms.diffs Wed Apr 29 12:57:55 2015 (r282218) @@ -37,6 +37,7 @@ .AM .OH 'A Revised Version of \*ms''USD:18-%' .EH 'USD:18-%''A Revised Version of \*ms' +.ND .TL A Revised Version of \*ms .AU Modified: head/share/doc/usd/22.trofftut/tt00 ============================================================================== --- head/share/doc/usd/22.trofftut/tt00 Wed Apr 29 12:54:21 2015 (r282217) +++ head/share/doc/usd/22.trofftut/tt00 Wed Apr 29 12:57:55 2015 (r282218) @@ -46,6 +46,7 @@ .OH 'A TROFF Tutorial''USD:22-%' .\".RP .\" .....TM 76-1273-7 39199 39199-11 +.ND .TL A TROFF Tutorial .AU "MH 2C-518" 6021 Modified: head/share/doc/usd/contents/contents.ms ============================================================================== --- head/share/doc/usd/contents/contents.ms Wed Apr 29 12:54:21 2015 (r282217) +++ head/share/doc/usd/contents/contents.ms Wed Apr 29 12:57:55 2015 (r282218) @@ -35,6 +35,7 @@ .. .OH '''USD Contents' .EH 'USD Contents''' +.ND .TL UNIX User's Supplementary Documents (USD) .if !r.U .nr .U 0 From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 13:30:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46B91669; Wed, 29 Apr 2015 13:30:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 347B31F66; Wed, 29 Apr 2015 13:30:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TDU5gk003840; Wed, 29 Apr 2015 13:30:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TDU4Yt003838; Wed, 29 Apr 2015 13:30:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504291330.t3TDU4Yt003838@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 29 Apr 2015 13:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282219 - in head: . share/doc/papers share/doc/papers/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 13:30:05 -0000 Author: bapt Date: Wed Apr 29 13:30:04 2015 New Revision: 282219 URL: https://svnweb.freebsd.org/changeset/base/282219 Log: Remove never written documentation Deleted: head/share/doc/papers/hwpmc/ Modified: head/ObsoleteFiles.inc head/share/doc/papers/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Apr 29 12:57:55 2015 (r282218) +++ head/ObsoleteFiles.inc Wed Apr 29 13:30:04 2015 (r282219) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20150429: +OLD_FILES+=usr/share/docs/papers/hwpmc.ascii.gz # 20150427: test/sys/kern/mmap_test moved to test/sys/vm/mmap_test OLD_FILES+=usr/tests/sys/kern/mmap_test # 20150418 Modified: head/share/doc/papers/Makefile ============================================================================== --- head/share/doc/papers/Makefile Wed Apr 29 12:57:55 2015 (r282218) +++ head/share/doc/papers/Makefile Wed Apr 29 13:30:04 2015 (r282219) @@ -6,7 +6,6 @@ SUBDIR= beyond4.3 \ devfs \ diskperf \ fsinterface \ - hwpmc \ jail \ kernmalloc \ kerntune \ From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 14:17:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61F89678; Wed, 29 Apr 2015 14:17:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5097D1546; Wed, 29 Apr 2015 14:17:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TEHfUJ028945; Wed, 29 Apr 2015 14:17:41 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TEHfKN028944; Wed, 29 Apr 2015 14:17:41 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201504291417.t3TEHfKN028944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 29 Apr 2015 14:17:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282220 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 14:17:41 -0000 Author: smh Date: Wed Apr 29 14:17:40 2015 New Revision: 282220 URL: https://svnweb.freebsd.org/changeset/base/282220 Log: Correct date typo in UPDATING MFC after: 1 month X-MFC-With: r282208 Sponsored by: Multiplay Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Apr 29 13:30:04 2015 (r282219) +++ head/UPDATING Wed Apr 29 14:17:40 2015 (r282220) @@ -31,7 +31,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20150523: +20150423: chmod, chflags, chown and chgrp now affect symlinks in -R mode as defined in symlink(7); previously symlinks were silently ignored. From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 15:00:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2BEE633; Wed, 29 Apr 2015 15:00:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0D551A5C; Wed, 29 Apr 2015 15:00:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TF0ilt051716; Wed, 29 Apr 2015 15:00:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TF0idE051713; Wed, 29 Apr 2015 15:00:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201504291500.t3TF0idE051713@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 29 Apr 2015 15:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282221 - in head/sys/arm64: arm64 include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 15:00:44 -0000 Author: andrew Date: Wed Apr 29 15:00:43 2015 New Revision: 282221 URL: https://svnweb.freebsd.org/changeset/base/282221 Log: Add pmap_mapbios and pmap_unmapbios. These will be needed to support acpi. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/pmap.c head/sys/arm64/include/pmap.h Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Apr 29 14:17:40 2015 (r282220) +++ head/sys/arm64/arm64/pmap.c Wed Apr 29 15:00:43 2015 (r282221) @@ -2936,6 +2936,18 @@ pmap_clear_modify(vm_page_t m) /* TODO: We lack support for tracking if a page is modified */ } +void * +pmap_mapbios(vm_paddr_t pa, vm_size_t size) +{ + + return ((void *)PHYS_TO_DMAP(pa)); +} + +void +pmap_unmapbios(vm_paddr_t pa, vm_size_t size) +{ +} + /* * Sets the memory attribute for the specified page. */ Modified: head/sys/arm64/include/pmap.h ============================================================================== --- head/sys/arm64/include/pmap.h Wed Apr 29 14:17:40 2015 (r282220) +++ head/sys/arm64/include/pmap.h Wed Apr 29 15:00:43 2015 (r282221) @@ -142,7 +142,9 @@ void pmap_kremove(vm_offset_t); void pmap_kremove_device(vm_offset_t, vm_size_t); void *pmap_mapdev(vm_offset_t, vm_size_t); +void *pmap_mapbios(vm_paddr_t, vm_size_t); void pmap_unmapdev(vm_offset_t, vm_size_t); +void pmap_unmapbios(vm_offset_t, vm_size_t); boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 15:33:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93557428; Wed, 29 Apr 2015 15:33:25 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E49C1EA5; Wed, 29 Apr 2015 15:33:25 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7E58CB95B; Wed, 29 Apr 2015 11:33:24 -0400 (EDT) From: John Baldwin To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282221 - in head/sys/arm64: arm64 include Date: Wed, 29 Apr 2015 11:33:22 -0400 Message-ID: <1602946.NmUd8I4zFq@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504291500.t3TF0idE051713@svn.freebsd.org> References: <201504291500.t3TF0idE051713@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 29 Apr 2015 11:33:24 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 15:33:25 -0000 On Wednesday, April 29, 2015 03:00:44 PM Andrew Turner wrote: > Author: andrew > Date: Wed Apr 29 15:00:43 2015 > New Revision: 282221 > URL: https://svnweb.freebsd.org/changeset/base/282221 > > Log: > Add pmap_mapbios and pmap_unmapbios. These will be needed to support acpi. > > Sponsored by: The FreeBSD Foundation I should have called these pmap_map_firmware() or some such instead, though it's really more like pmap_map_firmware_table(). :-/ -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 15:41:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC18C794; Wed, 29 Apr 2015 15:41:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAA021FB7; Wed, 29 Apr 2015 15:41:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TFfJRP072153; Wed, 29 Apr 2015 15:41:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TFfJMq072138; Wed, 29 Apr 2015 15:41:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504291541.t3TFfJMq072138@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 29 Apr 2015 15:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282226 - head/sys/dev/kbdmux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 15:41:19 -0000 Author: pfg Date: Wed Apr 29 15:41:19 2015 New Revision: 282226 URL: https://svnweb.freebsd.org/changeset/base/282226 Log: Plug memory leaks in kbdmux(4) (take 2) This is a fix to the previous attempt in r281889, which some (most?) keyboards. Discussed with: emaste, jkim Found by: clang static analyzer CID: 1007072 CID: 1007073 CID: 1007074 Modified: head/sys/dev/kbdmux/kbdmux.c Modified: head/sys/dev/kbdmux/kbdmux.c ============================================================================== --- head/sys/dev/kbdmux/kbdmux.c Wed Apr 29 15:33:55 2015 (r282225) +++ head/sys/dev/kbdmux/kbdmux.c Wed Apr 29 15:41:19 2015 (r282226) @@ -470,6 +470,10 @@ kbdmux_init(int unit, keyboard_t **kbdp, KBDMUX_LOCK(state); callout_reset(&state->ks_timo, TICKS, kbdmux_kbd_intr_timo, state); KBDMUX_UNLOCK(state); + } else if (needfree) { + free(accmap, M_KBDMUX); + free(fkeymap, M_KBDMUX); + free(keymap, M_KBDMUX); } return (0); From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 15:46:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34BCC95C; Wed, 29 Apr 2015 15:46:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23F341FF6; Wed, 29 Apr 2015 15:46:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TFkwbo073638; Wed, 29 Apr 2015 15:46:58 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TFkwwU073637; Wed, 29 Apr 2015 15:46:58 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504291546.t3TFkwwU073637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 29 Apr 2015 15:46:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282227 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 15:46:58 -0000 Author: pfg Date: Wed Apr 29 15:46:57 2015 New Revision: 282227 URL: https://svnweb.freebsd.org/changeset/base/282227 Log: Fix memory leak in scsi_scan_bus() CID: 1007770 PR: 199671 Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Wed Apr 29 15:41:19 2015 (r282226) +++ head/sys/cam/scsi/scsi_xpt.c Wed Apr 29 15:46:57 2015 (r282227) @@ -2008,6 +2008,7 @@ scsi_scan_bus(struct cam_periph *periph, " with status %#x, bus scan halted\n", status); free(scan_info, M_CAMXPT); + scan_info = NULL; request_ccb->ccb_h.status = status; xpt_free_ccb(work_ccb); xpt_done(request_ccb); @@ -2017,6 +2018,7 @@ scsi_scan_bus(struct cam_periph *periph, if (work_ccb == NULL) { xpt_free_ccb((union ccb *)scan_info->cpi); free(scan_info, M_CAMXPT); + scan_info = NULL; xpt_free_path(path); request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; xpt_done(request_ccb); @@ -2032,6 +2034,7 @@ scsi_scan_bus(struct cam_periph *periph, xpt_action(work_ccb); } + free(scan_info, M_CAMXPT); mtx_lock(mtx); break; } From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 15:57:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E66BEC7; Wed, 29 Apr 2015 15:57:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40466115C; Wed, 29 Apr 2015 15:57:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TFvFmn078545; Wed, 29 Apr 2015 15:57:15 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TFvEFV078542; Wed, 29 Apr 2015 15:57:14 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201504291557.t3TFvEFV078542@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Wed, 29 Apr 2015 15:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282228 - in head/sys: boot/forth vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 15:57:15 -0000 Author: scottl Date: Wed Apr 29 15:57:14 2015 New Revision: 282228 URL: https://svnweb.freebsd.org/changeset/base/282228 Log: Improve support for blacklisting bad memory locations. The user can supply a text file with a list of physical memory addresses to exclude, and have it loaded at boot time via the provided example in loader.conf. The tunable 'vm.blacklist' remains, but using an external file means that there's no practical limit to the size of the list. This change also improves the scanning algorithm for processing the list, scanning the list only once instead of scanning it for every page in the system. Both the sysctl and the file can be unsorted and contain duplicates so long as each entry is numeric (decimal or hex) and is separated by a space, comma, or newline character. The sysctl 'vm.page_blacklist' is now provided to report what memory locations were successfully excluded. Reviewed by: imp, emax Obtained from: Netflix, Inc. MFC after: 3 days Modified: head/sys/boot/forth/loader.conf head/sys/vm/vm_page.c Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Wed Apr 29 15:46:57 2015 (r282227) +++ head/sys/boot/forth/loader.conf Wed Apr 29 15:57:14 2015 (r282228) @@ -48,6 +48,16 @@ entropy_cache_type="/boot/entropy" #kern.random.sys.seeded="0" # Set this to 1 to start /dev/random # without waiting for a (re)seed. +############################################################## +### RAM Blacklist configuration ############################# +############################################################## + +ram_blacklist_load="NO" # Set this to YES to load a file + # containing a list of addresses to + # exclude from the running system. +ram_blacklist_name="/boot/blacklist.txt" # Set this to the name of the file +ram_blacklist_type="ram_blacklist" # Required for the kernel to find + # the blacklist module ############################################################## ### Loader settings ######################################## Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Apr 29 15:46:57 2015 (r282227) +++ head/sys/vm/vm_page.c Wed Apr 29 15:57:14 2015 (r282228) @@ -91,12 +91,14 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -142,6 +144,12 @@ static int pa_tryrelock_restart; SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD, &pa_tryrelock_restart, 0, "Number of tryrelock restarts"); +static TAILQ_HEAD(, vm_page) blacklist_head; +static int sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_blacklist, "A", "Blacklist pages"); + + static uma_zone_t fakepg_zone; static struct vnode *vm_page_alloc_init(vm_page_t m); @@ -216,35 +224,153 @@ vm_set_page_size(void) } /* - * vm_page_blacklist_lookup: + * vm_page_blacklist_next: * - * See if a physical address in this page has been listed - * in the blacklist tunable. Entries in the tunable are - * separated by spaces or commas. If an invalid integer is - * encountered then the rest of the string is skipped. + * Find the next entry in the provided string of blacklist + * addresses. Entries are separated by space, comma, or newline. + * If an invalid integer is encountered then the rest of the + * string is skipped. Updates the list pointer to the next + * character, or NULL if the string is exhausted or invalid. */ -static int -vm_page_blacklist_lookup(char *list, vm_paddr_t pa) +static vm_paddr_t +vm_page_blacklist_next(char **list, char *end) { vm_paddr_t bad; char *cp, *pos; - for (pos = list; *pos != '\0'; pos = cp) { + if (list == NULL || *list == NULL) + return (0); + if (**list =='\0') { + *list = NULL; + return (0); + } + + /* + * If there's no end pointer then the buffer is coming from + * the kenv and we know it's null-terminated. + */ + if (end == NULL) + end = *list + strlen(*list); + + /* Ensure that strtoq() won't walk off the end */ + if (*end != '\0') { + if (*end == '\n' || *end == ' ' || *end == ',') + *end = '\0'; + else { + printf("Blacklist not terminated, skipping\n"); + *list = NULL; + return (0); + } + } + + for (pos = *list; *pos != '\0'; pos = cp) { bad = strtoq(pos, &cp, 0); - if (*cp != '\0') { - if (*cp == ' ' || *cp == ',') { - cp++; - if (cp == pos) + if (*cp == '\0' || *cp == ' ' || *cp == ',' || *cp == '\n') { + if (bad == 0) { + if (++cp < end) continue; - } else - break; - } - if (pa == trunc_page(bad)) - return (1); + else + break; + } + } else + break; + if (*cp == '\0' || ++cp >= end) + *list = NULL; + else + *list = cp; + return (trunc_page(bad)); } + printf("Garbage in RAM blacklist, skipping\n"); + *list = NULL; return (0); } +/* + * vm_page_blacklist_check: + * + * Iterate through the provided string of blacklist addresses, pulling + * each entry out of the physical allocator free list and putting it + * onto a list for reporting via the vm.page_blacklist sysctl. + */ +static void +vm_page_blacklist_check(char *list, char *end) +{ + vm_paddr_t pa; + vm_page_t m; + char *next; + int ret; + + next = list; + while (next != NULL) { + if ((pa = vm_page_blacklist_next(&next, end)) == 0) + continue; + m = vm_phys_paddr_to_vm_page(pa); + if (m == NULL) + continue; + mtx_lock(&vm_page_queue_free_mtx); + ret = vm_phys_unfree_page(m); + mtx_unlock(&vm_page_queue_free_mtx); + if (ret == TRUE) { + TAILQ_INSERT_TAIL(&blacklist_head, m, listq); + if (bootverbose) + printf("Skipping page with pa 0x%jx\n", + (uintmax_t)pa); + } + } +} + +/* + * vm_page_blacklist_load: + * + * Search for a special module named "ram_blacklist". It'll be a + * plain text file provided by the user via the loader directive + * of the same name. + */ +static void +vm_page_blacklist_load(char **list, char **end) +{ + void *mod; + u_char *ptr; + u_int len; + + mod = NULL; + ptr = NULL; + + mod = preload_search_by_type("ram_blacklist"); + if (mod != NULL) { + ptr = preload_fetch_addr(mod); + len = preload_fetch_size(mod); + } + *list = ptr; + if (ptr != NULL) + *end = ptr + len; + else + *end = NULL; + return; +} + +static int +sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) +{ + vm_page_t m; + struct sbuf sbuf; + int error, first; + + first = 1; + error = sysctl_wire_old_buffer(req, 0); + if (error != 0) + return (error); + sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + TAILQ_FOREACH(m, &blacklist_head, listq) { + sbuf_printf(&sbuf, "%s%#jx", first ? "" : ",", + (uintmax_t)m->phys_addr); + first = 0; + } + error = sbuf_finish(&sbuf); + sbuf_delete(&sbuf); + return (error); +} + static void vm_page_domain_init(struct vm_domain *vmd) { @@ -290,7 +416,7 @@ vm_page_startup(vm_offset_t vaddr) int i; vm_paddr_t pa; vm_paddr_t last_pa; - char *list; + char *list, *listend; vm_paddr_t end; vm_paddr_t biggestsize; vm_paddr_t low_water, high_water; @@ -477,20 +603,22 @@ vm_page_startup(vm_offset_t vaddr) */ vm_cnt.v_page_count = 0; vm_cnt.v_free_count = 0; - list = kern_getenv("vm.blacklist"); for (i = 0; phys_avail[i + 1] != 0; i += 2) { pa = phys_avail[i]; last_pa = phys_avail[i + 1]; while (pa < last_pa) { - if (list != NULL && - vm_page_blacklist_lookup(list, pa)) - printf("Skipping page with pa 0x%jx\n", - (uintmax_t)pa); - else - vm_phys_add_page(pa); + vm_phys_add_page(pa); pa += PAGE_SIZE; } } + + TAILQ_INIT(&blacklist_head); + vm_page_blacklist_load(&list, &listend); + vm_page_blacklist_check(list, listend); + + list = kern_getenv("vm.blacklist"); + vm_page_blacklist_check(list, NULL); + freeenv(list); #if VM_NRESERVLEVEL > 0 /* From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 16:05:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87F5C50D; Wed, 29 Apr 2015 16:05:31 +0000 (UTC) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 53B7B1287; Wed, 29 Apr 2015 16:05:31 +0000 (UTC) Received: from bender (bender.sec.cl.cam.ac.uk [IPv6:2001:630:212:2a8:4e72:b9ff:fe93:61bf]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 56766D7A6F; Wed, 29 Apr 2015 16:05:29 +0000 (UTC) Date: Wed, 29 Apr 2015 17:05:29 +0100 From: Andrew Turner To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282221 - in head/sys/arm64: arm64 include Message-ID: <20150429170529.0777fa97@bender> In-Reply-To: <1602946.NmUd8I4zFq@ralph.baldwin.cx> References: <201504291500.t3TF0idE051713@svn.freebsd.org> <1602946.NmUd8I4zFq@ralph.baldwin.cx> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 16:05:31 -0000 On Wed, 29 Apr 2015 11:33:22 -0400 John Baldwin wrote: > On Wednesday, April 29, 2015 03:00:44 PM Andrew Turner wrote: > > Author: andrew > > Date: Wed Apr 29 15:00:43 2015 > > New Revision: 282221 > > URL: https://svnweb.freebsd.org/changeset/base/282221 > > > > Log: > > Add pmap_mapbios and pmap_unmapbios. These will be needed to > > support acpi. > > Sponsored by: The FreeBSD Foundation > > I should have called these pmap_map_firmware() or some such instead, > though it's really more like pmap_map_firmware_table(). :-/ > Fell free to rename them, the name makes sense on i386, less so on amd64, and none on arm64. Andrew From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 16:15:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B1868DC; Wed, 29 Apr 2015 16:15:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8948313AE; Wed, 29 Apr 2015 16:15:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TGFRjm088508; Wed, 29 Apr 2015 16:15:27 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TGFRiR088507; Wed, 29 Apr 2015 16:15:27 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504291615.t3TGFRiR088507@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 29 Apr 2015 16:15:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282229 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 16:15:27 -0000 Author: gjb Date: Wed Apr 29 16:15:26 2015 New Revision: 282229 URL: https://svnweb.freebsd.org/changeset/base/282229 Log: Document r280297, OpenSSL updated to version 1.0.1m. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 29 15:57:14 2015 (r282228) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 29 16:15:26 2015 (r282229) @@ -403,12 +403,12 @@ adding UTF-8 support to the &man.sh.1; shell. - OpenSSL has - been updated to version 1.0.1l. - The &man.xz.1; utility has been updated to support multi-threaded compression. + OpenSSL has + been updated to version 1.0.1m. + The elftoolchain utilities have been updated to version 3179. From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 16:41:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7BE49AD; Wed, 29 Apr 2015 16:41:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4B5E17AD; Wed, 29 Apr 2015 16:41:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TGfmIY003615; Wed, 29 Apr 2015 16:41:48 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TGfmHY003614; Wed, 29 Apr 2015 16:41:48 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201504291641.t3TGfmHY003614@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 29 Apr 2015 16:41:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282235 - head/share/doc/usd/06.bc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 16:41:49 -0000 Author: bapt Date: Wed Apr 29 16:41:48 2015 New Revision: 282235 URL: https://svnweb.freebsd.org/changeset/base/282235 Log: Fix mis usage of ms(7) macros Submitted by: heirloom doctools upstream Modified: head/share/doc/usd/06.bc/bc Modified: head/share/doc/usd/06.bc/bc ============================================================================== --- head/share/doc/usd/06.bc/bc Wed Apr 29 16:31:04 2015 (r282234) +++ head/share/doc/usd/06.bc/bc Wed Apr 29 16:41:48 2015 (r282235) @@ -36,8 +36,8 @@ .\" @(#)bc 6.2 (Berkeley) 4/17/91 .\" .if n \{\ -.po 5n -.ll 70n +.nr PO 5n +.nr LL 70n .\} .EH 'USD:6-%''BC \- An Arbitrary Precision Desk-Calculator Language' .OH 'BC \- An Arbitrary Precision Desk-Calculator Language''USD:6-%' From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 16:41:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 094079AE; Wed, 29 Apr 2015 16:41:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEF4417AE; Wed, 29 Apr 2015 16:41:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TGfnCU003661; Wed, 29 Apr 2015 16:41:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TGfnch003659; Wed, 29 Apr 2015 16:41:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504291641.t3TGfnch003659@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 29 Apr 2015 16:41:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282236 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 16:41:50 -0000 Author: trasz Date: Wed Apr 29 16:41:49 2015 New Revision: 282236 URL: https://svnweb.freebsd.org/changeset/base/282236 Log: Make rctl(8) more user-friendly when RACCT/RCTL is disabled for some reason. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Wed Apr 29 16:41:48 2015 (r282235) +++ head/usr.bin/rctl/rctl.c Wed Apr 29 16:41:49 2015 (r282236) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -305,13 +306,37 @@ print_rules(char *rules, int hflag, int } static void +enosys(void) +{ + int error, racct_enable; + size_t racct_enable_len; + + racct_enable_len = sizeof(racct_enable); + error = sysctlbyname("kern.racct.enable", + &racct_enable, &racct_enable_len, NULL, 0); + + if (error != 0) { + if (errno == ENOENT) + errx(1, "RACCT/RCTL support not present in kernel; see rctl(8) for details."); + + err(1, "sysctlbyname"); + } + + if (racct_enable == 0) + errx(1, "RACCT/RCTL present, but disabled; enable using kern.racct.enable=1 tunable"); +} + +static void add_rule(char *rule) { int error; error = rctl_add_rule(rule, strlen(rule) + 1, NULL, 0); - if (error != 0) + if (error != 0) { + if (errno == ENOSYS) + enosys(); err(1, "rctl_add_rule"); + } free(rule); } @@ -330,8 +355,11 @@ show_limits(char *filter, int hflag, int error = rctl_get_limits(filter, strlen(filter) + 1, outbuf, outbuflen); - if (error && errno != ERANGE) + if (error && errno != ERANGE) { + if (errno == ENOSYS) + enosys(); err(1, "rctl_get_limits"); + } } while (error && errno == ERANGE); print_rules(outbuf, hflag, nflag); @@ -345,8 +373,11 @@ remove_rule(char *filter) int error; error = rctl_remove_rule(filter, strlen(filter) + 1, NULL, 0); - if (error != 0) + if (error != 0) { + if (errno == ENOSYS) + enosys(); err(1, "rctl_remove_rule"); + } free(filter); } @@ -399,8 +430,11 @@ show_usage(char *filter, int hflag) error = rctl_get_racct(filter, strlen(filter) + 1, outbuf, outbuflen); - if (error && errno != ERANGE) + if (error && errno != ERANGE) { + if (errno == ENOSYS) + enosys(); err(1, "rctl_get_racct"); + } } while (error && errno == ERANGE); while ((tmp = strsep(&outbuf, ",")) != NULL) { @@ -439,8 +473,11 @@ show_rules(char *filter, int hflag, int err(1, "realloc"); error = rctl_get_rules(filter, filterlen, outbuf, outbuflen); - if (error && errno != ERANGE) + if (error && errno != ERANGE) { + if (errno == ENOSYS) + enosys(); err(1, "rctl_get_rules"); + } } while (error && errno == ERANGE); print_rules(outbuf, hflag, nflag); From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 16:45:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5189118; Wed, 29 Apr 2015 16:45:42 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6257B1823; Wed, 29 Apr 2015 16:45:41 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3TGjWZg016302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 29 Apr 2015 19:45:32 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3TGjWWp016301; Wed, 29 Apr 2015 19:45:32 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 29 Apr 2015 19:45:32 +0300 From: Gleb Smirnoff To: "George V. Neville-Neil" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282215 - head/sys/conf Message-ID: <20150429164532.GJ546@FreeBSD.org> References: <201504291237.t3TCbkKi078834@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504291237.t3TCbkKi078834@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 16:45:42 -0000 On Wed, Apr 29, 2015 at 12:37:46PM +0000, George V. Neville-Neil wrote: G> Author: gnn G> Date: Wed Apr 29 12:37:45 2015 G> New Revision: 282215 G> URL: https://svnweb.freebsd.org/changeset/base/282215 G> G> Log: G> Make it possible to statically link SIFTR into the kernel G> as a new option. G> G> Reviewed by: bz G> Discussed with: lstewart G> MFC after: 2 weeks G> G> Modified: G> head/sys/conf/files G> head/sys/conf/options You can also add it to NOTES file. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 16:52:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 360A15E5; Wed, 29 Apr 2015 16:52:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2497F195B; Wed, 29 Apr 2015 16:52:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TGqiD9009505; Wed, 29 Apr 2015 16:52:44 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TGqieA009504; Wed, 29 Apr 2015 16:52:44 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201504291652.t3TGqieA009504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Wed, 29 Apr 2015 16:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282237 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 16:52:44 -0000 Author: brd (doc,ports committer) Date: Wed Apr 29 16:52:43 2015 New Revision: 282237 URL: https://svnweb.freebsd.org/changeset/base/282237 Log: Fix typo Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 29 16:41:49 2015 (r282236) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Apr 29 16:52:43 2015 (r282237) @@ -413,7 +413,7 @@ elftoolchain utilities have been updated to version 3179. - The &man.xz.1; utility has been udpated + The &man.xz.1; utility has been updated to version 5.2.1. The &man.nvi.1; utility has been updated From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 16:55:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3D80943 for ; Wed, 29 Apr 2015 16:55:07 +0000 (UTC) Received: from nm1-vm10.bullet.mail.gq1.yahoo.com (nm1-vm10.bullet.mail.gq1.yahoo.com [98.136.218.89]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A879F198A for ; Wed, 29 Apr 2015 16:55:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1430326098; bh=n2rurvnCV4oT/dXFnSxGTVGnkjYGmQNIWQK+bGOxafk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=c+QalPcz59f2KyJRdfdTbYyEXkzGkfhzHPTlvPJ0zRtu8DQihTwHyZ8S6aS0aoBvZsoHyUiGVxWEihl2Q97hBfHHDfBsTcHtH4rtQj6mAGrZZvxm0VvE7Aat+DL46RQTYfwGr18qDK6A76/EI79AqbBxPHu4NYuLJ9n2wYCxDJK8UQdJqS6sKqLuoXir8IbAelLI27PgR7J/gvQjIii+1MqwX6+1IObo//QI4FSEQF+HYC2jH2pGNnqBrtmsZesPmir8CTZeaUXZuqyTZZWIRLX7MOVp7GIukh5XXpCtgr8Rdbb3dIQfzCW4INriywtcmN/DOrcp6tMxm/xbzkjnCw== Received: from [98.137.12.57] by nm1.bullet.mail.gq1.yahoo.com with NNFMP; 29 Apr 2015 16:48:18 -0000 Received: from [208.71.42.191] by tm2.bullet.mail.gq1.yahoo.com with NNFMP; 29 Apr 2015 16:48:18 -0000 Received: from [127.0.0.1] by smtp202.mail.gq1.yahoo.com with NNFMP; 29 Apr 2015 16:48:18 -0000 X-Yahoo-Newman-Id: 241718.83595.bm@smtp202.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yNgmgd4VM1nglwlokeur9DbXv1gYbzrK7bD2KaJJ1JpT4Z7 CP7VhWSNaDq33wMEglVxt6.h3wtb4SYiPNbqvM2ZNRdolQN6ZXQ9PHpX0pPO 8Zr6DUskH6DKdKHv9rcTD6nNjgE0uo8ZRAQg14uz7hNZetIJJnnlvk4UU.BY _tISJ9Krf3j.Ogdwfnyc2bwzmVPuX2tqrTCKPfdTE3.95jOleZutDzuCTEiH 1IhOx0YsGInuciEE5emOwU3vO1GHR8guJsKiXrUWPw62rqZVr0sHFuhiQOPY LgGgO9ZgkfD8o19D_SkgjwFJUdkotZM50_3YaLR9lcFX5LrrwvzyvVYMePCK GexRpK.NpnNpcqN7qVizJVNQjHXf0XTweDA7CSnt7Ubmq.uNKJqaFsfsl5RD b2ftMIwmO2qQiWCxDyoqnWtospmkIm4qrzkZIsJEXoxW1GasY5shh4xxrR8B KsHW6fL6wRkSF3Pk0_jMB6dQF_NxV7j9zZ7bgvaY62LFIJr4SAK9wP6lELy5 IpP8IoWr8bRBh9hc7KmeztLn3D9fhrF4mxhRhzboN X-Yahoo-SMTP: clhABp.swBB7fs.LwIJpv3jkWgo2NU8- Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r282227 - head/sys/cam/scsi From: Scott Long In-Reply-To: <201504291546.t3TFkwwU073637@svn.freebsd.org> Date: Wed, 29 Apr 2015 10:48:16 -0600 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8FE78308-75E2-4161-9EC8-3B0823EEBE7E@yahoo.com> References: <201504291546.t3TFkwwU073637@svn.freebsd.org> To: "Pedro F. Giffuni" X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 16:55:08 -0000 This commit is broken, please revert: Fatal trap 12: page fault while in kernel mode cpuid =3D 0; apic id =3D 00 fault virtual address =3D 0x21000002d8 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff802fd074 stack pointer =3D 0x28:0xfffffe100678f960 frame pointer =3D 0x28:0xfffffe100678f9e0 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 2 (doneq0) [ thread pid 2 tid 100025 ] Stopped at scsi_scan_bus+0x54: movq 0x58(%rax),%rdi db> bt Tracing pid 2 tid 100025 td 0xfffff8000d3ac940 scsi_scan_bus() at scsi_scan_bus+0x54/frame 0xfffffe100678f9e0 xpt_done_process() at xpt_done_process+0x521/frame 0xfffffe100678fa20 xpt_done_td() at xpt_done_td+0xf6/frame 0xfffffe100678fa70 fork_exit() at fork_exit+0x71/frame 0xfffffe100678fab0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe100678fab0 --- trap 0, rip =3D 0, rsp =3D 0xfffffe100678fb70, rbp =3D 0 --- db>=20 > On Apr 29, 2015, at 9:46 AM, Pedro F. Giffuni wrote: >=20 > Author: pfg > Date: Wed Apr 29 15:46:57 2015 > New Revision: 282227 > URL: https://svnweb.freebsd.org/changeset/base/282227 >=20 > Log: > Fix memory leak in scsi_scan_bus() >=20 > CID: 1007770 > PR: 199671 >=20 > Modified: > head/sys/cam/scsi/scsi_xpt.c >=20 > Modified: head/sys/cam/scsi/scsi_xpt.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/scsi/scsi_xpt.c Wed Apr 29 15:41:19 2015 = (r282226) > +++ head/sys/cam/scsi/scsi_xpt.c Wed Apr 29 15:46:57 2015 = (r282227) > @@ -2008,6 +2008,7 @@ scsi_scan_bus(struct cam_periph *periph, > " with status %#x, bus scan = halted\n", > status); > free(scan_info, M_CAMXPT); > + scan_info =3D NULL; > request_ccb->ccb_h.status =3D status; > xpt_free_ccb(work_ccb); > xpt_done(request_ccb); > @@ -2017,6 +2018,7 @@ scsi_scan_bus(struct cam_periph *periph, > if (work_ccb =3D=3D NULL) { > xpt_free_ccb((union ccb = *)scan_info->cpi); > free(scan_info, M_CAMXPT); > + scan_info =3D NULL; > xpt_free_path(path); > request_ccb->ccb_h.status =3D = CAM_RESRC_UNAVAIL; > xpt_done(request_ccb); > @@ -2032,6 +2034,7 @@ scsi_scan_bus(struct cam_periph *periph, > xpt_action(work_ccb); > } >=20 > + free(scan_info, M_CAMXPT); > mtx_lock(mtx); > break; > } >=20 From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 17:01:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 567A1C60; Wed, 29 Apr 2015 17:01:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 448431A85; Wed, 29 Apr 2015 17:01:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TH1T4t012004; Wed, 29 Apr 2015 17:01:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TH1TIE012003; Wed, 29 Apr 2015 17:01:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504291701.t3TH1TIE012003@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 29 Apr 2015 17:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282238 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 17:01:29 -0000 Author: trasz Date: Wed Apr 29 17:01:28 2015 New Revision: 282238 URL: https://svnweb.freebsd.org/changeset/base/282238 Log: Remove spurious period. MFC after: 1 month Sponsored by: International OCD Foun^W^W^WThe FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Wed Apr 29 16:52:43 2015 (r282237) +++ head/usr.bin/rctl/rctl.c Wed Apr 29 17:01:28 2015 (r282238) @@ -317,7 +317,7 @@ enosys(void) if (error != 0) { if (errno == ENOENT) - errx(1, "RACCT/RCTL support not present in kernel; see rctl(8) for details."); + errx(1, "RACCT/RCTL support not present in kernel; see rctl(8) for details"); err(1, "sysctlbyname"); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 17:18:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAE3C3ED; Wed, 29 Apr 2015 17:18:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8FEA1C5F; Wed, 29 Apr 2015 17:18:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3THIfOO020525; Wed, 29 Apr 2015 17:18:41 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3THIf49020524; Wed, 29 Apr 2015 17:18:41 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201504291718.t3THIf49020524@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Wed, 29 Apr 2015 17:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282239 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 17:18:42 -0000 Author: scottl Date: Wed Apr 29 17:18:41 2015 New Revision: 282239 URL: https://svnweb.freebsd.org/changeset/base/282239 Log: Revert r282227. It is clearly incorrect as it frees an object that is still referenced. I think that there does exist an unlikely edge case for a memory leak, but only if a driver is incorrectly written and specifies no valid range of targets to scan. That can be fixed in a follow-up commit. Obtained from: Netflix, Inc. Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Wed Apr 29 17:01:28 2015 (r282238) +++ head/sys/cam/scsi/scsi_xpt.c Wed Apr 29 17:18:41 2015 (r282239) @@ -2008,7 +2008,6 @@ scsi_scan_bus(struct cam_periph *periph, " with status %#x, bus scan halted\n", status); free(scan_info, M_CAMXPT); - scan_info = NULL; request_ccb->ccb_h.status = status; xpt_free_ccb(work_ccb); xpt_done(request_ccb); @@ -2018,7 +2017,6 @@ scsi_scan_bus(struct cam_periph *periph, if (work_ccb == NULL) { xpt_free_ccb((union ccb *)scan_info->cpi); free(scan_info, M_CAMXPT); - scan_info = NULL; xpt_free_path(path); request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; xpt_done(request_ccb); @@ -2034,7 +2032,6 @@ scsi_scan_bus(struct cam_periph *periph, xpt_action(work_ccb); } - free(scan_info, M_CAMXPT); mtx_lock(mtx); break; } From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 17:19:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B324554; Wed, 29 Apr 2015 17:19:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E024B1C82; Wed, 29 Apr 2015 17:19:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3THJu2I020729; Wed, 29 Apr 2015 17:19:56 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3THJtIM020724; Wed, 29 Apr 2015 17:19:55 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201504291719.t3THJtIM020724@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 29 Apr 2015 17:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282240 - in head: cddl/lib/libdtrace 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 17:19:57 -0000 Author: gnn Date: Wed Apr 29 17:19:55 2015 New Revision: 282240 URL: https://svnweb.freebsd.org/changeset/base/282240 Log: Brief demo script showing the various values that can be read via the new SIFTR statically defined tracepoint (SDT). Differential Revision: https://reviews.freebsd.org/D2387 Reviewed by: bz, markj Modified: head/cddl/lib/libdtrace/tcp.d head/sys/netinet/in_kdtrace.c head/sys/netinet/in_kdtrace.h head/sys/netinet/siftr.c Modified: head/cddl/lib/libdtrace/tcp.d ============================================================================== --- head/cddl/lib/libdtrace/tcp.d Wed Apr 29 17:18:41 2015 (r282239) +++ head/cddl/lib/libdtrace/tcp.d Wed Apr 29 17:19:55 2015 (r282240) @@ -241,3 +241,78 @@ translator tcpinfoh_t < struct tcphdr *p translator tcplsinfo_t < int s > { tcps_state = s; }; + +/* + * Convert a SIFTR direction value to a string + */ +#pragma D binding "1.12.1" SIFTR_IN +inline int SIFTR_IN = 1; +#pragma D binding "1.12.1" SIFTR_OUT +inline int SIFTR_OUT = 2; + +/* SIFTR direction strings. */ +#pragma D binding "1.12.1" siftr_dir_string +inline string siftr_dir_string[uint8_t direction] = + direction == SIFTR_IN ? "in" : + direction == SIFTR_OUT ? "out" : + "unknown" ; + +typedef struct siftrinfo { + struct timeval tval; + uint8_t direction; + uint8_t ipver; + uint32_t hash; + uint16_t tcp_localport; + uint16_t tcp_foreignport; + uint64_t snd_cwnd; + u_long snd_wnd; + u_long rcv_wnd; + u_long snd_bwnd; + u_long snd_ssthresh; + int conn_state; + u_int max_seg_size; + int smoothed_rtt; + u_char sack_enabled; + u_char snd_scale; + u_char rcv_scale; + u_int flags; + int rxt_length; + u_int snd_buf_hiwater; + u_int snd_buf_cc; + u_int rcv_buf_hiwater; + u_int rcv_buf_cc; + u_int sent_inflight_bytes; + int t_segqlen; + u_int flowid; + u_int flowtype; +} siftrinfo_t; + +#pragma D binding "1.12.1" translator +translator siftrinfo_t < struct pkt_node *p > { + direction = p == NULL ? 0 : p->direction; + ipver = p == NULL ? 0 : p->ipver; + hash = p == NULL ? 0 : p->hash; + tcp_localport = p == NULL ? 0 : ntohs(p->tcp_localport); + tcp_foreignport = p == NULL ? 0 : ntohs(p->tcp_foreignport); + snd_cwnd = p == NULL ? 0 : p->snd_cwnd; + snd_wnd = p == NULL ? 0 : p->snd_wnd; + rcv_wnd = p == NULL ? 0 : p->rcv_wnd; + snd_bwnd = p == NULL ? 0 : p->snd_bwnd; + snd_ssthresh = p == NULL ? 0 : p->snd_ssthresh; + conn_state = p == NULL ? 0 : p->conn_state; + max_seg_size = p == NULL ? 0 : p->max_seg_size; + smoothed_rtt = p == NULL ? 0 : p->smoothed_rtt; + sack_enabled = p == NULL ? 0 : p->sack_enabled; + snd_scale = p == NULL ? 0 : p->snd_scale; + rcv_scale = p == NULL ? 0 : p->rcv_scale; + flags = p == NULL ? 0 : p->flags; + rxt_length = p == NULL ? 0 : p->rxt_length; + snd_buf_hiwater = p == NULL ? 0 : p->snd_buf_hiwater; + snd_buf_cc = p == NULL ? 0 : p->snd_buf_cc; + rcv_buf_hiwater = p == NULL ? 0 : p->rcv_buf_hiwater; + rcv_buf_cc = p == NULL ? 0 : p->rcv_buf_cc; + sent_inflight_bytes = p == NULL ? 0 : p->sent_inflight_bytes; + t_segqlen = p == NULL ? 0 : p->t_segqlen; + flowid = p == NULL ? 0 : p->flowid; + flowtype = p == NULL ? 0 : p->flowtype; +}; Modified: head/sys/netinet/in_kdtrace.c ============================================================================== --- head/sys/netinet/in_kdtrace.c Wed Apr 29 17:18:41 2015 (r282239) +++ head/sys/netinet/in_kdtrace.c Wed Apr 29 17:19:55 2015 (r282240) @@ -102,6 +102,9 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , send, "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); +SDT_PROBE_DEFINE1_XLATE(tcp, , , siftr, + "struct pkt_node *", "siftrinfo_t *"); + SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change, "void *", "void *", "struct tcpcb *", "csinfo_t *", Modified: head/sys/netinet/in_kdtrace.h ============================================================================== --- head/sys/netinet/in_kdtrace.h Wed Apr 29 17:18:41 2015 (r282239) +++ head/sys/netinet/in_kdtrace.h Wed Apr 29 17:19:55 2015 (r282240) @@ -32,6 +32,8 @@ SDT_PROBE6(ip, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) #define UDP_PROBE(probe, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE5(udp, , , probe, arg0, arg1, arg2, arg3, arg4) +#define TCP_PROBE1(probe, arg0) \ + SDT_PROBE1(tcp, , , probe, arg0) #define TCP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE5(tcp, , , probe, arg0, arg1, arg2, arg3, arg4) #define TCP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ @@ -51,6 +53,7 @@ SDT_PROBE_DECLARE(tcp, , , connect__refu SDT_PROBE_DECLARE(tcp, , , connect__request); SDT_PROBE_DECLARE(tcp, , , receive); SDT_PROBE_DECLARE(tcp, , , send); +SDT_PROBE_DECLARE(tcp, , , siftr); SDT_PROBE_DECLARE(tcp, , , state__change); SDT_PROBE_DECLARE(udp, , , receive); Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Wed Apr 29 17:18:41 2015 (r282239) +++ head/sys/netinet/siftr.c Wed Apr 29 17:19:55 2015 (r282240) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -86,6 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -547,6 +549,7 @@ siftr_process_pkt(struct pkt_node * pkt_ } #endif + TCP_PROBE1(siftr, pkt_node); alq_post_flags(siftr_alq, log_buf, 0); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 17:21:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A2056D8; Wed, 29 Apr 2015 17:21:37 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 432931D3F; Wed, 29 Apr 2015 17:21:37 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A07C125D3A42; Wed, 29 Apr 2015 17:21:32 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id E0CC6C770A2; Wed, 29 Apr 2015 17:21:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id dGa59NURYsQ3; Wed, 29 Apr 2015 17:21:29 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 09773C7707D; Wed, 29 Apr 2015 17:21:28 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r282240 - in head: cddl/lib/libdtrace sys/netinet From: "Bjoern A. Zeeb" In-Reply-To: <201504291719.t3THJtIM020724@svn.freebsd.org> Date: Wed, 29 Apr 2015 17:21:27 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3C5C1638-4FA8-4E59-8CDF-1B102AE500C8@FreeBSD.org> References: <201504291719.t3THJtIM020724@svn.freebsd.org> To: "George V. Neville-Neil" X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 17:21:37 -0000 > On 29 Apr 2015, at 17:19 , George V. Neville-Neil = wrote: >=20 > Author: gnn > Date: Wed Apr 29 17:19:55 2015 > New Revision: 282240 > URL: https://svnweb.freebsd.org/changeset/base/282240 >=20 > Log: > Brief demo script showing the various values that can be read via > the new SIFTR statically defined tracepoint (SDT). >=20 > Differential Revision: https://reviews.freebsd.org/D2387 > Reviewed by: bz, markj >=20 That=E2=80=99s not the latest revision; sorry. > Modified: > head/cddl/lib/libdtrace/tcp.d > head/sys/netinet/in_kdtrace.c > head/sys/netinet/in_kdtrace.h > head/sys/netinet/siftr.c >=20 > Modified: head/cddl/lib/libdtrace/tcp.d > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/lib/libdtrace/tcp.d Wed Apr 29 17:18:41 2015 = (r282239) > +++ head/cddl/lib/libdtrace/tcp.d Wed Apr 29 17:19:55 2015 = (r282240) > @@ -241,3 +241,78 @@ translator tcpinfoh_t < struct tcphdr *p > translator tcplsinfo_t < int s > { > tcps_state =3D s; > }; > + > +/* > + * Convert a SIFTR direction value to a string > + */ > +#pragma D binding "1.12.1" SIFTR_IN > +inline int SIFTR_IN =3D 1; > +#pragma D binding "1.12.1" SIFTR_OUT > +inline int SIFTR_OUT =3D 2; > + > +/* SIFTR direction strings. */ > +#pragma D binding "1.12.1" siftr_dir_string > +inline string siftr_dir_string[uint8_t direction] =3D > + direction =3D=3D SIFTR_IN ? "in" : > + direction =3D=3D SIFTR_OUT ? "out" : > + "unknown" ; > + > +typedef struct siftrinfo { > + struct timeval tval; > + uint8_t direction; > + uint8_t ipver; > + uint32_t hash; > + uint16_t tcp_localport; > + uint16_t tcp_foreignport; > + uint64_t snd_cwnd; > + u_long snd_wnd; > + u_long rcv_wnd; > + u_long snd_bwnd; > + u_long snd_ssthresh; > + int conn_state; > + u_int max_seg_size; > + int smoothed_rtt; > + u_char sack_enabled; > + u_char snd_scale; > + u_char rcv_scale; > + u_int flags; > + int rxt_length; > + u_int snd_buf_hiwater; > + u_int snd_buf_cc; > + u_int rcv_buf_hiwater; > + u_int rcv_buf_cc; > + u_int sent_inflight_bytes; > + int t_segqlen; > + u_int flowid; > + u_int flowtype; > +} siftrinfo_t; > + > +#pragma D binding "1.12.1" translator > +translator siftrinfo_t < struct pkt_node *p > { > + direction =3D p =3D=3D NULL ? 0 : p->direction; > + ipver =3D p =3D=3D NULL ? 0 : p->ipver; > + hash =3D p =3D=3D NULL ? 0 : p->hash; > + tcp_localport =3D p =3D=3D NULL ? 0 : = ntohs(p->tcp_localport); > + tcp_foreignport =3D p =3D=3D NULL ? 0 : = ntohs(p->tcp_foreignport); > + snd_cwnd =3D p =3D=3D NULL ? 0 : p->snd_cwnd; > + snd_wnd =3D p =3D=3D NULL ? 0 : p->snd_wnd; > + rcv_wnd =3D p =3D=3D NULL ? 0 : p->rcv_wnd; > + snd_bwnd =3D p =3D=3D NULL ? 0 : p->snd_bwnd; > + snd_ssthresh =3D p =3D=3D NULL ? 0 : = p->snd_ssthresh; > + conn_state =3D p =3D=3D NULL ? 0 : p->conn_state; > + max_seg_size =3D p =3D=3D NULL ? 0 : = p->max_seg_size; > + smoothed_rtt =3D p =3D=3D NULL ? 0 : = p->smoothed_rtt; > + sack_enabled =3D p =3D=3D NULL ? 0 : = p->sack_enabled; > + snd_scale =3D p =3D=3D NULL ? 0 : p->snd_scale; > + rcv_scale =3D p =3D=3D NULL ? 0 : p->rcv_scale; > + flags =3D p =3D=3D NULL ? 0 : p->flags; > + rxt_length =3D p =3D=3D NULL ? 0 : p->rxt_length; > + snd_buf_hiwater =3D p =3D=3D NULL ? 0 : p->snd_buf_hiwater; > + snd_buf_cc =3D p =3D=3D NULL ? 0 : p->snd_buf_cc; > + rcv_buf_hiwater =3D p =3D=3D NULL ? 0 : p->rcv_buf_hiwater; > + rcv_buf_cc =3D p =3D=3D NULL ? 0 : p->rcv_buf_cc; > + sent_inflight_bytes =3D p =3D=3D NULL ? 0 : = p->sent_inflight_bytes; > + t_segqlen =3D p =3D=3D NULL ? 0 : p->t_segqlen; > + flowid =3D p =3D=3D NULL ? 0 : p->flowid; > + flowtype =3D p =3D=3D NULL ? 0 : p->flowtype; > +}; >=20 > Modified: head/sys/netinet/in_kdtrace.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/in_kdtrace.c Wed Apr 29 17:18:41 2015 = (r282239) > +++ head/sys/netinet/in_kdtrace.c Wed Apr 29 17:19:55 2015 = (r282240) > @@ -102,6 +102,9 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , send, > "struct tcpcb *", "tcpsinfo_t *" , > "struct tcphdr *", "tcpinfo_t *"); >=20 > +SDT_PROBE_DEFINE1_XLATE(tcp, , , siftr, > + "struct pkt_node *", "siftrinfo_t *"); > + > SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change, > "void *", "void *", > "struct tcpcb *", "csinfo_t *", >=20 > Modified: head/sys/netinet/in_kdtrace.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/in_kdtrace.h Wed Apr 29 17:18:41 2015 = (r282239) > +++ head/sys/netinet/in_kdtrace.h Wed Apr 29 17:19:55 2015 = (r282240) > @@ -32,6 +32,8 @@ > SDT_PROBE6(ip, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) > #define UDP_PROBE(probe, arg0, arg1, arg2, arg3, arg4) = \ > SDT_PROBE5(udp, , , probe, arg0, arg1, arg2, arg3, arg4) > +#define TCP_PROBE1(probe, arg0) \ > + SDT_PROBE1(tcp, , , probe, arg0) > #define TCP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) = \ > SDT_PROBE5(tcp, , , probe, arg0, arg1, arg2, arg3, arg4) > #define TCP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) = \ > @@ -51,6 +53,7 @@ SDT_PROBE_DECLARE(tcp, , , connect__refu > SDT_PROBE_DECLARE(tcp, , , connect__request); > SDT_PROBE_DECLARE(tcp, , , receive); > SDT_PROBE_DECLARE(tcp, , , send); > +SDT_PROBE_DECLARE(tcp, , , siftr); > SDT_PROBE_DECLARE(tcp, , , state__change); >=20 > SDT_PROBE_DECLARE(udp, , , receive); >=20 > Modified: head/sys/netinet/siftr.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/netinet/siftr.c Wed Apr 29 17:18:41 2015 = (r282239) > +++ head/sys/netinet/siftr.c Wed Apr 29 17:19:55 2015 = (r282240) > @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -86,6 +87,7 @@ __FBSDID("$FreeBSD$"); > #include >=20 > #include > +#include > #include > #include > #include > @@ -547,6 +549,7 @@ siftr_process_pkt(struct pkt_node * pkt_ > } > #endif >=20 > + TCP_PROBE1(siftr, pkt_node); > alq_post_flags(siftr_alq, log_buf, 0); > } >=20 >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 17:23:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49EA9852; Wed, 29 Apr 2015 17:23:27 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B60C1D5D; Wed, 29 Apr 2015 17:23:26 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 0368C25D3A85; Wed, 29 Apr 2015 17:23:17 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 04B7FC770A4; Wed, 29 Apr 2015 17:23:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id gOkh8aWbsDdK; Wed, 29 Apr 2015 17:23:14 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B5641C770A3; Wed, 29 Apr 2015 17:23:13 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r282240 - in head: cddl/lib/libdtrace sys/netinet From: "Bjoern A. Zeeb" In-Reply-To: <3C5C1638-4FA8-4E59-8CDF-1B102AE500C8@FreeBSD.org> Date: Wed, 29 Apr 2015 17:23:12 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <1093C9D4-23B1-4617-8139-8DD3057A7BFC@FreeBSD.org> References: <201504291719.t3THJtIM020724@svn.freebsd.org> <3C5C1638-4FA8-4E59-8CDF-1B102AE500C8@FreeBSD.org> To: "George V. Neville-Neil" X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 17:23:27 -0000 > On 29 Apr 2015, at 17:21 , Bjoern A. Zeeb wrote: >=20 >=20 >> On 29 Apr 2015, at 17:19 , George V. Neville-Neil = wrote: >>=20 >> Author: gnn >> Date: Wed Apr 29 17:19:55 2015 >> New Revision: 282240 >> URL: https://svnweb.freebsd.org/changeset/base/282240 >>=20 >> Log: >> Brief demo script showing the various values that can be read via >> the new SIFTR statically defined tracepoint (SDT). >>=20 >> Differential Revision: https://reviews.freebsd.org/D2387 >> Reviewed by: bz, markj >>=20 >=20 > That=E2=80=99s not the latest revision; sorry. (see, no dot at end of comment) Also you forgot to svn add share/dtrace/siftr I think? >> Modified: >> head/cddl/lib/libdtrace/tcp.d >> head/sys/netinet/in_kdtrace.c >> head/sys/netinet/in_kdtrace.h >> head/sys/netinet/siftr.c >>=20 >> Modified: head/cddl/lib/libdtrace/tcp.d >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/lib/libdtrace/tcp.d Wed Apr 29 17:18:41 2015 = (r282239) >> +++ head/cddl/lib/libdtrace/tcp.d Wed Apr 29 17:19:55 2015 = (r282240) >> @@ -241,3 +241,78 @@ translator tcpinfoh_t < struct tcphdr *p >> translator tcplsinfo_t < int s > { >> tcps_state =3D s; >> }; >> + >> +/* >> + * Convert a SIFTR direction value to a string >> + */ >> +#pragma D binding "1.12.1" SIFTR_IN >> +inline int SIFTR_IN =3D 1; >> +#pragma D binding "1.12.1" SIFTR_OUT >> +inline int SIFTR_OUT =3D 2; >> + >> +/* SIFTR direction strings. */ >> +#pragma D binding "1.12.1" siftr_dir_string >> +inline string siftr_dir_string[uint8_t direction] =3D >> + direction =3D=3D SIFTR_IN ? "in" : >> + direction =3D=3D SIFTR_OUT ? "out" : >> + "unknown" ; >> + >> +typedef struct siftrinfo { >> + struct timeval tval; >> + uint8_t direction; >> + uint8_t ipver; >> + uint32_t hash; >> + uint16_t tcp_localport; >> + uint16_t tcp_foreignport; >> + uint64_t snd_cwnd; >> + u_long snd_wnd; >> + u_long rcv_wnd; >> + u_long snd_bwnd; >> + u_long snd_ssthresh; >> + int conn_state; >> + u_int max_seg_size; >> + int smoothed_rtt; >> + u_char sack_enabled; >> + u_char snd_scale; >> + u_char rcv_scale; >> + u_int flags; >> + int rxt_length; >> + u_int snd_buf_hiwater; >> + u_int snd_buf_cc; >> + u_int rcv_buf_hiwater; >> + u_int rcv_buf_cc; >> + u_int sent_inflight_bytes; >> + int t_segqlen; >> + u_int flowid; >> + u_int flowtype; >> +} siftrinfo_t; >> + >> +#pragma D binding "1.12.1" translator >> +translator siftrinfo_t < struct pkt_node *p > { >> + direction =3D p =3D=3D NULL ? 0 : p->direction; >> + ipver =3D p =3D=3D NULL ? 0 : p->ipver; >> + hash =3D p =3D=3D NULL ? 0 : p->hash; >> + tcp_localport =3D p =3D=3D NULL ? 0 : = ntohs(p->tcp_localport); >> + tcp_foreignport =3D p =3D=3D NULL ? 0 : = ntohs(p->tcp_foreignport); >> + snd_cwnd =3D p =3D=3D NULL ? 0 : p->snd_cwnd; >> + snd_wnd =3D p =3D=3D NULL ? 0 : p->snd_wnd; >> + rcv_wnd =3D p =3D=3D NULL ? 0 : p->rcv_wnd; >> + snd_bwnd =3D p =3D=3D NULL ? 0 : p->snd_bwnd; >> + snd_ssthresh =3D p =3D=3D NULL ? 0 : = p->snd_ssthresh; >> + conn_state =3D p =3D=3D NULL ? 0 : p->conn_state; >> + max_seg_size =3D p =3D=3D NULL ? 0 : = p->max_seg_size; >> + smoothed_rtt =3D p =3D=3D NULL ? 0 : = p->smoothed_rtt; >> + sack_enabled =3D p =3D=3D NULL ? 0 : = p->sack_enabled; >> + snd_scale =3D p =3D=3D NULL ? 0 : p->snd_scale; >> + rcv_scale =3D p =3D=3D NULL ? 0 : p->rcv_scale; >> + flags =3D p =3D=3D NULL ? 0 : p->flags; >> + rxt_length =3D p =3D=3D NULL ? 0 : p->rxt_length; >> + snd_buf_hiwater =3D p =3D=3D NULL ? 0 : p->snd_buf_hiwater; >> + snd_buf_cc =3D p =3D=3D NULL ? 0 : p->snd_buf_cc; >> + rcv_buf_hiwater =3D p =3D=3D NULL ? 0 : p->rcv_buf_hiwater; >> + rcv_buf_cc =3D p =3D=3D NULL ? 0 : p->rcv_buf_cc; >> + sent_inflight_bytes =3D p =3D=3D NULL ? 0 : = p->sent_inflight_bytes; >> + t_segqlen =3D p =3D=3D NULL ? 0 : p->t_segqlen; >> + flowid =3D p =3D=3D NULL ? 0 : p->flowid; >> + flowtype =3D p =3D=3D NULL ? 0 : p->flowtype; >> +}; >>=20 >> Modified: head/sys/netinet/in_kdtrace.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet/in_kdtrace.c Wed Apr 29 17:18:41 2015 = (r282239) >> +++ head/sys/netinet/in_kdtrace.c Wed Apr 29 17:19:55 2015 = (r282240) >> @@ -102,6 +102,9 @@ SDT_PROBE_DEFINE5_XLATE(tcp, , , send, >> "struct tcpcb *", "tcpsinfo_t *" , >> "struct tcphdr *", "tcpinfo_t *"); >>=20 >> +SDT_PROBE_DEFINE1_XLATE(tcp, , , siftr, >> + "struct pkt_node *", "siftrinfo_t *"); >> + >> SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change, >> "void *", "void *", >> "struct tcpcb *", "csinfo_t *", >>=20 >> Modified: head/sys/netinet/in_kdtrace.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/in_kdtrace.h Wed Apr 29 17:18:41 2015 = (r282239) >> +++ head/sys/netinet/in_kdtrace.h Wed Apr 29 17:19:55 2015 = (r282240) >> @@ -32,6 +32,8 @@ >> SDT_PROBE6(ip, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) >> #define UDP_PROBE(probe, arg0, arg1, arg2, arg3, arg4) = \ >> SDT_PROBE5(udp, , , probe, arg0, arg1, arg2, arg3, arg4) >> +#define TCP_PROBE1(probe, arg0) \ >> + SDT_PROBE1(tcp, , , probe, arg0) >> #define TCP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) = \ >> SDT_PROBE5(tcp, , , probe, arg0, arg1, arg2, arg3, arg4) >> #define TCP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) = \ >> @@ -51,6 +53,7 @@ SDT_PROBE_DECLARE(tcp, , , connect__refu >> SDT_PROBE_DECLARE(tcp, , , connect__request); >> SDT_PROBE_DECLARE(tcp, , , receive); >> SDT_PROBE_DECLARE(tcp, , , send); >> +SDT_PROBE_DECLARE(tcp, , , siftr); >> SDT_PROBE_DECLARE(tcp, , , state__change); >>=20 >> SDT_PROBE_DECLARE(udp, , , receive); >>=20 >> Modified: head/sys/netinet/siftr.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet/siftr.c Wed Apr 29 17:18:41 2015 = (r282239) >> +++ head/sys/netinet/siftr.c Wed Apr 29 17:19:55 2015 = (r282240) >> @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -86,6 +87,7 @@ __FBSDID("$FreeBSD$"); >> #include >>=20 >> #include >> +#include >> #include >> #include >> #include >> @@ -547,6 +549,7 @@ siftr_process_pkt(struct pkt_node * pkt_ >> } >> #endif >>=20 >> + TCP_PROBE1(siftr, pkt_node); >> alq_post_flags(siftr_alq, log_buf, 0); >> } >>=20 >>=20 >=20 > =E2=80=94=20 > Bjoern A. Zeeb Charles Haddon = Spurgeon: > "Friendship is one of the sweetest joys of life. Many might have = failed > beneath the bitterness of their trial had they not found a friend." >=20 >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 17:40:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52F8CF35; Wed, 29 Apr 2015 17:40:45 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D0D61FA0; Wed, 29 Apr 2015 17:40:45 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4292EB98C; Wed, 29 Apr 2015 13:40:44 -0400 (EDT) From: John Baldwin To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282221 - in head/sys/arm64: arm64 include Date: Wed, 29 Apr 2015 13:40:40 -0400 Message-ID: <2279938.0IFb6BfZoH@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150429170529.0777fa97@bender> References: <201504291500.t3TF0idE051713@svn.freebsd.org> <1602946.NmUd8I4zFq@ralph.baldwin.cx> <20150429170529.0777fa97@bender> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 29 Apr 2015 13:40:44 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 17:40:45 -0000 On Wednesday, April 29, 2015 05:05:29 PM Andrew Turner wrote: > On Wed, 29 Apr 2015 11:33:22 -0400 > John Baldwin wrote: > > > On Wednesday, April 29, 2015 03:00:44 PM Andrew Turner wrote: > > > Author: andrew > > > Date: Wed Apr 29 15:00:43 2015 > > > New Revision: 282221 > > > URL: https://svnweb.freebsd.org/changeset/base/282221 > > > > > > Log: > > > Add pmap_mapbios and pmap_unmapbios. These will be needed to > > > support acpi. > > > Sponsored by: The FreeBSD Foundation > > > > I should have called these pmap_map_firmware() or some such instead, > > though it's really more like pmap_map_firmware_table(). :-/ > > > > Fell free to rename them, the name makes sense on i386, less so on > amd64, and none on arm64. Perhaps at some point. I was hoping to con you into doing the rename. :) -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 17:45:02 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 147182EB; Wed, 29 Apr 2015 17:45:02 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E48DD1FF1; Wed, 29 Apr 2015 17:45:01 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 09330B95E; Wed, 29 Apr 2015 13:45:01 -0400 (EDT) From: John Baldwin To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282211 - head/tests/freebsd_test_suite Date: Wed, 29 Apr 2015 13:44:54 -0400 Message-ID: <1942609.p0XeoXF1ms@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504290856.t3T8uuHF070908@svn.freebsd.org> References: <201504290856.t3T8uuHF070908@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 29 Apr 2015 13:45:01 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 17:45:02 -0000 On Wednesday, April 29, 2015 08:56:56 AM Garrett Cooper wrote: > Author: ngie > Date: Wed Apr 29 08:56:56 2015 > New Revision: 282211 > URL: https://svnweb.freebsd.org/changeset/base/282211 > > Log: > ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so the testcase > no longer bombs out > PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the testcase no > longer bombs out if it prints to stderr > > MFC after: 5 days This doesn't appear to compile? cc -O2 -pipe -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS -D HAVE_LONG_DOUBLE -DTZDIR=\"/usr/share/zoneinfo\" -Demkdir=mkdir -DHAVE_STRERROR -DHAVE_UNISTD_H -I/zoo/jhb/remove_xen/usr.sbin/zic/zic/.. -I/zoo/jhb/remove_xen/ m-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-protot ypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-stri ngs -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign - c /zoo/jhb/remove_xen/tests/sys/aio/aio_test.c -o aio_test.o cc1: warnings being treated as errors /zoo/jhb/remove_xen/tests/sys/aio/aio_test.c: In function 'aio_write_test': /zoo/jhb/remove_xen/tests/sys/aio/aio_test.c:207: warning: implicit declaration of function 'atf_skip' /zoo/jhb/remove_xen/tests/sys/aio/aio_test.c:207: warning: nested extern declara tion of 'atf_skip' *** [aio_test.o] Error code 1 -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 17:48:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36DBC5BC; Wed, 29 Apr 2015 17:48:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2539F102C; Wed, 29 Apr 2015 17:48:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3THmQm7035347; Wed, 29 Apr 2015 17:48:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3THmQkT035346; Wed, 29 Apr 2015 17:48:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504291748.t3THmQkT035346@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 29 Apr 2015 17:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282241 - head/sys/dev/virtio/network X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 17:48:26 -0000 Author: jhb Date: Wed Apr 29 17:48:25 2015 New Revision: 282241 URL: https://svnweb.freebsd.org/changeset/base/282241 Log: Don't free mbufs when stopping an interface in netmap mode. Currently if you ifconfig down a vtnet interface while it is being used via netmap, the kernel panics due to trying to treat the cookie values in the virtio rings as mbufs to be freed. When netmap is enabled, these cookie values are pointers to something else. Note that other netmap-aware drivers don't seem to need this as they store the mbuf pointers in the software rings that mirror the hardware descriptor rings, and since netmap doesn't touch those, the software state always has NULL mbuf pointers causing the loops to free mbufs to not do anything. However, vtnet reuses the same state area for both netmap and non-netmap mode, so it needs to explicitly avoid looking at the rings and treating the cookie values as mbufs if netmap is enabled. Differential Revision: https://reviews.freebsd.org/D2348 Reviewed by: adrian, bryanv, luigi MFC after: 1 week Sponsored by: Norse Corp, Inc. Modified: head/sys/dev/virtio/network/if_vtnet.c Modified: head/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Wed Apr 29 17:19:55 2015 (r282240) +++ head/sys/dev/virtio/network/if_vtnet.c Wed Apr 29 17:48:25 2015 (r282241) @@ -2745,6 +2745,11 @@ vtnet_drain_rxtx_queues(struct vtnet_sof struct vtnet_txq *txq; int i; +#ifdef DEV_NETMAP + if (nm_native_on(NA(sc->vtnet_ifp))) + return; +#endif /* DEV_NETMAP */ + for (i = 0; i < sc->vtnet_act_vq_pairs; i++) { rxq = &sc->vtnet_rxqs[i]; vtnet_rxq_free_mbufs(rxq); From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 18:07:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40DCFD7C; Wed, 29 Apr 2015 18:07:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EC061290; Wed, 29 Apr 2015 18:07:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TI7xlt045358; Wed, 29 Apr 2015 18:07:59 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TI7xif045357; Wed, 29 Apr 2015 18:07:59 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201504291807.t3TI7xif045357@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 29 Apr 2015 18:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282242 - head/share/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 18:07:59 -0000 Author: gnn Date: Wed Apr 29 18:07:58 2015 New Revision: 282242 URL: https://svnweb.freebsd.org/changeset/base/282242 Log: Brief demo script showing the various values that can be read via the new SIFTR statically defined tracepoint (SDT). Reviewed by: bz, markj Added: head/share/dtrace/siftr (contents, props changed) Added: head/share/dtrace/siftr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/dtrace/siftr Wed Apr 29 18:07:58 2015 (r282242) @@ -0,0 +1,68 @@ +#!/usr/sbin/dtrace -s +/*- + * Copyright (c) 2015 George V. Neville-Neil + * 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$ + * + * The siftr D script collects data from the SIFTR kernel module. + * + * Usage: siftr + */ + +#pragma D option quiet +tcp:kernel::siftr +{ + printf("direction %s state %s local %d remote %d\n", + siftr_dir_string[args[0]->direction], + tcp_state_string[args[0]->conn_state], + args[0]->tcp_localport, + args[0]->tcp_foreignport); + printf("snd_cwnd %d snd_wnd %d rcv_wnd %d snd_bwnd %d snd_ssthresh %d\n", + args[0]->snd_cwnd, + args[0]->snd_wnd, + args[0]->rcv_wnd, + args[0]->snd_bwnd, + args[0]->snd_ssthresh); + printf("\tmax_seg_size %u smoothed_rtt %d sack_enabled %d\n", + args[0]->max_seg_size, + args[0]->smoothed_rtt, + args[0]->sack_enabled); + printf("\tsnd_scale %d rcv_scale %d flags 0x%x rxt_length %d\n", + args[0]->snd_scale, + args[0]->rcv_scale, + args[0]->flags, + args[0]->rxt_length); + printf("\tsnd_buf_hiwater %u snd_buf_cc %u rcv_buf_hiwater %u\n", + args[0]->snd_buf_hiwater, + args[0]->snd_buf_cc, + args[0]->rcv_buf_hiwater); + printf("\trcv_buf_cc %u sent_inflight_bytes %u t_segqlen %d\n", + args[0]->rcv_buf_cc, + args[0]->sent_inflight_bytes, + args[0]->t_segqlen); + printf("\tflowid %u flowtype %u\n", + args[0]->flowid, + args[0]->flowtype); +} From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 18:10:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED189F08; Wed, 29 Apr 2015 18:10:41 +0000 (UTC) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C51F812B3; Wed, 29 Apr 2015 18:10:41 +0000 (UTC) Received: from global-1-26.nat.csx.cam.ac.uk ([131.111.184.26]:33266 helo=[172.16.33.1]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82) (envelope-from ) id 1YnWRS-0000eO-ST; Wed, 29 Apr 2015 14:10:39 -0400 From: "George Neville-Neil" To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282240 - in head: cddl/lib/libdtrace sys/netinet Date: Wed, 29 Apr 2015 19:10:37 +0100 Message-ID: <00D5ECC8-2CC3-427C-AD6C-9B3E9C529A9A@freebsd.org> In-Reply-To: <1093C9D4-23B1-4617-8139-8DD3057A7BFC@FreeBSD.org> References: <201504291719.t3THJtIM020724@svn.freebsd.org> <3C5C1638-4FA8-4E59-8CDF-1B102AE500C8@FreeBSD.org> <1093C9D4-23B1-4617-8139-8DD3057A7BFC@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailer: MailMate (1.9.1r5084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 18:10:42 -0000 On 29 Apr 2015, at 18:23, Bjoern A. Zeeb wrote: >> On 29 Apr 2015, at 17:21 , Bjoern A. Zeeb wrote: >> >> >>> On 29 Apr 2015, at 17:19 , George V. Neville-Neil >>> wrote: >>> >>> Author: gnn >>> Date: Wed Apr 29 17:19:55 2015 >>> New Revision: 282240 >>> URL: https://svnweb.freebsd.org/changeset/base/282240 >>> >>> Log: >>> Brief demo script showing the various values that can be read via >>> the new SIFTR statically defined tracepoint (SDT). >>> >>> Differential Revision: https://reviews.freebsd.org/D2387 >>> Reviewed by: bz, markj >>> >> >> That’s not the latest revision; sorry. > > (see, no dot at end of comment) > > Also you forgot to svn add share/dtrace/siftr I think? > I committed the non kernel code (the script) separately. Best, George From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 18:11:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC4F810F for ; Wed, 29 Apr 2015 18:11:06 +0000 (UTC) Received: from nm16.bullet.mail.bf1.yahoo.com (nm16.bullet.mail.bf1.yahoo.com [98.139.212.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B07712C7 for ; Wed, 29 Apr 2015 18:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1430331058; bh=IKruCFHrioXrgmZaP0alUVvTg50Fb2D95EWSqU73+ko=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=QoykqKEJxoU8Pl1BgO5I6v3KSfWbX0Lze2DSUjJJIV/AsYjKQ0/N+bPOREp7Ggg3JM+Egb6JptsfLkpHZpUqNlYY5H7UDHC8AwBwmROUJv/LYFCQMuUyegNCDMQLpM5CjyR62ilLuB3eI3n7uhr4MA+jIsz2NIHlmHKkYWZ3rQ+K9ghHZiVlM9BgE/fJKla/GPzyOwhuPIS2XuWjzWgYWvUHj8+tAAkq6fo04f2v9bqz6A24n6neZkHT6YbK/v09To8+pZggXSElcQJNVbsbZ05dVwyA0MQyQwRP/OprKMtnpH+rwRBw4CTrAQDm8o1f/zcEv5cVfCVDBmTm3ixpGQ== Received: from [66.196.81.172] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 29 Apr 2015 18:10:58 -0000 Received: from [98.139.213.15] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 29 Apr 2015 18:10:58 -0000 Received: from [127.0.0.1] by smtp115.mail.bf1.yahoo.com with NNFMP; 29 Apr 2015 18:10:58 -0000 X-Yahoo-Newman-Id: 373371.27569.bm@smtp115.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: jx2XUscVM1m_tMVlLHpnegLlY7dgudRk8AXffO91lPL_XFM mH8ec0Iu10PqewPk7.vws4ngVmK7BEm.ilFWqSdAUnbV4fjYlEbZ.42pRod8 vfN5eAifq7s1v6DSic4EdpVxUxS6N8.TNSIjB5xKXDuX70fM92vYvwl52o6h a4kyt3gkDSDsALdJ_CAvPVueYro_EoHbwzI2Ipk5oFdlZ1pEHR7HVvctq3Hz Rbd4jhf4DGLPgRc3kPEkw.FvnR0hCkKEcj8hwGSDkB7rZ2Fm_hhFiroVmD6a BZTid6MokOBFtCfnLG9FaRVyzCvYBlzRQjmlW05E2MgmC51oxHXNeAXBNToJ Tsxzl0SljewP_0YiAwUgEWngL1HgByt23eYxNDaBAdHbsp7Jns4ecMQNfk1y 3CgPnhxxXvpyUjEh5w5i6DLXChEx23eUgHxf0x1cWDdx5KnbdJ7L6YysvriO OOK4srgvK4fpxWefN.w0EfACT_jxtiA3hx1WZP72LcWwC2DZUj00YgmXNAdY Chzy3ZiYqGbydhlsGJ__HGsrzvqaFbdMs X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <55411EB8.9020800@FreeBSD.org> Date: Wed, 29 Apr 2015 13:11:04 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Scott Long CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282227 - head/sys/cam/scsi References: <201504291546.t3TFkwwU073637@svn.freebsd.org> <8FE78308-75E2-4161-9EC8-3B0823EEBE7E@yahoo.com> In-Reply-To: <8FE78308-75E2-4161-9EC8-3B0823EEBE7E@yahoo.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 18:11:07 -0000 Thanks for finding .. and reverting (I was AFK). I'll document this in Bugzilla and Coverity. Pedro. On 04/29/15 11:48, Scott Long wrote: > This commit is broken, please revert: > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x21000002d8 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff802fd074 > stack pointer = 0x28:0xfffffe100678f960 > frame pointer = 0x28:0xfffffe100678f9e0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 2 (doneq0) > [ thread pid 2 tid 100025 ] > Stopped at scsi_scan_bus+0x54: movq 0x58(%rax),%rdi > db> bt > Tracing pid 2 tid 100025 td 0xfffff8000d3ac940 > scsi_scan_bus() at scsi_scan_bus+0x54/frame 0xfffffe100678f9e0 > xpt_done_process() at xpt_done_process+0x521/frame 0xfffffe100678fa20 > xpt_done_td() at xpt_done_td+0xf6/frame 0xfffffe100678fa70 > fork_exit() at fork_exit+0x71/frame 0xfffffe100678fab0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe100678fab0 > --- trap 0, rip = 0, rsp = 0xfffffe100678fb70, rbp = 0 --- > db> > > >> On Apr 29, 2015, at 9:46 AM, Pedro F. Giffuni wrote: >> >> Author: pfg >> Date: Wed Apr 29 15:46:57 2015 >> New Revision: 282227 >> URL: https://svnweb.freebsd.org/changeset/base/282227 >> >> Log: >> Fix memory leak in scsi_scan_bus() >> >> CID: 1007770 >> PR: 199671 >> >> Modified: >> head/sys/cam/scsi/scsi_xpt.c >> >> Modified: head/sys/cam/scsi/scsi_xpt.c >> ============================================================================== >> --- head/sys/cam/scsi/scsi_xpt.c Wed Apr 29 15:41:19 2015 (r282226) >> +++ head/sys/cam/scsi/scsi_xpt.c Wed Apr 29 15:46:57 2015 (r282227) >> @@ -2008,6 +2008,7 @@ scsi_scan_bus(struct cam_periph *periph, >> " with status %#x, bus scan halted\n", >> status); >> free(scan_info, M_CAMXPT); >> + scan_info = NULL; >> request_ccb->ccb_h.status = status; >> xpt_free_ccb(work_ccb); >> xpt_done(request_ccb); >> @@ -2017,6 +2018,7 @@ scsi_scan_bus(struct cam_periph *periph, >> if (work_ccb == NULL) { >> xpt_free_ccb((union ccb *)scan_info->cpi); >> free(scan_info, M_CAMXPT); >> + scan_info = NULL; >> xpt_free_path(path); >> request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; >> xpt_done(request_ccb); >> @@ -2032,6 +2034,7 @@ scsi_scan_bus(struct cam_periph *periph, >> xpt_action(work_ccb); >> } >> >> + free(scan_info, M_CAMXPT); >> mtx_lock(mtx); >> break; >> } >> From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 19:08:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EE82226; Wed, 29 Apr 2015 19:08:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D36919D9; Wed, 29 Apr 2015 19:08:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TJ8CbL075294; Wed, 29 Apr 2015 19:08:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TJ8CD4075293; Wed, 29 Apr 2015 19:08:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504291908.t3TJ8CD4075293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 29 Apr 2015 19:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282244 - head/tests/freebsd_test_suite X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 19:08:12 -0000 Author: ngie Date: Wed Apr 29 19:08:11 2015 New Revision: 282244 URL: https://svnweb.freebsd.org/changeset/base/282244 Log: Fix typo. It should have been atf_tc_skip, not atf_skip Reported by: many, Jenkins Pointyhat to: ngie MFC after: 4 days Modified: head/tests/freebsd_test_suite/macros.h Modified: head/tests/freebsd_test_suite/macros.h ============================================================================== --- head/tests/freebsd_test_suite/macros.h Wed Apr 29 18:57:19 2015 (r282243) +++ head/tests/freebsd_test_suite/macros.h Wed Apr 29 19:08:11 2015 (r282244) @@ -40,7 +40,7 @@ #define ATF_REQUIRE_KERNEL_MODULE(_mod_name) do { \ if (modfind(_mod_name) == -1) { \ - atf_skip("module %s could not be resolved: %s", \ + atf_tc_skip("module %s could not be resolved: %s", \ _mod_name, strerror(errno)); \ } \ } while(0) From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 19:11:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AEDE48C; Wed, 29 Apr 2015 19:11:18 +0000 (UTC) Received: from mail-pd0-x235.google.com (mail-pd0-x235.google.com [IPv6:2607:f8b0:400e:c02::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 694F01ABC; Wed, 29 Apr 2015 19:11:18 +0000 (UTC) Received: by pdbnk13 with SMTP id nk13so36605724pdb.0; Wed, 29 Apr 2015 12:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=ZWtCfVbT7yrzmf5YWTuzaGxaAMroRhu8U6uSsKvHom8=; b=gS4/ngBOyk4D3RosirYL5fHiP1qGHaqWoTDE7jiCuC4EBXMpbcKFwYb33vfNEvickB 4dzGmH5mGbWKLF3Z1MBwGbDyAbnT4yw+bs2Ng/mI2XzpKTTzSKy7EVfSYeCJmUzvKXCs BELAjntK/KJkeo4TzYAfGP6mV5Ea08b/cFc0yKBdrLzNk597BPuCJWz2bVGhv9Rkfq6b 53XnGaqxvZ7YUFH92COb4h5baShwIfIduFzD36VltncbJocbAmOOSG2fzkmeaqidR3tt wW2kFV/bXVxpeijk9zJPD4e7VOklxLJRR6c04giCs4Np/V7E2PRAKSKwDwYaLCHGb/h7 IBZg== X-Received: by 10.70.134.35 with SMTP id ph3mr968304pdb.91.1430334677872; Wed, 29 Apr 2015 12:11:17 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:857d:cd13:79bf:f40d? ([2601:8:ab80:7d6:857d:cd13:79bf:f40d]) by mx.google.com with ESMTPSA id ho10sm18477936pbc.27.2015.04.29.12.11.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Apr 2015 12:11:16 -0700 (PDT) Subject: Re: svn commit: r282211 - head/tests/freebsd_test_suite Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_C5515D5E-6900-4BF0-BC59-F9F39EEA1B00"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <20150429112944.GI546@FreeBSD.org> Date: Wed, 29 Apr 2015 12:11:13 -0700 Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <068339F0-E6F0-4D10-B35D-AB4929521371@gmail.com> References: <201504290856.t3T8uuHF070908@svn.freebsd.org> <20150429112944.GI546@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 19:11:18 -0000 --Apple-Mail=_C5515D5E-6900-4BF0-BC59-F9F39EEA1B00 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Apr 29, 2015, at 4:29, Gleb Smirnoff wrote: > On Wed, Apr 29, 2015 at 08:56:56AM +0000, Garrett Cooper wrote: > G> Author: ngie > G> Date: Wed Apr 29 08:56:56 2015 > G> New Revision: 282211 > G> URL: https://svnweb.freebsd.org/changeset/base/282211 > G> > G> Log: > G> ATF_REQUIRE_KERNEL_MODULE: use atf_skip, not ATF_REQUIRE_MSG so = the testcase > G> no longer bombs out > G> PLAIN_REQUIRE_KERNEL_MODULE: use printf + _exit, no err so the = testcase no > G> longer bombs out if it prints to stderr > G> > G> MFC after: 5 days >=20 > This breaks buildworld since atf_skip() is a shell function, not a C = one: >=20 > glebius@behemoth:/usr/src/head/contrib/atf:|>grep -r atf_skip atf-c > glebius@behemoth:/usr/src/head/contrib/atf:|>grep -r atf_skip atf-sh/ > atf-sh/atf-sh.3:.Nm atf_skip , Yeah. I should really stop committing things after midnight and should = have gotten CRs/produced tests which would have proved that my code was = broken twice :(. Fixed in r282244.. --Apple-Mail=_C5515D5E-6900-4BF0-BC59-F9F39EEA1B00 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVQSzSAAoJEMZr5QU6S73e9t8H/1Xk9ERJIPpR+g/TZ9zpUhpW pExsXPGM3qwH67kSTQ6RS6ic7gPsfJBvNruX+gqfT5jeHVMfJDtgHlQ9pPzJjYu/ Jwqlo9ttPT7spiXd/KGnhaYk7w2TaYV8sEPpZRD2xIYddTokSBkFF6+WvpHn1Ted k8jCUJBb1t2/Twcbn9C+Ck5x2aa9Ir5FmMhGga8oLB48VB5dnXKUwF3ZX91+P1ts MGJP5MsOiPpx0L5AJR/MdRxbjqGB1brxXE1JkL0ZLOXKitYkj4wuuJC8n0fHCUGV OdO+74WXLeilNKGMZABjgR5W1ytcNOyy6H6rKoFvTcng8V4lGbLxOsmQLtvA/Vg= =Yp4W -----END PGP SIGNATURE----- --Apple-Mail=_C5515D5E-6900-4BF0-BC59-F9F39EEA1B00-- From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 19:47:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9767228B; Wed, 29 Apr 2015 19:47:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8687A1EBA; Wed, 29 Apr 2015 19:47:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TJlJfJ095230; Wed, 29 Apr 2015 19:47:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TJlJYn095229; Wed, 29 Apr 2015 19:47:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504291947.t3TJlJYn095229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 29 Apr 2015 19:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282245 - head/libexec/getty X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 19:47:19 -0000 Author: kib Date: Wed Apr 29 19:47:18 2015 New Revision: 282245 URL: https://svnweb.freebsd.org/changeset/base/282245 Log: Remove the #ifdef DEBUG code, which is not compilable on 64bit architectures. It seems to be an overlooked chunk in the r15645. PR: 199767 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/getty/subr.c Modified: head/libexec/getty/subr.c ============================================================================== --- head/libexec/getty/subr.c Wed Apr 29 19:08:11 2015 (r282244) +++ head/libexec/getty/subr.c Wed Apr 29 19:47:18 2015 (r282245) @@ -38,9 +38,6 @@ static const char rcsid[] = /* * Melbourne getty. */ -#ifdef DEBUG -#include -#endif #include #include #include @@ -160,17 +157,6 @@ gettable(const char *name, char *buf) fp->value = 1 ^ fp->invrt; } } - -#ifdef DEBUG - printf("name=\"%s\", buf=\"%s\"\r\n", name, buf); - for (sp = gettystrs; sp->field; sp++) - printf("cgetstr: %s=%s\r\n", sp->field, sp->value); - for (np = gettynums; np->field; np++) - printf("cgetnum: %s=%d\r\n", np->field, np->value); - for (fp = gettyflags; fp->field; fp++) - printf("cgetflags: %s='%c' set='%c'\r\n", fp->field, - fp->value + '0', fp->set + '0'); -#endif /* DEBUG */ } void From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 20:08:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D15A9867; Wed, 29 Apr 2015 20:08:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C062210C9; Wed, 29 Apr 2015 20:08:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TK84Cl005430; Wed, 29 Apr 2015 20:08:04 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TK84t0005429; Wed, 29 Apr 2015 20:08:04 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504292008.t3TK84t0005429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 29 Apr 2015 20:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282246 - head/sys/dev/kbdmux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 20:08:04 -0000 Author: pfg Date: Wed Apr 29 20:08:03 2015 New Revision: 282246 URL: https://svnweb.freebsd.org/changeset/base/282246 Log: Revert r281889: The change would appease the static analyzers but it is pretty much a no-op. I need to trust static analyzers much less, especially for the kernel. Requested by: jkim Modified: head/sys/dev/kbdmux/kbdmux.c Modified: head/sys/dev/kbdmux/kbdmux.c ============================================================================== --- head/sys/dev/kbdmux/kbdmux.c Wed Apr 29 19:47:18 2015 (r282245) +++ head/sys/dev/kbdmux/kbdmux.c Wed Apr 29 20:08:03 2015 (r282246) @@ -470,10 +470,6 @@ kbdmux_init(int unit, keyboard_t **kbdp, KBDMUX_LOCK(state); callout_reset(&state->ks_timo, TICKS, kbdmux_kbd_intr_timo, state); KBDMUX_UNLOCK(state); - } else if (needfree) { - free(accmap, M_KBDMUX); - free(fkeymap, M_KBDMUX); - free(keymap, M_KBDMUX); } return (0); From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 20:30:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16BF6C9B; Wed, 29 Apr 2015 20:30:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFA2B12DC; Wed, 29 Apr 2015 20:30:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TKUBwY016565; Wed, 29 Apr 2015 20:30:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TKUBOv016564; Wed, 29 Apr 2015 20:30:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504292030.t3TKUBOv016564@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 29 Apr 2015 20:30:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282247 - head/sys/dev/vt/hw/fb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 20:30:12 -0000 Author: emaste Date: Wed Apr 29 20:30:11 2015 New Revision: 282247 URL: https://svnweb.freebsd.org/changeset/base/282247 Log: vt: fix vt_fb_bitblt_bitmap mask corruption Previously the mask wrapped when one or more of the mask bytes extended past the right edge of the window. Simplify the logic and use the same byte offset and bit in both the pattern and mask. PR: 199648 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2360 Modified: head/sys/dev/vt/hw/fb/vt_fb.c Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Wed Apr 29 20:08:03 2015 (r282246) +++ head/sys/dev/vt/hw/fb/vt_fb.c Wed Apr 29 20:30:11 2015 (r282247) @@ -264,46 +264,40 @@ vt_fb_bitblt_bitmap(struct vt_device *vd { struct fb_info *info; uint32_t fgc, bgc, cc, o; - int c, l, bpp, bpl; - u_long line; - uint8_t b, m; - const uint8_t *ch; + int bpp, bpl, xi, yi; + int bit, byte; info = vd->vd_softc; bpp = FBTYPE_GET_BYTESPP(info); fgc = info->fb_cmap[fg]; bgc = info->fb_cmap[bg]; - b = m = 0; - bpl = (width + 7) >> 3; /* Bytes per source line. */ + bpl = (width + 7) / 8; /* Bytes per source line. */ if (info->fb_flags & FB_FLAG_NOWRITE) return; KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); - line = (info->fb_stride * y) + (x * bpp); - for (l = 0; - l < height && y + l < vw->vw_draw_area.tr_end.tp_row; - l++) { - ch = pattern; - for (c = 0; - c < width && x + c < vw->vw_draw_area.tr_end.tp_col; - c++) { - if (c % 8 == 0) - b = *ch++; - else - b <<= 1; - if (mask != NULL) { - if (c % 8 == 0) - m = *mask++; - else - m <<= 1; - /* Skip pixel write, if mask has no bit set. */ - if ((m & 0x80) == 0) - continue; - } - o = line + (c * bpp); - cc = b & 0x80 ? fgc : bgc; + /* Bound by right and bottom edges. */ + if (y + height > vw->vw_draw_area.tr_end.tp_row) { + if (y >= vw->vw_draw_area.tr_end.tp_row) + return; + height = vw->vw_draw_area.tr_end.tp_row - y; + } + if (x + width > vw->vw_draw_area.tr_end.tp_col) { + if (x >= vw->vw_draw_area.tr_end.tp_col) + return; + width = vw->vw_draw_area.tr_end.tp_col - x; + } + for (yi = 0; yi < height; yi++) { + for (xi = 0; xi < width; xi++) { + byte = yi * bpl + xi / 8; + bit = 0x80 >> (xi % 8); + /* Skip pixel write, if mask bit not set. */ + if (mask != NULL && (mask[byte] & bit) == 0) + continue; + o = (y + yi) * info->fb_stride + (x + xi) * bpp; + cc = pattern[byte] & bit ? fgc : bgc; switch(bpp) { case 1: @@ -326,8 +320,6 @@ vt_fb_bitblt_bitmap(struct vt_device *vd break; } } - line += info->fb_stride; - pattern += bpl; } } From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 21:50:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6484AE35; Wed, 29 Apr 2015 21:50:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52B321BFA; Wed, 29 Apr 2015 21:50:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TLo51Z056378; Wed, 29 Apr 2015 21:50:05 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TLo4nU056375; Wed, 29 Apr 2015 21:50:04 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292150.t3TLo4nU056375@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 21:50:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282248 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 21:50:05 -0000 Author: oshogbo Date: Wed Apr 29 21:50:04 2015 New Revision: 282248 URL: https://svnweb.freebsd.org/changeset/base/282248 Log: Style fixes. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c head/sys/sys/nv_impl.h Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Wed Apr 29 20:30:11 2015 (r282247) +++ head/sys/kern/subr_nvlist.c Wed Apr 29 21:50:04 2015 (r282248) @@ -1260,8 +1260,9 @@ nvlist_add_stringv(nvlist_t *nvl, const if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1376,8 +1377,9 @@ nvlist_addv_null(nvlist_t *nvl, const ch if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1394,8 +1396,9 @@ nvlist_addv_bool(nvlist_t *nvl, bool val if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1413,8 +1416,9 @@ nvlist_addv_number(nvlist_t *nvl, uint64 if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1432,8 +1436,9 @@ nvlist_addv_string(nvlist_t *nvl, const if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1451,8 +1456,9 @@ nvlist_addv_nvlist(nvlist_t *nvl, const if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } #ifndef _KERNEL @@ -1490,8 +1496,9 @@ nvlist_addv_binary(nvlist_t *nvl, const if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1586,8 +1593,9 @@ nvlist_movev_string(nvlist_t *nvl, char if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } void @@ -1607,8 +1615,9 @@ nvlist_movev_nvlist(nvlist_t *nvl, nvlis if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } #ifndef _KERNEL @@ -1648,8 +1657,9 @@ nvlist_movev_binary(nvlist_t *nvl, void if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); - } else + } else { nvlist_move_nvpair(nvl, nvp); + } } const nvpair_t * Modified: head/sys/sys/nv_impl.h ============================================================================== --- head/sys/sys/nv_impl.h Wed Apr 29 20:30:11 2015 (r282247) +++ head/sys/sys/nv_impl.h Wed Apr 29 21:50:04 2015 (r282248) @@ -41,8 +41,8 @@ typedef struct nvpair nvpair_t; #define NV_TYPE_NVLIST_UP 255 -#define NV_TYPE_FIRST NV_TYPE_NULL -#define NV_TYPE_LAST NV_TYPE_BINARY +#define NV_TYPE_FIRST NV_TYPE_NULL +#define NV_TYPE_LAST NV_TYPE_BINARY #define NV_FLAG_BIG_ENDIAN 0x80 @@ -70,8 +70,8 @@ typedef struct nvpair nvpair_t; #define nv_strdup(buf) strdup((buf)) #define nv_vasprintf(ptr, ...) vasprintf(ptr, __VA_ARGS__) -#define SAVE_ERRNO(var) (var) = errno -#define RESTORE_ERRNO(var) errno = (var) +#define SAVE_ERRNO(var) (var) = errno +#define RESTORE_ERRNO(var) errno = (var) #define ERRNO_OR_DEFAULT(default) (errno == 0 ? (default) : errno) From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 21:54:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 024A7FDD; Wed, 29 Apr 2015 21:54:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E52421CC5; Wed, 29 Apr 2015 21:54:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TLsYpX060554; Wed, 29 Apr 2015 21:54:34 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TLsYpQ060553; Wed, 29 Apr 2015 21:54:34 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292154.t3TLsYpQ060553@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 21:54:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282249 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 21:54:35 -0000 Author: oshogbo Date: Wed Apr 29 21:54:34 2015 New Revision: 282249 URL: https://svnweb.freebsd.org/changeset/base/282249 Log: Always use the nv_malloc macro instead of malloc(3). Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Wed Apr 29 21:50:04 2015 (r282248) +++ head/sys/kern/subr_nvlist.c Wed Apr 29 21:54:34 2015 (r282249) @@ -963,7 +963,7 @@ nvlist_recv(int sock) nfds = (size_t)nvlhdr.nvlh_descriptors; size = sizeof(nvlhdr) + (size_t)nvlhdr.nvlh_size; - buf = malloc(size); + buf = nv_malloc(size); if (buf == NULL) return (NULL); @@ -976,7 +976,7 @@ nvlist_recv(int sock) goto out; if (nfds > 0) { - fds = malloc(nfds * sizeof(fds[0])); + fds = nv_malloc(nfds * sizeof(fds[0])); if (fds == NULL) goto out; if (fd_recv(sock, fds, nfds) == -1) From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:00:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55C9437B; Wed, 29 Apr 2015 22:00:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 447FF1D0A; Wed, 29 Apr 2015 22:00:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TM0Rjm062089; Wed, 29 Apr 2015 22:00:27 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TM0R2J062088; Wed, 29 Apr 2015 22:00:27 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292200.t3TM0R2J062088@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 22:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282250 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:00:27 -0000 Author: oshogbo Date: Wed Apr 29 22:00:26 2015 New Revision: 282250 URL: https://svnweb.freebsd.org/changeset/base/282250 Log: Nvlist functionality is not used within interrupt context, so we should use M_WAITOK to allocate memory. Approved by: pjd (mentor) Modified: head/sys/sys/nv_impl.h Modified: head/sys/sys/nv_impl.h ============================================================================== --- head/sys/sys/nv_impl.h Wed Apr 29 21:54:34 2015 (r282249) +++ head/sys/sys/nv_impl.h Wed Apr 29 22:00:26 2015 (r282250) @@ -47,11 +47,11 @@ typedef struct nvpair nvpair_t; #define NV_FLAG_BIG_ENDIAN 0x80 #ifdef _KERNEL -#define nv_malloc(size) malloc((size), M_NVLIST, M_NOWAIT) +#define nv_malloc(size) malloc((size), M_NVLIST, M_WAITOK) #define nv_calloc(n, size) malloc((n) * (size), M_NVLIST, \ - M_NOWAIT | M_ZERO) + M_WAITOK | M_ZERO) #define nv_realloc(buf, size) realloc((buf), (size), M_NVLIST, \ - M_NOWAIT) + M_WAITOK) #define nv_free(buf) free((buf), M_NVLIST) #define nv_strdup(buf) strdup((buf), M_NVLIST) #define nv_vasprintf(ptr, ...) vasprintf(ptr, M_NVLIST, __VA_ARGS__) From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:15:03 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 999CC80E; Wed, 29 Apr 2015 22:15:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AEF91EF0; Wed, 29 Apr 2015 22:15:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TMF3Da070901; Wed, 29 Apr 2015 22:15:03 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TMF3S6070900; Wed, 29 Apr 2015 22:15:03 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292215.t3TMF3S6070900@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 22:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282251 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:15:03 -0000 Author: oshogbo Date: Wed Apr 29 22:15:02 2015 New Revision: 282251 URL: https://svnweb.freebsd.org/changeset/base/282251 Log: Remove recursion from descriptor-related functions. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Wed Apr 29 22:00:26 2015 (r282250) +++ head/sys/kern/subr_nvlist.c Wed Apr 29 22:15:02 2015 (r282251) @@ -533,27 +533,30 @@ out: #ifndef _KERNEL static int * -nvlist_xdescriptors(const nvlist_t *nvl, int *descs, int level) +nvlist_xdescriptors(const nvlist_t *nvl, int *descs) { - const nvpair_t *nvp; + nvpair_t *nvp; + const char *name; + int type; NVLIST_ASSERT(nvl); PJDLOG_ASSERT(nvl->nvl_error == 0); - PJDLOG_ASSERT(level < 3); - for (nvp = nvlist_first_nvpair(nvl); nvp != NULL; - nvp = nvlist_next_nvpair(nvl, nvp)) { - switch (nvpair_type(nvp)) { - case NV_TYPE_DESCRIPTOR: - *descs = nvpair_get_descriptor(nvp); - descs++; - break; - case NV_TYPE_NVLIST: - descs = nvlist_xdescriptors(nvpair_get_nvlist(nvp), - descs, level + 1); - break; + nvp = NULL; + do { + while ((name = nvlist_next(nvl, &type, (void**)&nvp)) != NULL) { + switch (type) { + case NV_TYPE_DESCRIPTOR: + *descs = nvpair_get_descriptor(nvp); + descs++; + break; + case NV_TYPE_NVLIST: + nvl = nvpair_get_nvlist(nvp); + nvp = NULL; + break; + } } - } + } while ((nvl = nvlist_get_parent(nvl, (void**)&nvp)) != NULL); return (descs); } @@ -571,7 +574,7 @@ nvlist_descriptors(const nvlist_t *nvl, if (fds == NULL) return (NULL); if (nitems > 0) - nvlist_xdescriptors(nvl, fds, 0); + nvlist_xdescriptors(nvl, fds); fds[nitems] = -1; if (nitemsp != NULL) *nitemsp = nitems; @@ -579,30 +582,33 @@ nvlist_descriptors(const nvlist_t *nvl, } #endif -static size_t -nvlist_xndescriptors(const nvlist_t *nvl, int level) +size_t +nvlist_ndescriptors(const nvlist_t *nvl) { #ifndef _KERNEL - const nvpair_t *nvp; + nvpair_t *nvp; + const char *name; size_t ndescs; + int type; NVLIST_ASSERT(nvl); PJDLOG_ASSERT(nvl->nvl_error == 0); - PJDLOG_ASSERT(level < 3); ndescs = 0; - for (nvp = nvlist_first_nvpair(nvl); nvp != NULL; - nvp = nvlist_next_nvpair(nvl, nvp)) { - switch (nvpair_type(nvp)) { - case NV_TYPE_DESCRIPTOR: - ndescs++; - break; - case NV_TYPE_NVLIST: - ndescs += nvlist_xndescriptors(nvpair_get_nvlist(nvp), - level + 1); - break; + nvp = NULL; + do { + while ((name = nvlist_next(nvl, &type, (void**)&nvp)) != NULL) { + switch (type) { + case NV_TYPE_DESCRIPTOR: + ndescs++; + break; + case NV_TYPE_NVLIST: + nvl = nvpair_get_nvlist(nvp); + nvp = NULL; + break; + } } - } + } while ((nvl = nvlist_get_parent(nvl, (void**)&nvp)) != NULL); return (ndescs); #else @@ -610,13 +616,6 @@ nvlist_xndescriptors(const nvlist_t *nvl #endif } -size_t -nvlist_ndescriptors(const nvlist_t *nvl) -{ - - return (nvlist_xndescriptors(nvl, 0)); -} - static unsigned char * nvlist_pack_header(const nvlist_t *nvl, unsigned char *ptr, size_t *leftp) { From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:19:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABF0A9EA; Wed, 29 Apr 2015 22:19:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D4C21F36; Wed, 29 Apr 2015 22:19:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TMJf93071531; Wed, 29 Apr 2015 22:19:41 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TMJeGn071528; Wed, 29 Apr 2015 22:19:40 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292219.t3TMJeGn071528@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 22:19:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282252 - head/lib/libcapsicum X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:19:41 -0000 Author: oshogbo Date: Wed Apr 29 22:19:40 2015 New Revision: 282252 URL: https://svnweb.freebsd.org/changeset/base/282252 Log: Remove the use of nvlist_.*[vf] functions from libcapsicum and replace them with snprintf(3). Assert the results of snprintf(3). Approved by: pjd (mentor) Modified: head/lib/libcapsicum/libcapsicum_dns.c head/lib/libcapsicum/libcapsicum_grp.c head/lib/libcapsicum/libcapsicum_pwd.c Modified: head/lib/libcapsicum/libcapsicum_dns.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_dns.c Wed Apr 29 22:15:02 2015 (r282251) +++ head/lib/libcapsicum/libcapsicum_dns.c Wed Apr 29 22:19:40 2015 (r282252) @@ -30,6 +30,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -67,6 +68,8 @@ static struct hostent * hostent_unpack(const nvlist_t *nvl, struct hostent *hp) { unsigned int ii, nitems; + char nvlname[64]; + int n; hostent_free(hp); @@ -81,8 +84,10 @@ hostent_unpack(const nvlist_t *nvl, stru if (hp->h_aliases == NULL) goto fail; for (ii = 0; ii < nitems; ii++) { + n = snprintf(nvlname, sizeof(nvlname), "alias%u", ii); + assert(n > 0 && n < (int)sizeof(nvlname)); hp->h_aliases[ii] = - strdup(nvlist_getf_string(nvl, "alias%u", ii)); + strdup(nvlist_get_string(nvl, nvlname)); if (hp->h_aliases[ii] == NULL) goto fail; } @@ -96,7 +101,9 @@ hostent_unpack(const nvlist_t *nvl, stru hp->h_addr_list[ii] = malloc(hp->h_length); if (hp->h_addr_list[ii] == NULL) goto fail; - bcopy(nvlist_getf_binary(nvl, NULL, "addr%u", ii), + n = snprintf(nvlname, sizeof(nvlname), "addr%u", ii); + assert(n > 0 && n < (int)sizeof(nvlname)); + bcopy(nvlist_get_binary(nvl, nvlname, NULL), hp->h_addr_list[ii], hp->h_length); } hp->h_addr_list[ii] = NULL; @@ -208,8 +215,9 @@ cap_getaddrinfo(cap_channel_t *chan, con struct addrinfo *firstai, *prevai, *curai; unsigned int ii; const nvlist_t *nvlai; + char nvlname[64]; nvlist_t *nvl; - int error; + int error, n; nvl = nvlist_create(0); nvlist_add_string(nvl, "cmd", "getaddrinfo"); @@ -237,9 +245,11 @@ cap_getaddrinfo(cap_channel_t *chan, con nvlai = NULL; firstai = prevai = curai = NULL; for (ii = 0; ; ii++) { - if (!nvlist_existsf_nvlist(nvl, "res%u", ii)) + n = snprintf(nvlname, sizeof(nvlname), "res%u", ii); + assert(n > 0 && n < (int)sizeof(nvlname)); + if (!nvlist_exists_nvlist(nvl, nvlname)) break; - nvlai = nvlist_getf_nvlist(nvl, "res%u", ii); + nvlai = nvlist_get_nvlist(nvl, nvlname); curai = addrinfo_unpack(nvlai); if (curai == NULL) break; @@ -314,6 +324,8 @@ cap_dns_type_limit(cap_channel_t *chan, { nvlist_t *limits; unsigned int i; + char nvlname[64]; + int n; if (cap_limit_get(chan, &limits) < 0) return (-1); @@ -321,8 +333,11 @@ cap_dns_type_limit(cap_channel_t *chan, limits = nvlist_create(0); else limit_remove(limits, "type"); - for (i = 0; i < ntypes; i++) - nvlist_addf_string(limits, types[i], "type%u", i); + for (i = 0; i < ntypes; i++) { + n = snprintf(nvlname, sizeof(nvlname), "type%u", i); + assert(n > 0 && n < (int)sizeof(nvlname)); + nvlist_add_string(limits, nvlname, types[i]); + } return (cap_limit_set(chan, limits)); } @@ -332,6 +347,8 @@ cap_dns_family_limit(cap_channel_t *chan { nvlist_t *limits; unsigned int i; + char nvlname[64]; + int n; if (cap_limit_get(chan, &limits) < 0) return (-1); @@ -340,8 +357,9 @@ cap_dns_family_limit(cap_channel_t *chan else limit_remove(limits, "family"); for (i = 0; i < nfamilies; i++) { - nvlist_addf_number(limits, (uint64_t)families[i], - "family%u", i); + n = snprintf(nvlname, sizeof(nvlname), "type%u", i); + assert(n > 0 && n < (int)sizeof(nvlname)); + nvlist_add_number(limits, nvlname, (uint64_t)families[i]); } return (cap_limit_set(chan, limits)); } Modified: head/lib/libcapsicum/libcapsicum_grp.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_grp.c Wed Apr 29 22:15:02 2015 (r282251) +++ head/lib/libcapsicum/libcapsicum_grp.c Wed Apr 29 22:19:40 2015 (r282252) @@ -94,9 +94,10 @@ group_unpack_members(const nvlist_t *nvl size_t *bufsizep) { const char *mem; - char **outstrs, *str; + char **outstrs, *str, nvlname[64]; size_t nmem, datasize, strsize; unsigned int ii; + int n; if (!nvlist_exists_number(nvl, "gr_nmem")) { datasize = _ALIGNBYTES + sizeof(char *); @@ -113,7 +114,9 @@ group_unpack_members(const nvlist_t *nvl nmem = (size_t)nvlist_get_number(nvl, "gr_nmem"); datasize = _ALIGNBYTES + sizeof(char *) * (nmem + 1); for (ii = 0; ii < nmem; ii++) { - mem = dnvlist_getf_string(nvl, NULL, "gr_mem[%u]", ii); + n = snprintf(nvlname, sizeof(nvlname), "gr_mem[%u]", ii); + assert(n > 0 && n < (int)sizeof(nvlname)); + mem = dnvlist_get_string(nvl, nvlname, NULL); if (mem == NULL) return (EINVAL); datasize += strlen(mem) + 1; @@ -125,7 +128,9 @@ group_unpack_members(const nvlist_t *nvl outstrs = (char **)_ALIGN(*bufferp); str = (char *)outstrs + sizeof(char *) * (nmem + 1); for (ii = 0; ii < nmem; ii++) { - mem = nvlist_getf_string(nvl, "gr_mem[%u]", ii); + n = snprintf(nvlname, sizeof(nvlname), "gr_mem[%u]", ii); + assert(n > 0 && n < (int)sizeof(nvlname)); + mem = nvlist_get_string(nvl, nvlname); strsize = strlen(mem) + 1; memcpy(str, mem, strsize); outstrs[ii] = str; @@ -407,6 +412,8 @@ cap_grp_limit_groups(cap_channel_t *chan { nvlist_t *limits, *groups; unsigned int i; + char nvlname[64]; + int n; if (cap_limit_get(chan, &limits) < 0) return (-1); @@ -417,10 +424,16 @@ cap_grp_limit_groups(cap_channel_t *chan nvlist_free_nvlist(limits, "groups"); } groups = nvlist_create(0); - for (i = 0; i < ngids; i++) - nvlist_addf_number(groups, (uint64_t)gids[i], "gid%u", i); - for (i = 0; i < nnames; i++) - nvlist_addf_string(groups, names[i], "name%u", i); + for (i = 0; i < ngids; i++) { + n = snprintf(nvlname, sizeof(nvlname), "gid%u", i); + assert(n > 0 && n < (int)sizeof(nvlname)); + nvlist_add_number(groups, nvlname, (uint64_t)gids[i]); + } + for (i = 0; i < nnames; i++) { + n = snprintf(nvlname, sizeof(nvlname), "gid%u", i); + assert(n > 0 && n < (int)sizeof(nvlname)); + nvlist_add_string(groups, nvlname, names[i]); + } nvlist_move_nvlist(limits, "groups", groups); return (cap_limit_set(chan, limits)); } Modified: head/lib/libcapsicum/libcapsicum_pwd.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_pwd.c Wed Apr 29 22:15:02 2015 (r282251) +++ head/lib/libcapsicum/libcapsicum_pwd.c Wed Apr 29 22:19:40 2015 (r282252) @@ -364,7 +364,9 @@ cap_pwd_limit_users(cap_channel_t *chan, size_t nnames, uid_t *uids, size_t nuids) { nvlist_t *limits, *users; + char nvlname[64]; unsigned int i; + int n; if (cap_limit_get(chan, &limits) < 0) return (-1); @@ -375,10 +377,16 @@ cap_pwd_limit_users(cap_channel_t *chan, nvlist_free_nvlist(limits, "users"); } users = nvlist_create(0); - for (i = 0; i < nuids; i++) - nvlist_addf_number(users, (uint64_t)uids[i], "uid%u", i); - for (i = 0; i < nnames; i++) - nvlist_addf_string(users, names[i], "name%u", i); + for (i = 0; i < nuids; i++) { + n = snprintf(nvlname, sizeof(nvlname), "uid%u", i); + assert(n > 0 && n < (int)sizeof(nvlname)); + nvlist_add_number(users, nvlname, (uint64_t)uids[i]); + } + for (i = 0; i < nnames; i++) { + n = snprintf(nvlname, sizeof(nvlname), "name%u", i); + assert(n > 0 && n < (int)sizeof(nvlname)); + nvlist_add_string(users, nvlname, names[i]); + } nvlist_move_nvlist(limits, "users", users); return (cap_limit_set(chan, limits)); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:28:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D240D94; Wed, 29 Apr 2015 22:28:51 +0000 (UTC) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2A171046; Wed, 29 Apr 2015 22:28:50 +0000 (UTC) Received: by lbbuc2 with SMTP id uc2so31214759lbb.2; Wed, 29 Apr 2015 15:28:48 -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:message-id:subject :from:to:cc:content-type; bh=3HsNtZkTVmZEU9q0/sq/rkHnPyLYRzEFx0EhVxezOHg=; b=sZeA8FdoStmb+2HSV0symVyGifDgjVqjA4U3k2v67Nce5UvUEOQ6WaBMxsRh1IV0Zx 3U9YzQou4dVxJTA6ayXw3A2v67SjQ+RWUJZivL20eDBbCgBIoidyjvQsMvhhwsLKYnX1 iRMiofShbQECFubiMjr6a/q4/XDz11aA/fb0s4udlYGlRUGH7kQqYdE8s3Um3vyOJwLo p/r81dAmzZ6twd0llwP9NWdWrOq4BSMgJoSemhLeH4HWmNp+UTN/S5IBSkVSqCxMIkFg Ux7v4s/d2mg9gJ6/8MxLD2VOcxyWO5Sk2AblRpFWBO88xJKfGGKD2qUL6BbEaQDaaR7V i8xg== MIME-Version: 1.0 X-Received: by 10.152.234.139 with SMTP id ue11mr1128155lac.28.1430346528911; Wed, 29 Apr 2015 15:28:48 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.88.77 with HTTP; Wed, 29 Apr 2015 15:28:48 -0700 (PDT) In-Reply-To: <201504292200.t3TM0R2J062088@svn.freebsd.org> References: <201504292200.t3TM0R2J062088@svn.freebsd.org> Date: Wed, 29 Apr 2015 15:28:48 -0700 X-Google-Sender-Auth: 3nD7zJvJDv5jQQR5-XQMRe6w42I Message-ID: Subject: Re: svn commit: r282250 - head/sys/sys From: Davide Italiano To: Mariusz Zaborski Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:28:51 -0000 On Wed, Apr 29, 2015 at 3:00 PM, Mariusz Zaborski wrote: > Author: oshogbo > Date: Wed Apr 29 22:00:26 2015 > New Revision: 282250 > URL: https://svnweb.freebsd.org/changeset/base/282250 > > Log: > Nvlist functionality is not used within interrupt context, so we should > use M_WAITOK to allocate memory. > > Approved by: pjd (mentor) > FYI, given you're passing M_WAITOK to malloc(9) you can now remove all the check for return type, as long as malloc(9) with M_WAITOK can never fail. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:30:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 765FBEFD; Wed, 29 Apr 2015 22:30:40 +0000 (UTC) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F00410F9; Wed, 29 Apr 2015 22:30:40 +0000 (UTC) Received: by wgen6 with SMTP id n6so43554424wge.3; Wed, 29 Apr 2015 15:30:38 -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:message-id:subject :from:to:cc:content-type; bh=3vOWgEB9MybhkPp8FoXZQIA7095JVyMU/BV34W6E5Fg=; b=jypP3DyAJgo9ntIBbHpjnypca8IkZrkwuEeWvUS2r/MMBGJAJmDeJAyH1gVU0vX+Mo V/ufrgcIL7RFdlRWBKkwQjhkGya8EcNAl8jnByp4nSEJOEZrJUB5HyPXRaDMqDFR/4xq /ioGmY2cd5S/uEC60mRqwnYv9d/MkcEBWPHB62zMPO0uXU/IAby5evckXUPfi8wa1RhQ onDvOegGeGFeXifgORRpkGJRg/vp/2r7hsVg8Pc+qdzGGAPzDrJfk0vyt2Z2yd5/bMTY 1DQ2HfMLwhiAqRE7uPzr6Ni//s33sC1CnMQ8Osk99WEhFGUCqkAtnWAZvKFMSzh4GvBU dYHQ== MIME-Version: 1.0 X-Received: by 10.194.104.164 with SMTP id gf4mr2556985wjb.102.1430346638682; Wed, 29 Apr 2015 15:30:38 -0700 (PDT) Sender: oshogbo.vx@gmail.com Received: by 10.28.187.214 with HTTP; Wed, 29 Apr 2015 15:30:38 -0700 (PDT) In-Reply-To: References: <201504292200.t3TM0R2J062088@svn.freebsd.org> Date: Thu, 30 Apr 2015 00:30:38 +0200 X-Google-Sender-Auth: t0dTTBLThfP-8436WAX66k3UAW8 Message-ID: Subject: Re: svn commit: r282250 - head/sys/sys From: Mariusz Zaborski To: Davide Italiano Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:30:40 -0000 On 30 April 2015 at 00:28, Davide Italiano wrote: > On Wed, Apr 29, 2015 at 3:00 PM, Mariusz Zaborski > wrote: > > Author: oshogbo > > Date: Wed Apr 29 22:00:26 2015 > > New Revision: 282250 > > URL: https://svnweb.freebsd.org/changeset/base/282250 > > > > Log: > > Nvlist functionality is not used within interrupt context, so we should > > use M_WAITOK to allocate memory. > > > > Approved by: pjd (mentor) > > > > FYI, given you're passing M_WAITOK to malloc(9) you can now remove all > the check for return type, as long as malloc(9) with M_WAITOK can > never fail. > > There is also nvlist user-land library (lib/libnv). Thanks, Mariusz From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:32:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7974FE4; Wed, 29 Apr 2015 22:32:35 +0000 (UTC) Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19A8E1110; Wed, 29 Apr 2015 22:32:35 +0000 (UTC) Received: by labbd9 with SMTP id bd9so31137997lab.2; Wed, 29 Apr 2015 15:32:33 -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:message-id:subject :from:to:cc:content-type; bh=ocXrP0RZ3t51wTLu+Eh41VG8ZL88NR6hm9PpHXuRbdo=; b=tUX0hC5ISp5M7N7H17a5r/yPh1pAzzmg7j/c3NXh09bcap1iQuPpAv/2reaw9lsUB5 d8dwOew0rTOO3iwMGuCA5L5kbkwAxzL/g44/11KkI2c6wRQ6dlLqRe6fqwKhtIjHipMT RuLrlmUuLo9jSQ2lSFisuIIX/5svcT1ehGjK0/bpz4BR3YMqDVzwmQxtjhDJXljfQZRt Q0VFn1+C/kELUjbR48AgfQvUgNoyM6it/PjJ2px7i3LTpO0xb/kLCbNwkIy2nssezur5 T6D9uJiiWqirX/hcYVSSDWTe2+KT4A5FvM3PwtycTB/hwvdvfWSad1KGVvsxIrJEdW0t QYzw== MIME-Version: 1.0 X-Received: by 10.152.234.139 with SMTP id ue11mr1137342lac.28.1430346753293; Wed, 29 Apr 2015 15:32:33 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.88.77 with HTTP; Wed, 29 Apr 2015 15:32:33 -0700 (PDT) In-Reply-To: References: <201504292200.t3TM0R2J062088@svn.freebsd.org> Date: Wed, 29 Apr 2015 15:32:33 -0700 X-Google-Sender-Auth: JQJtH4-MNB_tFqd9w_di_hXpBHI Message-ID: Subject: Re: svn commit: r282250 - head/sys/sys From: Davide Italiano To: Mariusz Zaborski Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:32:35 -0000 On Wed, Apr 29, 2015 at 3:30 PM, Mariusz Zaborski wrote: > On 30 April 2015 at 00:28, Davide Italiano wrote: >> >> On Wed, Apr 29, 2015 at 3:00 PM, Mariusz Zaborski >> wrote: >> > Author: oshogbo >> > Date: Wed Apr 29 22:00:26 2015 >> > New Revision: 282250 >> > URL: https://svnweb.freebsd.org/changeset/base/282250 >> > >> > Log: >> > Nvlist functionality is not used within interrupt context, so we >> > should >> > use M_WAITOK to allocate memory. >> > >> > Approved by: pjd (mentor) >> > >> >> FYI, given you're passing M_WAITOK to malloc(9) you can now remove all >> the check for return type, as long as malloc(9) with M_WAITOK can >> never fail. >> > There is also nvlist user-land library (lib/libnv). > > Thanks, > Mariusz I'm talking about sys/kern/subr_nvlist.c. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:33:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5EC68239; Wed, 29 Apr 2015 22:33:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CD4B111D; Wed, 29 Apr 2015 22:33:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TMXsJY080700; Wed, 29 Apr 2015 22:33:54 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TMXruG080690; Wed, 29 Apr 2015 22:33:53 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292233.t3TMXruG080690@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 22:33:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282253 - in head/libexec/casper: dns grp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:33:54 -0000 Author: oshogbo Date: Wed Apr 29 22:33:53 2015 New Revision: 282253 URL: https://svnweb.freebsd.org/changeset/base/282253 Log: Remove the use of nvlist_.*[vf] functions from casper and replace them with snprintf(3). Assert the results of snprintf(3). Approved by: pjd (mentor) Modified: head/libexec/casper/dns/dns.c head/libexec/casper/grp/grp.c Modified: head/libexec/casper/dns/dns.c ============================================================================== --- head/libexec/casper/dns/dns.c Wed Apr 29 22:19:40 2015 (r282252) +++ head/libexec/casper/dns/dns.c Wed Apr 29 22:33:53 2015 (r282253) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -103,6 +104,8 @@ static void hostent_pack(const struct hostent *hp, nvlist_t *nvl) { unsigned int ii; + char nvlname[64]; + int n; nvlist_add_string(nvl, "name", hp->h_name); nvlist_add_number(nvl, "addrtype", (uint64_t)hp->h_addrtype); @@ -112,8 +115,9 @@ hostent_pack(const struct hostent *hp, n nvlist_add_number(nvl, "naliases", 0); } else { for (ii = 0; hp->h_aliases[ii] != NULL; ii++) { - nvlist_addf_string(nvl, hp->h_aliases[ii], "alias%u", - ii); + n = snprintf(nvlname, sizeof(nvlname), "alias%u", ii); + assert(n > 0 && n < (int)sizeof(nvlname)); + nvlist_add_string(nvl, nvlname, hp->h_aliases[ii]); } nvlist_add_number(nvl, "naliases", (uint64_t)ii); } @@ -122,8 +126,10 @@ hostent_pack(const struct hostent *hp, n nvlist_add_number(nvl, "naddrs", 0); } else { for (ii = 0; hp->h_addr_list[ii] != NULL; ii++) { - nvlist_addf_binary(nvl, hp->h_addr_list[ii], - (size_t)hp->h_length, "addr%u", ii); + n = snprintf(nvlname, sizeof(nvlname), "addr%u", ii); + assert(n > 0 && n < (int)sizeof(nvlname)); + nvlist_add_binary(nvl, nvlname, hp->h_addr_list[ii], + (size_t)hp->h_length); } nvlist_add_number(nvl, "naddrs", (uint64_t)ii); } @@ -271,9 +277,10 @@ dns_getaddrinfo(const nvlist_t *limits, { struct addrinfo hints, *hintsp, *res, *cur; const char *hostname, *servname; + char nvlname[64]; nvlist_t *elem; unsigned int ii; - int error, family; + int error, family, n; if (!dns_allowed_type(limits, "ADDR")) return (NO_RECOVERY); @@ -310,7 +317,9 @@ dns_getaddrinfo(const nvlist_t *limits, for (cur = res, ii = 0; cur != NULL; cur = cur->ai_next, ii++) { elem = addrinfo_pack(cur); - nvlist_movef_nvlist(nvlout, elem, "res%u", ii); + n = snprintf(nvlname, sizeof(nvlname), "res%u", ii); + assert(n > 0 && n < (int)sizeof(nvlname)); + nvlist_move_nvlist(nvlout, nvlname, elem); } freeaddrinfo(res); Modified: head/libexec/casper/grp/grp.c ============================================================================== --- head/libexec/casper/grp/grp.c Wed Apr 29 22:19:40 2015 (r282252) +++ head/libexec/casper/grp/grp.c Wed Apr 29 22:33:53 2015 (r282253) @@ -30,6 +30,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include #include @@ -184,6 +185,8 @@ grp_allowed_fields(const nvlist_t *oldli static bool grp_pack(const nvlist_t *limits, const struct group *grp, nvlist_t *nvl) { + char nvlname[64]; + int n; if (grp == NULL) return (true); @@ -210,8 +213,10 @@ grp_pack(const nvlist_t *limits, const s unsigned int ngroups; for (ngroups = 0; grp->gr_mem[ngroups] != NULL; ngroups++) { - nvlist_addf_string(nvl, grp->gr_mem[ngroups], - "gr_mem[%u]", ngroups); + n = snprintf(nvlname, sizeof(nvlname), "gr_mem[%u]", + ngroups); + assert(n > 0 && n < sizeof(nvlname)); + nvlist_add_string(nvl, nvlname, grp->gr_mem[ngroups]); } nvlist_add_number(nvl, "gr_nmem", (uint64_t)ngroups); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:38:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B5183F0; Wed, 29 Apr 2015 22:38:37 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D485A1155; Wed, 29 Apr 2015 22:38:36 +0000 (UTC) Received: by wief7 with SMTP id f7so225682wie.0; Wed, 29 Apr 2015 15:38:35 -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:message-id:subject :from:to:cc:content-type; bh=OryONGoQXmI/NprRsq6WYtvcLhn69ZZMT7+6bPVMWLg=; b=dJVSmcShNAsQ8B+oYmFZQ5UfLTBvtS0D3AOfHREgZJ2R3OEyRmvAlbFjBjXtP2rXjR tiDmtjYT6ujsKCUaQ8e84fyjWiOQsLvXvct28yapc1P2ue9pczc9DMg6HQh3PwYQ0j72 4xoRr65gn5frUYzVEADtDwfpqWUSygNX4fxOxbal0u59prRenJYsV+K4p6YVPkwBdzVn CERytxqy+rZQC8Fyh2LTVJGHT6edQqR+hbgoA28Q0dD2G7u5QiHMzIPaRMToswgEb3f2 6KIEHSf1/pBswKDYEMPWVAdTXPV7xsRCqKpg5cs2cnpEkO4jLpE+UHwz5fCVC/DDOuFS UzRQ== MIME-Version: 1.0 X-Received: by 10.194.71.168 with SMTP id w8mr2492611wju.80.1430347115400; Wed, 29 Apr 2015 15:38:35 -0700 (PDT) Sender: oshogbo.vx@gmail.com Received: by 10.28.187.214 with HTTP; Wed, 29 Apr 2015 15:38:35 -0700 (PDT) In-Reply-To: References: <201504292200.t3TM0R2J062088@svn.freebsd.org> Date: Thu, 30 Apr 2015 00:38:35 +0200 X-Google-Sender-Auth: oOVp2EvU1k3CBd3otkz9C6VZuRk Message-ID: Subject: Re: svn commit: r282250 - head/sys/sys From: Mariusz Zaborski To: Davide Italiano Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:38:37 -0000 > > I'm talking about sys/kern/subr_nvlist.c. > Yes. lib/libnv is compiling sys/kern/subr_nvlist.c. This is the reason why we have nv_malloc. One nv_malloc is for kernel: #define nv_malloc(size) malloc((size), M_NVLIST, M_WAITOK) and second nv_malloc is for user-land: #define nv_malloc(size) (malloc((size)): So in user-land all checks are still needed in sys/kern/subr_nvlist.c. Thanks, Mariusz Zaborski From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:42:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53EC4595; Wed, 29 Apr 2015 22:42:08 +0000 (UTC) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E66F1120E; Wed, 29 Apr 2015 22:42:07 +0000 (UTC) Received: by layy10 with SMTP id y10so31294574lay.0; Wed, 29 Apr 2015 15:42: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:message-id:subject :from:to:cc:content-type; bh=QFSNi7+nIoh8zveNJTLo6oQ7MCTT4CjI0hjVUygeOWE=; b=EEcPCwP3ZwIE//6F5EoWLARAscfemBXSzSOlo+FQY9NINsPJKx2VAcdDos4ACCyH8Q KjjDQzjOUEEHyTLoPdmjbWG359sPvFpODBtrMC2YvfILJJLzx0+DLjeLgz9uQDO61pas 5e5cF+VoBSIpHeBO2xyBo6sDODauBqu4/Ni2YDmei6MIe3UeLLxHXFAGboRMqlGtqusC BrVzj8dE+759IKsMNY2Rgp6a6YuMBbu54TLSZJlyCO+tj6xES64iATLhhWxFn2S9aHNq 2ayn+3n2Po56SBnehFdLYFxqo4LUbAVSaTdb0Tlj6p9h4az5PXYHMh+v6rBuk43HjXcR Q/Bw== MIME-Version: 1.0 X-Received: by 10.112.211.134 with SMTP id nc6mr1138252lbc.52.1430347326205; Wed, 29 Apr 2015 15:42:06 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.88.77 with HTTP; Wed, 29 Apr 2015 15:42:06 -0700 (PDT) In-Reply-To: References: <201504292200.t3TM0R2J062088@svn.freebsd.org> Date: Wed, 29 Apr 2015 15:42:06 -0700 X-Google-Sender-Auth: kM7TLrUr3JparT-3fNF48Fq7XL0 Message-ID: Subject: Re: svn commit: r282250 - head/sys/sys From: Davide Italiano To: Mariusz Zaborski Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:42:08 -0000 On Wed, Apr 29, 2015 at 3:38 PM, Mariusz Zaborski wrote: >> I'm talking about sys/kern/subr_nvlist.c. > > Yes. lib/libnv is compiling sys/kern/subr_nvlist.c. > This is the reason why we have nv_malloc. > One nv_malloc is for kernel: > > #define nv_malloc(size) malloc((size), M_NVLIST, M_WAITOK) > > and second nv_malloc is for user-land: > > #define nv_malloc(size) (malloc((size)): > > So in user-land all checks are still needed in sys/kern/subr_nvlist.c. > > Thanks, > Mariusz Zaborski It makes sense now, thanks. -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:46:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74149731; Wed, 29 Apr 2015 22:46:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61A9E1229; Wed, 29 Apr 2015 22:46:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TMkJH1086554; Wed, 29 Apr 2015 22:46:19 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TMkIaO086552; Wed, 29 Apr 2015 22:46:18 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292246.t3TMkIaO086552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 22:46:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282254 - head/lib/libnv/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:46:19 -0000 Author: oshogbo Date: Wed Apr 29 22:46:18 2015 New Revision: 282254 URL: https://svnweb.freebsd.org/changeset/base/282254 Log: Remove the use of nvlist_.*[fv] functions from tests. Approved by: pjd (mentor) Modified: head/lib/libnv/tests/dnv_tests.cc head/lib/libnv/tests/nv_tests.cc Modified: head/lib/libnv/tests/dnv_tests.cc ============================================================================== --- head/lib/libnv/tests/dnv_tests.cc Wed Apr 29 22:33:53 2015 (r282253) +++ head/lib/libnv/tests/dnv_tests.cc Wed Apr 29 22:46:18 2015 (r282254) @@ -45,7 +45,7 @@ ATF_TEST_CASE_BODY(dnvlist_get_bool__pre nvlist_add_bool(nvl, key, value); ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, key, false), value); - ATF_REQUIRE_EQ(dnvlist_getf_bool(nvl, false, "%c%s", 'n', "ame"), value); + ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, "name", false), value); nvlist_destroy(nvl); } @@ -60,12 +60,12 @@ ATF_TEST_CASE_BODY(dnvlist_get_bool__def nvl = nvlist_create(0); ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, key, false), false); - ATF_REQUIRE_EQ(dnvlist_getf_bool(nvl, true, "%d", 123), true); + ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, "123", true), true); nvlist_add_bool(nvl, key, true); ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, "otherkey", true), true); - ATF_REQUIRE_EQ(dnvlist_getf_bool(nvl, false, "%d%c", 12, 'c'), false); + ATF_REQUIRE_EQ(dnvlist_get_bool(nvl, "12c", false), false); nvlist_destroy(nvl); } @@ -84,7 +84,7 @@ ATF_TEST_CASE_BODY(dnvlist_get_number__p nvlist_add_number(nvl, key, value); ATF_REQUIRE_EQ(dnvlist_get_number(nvl, key, 19), value); - ATF_REQUIRE_EQ(dnvlist_getf_number(nvl, 65, "key"), value); + ATF_REQUIRE_EQ(dnvlist_get_number(nvl, "key", 65), value); nvlist_destroy(nvl); } @@ -99,12 +99,11 @@ ATF_TEST_CASE_BODY(dnvlist_get_number__d nvl = nvlist_create(0); ATF_REQUIRE_EQ(dnvlist_get_number(nvl, key, 5), 5); - ATF_REQUIRE_EQ(dnvlist_getf_number(nvl, 12, "%s", key), 12); + ATF_REQUIRE_EQ(dnvlist_get_number(nvl, "1234", 5), 5); nvlist_add_number(nvl, key, 24841); - ATF_REQUIRE_EQ(dnvlist_get_number(nvl, "hthth", 184), 184); - ATF_REQUIRE_EQ(dnvlist_getf_number(nvl, 5641, "%d", 1234), 5641); + ATF_REQUIRE_EQ(dnvlist_get_number(nvl, "1234", 5641), 5641); nvlist_destroy(nvl); } @@ -124,7 +123,7 @@ ATF_TEST_CASE_BODY(dnvlist_get_string__p ATF_REQUIRE_EQ(strcmp(dnvlist_get_string(nvl, key, "g"), value), 0); - actual_value = dnvlist_getf_string(nvl, "rs", "%s", key); + actual_value = dnvlist_get_string(nvl, key, "rs"); ATF_REQUIRE_EQ(strcmp(actual_value, value), 0); nvlist_destroy(nvl); @@ -142,13 +141,13 @@ ATF_TEST_CASE_BODY(dnvlist_get_string__d ATF_REQUIRE_EQ(strcmp(dnvlist_get_string(nvl, key, "bar"), "bar"), 0); - actual_value = dnvlist_getf_string(nvl, "d", "%s", key); + actual_value = dnvlist_get_string(nvl, key, "d"); ATF_REQUIRE_EQ(strcmp(actual_value, "d"), 0); nvlist_add_string(nvl, key, "cxhweh"); ATF_REQUIRE_EQ(strcmp(dnvlist_get_string(nvl, "hthth", "fd"), "fd"), 0); - actual_value = dnvlist_getf_string(nvl, "5", "%s", "5"); + actual_value = dnvlist_get_string(nvl, "5", "5"); ATF_REQUIRE_EQ(strcmp("5", "5"), 0); nvlist_destroy(nvl); @@ -172,10 +171,6 @@ ATF_TEST_CASE_BODY(dnvlist_get_nvlist__p ATF_REQUIRE(actual_value != NULL); ATF_REQUIRE(nvlist_empty(actual_value)); - actual_value = dnvlist_getf_nvlist(nvl, NULL, "%s", key); - ATF_REQUIRE(actual_value != NULL); - ATF_REQUIRE(nvlist_empty(actual_value)); - nvlist_destroy(nvl); } @@ -191,11 +186,10 @@ ATF_TEST_CASE_BODY(dnvlist_get_nvlist__d dummy = nvlist_create(0); ATF_REQUIRE_EQ(dnvlist_get_nvlist(nvl, key, dummy), dummy); - ATF_REQUIRE_EQ(dnvlist_getf_nvlist(nvl, dummy, "%s", key), dummy); nvlist_move_nvlist(nvl, key, nvlist_create(0)); ATF_REQUIRE_EQ(dnvlist_get_nvlist(nvl, "456", dummy), dummy); - ATF_REQUIRE_EQ(dnvlist_getf_nvlist(nvl, dummy, "%s", "gh"), dummy); + ATF_REQUIRE_EQ(dnvlist_get_nvlist(nvl, "gh", dummy), dummy); nvlist_destroy(nvl); } @@ -226,10 +220,6 @@ ATF_TEST_CASE_BODY(dnvlist_get_binary__p ATF_REQUIRE_EQ(value_size, actual_size); ATF_REQUIRE_EQ(memcmp(actual_value, value, actual_size), 0); - actual_value = dnvlist_getf_binary(nvl, &actual_size, "g", 1, "%s", k); - ATF_REQUIRE_EQ(value_size, actual_size); - ATF_REQUIRE_EQ(memcmp(actual_value, value, actual_size), 0); - nvlist_destroy(nvl); } @@ -251,8 +241,8 @@ ATF_TEST_CASE_BODY(dnvlist_get_binary__d ATF_REQUIRE_EQ(memcmp(actual_value, default_value, actual_size), 0); set_const_binary_value(default_value, default_size, "atf"); - actual_value = dnvlist_getf_binary(nvl, &actual_size, default_value, - default_size, "%s", key); + actual_value = dnvlist_get_binary(nvl, key, &actual_size, default_value, + default_size); ATF_REQUIRE_EQ(default_size, actual_size); ATF_REQUIRE_EQ(memcmp(actual_value, default_value, actual_size), 0); @@ -266,8 +256,8 @@ ATF_TEST_CASE_BODY(dnvlist_get_binary__d set_const_binary_value(default_value, default_size, "rrhgrythtyrtgbrhgrtdsvdfbtjlkul"); - actual_value = dnvlist_getf_binary(nvl, &actual_size, default_value, - default_size, "s"); + actual_value = dnvlist_get_binary(nvl, "s", &actual_size, default_value, + default_size); ATF_REQUIRE_EQ(default_size, actual_size); ATF_REQUIRE_EQ(memcmp(actual_value, default_value, actual_size), 0); Modified: head/lib/libnv/tests/nv_tests.cc ============================================================================== --- head/lib/libnv/tests/nv_tests.cc Wed Apr 29 22:33:53 2015 (r282253) +++ head/lib/libnv/tests/nv_tests.cc Wed Apr 29 22:46:18 2015 (r282254) @@ -77,9 +77,8 @@ ATF_TEST_CASE_BODY(nvlist_add_null__sing ATF_REQUIRE(!nvlist_empty(nvl)); ATF_REQUIRE(nvlist_exists(nvl, key)); - ATF_REQUIRE(nvlist_existsf(nvl, "%s", key)); ATF_REQUIRE(nvlist_exists_null(nvl, key)); - ATF_REQUIRE(nvlist_existsf_null(nvl, "key")); + ATF_REQUIRE(nvlist_exists_null(nvl, "key")); /* Iterate over the nvlist; ensure that it has only our one key. */ it = NULL; @@ -108,11 +107,10 @@ ATF_TEST_CASE_BODY(nvlist_add_bool__sing ATF_REQUIRE(!nvlist_empty(nvl)); ATF_REQUIRE(nvlist_exists(nvl, key)); - ATF_REQUIRE(nvlist_existsf(nvl, "%s%s", "na", "me")); + ATF_REQUIRE(nvlist_exists(nvl, "name")); ATF_REQUIRE(nvlist_exists_bool(nvl, key)); - ATF_REQUIRE(nvlist_existsf_bool(nvl, "%s%c", "nam", 'e')); + ATF_REQUIRE(nvlist_exists_bool(nvl, "name")); ATF_REQUIRE_EQ(nvlist_get_bool(nvl, key), true); - ATF_REQUIRE_EQ(nvlist_getf_bool(nvl, "%c%s", 'n', "ame"), true); /* Iterate over the nvlist; ensure that it has only our one key. */ it = NULL; @@ -143,11 +141,9 @@ ATF_TEST_CASE_BODY(nvlist_add_number__si ATF_REQUIRE(!nvlist_empty(nvl)); ATF_REQUIRE(nvlist_exists(nvl, key)); - ATF_REQUIRE(nvlist_existsf(nvl, "%s%d", "foo", 123)); + ATF_REQUIRE(nvlist_exists(nvl, "foo123")); ATF_REQUIRE(nvlist_exists_number(nvl, key)); - ATF_REQUIRE(nvlist_existsf_number(nvl, "%s", key)); ATF_REQUIRE_EQ(nvlist_get_number(nvl, key), value); - ATF_REQUIRE_EQ(nvlist_getf_number(nvl, "%s", key), value); /* Iterate over the nvlist; ensure that it has only our one key. */ it = NULL; @@ -178,11 +174,10 @@ ATF_TEST_CASE_BODY(nvlist_add_string__si ATF_REQUIRE(!nvlist_empty(nvl)); ATF_REQUIRE(nvlist_exists(nvl, key)); - ATF_REQUIRE(nvlist_existsf(nvl, "%s", key)); + ATF_REQUIRE(nvlist_exists(nvl, "test")); ATF_REQUIRE(nvlist_exists_string(nvl, key)); - ATF_REQUIRE(nvlist_existsf_string(nvl, "%s", key)); + ATF_REQUIRE(nvlist_exists_string(nvl, "test")); ATF_REQUIRE_EQ(strcmp(nvlist_get_string(nvl, key), value), 0); - ATF_REQUIRE_EQ(strcmp(nvlist_getf_string(nvl, "%s", key), value), 0); /* nvlist_add_* is required to clone the value, so check for that. */ ATF_REQUIRE(nvlist_get_string(nvl, key) != value); @@ -219,9 +214,9 @@ ATF_TEST_CASE_BODY(nvlist_add_nvlist__si ATF_REQUIRE(!nvlist_empty(nvl)); ATF_REQUIRE(nvlist_exists(nvl, key)); - ATF_REQUIRE(nvlist_existsf(nvl, "%s", key)); + ATF_REQUIRE(nvlist_exists(nvl, "test")); ATF_REQUIRE(nvlist_exists_nvlist(nvl, key)); - ATF_REQUIRE(nvlist_existsf_nvlist(nvl, "%s", key)); + ATF_REQUIRE(nvlist_exists_nvlist(nvl, "test")); value = nvlist_get_nvlist(nvl, key); ATF_REQUIRE(nvlist_exists_null(value, subkey)); @@ -229,10 +224,6 @@ ATF_TEST_CASE_BODY(nvlist_add_nvlist__si /* nvlist_add_* is required to clone the value, so check for that. */ ATF_REQUIRE(sublist != value); - value = nvlist_getf_nvlist(nvl, "%s", key); - ATF_REQUIRE(nvlist_exists_null(value, subkey)); - ATF_REQUIRE(sublist != value); - /* Iterate over the nvlist; ensure that it has only our one key. */ it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); @@ -283,9 +274,9 @@ ATF_TEST_CASE_BODY(nvlist_add_binary__si ATF_REQUIRE(!nvlist_empty(nvl)); ATF_REQUIRE(nvlist_exists(nvl, key)); - ATF_REQUIRE(nvlist_existsf(nvl, "%s", key)); + ATF_REQUIRE(nvlist_exists(nvl, "binary")); ATF_REQUIRE(nvlist_exists_binary(nvl, key)); - ATF_REQUIRE(nvlist_existsf_binary(nvl, "%s", key)); + ATF_REQUIRE(nvlist_exists_binary(nvl, "binary")); ret_value = nvlist_get_binary(nvl, key, &ret_size); ATF_REQUIRE_EQ(value_size, ret_size); @@ -294,11 +285,6 @@ ATF_TEST_CASE_BODY(nvlist_add_binary__si /* nvlist_add_* is required to clone the value, so check for that. */ ATF_REQUIRE(value != ret_value); - ret_value = nvlist_getf_binary(nvl, &ret_size, "%s", key); - ATF_REQUIRE_EQ(value_size, ret_size); - ATF_REQUIRE_EQ(memcmp(value, ret_value, ret_size), 0); - ATF_REQUIRE(value != ret_value); - /* Iterate over the nvlist; ensure that it has only our one key. */ it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:46:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2298D877; Wed, 29 Apr 2015 22:46:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11018122F; Wed, 29 Apr 2015 22:46:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TMkUcQ086636; Wed, 29 Apr 2015 22:46:30 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TMkU0w086635; Wed, 29 Apr 2015 22:46:30 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201504292246.t3TMkU0w086635@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 29 Apr 2015 22:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282255 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:46:31 -0000 Author: sbruno Date: Wed Apr 29 22:46:30 2015 New Revision: 282255 URL: https://svnweb.freebsd.org/changeset/base/282255 Log: Obsolute /usr/bin/gperf for non-gcc enabled targets. Leave it as valid for mips/sparc64 gcc enabled targets. Reviewed by: imp@ Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Apr 29 22:46:18 2015 (r282254) +++ head/ObsoleteFiles.inc Wed Apr 29 22:46:30 2015 (r282255) @@ -345,6 +345,10 @@ OLD_FILES+=usr/lib/debug/usr/lib32/i18n OLD_FILES+=usr/lib/debug/usr/lib32/private # 20141015: OpenSSL 1.0.1j import OLD_FILES+=usr/share/openssl/man/man3/CMS_sign_add1_signer.3.gz +.if ${MK_GCC} == "no" +# 20141009: gperf disabled by default +OLD_FILES+=usr/bin/gperf +.endif # 20140922: sleepq_calc_signal_retval.9 and sleepq_catch_signals.9 removed OLD_FILES+=usr/share/man/man9/sleepq_calc_signal_retval.9.gz OLD_FILES+=usr/share/man/man9/sleepq_catch_signals.9.gz From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:50:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4FA0A28; Wed, 29 Apr 2015 22:50:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A353712FC; Wed, 29 Apr 2015 22:50:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TMofuE088025; Wed, 29 Apr 2015 22:50:41 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TMofpe088024; Wed, 29 Apr 2015 22:50:41 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <201504292250.t3TMofpe088024@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Wed, 29 Apr 2015 22:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282256 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:50:41 -0000 Author: grembo (ports committer) Date: Wed Apr 29 22:50:41 2015 New Revision: 282256 URL: https://svnweb.freebsd.org/changeset/base/282256 Log: Bump __FreeBSD_version for smb(4) changes in r281985 Differential Revision: https://reviews.freebsd.org/D2398 Reviewed by: bapt, flo Approved by: bapt, flo Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Apr 29 22:46:30 2015 (r282255) +++ head/sys/sys/param.h Wed Apr 29 22:50:41 2015 (r282256) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100070 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100071 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:57:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 405A4CBD; Wed, 29 Apr 2015 22:57:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CB9F134D; Wed, 29 Apr 2015 22:57:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TMv6X3091921; Wed, 29 Apr 2015 22:57:06 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TMv5A1091917; Wed, 29 Apr 2015 22:57:05 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292257.t3TMv5A1091917@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 22:57:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282257 - in head: lib/libnv sys/kern 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:57:06 -0000 Author: oshogbo Date: Wed Apr 29 22:57:04 2015 New Revision: 282257 URL: https://svnweb.freebsd.org/changeset/base/282257 Log: Remove the nvlist_.*[fv] functions. Those functions are problematic, because there is no way to report memory allocation problems without complicating the API, so we can either abort or potentially return invalid results. None of which is acceptable. In most cases the caller knows the size of the name, so he can allocate buffer on the stack and use snprintf(3) to prepare the name. After some discussion the conclusion is to removed those functions, which also simplifies the API. Discussed with: pjd, rstone Approved by: pjd (mentor) Modified: head/lib/libnv/Makefile head/sys/kern/subr_dnvlist.c head/sys/kern/subr_nvlist.c head/sys/kern/subr_nvpair.c head/sys/sys/nv.h head/sys/sys/nv_impl.h Modified: head/lib/libnv/Makefile ============================================================================== --- head/lib/libnv/Makefile Wed Apr 29 22:50:41 2015 (r282256) +++ head/lib/libnv/Makefile Wed Apr 29 22:57:04 2015 (r282257) @@ -81,88 +81,6 @@ MLINKS+=nv.3 nvlist_create.3 \ nv.3 nvlist_free_nvlist.3 \ nv.3 nvlist_free_descriptor.3 \ nv.3 nvlist_free_binary.3 -MLINKS+=nv.3 nvlist_existsf.3 \ - nv.3 nvlist_existsf_type.3 \ - nv.3 nvlist_existsf_null.3 \ - nv.3 nvlist_existsf_bool.3 \ - nv.3 nvlist_existsf_number.3 \ - nv.3 nvlist_existsf_string.3 \ - nv.3 nvlist_existsf_nvlist.3 \ - nv.3 nvlist_existsf_descriptor.3 \ - nv.3 nvlist_existsf_binary.3 \ - nv.3 nvlist_addf_null.3 \ - nv.3 nvlist_addf_bool.3 \ - nv.3 nvlist_addf_number.3 \ - nv.3 nvlist_addf_string.3 \ - nv.3 nvlist_addf_nvlist.3 \ - nv.3 nvlist_addf_descriptor.3 \ - nv.3 nvlist_addf_binary.3 \ - nv.3 nvlist_movef_string.3 \ - nv.3 nvlist_movef_nvlist.3 \ - nv.3 nvlist_movef_descriptor.3 \ - nv.3 nvlist_movef_binary.3 \ - nv.3 nvlist_getf_bool.3 \ - nv.3 nvlist_getf_number.3 \ - nv.3 nvlist_getf_string.3 \ - nv.3 nvlist_getf_nvlist.3 \ - nv.3 nvlist_getf_descriptor.3 \ - nv.3 nvlist_getf_binary.3 \ - nv.3 nvlist_takef_bool.3 \ - nv.3 nvlist_takef_number.3 \ - nv.3 nvlist_takef_string.3 \ - nv.3 nvlist_takef_nvlist.3 \ - nv.3 nvlist_takef_descriptor.3 \ - nv.3 nvlist_takef_binary.3 \ - nv.3 nvlist_freef.3 \ - nv.3 nvlist_freef_type.3 \ - nv.3 nvlist_freef_null.3 \ - nv.3 nvlist_freef_bool.3 \ - nv.3 nvlist_freef_number.3 \ - nv.3 nvlist_freef_string.3 \ - nv.3 nvlist_freef_nvlist.3 \ - nv.3 nvlist_freef_descriptor.3 \ - nv.3 nvlist_freef_binary.3 -MLINKS+=nv.3 nvlist_existsv.3 \ - nv.3 nvlist_existsv_type.3 \ - nv.3 nvlist_existsv_null.3 \ - nv.3 nvlist_existsv_bool.3 \ - nv.3 nvlist_existsv_number.3 \ - nv.3 nvlist_existsv_string.3 \ - nv.3 nvlist_existsv_nvlist.3 \ - nv.3 nvlist_existsv_descriptor.3 \ - nv.3 nvlist_existsv_binary.3 \ - nv.3 nvlist_addv_null.3 \ - nv.3 nvlist_addv_bool.3 \ - nv.3 nvlist_addv_number.3 \ - nv.3 nvlist_addv_string.3 \ - nv.3 nvlist_addv_nvlist.3 \ - nv.3 nvlist_addv_descriptor.3 \ - nv.3 nvlist_addv_binary.3 \ - nv.3 nvlist_movev_string.3 \ - nv.3 nvlist_movev_nvlist.3 \ - nv.3 nvlist_movev_descriptor.3 \ - nv.3 nvlist_movev_binary.3 \ - nv.3 nvlist_getv_bool.3 \ - nv.3 nvlist_getv_number.3 \ - nv.3 nvlist_getv_string.3 \ - nv.3 nvlist_getv_nvlist.3 \ - nv.3 nvlist_getv_descriptor.3 \ - nv.3 nvlist_getv_binary.3 \ - nv.3 nvlist_takev_bool.3 \ - nv.3 nvlist_takev_number.3 \ - nv.3 nvlist_takev_string.3 \ - nv.3 nvlist_takev_nvlist.3 \ - nv.3 nvlist_takev_descriptor.3 \ - nv.3 nvlist_takev_binary.3 \ - nv.3 nvlist_freev.3 \ - nv.3 nvlist_freev_type.3 \ - nv.3 nvlist_freev_null.3 \ - nv.3 nvlist_freev_bool.3 \ - nv.3 nvlist_freev_number.3 \ - nv.3 nvlist_freev_string.3 \ - nv.3 nvlist_freev_nvlist.3 \ - nv.3 nvlist_freev_descriptor.3 \ - nv.3 nvlist_freev_binary.3 WARNS?= 6 Modified: head/sys/kern/subr_dnvlist.c ============================================================================== --- head/sys/kern/subr_dnvlist.c Wed Apr 29 22:50:41 2015 (r282256) +++ head/sys/kern/subr_dnvlist.c Wed Apr 29 22:57:04 2015 (r282257) @@ -89,89 +89,6 @@ dnvlist_get_binary(const nvlist_t *nvl, return (value); } -#ifndef _KERNEL -#define DNVLIST_GETF(ftype, type) \ -ftype \ -dnvlist_getf_##type(const nvlist_t *nvl, ftype defval, \ - const char *namefmt, ...) \ -{ \ - va_list nameap; \ - ftype value; \ - \ - va_start(nameap, namefmt); \ - value = dnvlist_getv_##type(nvl, defval, namefmt, nameap); \ - va_end(nameap); \ - \ - return (value); \ -} - -DNVLIST_GETF(bool, bool) -DNVLIST_GETF(uint64_t, number) -DNVLIST_GETF(const char *, string) -DNVLIST_GETF(const nvlist_t *, nvlist) -DNVLIST_GETF(int, descriptor) - -#undef DNVLIST_GETF - -const void * -dnvlist_getf_binary(const nvlist_t *nvl, size_t *sizep, const void *defval, - size_t defsize, const char *namefmt, ...) -{ - va_list nameap; - const void *value; - - va_start(nameap, namefmt); - value = dnvlist_getv_binary(nvl, sizep, defval, defsize, namefmt, - nameap); - va_end(nameap); - - return (value); -} - -#define DNVLIST_GETV(ftype, type) \ -ftype \ -dnvlist_getv_##type(const nvlist_t *nvl, ftype defval, \ - const char *namefmt, va_list nameap) \ -{ \ - char *name; \ - ftype value; \ - \ - vasprintf(&name, namefmt, nameap); \ - if (name == NULL) \ - return (defval); \ - value = dnvlist_get_##type(nvl, name, defval); \ - free(name); \ - return (value); \ -} - -DNVLIST_GETV(bool, bool) -DNVLIST_GETV(uint64_t, number) -DNVLIST_GETV(const char *, string) -DNVLIST_GETV(const nvlist_t *, nvlist) -DNVLIST_GETV(int, descriptor) - -#undef DNVLIST_GETV - -const void * -dnvlist_getv_binary(const nvlist_t *nvl, size_t *sizep, const void *defval, - size_t defsize, const char *namefmt, va_list nameap) -{ - char *name; - const void *value; - - nv_vasprintf(&name, namefmt, nameap); - if (name != NULL) { - value = dnvlist_get_binary(nvl, name, sizep, defval, defsize); - nv_free(name); - } else { - if (sizep != NULL) - *sizep = defsize; - value = defval; - } - return (value); -} -#endif - #define DNVLIST_TAKE(ftype, type) \ ftype \ dnvlist_take_##type(nvlist_t *nvl, const char *name, ftype defval) \ @@ -209,86 +126,3 @@ dnvlist_take_binary(nvlist_t *nvl, const return (value); } -#ifndef _KERNEL -#define DNVLIST_TAKEF(ftype, type) \ -ftype \ -dnvlist_takef_##type(nvlist_t *nvl, ftype defval, \ - const char *namefmt, ...) \ -{ \ - va_list nameap; \ - ftype value; \ - \ - va_start(nameap, namefmt); \ - value = dnvlist_takev_##type(nvl, defval, namefmt, nameap); \ - va_end(nameap); \ - \ - return (value); \ -} - -DNVLIST_TAKEF(bool, bool) -DNVLIST_TAKEF(uint64_t, number) -DNVLIST_TAKEF(char *, string) -DNVLIST_TAKEF(nvlist_t *, nvlist) -DNVLIST_TAKEF(int, descriptor) - -#undef DNVLIST_TAKEF - -void * -dnvlist_takef_binary(nvlist_t *nvl, size_t *sizep, void *defval, - size_t defsize, const char *namefmt, ...) -{ - va_list nameap; - void *value; - - va_start(nameap, namefmt); - value = dnvlist_takev_binary(nvl, sizep, defval, defsize, namefmt, - nameap); - va_end(nameap); - - return (value); -} - -#define DNVLIST_TAKEV(ftype, type) \ -ftype \ -dnvlist_takev_##type(nvlist_t *nvl, ftype defval, const char *namefmt, \ - va_list nameap) \ -{ \ - char *name; \ - ftype value; \ - \ - vasprintf(&name, namefmt, nameap); \ - if (name == NULL) \ - return (defval); \ - value = dnvlist_take_##type(nvl, name, defval); \ - free(name); \ - return (value); \ -} - -DNVLIST_TAKEV(bool, bool) -DNVLIST_TAKEV(uint64_t, number) -DNVLIST_TAKEV(char *, string) -DNVLIST_TAKEV(nvlist_t *, nvlist) -DNVLIST_TAKEV(int, descriptor) - -#undef DNVLIST_TAKEV - -void * -dnvlist_takev_binary(nvlist_t *nvl, size_t *sizep, void *defval, - size_t defsize, const char *namefmt, va_list nameap) -{ - char *name; - void *value; - - nv_vasprintf(&name, namefmt, nameap); - if (name != NULL) { - value = dnvlist_take_binary(nvl, name, sizep, defval, defsize); - nv_free(name); - } else { - if (sizep != NULL) - *sizep = defsize; - value = defval; - } - - return (value); -} -#endif Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Wed Apr 29 22:50:41 2015 (r282256) +++ head/sys/kern/subr_nvlist.c Wed Apr 29 22:57:04 2015 (r282257) @@ -281,37 +281,6 @@ nvlist_exists_type(const nvlist_t *nvl, return (nvlist_find(nvl, type, name) != NULL); } -#ifndef _KERNEL -bool -nvlist_existsf_type(const nvlist_t *nvl, int type, const char *namefmt, ...) -{ - va_list nameap; - bool ret; - - va_start(nameap, namefmt); - ret = nvlist_existsv_type(nvl, type, namefmt, nameap); - va_end(nameap); - - return (ret); -} - -bool -nvlist_existsv_type(const nvlist_t *nvl, int type, const char *namefmt, - va_list nameap) -{ - char *name; - bool exists; - - nv_vasprintf(&name, namefmt, nameap); - if (name == NULL) - return (false); - - exists = nvlist_exists_type(nvl, name, type); - nv_free(name); - return (exists); -} -#endif - void nvlist_free_type(nvlist_t *nvl, const char *name, int type) { @@ -329,30 +298,6 @@ nvlist_free_type(nvlist_t *nvl, const ch nvlist_report_missing(type, name); } -#ifndef _KERNEL -void -nvlist_freef_type(nvlist_t *nvl, int type, const char *namefmt, ...) -{ - va_list nameap; - - va_start(nameap, namefmt); - nvlist_freev_type(nvl, type, namefmt, nameap); - va_end(nameap); -} - -void -nvlist_freev_type(nvlist_t *nvl, int type, const char *namefmt, va_list nameap) -{ - char *name; - - nv_vasprintf(&name, namefmt, nameap); - if (name == NULL) - nvlist_report_missing(type, ""); - nvlist_free_type(nvl, name, type); - nv_free(name); -} -#endif - nvlist_t * nvlist_clone(const nvlist_t *nvl) { @@ -1099,86 +1044,6 @@ NVLIST_EXISTS(binary, BINARY) #undef NVLIST_EXISTS -#ifndef _KERNEL -bool -nvlist_existsf(const nvlist_t *nvl, const char *namefmt, ...) -{ - va_list nameap; - bool ret; - - va_start(nameap, namefmt); - ret = nvlist_existsv(nvl, namefmt, nameap); - va_end(nameap); - return (ret); -} - -#define NVLIST_EXISTSF(type) \ -bool \ -nvlist_existsf_##type(const nvlist_t *nvl, const char *namefmt, ...) \ -{ \ - va_list nameap; \ - bool ret; \ - \ - va_start(nameap, namefmt); \ - ret = nvlist_existsv_##type(nvl, namefmt, nameap); \ - va_end(nameap); \ - return (ret); \ -} - -NVLIST_EXISTSF(null) -NVLIST_EXISTSF(bool) -NVLIST_EXISTSF(number) -NVLIST_EXISTSF(string) -NVLIST_EXISTSF(nvlist) -#ifndef _KERNEL -NVLIST_EXISTSF(descriptor) -#endif -NVLIST_EXISTSF(binary) - -#undef NVLIST_EXISTSF - -bool -nvlist_existsv(const nvlist_t *nvl, const char *namefmt, va_list nameap) -{ - char *name; - bool exists; - - nv_vasprintf(&name, namefmt, nameap); - if (name == NULL) - return (false); - - exists = nvlist_exists(nvl, name); - nv_free(name); - return (exists); -} - -#define NVLIST_EXISTSV(type) \ -bool \ -nvlist_existsv_##type(const nvlist_t *nvl, const char *namefmt, \ - va_list nameap) \ -{ \ - char *name; \ - bool exists; \ - \ - vasprintf(&name, namefmt, nameap); \ - if (name == NULL) \ - return (false); \ - exists = nvlist_exists_##type(nvl, name); \ - free(name); \ - return (exists); \ -} - -NVLIST_EXISTSV(null) -NVLIST_EXISTSV(bool) -NVLIST_EXISTSV(number) -NVLIST_EXISTSV(string) -NVLIST_EXISTSV(nvlist) -NVLIST_EXISTSV(descriptor) -NVLIST_EXISTSV(binary) - -#undef NVLIST_EXISTSV -#endif - void nvlist_add_nvpair(nvlist_t *nvl, const nvpair_t *nvp) { @@ -1207,34 +1072,6 @@ nvlist_add_nvpair(nvlist_t *nvl, const n } void -nvlist_add_null(nvlist_t *nvl, const char *name) -{ - - nvlist_addf_null(nvl, "%s", name); -} - -void -nvlist_add_bool(nvlist_t *nvl, const char *name, bool value) -{ - - nvlist_addf_bool(nvl, value, "%s", name); -} - -void -nvlist_add_number(nvlist_t *nvl, const char *name, uint64_t value) -{ - - nvlist_addf_number(nvl, value, "%s", name); -} - -void -nvlist_add_string(nvlist_t *nvl, const char *name, const char *value) -{ - - nvlist_addf_string(nvl, value, "%s", name); -} - -void nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, ...) { va_list valueap; @@ -1265,105 +1102,7 @@ nvlist_add_stringv(nvlist_t *nvl, const } void -nvlist_add_nvlist(nvlist_t *nvl, const char *name, const nvlist_t *value) -{ - - nvlist_addf_nvlist(nvl, value, "%s", name); -} - -#ifndef _KERNEL -void -nvlist_add_descriptor(nvlist_t *nvl, const char *name, int value) -{ - - nvlist_addf_descriptor(nvl, value, "%s", name); -} -#endif - -void -nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value, - size_t size) -{ - - nvlist_addf_binary(nvl, value, size, "%s", name); -} - -void -nvlist_addf_null(nvlist_t *nvl, const char *namefmt, ...) -{ - va_list nameap; - - va_start(nameap, namefmt); - nvlist_addv_null(nvl, namefmt, nameap); - va_end(nameap); -} - -void -nvlist_addf_bool(nvlist_t *nvl, bool value, const char *namefmt, ...) -{ - va_list nameap; - - va_start(nameap, namefmt); - nvlist_addv_bool(nvl, value, namefmt, nameap); - va_end(nameap); -} - -void -nvlist_addf_number(nvlist_t *nvl, uint64_t value, const char *namefmt, ...) -{ - va_list nameap; - - va_start(nameap, namefmt); - nvlist_addv_number(nvl, value, namefmt, nameap); - va_end(nameap); -} - -void -nvlist_addf_string(nvlist_t *nvl, const char *value, const char *namefmt, ...) -{ - va_list nameap; - - va_start(nameap, namefmt); - nvlist_addv_string(nvl, value, namefmt, nameap); - va_end(nameap); -} - -void -nvlist_addf_nvlist(nvlist_t *nvl, const nvlist_t *value, const char *namefmt, - ...) -{ - va_list nameap; - - va_start(nameap, namefmt); - nvlist_addv_nvlist(nvl, value, namefmt, nameap); - va_end(nameap); -} - -#ifndef _KERNEL -void -nvlist_addf_descriptor(nvlist_t *nvl, int value, const char *namefmt, ...) -{ - va_list nameap; - - va_start(nameap, namefmt); - nvlist_addv_descriptor(nvl, value, namefmt, nameap); - va_end(nameap); -} -#endif - -void -nvlist_addf_binary(nvlist_t *nvl, const void *value, size_t size, - const char *namefmt, ...) -{ - va_list nameap; - - va_start(nameap, namefmt); - nvlist_addv_binary(nvl, value, size, namefmt, nameap); - va_end(nameap); -} - -void -nvlist_addv_null(nvlist_t *nvl, const char *namefmt, va_list nameap) +nvlist_add_null(nvlist_t *nvl, const char *name) { nvpair_t *nvp; @@ -1372,7 +1111,7 @@ nvlist_addv_null(nvlist_t *nvl, const ch return; } - nvp = nvpair_createv_null(namefmt, nameap); + nvp = nvpair_create_null(name); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); @@ -1382,7 +1121,7 @@ nvlist_addv_null(nvlist_t *nvl, const ch } void -nvlist_addv_bool(nvlist_t *nvl, bool value, const char *namefmt, va_list nameap) +nvlist_add_bool(nvlist_t *nvl, const char *name, bool value) { nvpair_t *nvp; @@ -1391,7 +1130,7 @@ nvlist_addv_bool(nvlist_t *nvl, bool val return; } - nvp = nvpair_createv_bool(value, namefmt, nameap); + nvp = nvpair_create_bool(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); @@ -1401,8 +1140,7 @@ nvlist_addv_bool(nvlist_t *nvl, bool val } void -nvlist_addv_number(nvlist_t *nvl, uint64_t value, const char *namefmt, - va_list nameap) +nvlist_add_number(nvlist_t *nvl, const char *name, uint64_t value) { nvpair_t *nvp; @@ -1411,7 +1149,7 @@ nvlist_addv_number(nvlist_t *nvl, uint64 return; } - nvp = nvpair_createv_number(value, namefmt, nameap); + nvp = nvpair_create_number(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); @@ -1421,8 +1159,7 @@ nvlist_addv_number(nvlist_t *nvl, uint64 } void -nvlist_addv_string(nvlist_t *nvl, const char *value, const char *namefmt, - va_list nameap) +nvlist_add_string(nvlist_t *nvl, const char *name, const char *value) { nvpair_t *nvp; @@ -1431,7 +1168,7 @@ nvlist_addv_string(nvlist_t *nvl, const return; } - nvp = nvpair_createv_string(value, namefmt, nameap); + nvp = nvpair_create_string(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); @@ -1441,8 +1178,7 @@ nvlist_addv_string(nvlist_t *nvl, const } void -nvlist_addv_nvlist(nvlist_t *nvl, const nvlist_t *value, const char *namefmt, - va_list nameap) +nvlist_add_nvlist(nvlist_t *nvl, const char *name, const nvlist_t *value) { nvpair_t *nvp; @@ -1451,7 +1187,7 @@ nvlist_addv_nvlist(nvlist_t *nvl, const return; } - nvp = nvpair_createv_nvlist(value, namefmt, nameap); + nvp = nvpair_create_nvlist(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); @@ -1462,8 +1198,7 @@ nvlist_addv_nvlist(nvlist_t *nvl, const #ifndef _KERNEL void -nvlist_addv_descriptor(nvlist_t *nvl, int value, const char *namefmt, - va_list nameap) +nvlist_add_descriptor(nvlist_t *nvl, const char *name, int value) { nvpair_t *nvp; @@ -1472,7 +1207,7 @@ nvlist_addv_descriptor(nvlist_t *nvl, in return; } - nvp = nvpair_createv_descriptor(value, namefmt, nameap); + nvp = nvpair_create_descriptor(name, value); if (nvp == NULL) nvl->nvl_error = errno = (errno != 0 ? errno : ENOMEM); else @@ -1481,8 +1216,8 @@ nvlist_addv_descriptor(nvlist_t *nvl, in #endif void -nvlist_addv_binary(nvlist_t *nvl, const void *value, size_t size, - const char *namefmt, va_list nameap) +nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value, + size_t size) { nvpair_t *nvp; @@ -1491,7 +1226,7 @@ nvlist_addv_binary(nvlist_t *nvl, const return; } - nvp = nvpair_createv_binary(value, size, namefmt, nameap); + nvp = nvpair_create_binary(name, value, size); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); @@ -1522,63 +1257,8 @@ nvlist_move_nvpair(nvlist_t *nvl, nvpair nvpair_insert(&nvl->nvl_head, nvp, nvl); } -#define NVLIST_MOVE(vtype, type) \ -void \ -nvlist_move_##type(nvlist_t *nvl, const char *name, vtype value) \ -{ \ - \ - nvlist_movef_##type(nvl, value, "%s", name); \ -} - -NVLIST_MOVE(char *, string) -NVLIST_MOVE(nvlist_t *, nvlist) -#ifndef _KERNEL -NVLIST_MOVE(int, descriptor) -#endif - -#undef NVLIST_MOVE - -void -nvlist_move_binary(nvlist_t *nvl, const char *name, void *value, size_t size) -{ - - nvlist_movef_binary(nvl, value, size, "%s", name); -} - -#define NVLIST_MOVEF(vtype, type) \ -void \ -nvlist_movef_##type(nvlist_t *nvl, vtype value, const char *namefmt, \ - ...) \ -{ \ - va_list nameap; \ - \ - va_start(nameap, namefmt); \ - nvlist_movev_##type(nvl, value, namefmt, nameap); \ - va_end(nameap); \ -} - -NVLIST_MOVEF(char *, string) -NVLIST_MOVEF(nvlist_t *, nvlist) -#ifndef _KERNEL -NVLIST_MOVEF(int, descriptor) -#endif - -#undef NVLIST_MOVEF - -void -nvlist_movef_binary(nvlist_t *nvl, void *value, size_t size, - const char *namefmt, ...) -{ - va_list nameap; - - va_start(nameap, namefmt); - nvlist_movev_binary(nvl, value, size, namefmt, nameap); - va_end(nameap); -} - void -nvlist_movev_string(nvlist_t *nvl, char *value, const char *namefmt, - va_list nameap) +nvlist_move_string(nvlist_t *nvl, const char *name, char *value) { nvpair_t *nvp; @@ -1588,7 +1268,7 @@ nvlist_movev_string(nvlist_t *nvl, char return; } - nvp = nvpair_movev_string(value, namefmt, nameap); + nvp = nvpair_move_string(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); @@ -1598,8 +1278,7 @@ nvlist_movev_string(nvlist_t *nvl, char } void -nvlist_movev_nvlist(nvlist_t *nvl, nvlist_t *value, const char *namefmt, - va_list nameap) +nvlist_move_nvlist(nvlist_t *nvl, const char *name, nvlist_t *value) { nvpair_t *nvp; @@ -1610,7 +1289,7 @@ nvlist_movev_nvlist(nvlist_t *nvl, nvlis return; } - nvp = nvpair_movev_nvlist(value, namefmt, nameap); + nvp = nvpair_move_nvlist(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); @@ -1621,8 +1300,7 @@ nvlist_movev_nvlist(nvlist_t *nvl, nvlis #ifndef _KERNEL void -nvlist_movev_descriptor(nvlist_t *nvl, int value, const char *namefmt, - va_list nameap) +nvlist_move_descriptor(nvlist_t *nvl, const char *name, int value) { nvpair_t *nvp; @@ -1632,7 +1310,7 @@ nvlist_movev_descriptor(nvlist_t *nvl, i return; } - nvp = nvpair_movev_descriptor(value, namefmt, nameap); + nvp = nvpair_move_descriptor(name, value); if (nvp == NULL) nvl->nvl_error = errno = (errno != 0 ? errno : ENOMEM); else @@ -1641,8 +1319,7 @@ nvlist_movev_descriptor(nvlist_t *nvl, i #endif void -nvlist_movev_binary(nvlist_t *nvl, void *value, size_t size, - const char *namefmt, va_list nameap) +nvlist_move_binary(nvlist_t *nvl, const char *name, void *value, size_t size) { nvpair_t *nvp; @@ -1652,7 +1329,7 @@ nvlist_movev_binary(nvlist_t *nvl, void return; } - nvp = nvpair_movev_binary(value, size, namefmt, nameap); + nvp = nvpair_move_binary(name, value, size); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); RESTORE_ERRNO(nvl->nvl_error); @@ -1702,84 +1379,6 @@ nvlist_get_binary(const nvlist_t *nvl, c return (nvpair_get_binary(nvp, sizep)); } -#define NVLIST_GETF(ftype, type) \ -ftype \ -nvlist_getf_##type(const nvlist_t *nvl, const char *namefmt, ...) \ -{ \ - va_list nameap; \ - ftype value; \ - \ - va_start(nameap, namefmt); \ - value = nvlist_getv_##type(nvl, namefmt, nameap); \ - va_end(nameap); \ - \ - return (value); \ -} - -#ifndef _KERNEL -NVLIST_GETF(bool, bool) -NVLIST_GETF(uint64_t, number) -NVLIST_GETF(const char *, string) -NVLIST_GETF(const nvlist_t *, nvlist) -NVLIST_GETF(int, descriptor) - -#undef NVLIST_GETF - -const void * -nvlist_getf_binary(const nvlist_t *nvl, size_t *sizep, const char *namefmt, ...) -{ - va_list nameap; - const void *value; - - va_start(nameap, namefmt); - value = nvlist_getv_binary(nvl, sizep, namefmt, nameap); - va_end(nameap); - - return (value); -} - -#define NVLIST_GETV(ftype, type, TYPE) \ -ftype \ -nvlist_getv_##type(const nvlist_t *nvl, const char *namefmt, \ - va_list nameap) \ -{ \ - char *name; \ - ftype value; \ - \ - vasprintf(&name, namefmt, nameap); \ - if (name == NULL) \ - nvlist_report_missing(NV_TYPE_##TYPE, ""); \ - value = nvlist_get_##type(nvl, name); \ - free(name); \ - \ - return (value); \ -} - -NVLIST_GETV(bool, bool, BOOL) -NVLIST_GETV(uint64_t, number, NUMBER) -NVLIST_GETV(const char *, string, STRING) -NVLIST_GETV(const nvlist_t *, nvlist, NVLIST) -NVLIST_GETV(int, descriptor, DESCRIPTOR) - -#undef NVLIST_GETV - -const void * -nvlist_getv_binary(const nvlist_t *nvl, size_t *sizep, const char *namefmt, - va_list nameap) -{ - char *name; - const void *binary; - - nv_vasprintf(&name, namefmt, nameap); - if (name == NULL) - nvlist_report_missing(NV_TYPE_BINARY, ""); - - binary = nvlist_get_binary(nvl, name, sizep); - nv_free(name); - return (binary); -} -#endif - #define NVLIST_TAKE(ftype, type, TYPE) \ ftype \ nvlist_take_##type(nvlist_t *nvl, const char *name) \ @@ -1822,82 +1421,6 @@ nvlist_take_binary(nvlist_t *nvl, const return (value); } -#define NVLIST_TAKEF(ftype, type) \ -ftype \ -nvlist_takef_##type(nvlist_t *nvl, const char *namefmt, ...) \ -{ \ - va_list nameap; \ - ftype value; \ - \ - va_start(nameap, namefmt); \ - value = nvlist_takev_##type(nvl, namefmt, nameap); \ - va_end(nameap); \ - \ - return (value); \ -} - -#ifndef _KERNEL -NVLIST_TAKEF(bool, bool) -NVLIST_TAKEF(uint64_t, number) -NVLIST_TAKEF(char *, string) -NVLIST_TAKEF(nvlist_t *, nvlist) -NVLIST_TAKEF(int, descriptor) - -#undef NVLIST_TAKEF - -void * -nvlist_takef_binary(nvlist_t *nvl, size_t *sizep, const char *namefmt, ...) -{ - va_list nameap; - void *value; - - va_start(nameap, namefmt); - value = nvlist_takev_binary(nvl, sizep, namefmt, nameap); - va_end(nameap); - - return (value); -} - -#define NVLIST_TAKEV(ftype, type, TYPE) \ -ftype \ -nvlist_takev_##type(nvlist_t *nvl, const char *namefmt, va_list nameap) \ -{ \ - char *name; \ - ftype value; \ - \ - vasprintf(&name, namefmt, nameap); \ - if (name == NULL) \ - nvlist_report_missing(NV_TYPE_##TYPE, ""); \ - value = nvlist_take_##type(nvl, name); \ - free(name); \ - return (value); \ -} - -NVLIST_TAKEV(bool, bool, BOOL) -NVLIST_TAKEV(uint64_t, number, NUMBER) -NVLIST_TAKEV(char *, string, STRING) -NVLIST_TAKEV(nvlist_t *, nvlist, NVLIST) -NVLIST_TAKEV(int, descriptor, DESCRIPTOR) - -#undef NVLIST_TAKEV - -void * -nvlist_takev_binary(nvlist_t *nvl, size_t *sizep, const char *namefmt, - va_list nameap) -{ - char *name; - void *binary; - - nv_vasprintf(&name, namefmt, nameap); - if (name == NULL) - nvlist_report_missing(NV_TYPE_BINARY, ""); - - binary = nvlist_take_binary(nvl, name, sizep); - nv_free(name); - return (binary); -} -#endif - void nvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *nvp) { @@ -1936,68 +1459,6 @@ NVLIST_FREE(binary, BINARY) #undef NVLIST_FREE -#ifndef _KERNEL -void -nvlist_freef(nvlist_t *nvl, const char *namefmt, ...) -{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 22:59:45 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25AB0E26; Wed, 29 Apr 2015 22:59:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 140651365; Wed, 29 Apr 2015 22:59:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TMxiNQ092302; Wed, 29 Apr 2015 22:59:44 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TMxiKJ092300; Wed, 29 Apr 2015 22:59:44 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504292259.t3TMxiKJ092300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Apr 2015 22:59:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282258 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 22:59:45 -0000 Author: oshogbo Date: Wed Apr 29 22:59:44 2015 New Revision: 282258 URL: https://svnweb.freebsd.org/changeset/base/282258 Log: Save errno from close override. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c head/sys/kern/subr_nvpair.c Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Wed Apr 29 22:57:04 2015 (r282257) +++ head/sys/kern/subr_nvlist.c Wed Apr 29 22:59:44 2015 (r282258) @@ -929,8 +929,10 @@ nvlist_recv(int sock) nvl = nvlist_xunpack(buf, size, fds, nfds); if (nvl == NULL) { + SAVE_ERRNO(serrno); for (i = 0; i < nfds; i++) close(fds[i]); + RESTORE_ERRNO(serrno); goto out; } Modified: head/sys/kern/subr_nvpair.c ============================================================================== --- head/sys/kern/subr_nvpair.c Wed Apr 29 22:57:04 2015 (r282257) +++ head/sys/kern/subr_nvpair.c Wed Apr 29 22:59:44 2015 (r282258) @@ -848,6 +848,7 @@ nvpair_t * nvpair_create_descriptor(const char *name, int value) { nvpair_t *nvp; + int serrno; if (value < 0 || !fd_is_valid(value)) { errno = EBADF; @@ -860,8 +861,11 @@ nvpair_create_descriptor(const char *nam nvp = nvpair_allocv(name, NV_TYPE_DESCRIPTOR, (uint64_t)value, sizeof(int64_t)); - if (nvp == NULL) + if (nvp == NULL) { + SAVE_ERRNO(serrno); close(value); + RESTORE_ERRNO(serrno); + } return (nvp); } From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 23:00:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA792F67; Wed, 29 Apr 2015 23:00:12 +0000 (UTC) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EEED136A; Wed, 29 Apr 2015 23:00:12 +0000 (UTC) Received: by pacwv17 with SMTP id wv17so40991940pac.0; Wed, 29 Apr 2015 16:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=yC774/bH9VBB5COtDfNjjn/Y8OmYIfdHx5SI4ymSaCI=; b=xIMG2zBzkxT+cBl3zptGbcFTSNQ5pguwGoFx0chuB21cPfq6eZhCdKbCnjm6HqyzCv zjQUZTaCrwuTpdCS33EkEMQOmIkKx883U2HN5G/ERZCIkGC9+Kb/TTMXd8WG32XJhrRy YMufqb9KjXpxsBA/sI9SQLiKXGqjlg36/ULI3SjJthEkdqjM9luSBq1G+K9xjvBeHoDA GDyZxlDQp5VEgBqR7ChI4k4Ps2lSsA+GAlzS+1h3giwe/NvHd/1J17IesqZAvT9YM9Nf 8aqizMJtrUKYkvjDQKDGxNW8R+Ux5hxgDhLfq3SJEbxF/ZXL55o7F1xOjgoOuPD9cUd6 6zCQ== X-Received: by 10.70.90.231 with SMTP id bz7mr2509206pdb.15.1430348411812; Wed, 29 Apr 2015 16:00:11 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:857d:cd13:79bf:f40d? ([2601:8:ab80:7d6:857d:cd13:79bf:f40d]) by mx.google.com with ESMTPSA id h12sm227869pdk.77.2015.04.29.16.00.10 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Apr 2015 16:00:10 -0700 (PDT) Subject: Re: svn commit: r282252 - head/lib/libcapsicum Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1D5B87A7-710F-43E1-9380-67444522B2D4"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <201504292219.t3TMJeGn071528@svn.freebsd.org> Date: Wed, 29 Apr 2015 16:00:08 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <8E2140D8-E008-4A9D-A628-1FA4693A8797@gmail.com> References: <201504292219.t3TMJeGn071528@svn.freebsd.org> To: Mariusz Zaborski X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 23:00:12 -0000 --Apple-Mail=_1D5B87A7-710F-43E1-9380-67444522B2D4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Apr 29, 2015, at 15:19, Mariusz Zaborski wrote: > Author: oshogbo > Date: Wed Apr 29 22:19:40 2015 > New Revision: 282252 > URL: https://svnweb.freebsd.org/changeset/base/282252 >=20 > Log: > Remove the use of nvlist_.*[vf] functions from libcapsicum and = replace > them with snprintf(3). Assert the results of snprintf(3). >=20 > Approved by: pjd (mentor) assert(3) can be compiled out with NDEBUG, causing memory = corruption on memory allocation failure or snprintf-related failure. Is = using assert a good idea? Thanks! -NGie --Apple-Mail=_1D5B87A7-710F-43E1-9380-67444522B2D4 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVQWJ5AAoJEMZr5QU6S73eS0sH/igysTkAKOzokPcESuDjz+zx 3aE7QVgk8+7JEAManDXrXco7jkp+M8Mf55j3j56qwnNG6IZMc1Kun9KtXC85H2Zh ljSBarufw54W0u3ZGUeX3rd+9YS+0Nysxn2FTMaXHGFKf4GI3e6nB5DLM9yEwWhY BQ0AxiAx75mEPc1I++/ZFDAeRuuXAn+/0aAkZo2Irtmpvq9/GdNbRdTIs+FhFsez u4KLIKkJ1VjDX1YVC72zbbo3ejr8sDfIW2JR9Q6xYwVy3jaz6KCXyVesKYYxRZJi hl9xP/de99LOCxJIM5L83CmG7s/pYzXl49h5Au+ECW8LQ3xAAk25RAFoqS+IRek= =+ewl -----END PGP SIGNATURE----- --Apple-Mail=_1D5B87A7-710F-43E1-9380-67444522B2D4-- From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 23:08:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5960321B; Wed, 29 Apr 2015 23:08:44 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E456814AF; Wed, 29 Apr 2015 23:08:43 +0000 (UTC) Received: by wicmx19 with SMTP id mx19so550013wic.1; Wed, 29 Apr 2015 16:08:42 -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:message-id:subject :from:to:cc:content-type; bh=Tb4aprbx89bZox1E7DCS5NWPd1gq5RhjQxEp4ZduVPA=; b=sRwLXfuo8Wc79KZNzjva7NXdMkJd0rG44XXj6jHekeougtCQyakWMLKetPTTNV7aE2 T/wAV58Avs2SR+Ml72P8VvpP0SkYr4wLkh9vHrQKA798hwsVoevl2hOgA6irVmeS0cz9 DqfOL5B4aawaNbv8j50RIBzYnHomtiLYOt/AhOqg8Nlda27HsaJ+V7XEDF0UHDb7igTw q5YYPf2E2muHrGCDk+IhWZsVmn8W8w+JOm5FdqtKLV3QmCH8Pg/6DJ+3rjdnYtmfRcSs cIOUyDHDKG0ps1GU/rwdBXMTeejUxkzrf7Xy1iIYGdLqo+wHjwEgM+gjfQmDVTKigizM LwUQ== MIME-Version: 1.0 X-Received: by 10.180.78.65 with SMTP id z1mr67600wiw.14.1430348922381; Wed, 29 Apr 2015 16:08:42 -0700 (PDT) Sender: oshogbo.vx@gmail.com Received: by 10.28.187.214 with HTTP; Wed, 29 Apr 2015 16:08:42 -0700 (PDT) In-Reply-To: <8E2140D8-E008-4A9D-A628-1FA4693A8797@gmail.com> References: <201504292219.t3TMJeGn071528@svn.freebsd.org> <8E2140D8-E008-4A9D-A628-1FA4693A8797@gmail.com> Date: Thu, 30 Apr 2015 01:08:42 +0200 X-Google-Sender-Auth: NOkAjeUgIUIDOD2j_6ewTrUza5c Message-ID: Subject: Re: svn commit: r282252 - head/lib/libcapsicum From: Mariusz Zaborski To: Garrett Cooper Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 23:08:44 -0000 On 30 April 2015 at 01:00, Garrett Cooper wrote: > On Apr 29, 2015, at 15:19, Mariusz Zaborski wrote: > > > Author: oshogbo > > Date: Wed Apr 29 22:19:40 2015 > > New Revision: 282252 > > URL: https://svnweb.freebsd.org/changeset/base/282252 > > > > Log: > > Remove the use of nvlist_.*[vf] functions from libcapsicum and replace > > them with snprintf(3). Assert the results of snprintf(3). > > > > Approved by: pjd (mentor) > > assert(3) can be compiled out with NDEBUG, causing memory > corruption on memory allocation failure or snprintf-related failure. Is > using assert a good idea? > Thanks! > -NGie > In my opinion it's only sanitary check for developers. We not assume that snprintf(3) will fail in those condition - buffer is far bigger then max value stored there (name (4) + MAX_UINT (21) = 25, buffer is declared 64). But it could fail if some developer will change the name of the variable and forgot to resize the array. So like I say it's only sanitary check. Thanks, Mariusz Zaborski From owner-svn-src-head@FreeBSD.ORG Wed Apr 29 23:44:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3740691; Wed, 29 Apr 2015 23:44:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A13A0187A; Wed, 29 Apr 2015 23:44:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3TNiT7H016281; Wed, 29 Apr 2015 23:44:29 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3TNiTp3016280; Wed, 29 Apr 2015 23:44:29 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504292344.t3TNiTp3016280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Wed, 29 Apr 2015 23:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282259 - head/sys/amd64/vmm/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2015 23:44:29 -0000 Author: neel Date: Wed Apr 29 23:44:28 2015 New Revision: 282259 URL: https://svnweb.freebsd.org/changeset/base/282259 Log: Re-implement RTC current time calculation to eliminate the possibility of losing time. The problem with the earlier implementation was that the uptime value used by 'vrtc_curtime()' could be different than the uptime value when 'vrtc_time_update()' actually updated 'base_uptime'. Fix this by calculating and updating the (rtctime, uptime) tuple together. MFC after: 2 weeks Modified: head/sys/amd64/vmm/io/vrtc.c Modified: head/sys/amd64/vmm/io/vrtc.c ============================================================================== --- head/sys/amd64/vmm/io/vrtc.c Wed Apr 29 22:59:44 2015 (r282258) +++ head/sys/amd64/vmm/io/vrtc.c Wed Apr 29 23:44:28 2015 (r282259) @@ -142,20 +142,23 @@ update_enabled(struct vrtc *vrtc) } static time_t -vrtc_curtime(struct vrtc *vrtc) +vrtc_curtime(struct vrtc *vrtc, sbintime_t *basetime) { sbintime_t now, delta; - time_t t; + time_t t, secs; KASSERT(VRTC_LOCKED(vrtc), ("%s: vrtc not locked", __func__)); t = vrtc->base_rtctime; + *basetime = vrtc->base_uptime; if (update_enabled(vrtc)) { now = sbinuptime(); delta = now - vrtc->base_uptime; KASSERT(delta >= 0, ("vrtc_curtime: uptime went backwards: " "%#lx to %#lx", vrtc->base_uptime, now)); - t += delta / SBT_1S; + secs = delta / SBT_1S; + t += secs; + *basetime += secs * SBT_1S; } return (t); } @@ -390,9 +393,10 @@ fail: } static int -vrtc_time_update(struct vrtc *vrtc, time_t newtime) +vrtc_time_update(struct vrtc *vrtc, time_t newtime, sbintime_t newbase) { struct rtcdev *rtc; + sbintime_t oldbase; time_t oldtime; uint8_t alarm_sec, alarm_min, alarm_hour; @@ -404,16 +408,21 @@ vrtc_time_update(struct vrtc *vrtc, time alarm_hour = rtc->alarm_hour; oldtime = vrtc->base_rtctime; - VM_CTR2(vrtc->vm, "Updating RTC time from %#lx to %#lx", + VM_CTR2(vrtc->vm, "Updating RTC secs from %#lx to %#lx", oldtime, newtime); + oldbase = vrtc->base_uptime; + VM_CTR2(vrtc->vm, "Updating RTC base uptime from %#lx to %#lx", + oldbase, newbase); + vrtc->base_uptime = newbase; + if (newtime == oldtime) return (0); /* * If 'newtime' indicates that RTC updates are disabled then just * record that and return. There is no need to do alarm interrupt - * processing or update 'base_uptime' in this case. + * processing in this case. */ if (newtime == VRTC_BROKEN_TIME) { vrtc->base_rtctime = VRTC_BROKEN_TIME; @@ -459,8 +468,6 @@ vrtc_time_update(struct vrtc *vrtc, time if (uintr_enabled(vrtc)) vrtc_set_reg_c(vrtc, rtc->reg_c | RTCIR_UPDATE); - vrtc->base_uptime = sbinuptime(); - return (0); } @@ -531,7 +538,7 @@ static void vrtc_callout_handler(void *arg) { struct vrtc *vrtc = arg; - sbintime_t freqsbt; + sbintime_t freqsbt, basetime; time_t rtctime; int error; @@ -553,8 +560,8 @@ vrtc_callout_handler(void *arg) vrtc_set_reg_c(vrtc, vrtc->rtcdev.reg_c | RTCIR_PERIOD); if (aintr_enabled(vrtc) || uintr_enabled(vrtc)) { - rtctime = vrtc_curtime(vrtc); - error = vrtc_time_update(vrtc, rtctime); + rtctime = vrtc_curtime(vrtc, &basetime); + error = vrtc_time_update(vrtc, rtctime, basetime); KASSERT(error == 0, ("%s: vrtc_time_update error %d", __func__, error)); } @@ -619,7 +626,7 @@ static int vrtc_set_reg_b(struct vrtc *vrtc, uint8_t newval) { struct rtcdev *rtc; - sbintime_t oldfreq, newfreq; + sbintime_t oldfreq, newfreq, basetime; time_t curtime, rtctime; int error; uint8_t oldval, changed; @@ -640,12 +647,13 @@ vrtc_set_reg_b(struct vrtc *vrtc, uint8_ if (changed & RTCSB_HALT) { if ((newval & RTCSB_HALT) == 0) { rtctime = rtc_to_secs(vrtc); + basetime = sbinuptime(); if (rtctime == VRTC_BROKEN_TIME) { if (rtc_flag_broken_time) return (-1); } } else { - curtime = vrtc_curtime(vrtc); + curtime = vrtc_curtime(vrtc, &basetime); KASSERT(curtime == vrtc->base_rtctime, ("%s: mismatch " "between vrtc basetime (%#lx) and curtime (%#lx)", __func__, vrtc->base_rtctime, curtime)); @@ -664,7 +672,7 @@ vrtc_set_reg_b(struct vrtc *vrtc, uint8_ rtctime = VRTC_BROKEN_TIME; rtc->reg_b &= ~RTCSB_UINTR; } - error = vrtc_time_update(vrtc, rtctime); + error = vrtc_time_update(vrtc, rtctime, basetime); KASSERT(error == 0, ("vrtc_time_update error %d", error)); } @@ -744,7 +752,7 @@ vrtc_set_time(struct vm *vm, time_t secs vrtc = vm_rtc(vm); VRTC_LOCK(vrtc); - error = vrtc_time_update(vrtc, secs); + error = vrtc_time_update(vrtc, secs, sbinuptime()); VRTC_UNLOCK(vrtc); if (error) { @@ -761,11 +769,12 @@ time_t vrtc_get_time(struct vm *vm) { struct vrtc *vrtc; + sbintime_t basetime; time_t t; vrtc = vm_rtc(vm); VRTC_LOCK(vrtc); - t = vrtc_curtime(vrtc); + t = vrtc_curtime(vrtc, &basetime); VRTC_UNLOCK(vrtc); return (t); @@ -802,6 +811,7 @@ int vrtc_nvram_read(struct vm *vm, int offset, uint8_t *retval) { struct vrtc *vrtc; + sbintime_t basetime; time_t curtime; uint8_t *ptr; @@ -818,7 +828,7 @@ vrtc_nvram_read(struct vm *vm, int offse * Update RTC date/time fields if necessary. */ if (offset < 10 || offset == RTC_CENTURY) { - curtime = vrtc_curtime(vrtc); + curtime = vrtc_curtime(vrtc, &basetime); secs_to_rtc(curtime, vrtc, 0); } @@ -858,6 +868,7 @@ vrtc_data_handler(struct vm *vm, int vcp { struct vrtc *vrtc; struct rtcdev *rtc; + sbintime_t basetime; time_t curtime; int error, offset; @@ -875,8 +886,8 @@ vrtc_data_handler(struct vm *vm, int vcp } error = 0; - curtime = vrtc_curtime(vrtc); - vrtc_time_update(vrtc, curtime); + curtime = vrtc_curtime(vrtc, &basetime); + vrtc_time_update(vrtc, curtime, basetime); /* * Update RTC date/time fields if necessary. @@ -939,7 +950,7 @@ vrtc_data_handler(struct vm *vm, int vcp */ if (offset == RTC_CENTURY && !rtc_halted(vrtc)) { curtime = rtc_to_secs(vrtc); - error = vrtc_time_update(vrtc, curtime); + error = vrtc_time_update(vrtc, curtime, sbinuptime()); KASSERT(!error, ("vrtc_time_update error %d", error)); if (curtime == VRTC_BROKEN_TIME && rtc_flag_broken_time) error = -1; @@ -993,7 +1004,7 @@ vrtc_init(struct vm *vm) VRTC_LOCK(vrtc); vrtc->base_rtctime = VRTC_BROKEN_TIME; - vrtc_time_update(vrtc, curtime); + vrtc_time_update(vrtc, curtime, sbinuptime()); secs_to_rtc(curtime, vrtc, 0); VRTC_UNLOCK(vrtc); From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 00:17:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DE1BC6B; Thu, 30 Apr 2015 00:17:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C2911BD8; Thu, 30 Apr 2015 00:17:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3U0HXXV032608; Thu, 30 Apr 2015 00:17:33 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3U0HXgf032607; Thu, 30 Apr 2015 00:17:33 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201504300017.t3U0HXgf032607@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 30 Apr 2015 00:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282260 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 00:17:33 -0000 Author: sbruno Date: Thu Apr 30 00:17:32 2015 New Revision: 282260 URL: https://svnweb.freebsd.org/changeset/base/282260 Log: Fix native-xtools breakage when building a gcc enabled target on a clang enabled host. Build a one-off gperf and put it in the PATH for the rest of the target so the ONE call to gperf by the gcc build picks it up and DTRT. Reviewed by: imp Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Apr 29 23:44:28 2015 (r282259) +++ head/Makefile.inc1 Thu Apr 30 00:17:32 2015 (r282260) @@ -1535,7 +1535,22 @@ NXBMAKE= ${NXBENV} ${MAKE} \ MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ MK_LLDB=no +# native-xtools is the current target for qemu-user cross builds of ports +# via poudriere and the imgact_binmisc kernel module. +# For non-clang enabled targets that are still using the in tree gcc +# we must build a gperf binary for one instance of its Makefiles. On +# clang-enabled systems, the gperf binary is obsolete. native-xtools: .MAKE +.if ${MK_GCC_BOOTSTRAP} != "no" + mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin + ${_+_}@${ECHODIR} "===> ${_gperf} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_gperf} && \ + ${NXBMAKE} DIRPRFX=${_gperf}/ obj && \ + ${NXBMAKE} DIRPRFX=${_gperf}/ depend && \ + ${NXBMAKE} DIRPRFX=${_gperf}/ all && \ + ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install + PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin +.endif mkdir -p ${OBJTREE}/nxb-bin/bin mkdir -p ${OBJTREE}/nxb-bin/sbin mkdir -p ${OBJTREE}/nxb-bin/usr From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 00:27:53 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFD90ED1; Thu, 30 Apr 2015 00:27:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE3E21D0A; Thu, 30 Apr 2015 00:27:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3U0RrjQ037607; Thu, 30 Apr 2015 00:27:53 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3U0RrWI037606; Thu, 30 Apr 2015 00:27:53 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201504300027.t3U0RrWI037606@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 30 Apr 2015 00:27:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282261 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 00:27:54 -0000 Author: eadler Date: Thu Apr 30 00:27:53 2015 New Revision: 282261 URL: https://svnweb.freebsd.org/changeset/base/282261 Log: Phabricator: enable "history.immutable": With certain arc workflows leaving history.immutable as false results in using the upstream template instead of our usual commit template. Since the git workflow issues alluded to in my prior commit message can be worked around, set history.immutable once again. Modified: head/.arcconfig Modified: head/.arcconfig ============================================================================== --- head/.arcconfig Thu Apr 30 00:17:32 2015 (r282260) +++ head/.arcconfig Thu Apr 30 00:27:53 2015 (r282261) @@ -1,4 +1,5 @@ { "project.name": "S", - "phabricator.uri" : "https://reviews.freebsd.org/" + "phabricator.uri" : "https://reviews.freebsd.org/", + "history.immutable" : true } From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 00:28:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21FBEB2 for ; Thu, 30 Apr 2015 00:28:54 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A84811D1B for ; Thu, 30 Apr 2015 00:28:53 +0000 (UTC) Received: by wiun10 with SMTP id n10so84179285wiu.1 for ; Wed, 29 Apr 2015 17:28:51 -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:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=zAQQeciL3g2PGThblK07hkRHkN+yUxEAeRS0RhMQmVs=; b=mDuGuh+UMEb60rYQFQYiHB57ecoTCXne5zZ09qpH80O7s95iTleyCm1bKIc3hgsJf3 a9sWoltFr4dInUGKISR/HOLf0NfvGum96uADBzD28S5cv4t3nuZImQ2cAV3dDSiOgnG6 9G1hVh+501zdji3SxXKl82Pp/f7ia0zWjKNO8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=zAQQeciL3g2PGThblK07hkRHkN+yUxEAeRS0RhMQmVs=; b=jd9Jy5ZT1i5K5u4LipuZb3SBRuKAYYnXoFGiK1iomv8760TTHtQ45A/TJLMCVuQNYJ 7ehZwPPrl0W+czqf8Mr2686QrWohpQVdSrhuZMYMXPnVz/6njrqy9qDXyyZV9DODDDrL L07PzZIeEjs1epCJ5wwGX6Uhp1jLNRXro1MEW+aTwF9i+uSEt7NUNH1w+t57TPLREFV3 m5cEvax76EO2yFEkEEOvAA4CkTNWPvjzFoz53+EwyoTiqOkGc5TEJue7AjQdzgLlEHte i7MAHy2S/vbMQmAQWSUD9vtw8edyPd2svsmsvhyKPjAMCw4stHBZEHOxpSCrt7T0S6ht W59A== X-Gm-Message-State: ALoCoQn818r0C/z2G6mZz22bs/ffcpwy2TEgw6H9B+exjXPXGUSFFR1jzP6gqPY2XOajMA2fURUN X-Received: by 10.180.92.161 with SMTP id cn1mr367221wib.91.1430353731873; Wed, 29 Apr 2015 17:28:51 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.28.20.75 with HTTP; Wed, 29 Apr 2015 17:28:21 -0700 (PDT) In-Reply-To: <20150429123124.GJ13141@ivaldir.etoilebsd.net> References: <201504202033.t3KKXMPW019822@svn.freebsd.org> <5540C981.3070103@FreeBSD.org> <20150429123124.GJ13141@ivaldir.etoilebsd.net> From: Eitan Adler Date: Wed, 29 Apr 2015 17:28:21 -0700 X-Google-Sender-Auth: vDQ02_MbWGyiVvJlTg1HqyNJ2Lk Message-ID: Subject: Re: svn commit: r281789 - head To: Baptiste Daroussin Cc: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 00:28:54 -0000 On 29 April 2015 at 05:31, Baptiste Daroussin wrote: > On Wed, Apr 29, 2015 at 02:07:29PM +0200, Roger Pau Monn=C3=A9 wrote: >> Hello, >> >> El 20/04/15 a les 22.33, Eitan Adler ha escrit: >> > Author: eadler >> > Date: Mon Apr 20 20:33:22 2015 >> > New Revision: 281789 >> > URL: https://svnweb.freebsd.org/changeset/base/281789 >> > >> > Log: >> > phabricator related changes: >> > - don't lint either contrib or crypto: these are both externally w= ritten >> > directories >> > - add additional linters for spelling (check common typos like teh= -> >> > the) >> > - chmod linter checks for executible bit on bad files >> > - merge-conflict checks for merge conflict tokens then may have be= en >> > resolved incorrectly >> > - filename checks for back characters in filenames >> > - json for json syntax correctness >> > >> > - remove history.immutable: it is meaningless on subversion, and c= auses >> > workflow problems when trying to use git. It it set to 'true' b= y >> > default with hg >> >> I've never had workflow problems with it when using git. Now every time >> I use arc diff... arc mangles my commit message by adding "Reviewers:" >> and "Subscribers:" tags. Could we leave "history.immutable" : true pleas= e? > > @eadler: > > That is the reason why I set history.immutable in the first place (note t= hat I > could not remember since :)) so yes my commit message at the time should = have > been more informational, that would have helped. I set "history.immutable" : true again. --=20 Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 00:29:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18FB31FE; Thu, 30 Apr 2015 00:29:22 +0000 (UTC) Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D94F91D24; Thu, 30 Apr 2015 00:29:21 +0000 (UTC) Received: by pdbqd1 with SMTP id qd1so43345172pdb.2; Wed, 29 Apr 2015 17:29:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=XF9lEXeIM4sIG8C8j8qHcBQ5MhwfeFAUJCIFpNKjQvI=; b=cdVzWWJQ11/YbAyJW4zKxfjKp3VFECoVCM0qtSa++xKupY70NxVzarJ/sDvGZslKVf zOvRl/qeJyVKK0iWOBX2sYOY6xOZty/qZK3XmgYE5OOsiA/gIHdSpRkmyFe4bBXxrcWX XpX74Ztqu6pDUZ43dlBR9zGzmaA50j0oOtKz1SCZKUdLvvRp9Pu7S/4VbMb0JluWM+j+ Xch0RLfXfR+2misbBtwmYCwTG/iFRR9R6o4nt4lprZt4hQTBx1Kls1FpJ7kJOr7VQwPd 1tEKo/WeDH/9p2+kUs8S3Dx8q/0+fZbIeTuvLzVZwhSi1FncA7FooNDiGygHlEY5d1+p 49GQ== X-Received: by 10.68.87.35 with SMTP id u3mr2947542pbz.127.1430353761356; Wed, 29 Apr 2015 17:29:21 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:857d:cd13:79bf:f40d? ([2601:8:ab80:7d6:857d:cd13:79bf:f40d]) by mx.google.com with ESMTPSA id fu7sm338001pac.26.2015.04.29.17.29.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Apr 2015 17:29:20 -0700 (PDT) Subject: Re: svn commit: r282260 - head Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_AA894F30-21B2-48F8-9439-4D6A467B26BB"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <201504300017.t3U0HXgf032607@svn.freebsd.org> Date: Wed, 29 Apr 2015 17:29:17 -0700 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201504300017.t3U0HXgf032607@svn.freebsd.org> To: Sean Bruno X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 00:29:22 -0000 --Apple-Mail=_AA894F30-21B2-48F8-9439-4D6A467B26BB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Apr 29, 2015, at 17:17, Sean Bruno wrote: > Author: sbruno > Date: Thu Apr 30 00:17:32 2015 > New Revision: 282260 > URL: https://svnweb.freebsd.org/changeset/base/282260 >=20 > Log: > Fix native-xtools breakage when building a gcc enabled target on a = clang > enabled host. Build a one-off gperf and put it in the PATH for the = rest > of the target so the ONE call to gperf by the gcc build picks it up = and > DTRT. >=20 > Reviewed by: imp >=20 > Modified: > head/Makefile.inc1 >=20 > Modified: head/Makefile.inc1 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/Makefile.inc1 Wed Apr 29 23:44:28 2015 = (r282259) > +++ head/Makefile.inc1 Thu Apr 30 00:17:32 2015 = (r282260) > @@ -1535,7 +1535,22 @@ NXBMAKE=3D ${NXBENV} ${MAKE} \ > MK_CLANG_EXTRAS=3Dno MK_CLANG_FULL=3Dno \ > MK_LLDB=3Dno >=20 > +# native-xtools is the current target for qemu-user cross builds of = ports > +# via poudriere and the imgact_binmisc kernel module. > +# For non-clang enabled targets that are still using the in tree gcc > +# we must build a gperf binary for one instance of its Makefiles. On > +# clang-enabled systems, the gperf binary is obsolete. > native-xtools: .MAKE > +.if ${MK_GCC_BOOTSTRAP} !=3D "no" > + mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin > + ${_+_}@${ECHODIR} "=3D=3D=3D> ${_gperf} = (obj,depend,all,install)"; \ > + cd ${.CURDIR}/${_gperf} && \ > + ${NXBMAKE} DIRPRFX=3D${_gperf}/ obj && \ > + ${NXBMAKE} DIRPRFX=3D${_gperf}/ depend && \ > + ${NXBMAKE} DIRPRFX=3D${_gperf}/ all && \ > + ${NXBMAKE} DIRPRFX=3D${_gperf}/ DESTDIR=3D${OBJTREE}/gperf_for_gcc= install > + PATH=3D${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin This $PATH doesn=92t get used though=85 Oi though... Is there any way to make the xtools targets use the other = targets :/...? --Apple-Mail=_AA894F30-21B2-48F8-9439-4D6A467B26BB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVQXdfAAoJEMZr5QU6S73eZ0YH/iZY8BRlYrPAOMTCOHc5dcH+ qls3LDO9xBbPOFoeHrN/3+vEHdsBMJkZEGmgpH6PJMGZKbdrDKN08DVUTj6nRq9b FPw2pdKojAktnjNObZ9nttLZjY6paI2itGXtM6+X+hx5UCm3rucYiwO39UYTFfVw 4dzbUkxmu/gzCvIZh5M43RWFA95F2ETc2WxacWGQrZYLerYf8bGyrfr/FLpxgls0 z5P4dFW9ff7Ji8RnmMZBzyXR897aDXobzIa3SvyMEIuzIzczXxYBqijdp54m+M0K AzHnEae1HSrhJRVfPoXD4OsG2O+tBDjNjnVBFj13RWmNoSThzJzk9hwY9mSDPoM= =VpSY -----END PGP SIGNATURE----- --Apple-Mail=_AA894F30-21B2-48F8-9439-4D6A467B26BB-- From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 00:33:33 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C4DC4AF; Thu, 30 Apr 2015 00:33:33 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52CDD1E02; Thu, 30 Apr 2015 00:33:33 +0000 (UTC) Received: from [192.168.200.207] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 39BCB193655; Thu, 30 Apr 2015 00:33:28 +0000 (UTC) Message-ID: <55417856.9020109@ignoranthack.me> Date: Wed, 29 Apr 2015 17:33:26 -0700 From: Sean Bruno Reply-To: Sean Bruno User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: ngie@freebsd.org CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282260 - head References: <201504300017.t3U0HXgf032607@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 00:33:33 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 04/29/15 17:29, Garrett Cooper wrote: > This $PATH doesn’t get used though… What? As far as I can tell it does. Did I miss something obvious? Because if the PATH wasn't working, gperf wouldn't be found and the builds for a native-xtools target would fail for the gcc ARCH's sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVQXhUXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kP8IIAJJ/0/T8l+hdLlMSwzAeKgLA Fa2825eRLvGph9OcLLBDwneuReGBOJgFxbmd8e0xnOuWEsc0YNfZ9Sg7ec4pAOaI i3ZpgulUm7+TBDYYbl/HWgp4sRON8qs8DZjUTvHpEwCDxUzfQU8WIu9zhI/JEiX9 zw374bJSUEjkMFABRlT6rAxO967H2mgTDTLSP3skhdmVz5wvaWxoc9q/MBeFftOk MTpI2u9b/BWhHdCU/e2vbKkPggTf4sAdXw0wh5yF27Z1BeMY78iWzQnYWz7/Ke7a vz/SBCFzpyzOwvofhHt136pP6tCCupI/MSgYzqL2OO2fiGRXcJQ3/WT3UjkZaQM= =dR6s -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 00:39:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 770CD8DE; Thu, 30 Apr 2015 00:39:54 +0000 (UTC) Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e:c03::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46FD11E59; Thu, 30 Apr 2015 00:39:54 +0000 (UTC) Received: by pacyx8 with SMTP id yx8so42970482pac.1; Wed, 29 Apr 2015 17:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=ZO2MSOClrUlkf29LST9J0BJ+1EILNEQsaauP5iWQVMI=; b=aNQquEM3xNRxo1cCdFEEZnAaiy9vLWF8qUBZUaZtCi/P/WAQw3TUIGZomhSRVxpbIj mH+CM/Iiteleya42FnvggFdX/xWwQ7o89nG1nSxEzkZ6hz3hCIrtaxhi7UHgvmiEvdA8 07tA7I7gmCq7AbU9adUw+8tingUKCBrnL9MLw7/HuTahNffcOPCwGdc1M3K3my6wL7om mqtPJdHxbvJ8MZecbsnc/dsDJVY0lErukkSd5UieMT9O3yZYF/BKTpPq9EVrAcF2t8ci xr25sq7FGtBU1ljUoAD9Q4kFJ7eDC2X2HWLQYRD+hW/EgIf4ePS2Ml9hiPLrPKDdfCum rQcw== X-Received: by 10.70.91.37 with SMTP id cb5mr3043695pdb.151.1430354393519; Wed, 29 Apr 2015 17:39:53 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:857d:cd13:79bf:f40d? ([2601:8:ab80:7d6:857d:cd13:79bf:f40d]) by mx.google.com with ESMTPSA id ud3sm361930pbc.10.2015.04.29.17.39.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Apr 2015 17:39:52 -0700 (PDT) Subject: Re: svn commit: r282260 - head Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_525B6581-1653-4311-A9F4-38E57901371C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <55417856.9020109@ignoranthack.me> Date: Wed, 29 Apr 2015 17:39:50 -0700 Cc: ngie@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <246BD160-EB31-48FD-ADBE-526C198C7937@gmail.com> References: <201504300017.t3U0HXgf032607@svn.freebsd.org> <55417856.9020109@ignoranthack.me> To: Sean Bruno X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 00:39:54 -0000 --Apple-Mail=_525B6581-1653-4311-A9F4-38E57901371C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Apr 29, 2015, at 17:33, Sean Bruno wrote: > Signed PGP part > On 04/29/15 17:29, Garrett Cooper wrote: > > This $PATH doesn=92t get used though=85 >=20 > What? As far as I can tell it does. Did I miss something obvious? > Because if the PATH wasn't working, gperf wouldn't be found and the > builds for a native-xtools target would fail for the gcc ARCH's "PATH=3D${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin=94 is a standalone = line, without a continuation, so the value should have been executed in = a separate shell instance and doesn=92t get inherited in the environment = following it. Here=92s an example: $ make -f r282260.mk A=3DB echo A is: $A A is: $ cat r282260.mk all: A=3DB echo A is: $$A $ Cheers! --Apple-Mail=_525B6581-1653-4311-A9F4-38E57901371C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVQXnXAAoJEMZr5QU6S73eOiIH/2j4vjSQ0iTvX6vWyrkrM5UH T3Dxlh3y+EiyLyCCY52+Fg3PhHpxlbu3Dn755sjEOWarfWy0WvmLNJdxUJ8vICt8 RLUSWD/78ppiYIwGfL3x4g+Ith4gAkqH8wHRKPGLb6ggFitgsMA2/ZxhRpxSM5n3 Xf3W0BnT6H9kfLcw4WPHiao2esRQLf57+AdrEHLjtYijtezDEWbFoydOV73QAv5b KMx50NLmUwAkO9weoYz+iiwmPEEVyg1jGvDbIO6jmoDdXytdXDDnvnn1q8F7XmYO Wne9iyi7Are4zwTrZAcgDeYd35FhWwkxmwJIWzkTP+6GQixyStN3bghCAnzvE3U= =533b -----END PGP SIGNATURE----- --Apple-Mail=_525B6581-1653-4311-A9F4-38E57901371C-- From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 00:41:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BB4CA49; Thu, 30 Apr 2015 00:41:43 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BE5B1F11; Thu, 30 Apr 2015 00:41:43 +0000 (UTC) Received: from [192.168.200.207] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 3B439193655; Thu, 30 Apr 2015 00:41:41 +0000 (UTC) Message-ID: <55417A43.3080704@ignoranthack.me> Date: Wed, 29 Apr 2015 17:41:39 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: ngie@freebsd.org CC: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282260 - head References: <201504300017.t3U0HXgf032607@svn.freebsd.org> <55417856.9020109@ignoranthack.me> <246BD160-EB31-48FD-ADBE-526C198C7937@gmail.com> In-Reply-To: <246BD160-EB31-48FD-ADBE-526C198C7937@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 00:41:43 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 04/29/15 17:39, Garrett Cooper wrote: > On Apr 29, 2015, at 17:33, Sean Bruno > wrote: > >> Signed PGP part On 04/29/15 17:29, Garrett Cooper wrote: >>> This $PATH doesn’t get used though… >> >> What? As far as I can tell it does. Did I miss something >> obvious? Because if the PATH wasn't working, gperf wouldn't be >> found and the builds for a native-xtools target would fail for >> the gcc ARCH's > > "PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin” is a standalone > line, without a continuation, so the value should have been > executed in a separate shell instance and doesn’t get inherited in > the environment following it. Here’s an example: > > $ make -f r282260.mk A=B echo A is: $A A is: $ cat r282260.mk all: > A=B echo A is: $$A $ > > Cheers! > Like I said, what am I missing if my broken Make-foo can't possibly work. Isn't PATH global to the Makefile/ENV or something in this contex t? sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVQXpAXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kDJMIAMzH9kPlt0DcL6kl+ttMaQzW wX69V+9a8oJT2ovwF2Ebh2RsI7HMorBMzESEeTEFQPZTqgcBU+B6qC3cc7YMb854 1nVrzd083/dNMk9cJwaFT3fq+VAtgUs78TBiyaXdv9xUlrGn0wSpvGCux2Fpezum JhV1dGnkAOTpeG/TugwW4bt1riG6GmDhlbQmKewDzMEV4gK6aU5zAxeQttq4PlYk 0DkHlD+rm2SqexkG7ZcJ4elDM60GqhCCDDaJMFG+dgPCszdQp+/AoRCNRRinV+p/ IxsddWOF5NuNGHn3HnSTQBE7oAk0zmP9CWjxEgNggO8cbOKzjna/H/8cFXoYJuQ= =ZTlP -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 00:44:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E516ACCD; Thu, 30 Apr 2015 00:44:25 +0000 (UTC) Received: from mail-oi0-x22a.google.com (mail-oi0-x22a.google.com [IPv6:2607:f8b0:4003:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2B391F47; Thu, 30 Apr 2015 00:44:25 +0000 (UTC) Received: by oign205 with SMTP id n205so35947704oig.2; Wed, 29 Apr 2015 17:44:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=PRarXNXxe4YXZ8vInw8GsMAzGVveXpyGaYnSKKJ8fIs=; b=Hb9qK24p4GHMEH9jH/F9Q5Ugf5zFCo4X5q8gF3CU45tjie8QWVi2C5cWWXOTCyaA4j 1zD5VOuSAf56iUHFSMlpst49BKN804bABMqb+mdwKqLTHANXP6B7OomKbP7a+bF4svbR VtK/aqzDVWBbsNgpyywJGHGVGGbwMSuzezeuGTxbA/MnQHkS5sypvPLmBuZ104AA3SfQ 6nmwwa1A4MCCnyMcrXmcUWghjaHQnRkPz/JjDpSYgKHvS9UM0pG9QsO73tZ2vCudj5q0 h7wsFor3WvgDXMw/+jrdlLH11oO0i+2qh9YfFxDB9KyswaaA+DPjWtdSJSY0u8iwjQPz JKgw== X-Received: by 10.202.193.8 with SMTP id r8mr1314663oif.27.1430354664725; Wed, 29 Apr 2015 17:44:24 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:857d:cd13:79bf:f40d? ([2601:8:ab80:7d6:857d:cd13:79bf:f40d]) by mx.google.com with ESMTPSA id qk9sm468818obb.10.2015.04.29.17.44.23 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Apr 2015 17:44:24 -0700 (PDT) Subject: Re: svn commit: r282260 - head Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_632ED6D7-C137-4FAC-8036-23FE5A6E48B0"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Garrett Cooper In-Reply-To: <55417A43.3080704@ignoranthack.me> Date: Wed, 29 Apr 2015 17:44:22 -0700 Cc: ngie@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <092A08AC-D733-481E-B207-9276D97B97E0@gmail.com> References: <201504300017.t3U0HXgf032607@svn.freebsd.org> <55417856.9020109@ignoranthack.me> <246BD160-EB31-48FD-ADBE-526C198C7937@gmail.com> <55417A43.3080704@ignoranthack.me> To: sbruno@freebsd.org X-Mailer: Apple Mail (2.1878.6) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 00:44:26 -0000 --Apple-Mail=_632ED6D7-C137-4FAC-8036-23FE5A6E48B0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Apr 29, 2015, at 17:41, Sean Bruno wrote: > Signed PGP part > On 04/29/15 17:39, Garrett Cooper wrote: > > On Apr 29, 2015, at 17:33, Sean Bruno > > wrote: > > > >> Signed PGP part On 04/29/15 17:29, Garrett Cooper wrote: > >>> This $PATH doesn=92t get used though=85 > >> > >> What? As far as I can tell it does. Did I miss something > >> obvious? Because if the PATH wasn't working, gperf wouldn't be > >> found and the builds for a native-xtools target would fail for > >> the gcc ARCH's > > > > "PATH=3D${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin=94 is a standalone > > line, without a continuation, so the value should have been > > executed in a separate shell instance and doesn=92t get inherited in > > the environment following it. Here=92s an example: > > > > $ make -f r282260.mk A=3DB echo A is: $A A is: $ cat r282260.mk all: > > A=3DB echo A is: $$A $ > > > > Cheers! > > >=20 > Like I said, what am I missing if my broken Make-foo can't possibly > work. Isn't PATH global to the Makefile/ENV or something in this = contex > t? Not unless it=92s operating in a mode I=92m not specifying=85 all: PATH=3D${PATH}:A echo path is: ${PATH} echo path is: $$PATH echo path is: = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ngie/bi= n path is: = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ngie/bi= n echo path is: $PATH path is: = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ngie/bi= n --Apple-Mail=_632ED6D7-C137-4FAC-8036-23FE5A6E48B0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJVQXrmAAoJEMZr5QU6S73etjYIALXQBGP0qp/CT1wKs+vs9oG3 toQL3x/aetVS6k49vHoM2dyioxAi9xmYbz6yp2JbshZNQOq+9T82DuvfCXXivxZs aL/fQSSNJ/V5Zzc5tGiZvr8LknuWsV+rVwkEiDc8rtwnilW+Wj9G6vTbAZaoeItL 9ZnC7p2D7uod6eBraqbvfFIoTH6lScY+zWHXcy3hvHuouVPV2ePyCDY5wpVM7I1g DGMdKp91SgHme6wVT9Tjt7LYFctjXTJQC1Dy3o08gm6ce1tt38IrLizmii08qAWE EsxLrQQGGI/J1cDOOkLTfR33mjmlE71+h4j0bKyzOagdDTMko2ZvrgCJhKOyvV0= =us2I -----END PGP SIGNATURE----- --Apple-Mail=_632ED6D7-C137-4FAC-8036-23FE5A6E48B0-- From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 01:24:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59823360; Thu, 30 Apr 2015 01:24:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 457061393; Thu, 30 Apr 2015 01:24:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3U1ORbW067437; Thu, 30 Apr 2015 01:24:27 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3U1OPkc067430; Thu, 30 Apr 2015 01:24:25 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504300124.t3U1OPkc067430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 30 Apr 2015 01:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282264 - in head/sys/powerpc: aim booke conf powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 01:24:27 -0000 Author: jhibbits Date: Thu Apr 30 01:24:25 2015 New Revision: 282264 URL: https://svnweb.freebsd.org/changeset/base/282264 Log: Unify booke and AIM machdep. Much of the code was common to begin with. There is one nit, which is likely not an issue at all. With the old code, the AIM machdep would __syncicache() the entire kernel core at setup. However, in the unified setup, that seems to hang on the MPC7455, perhaps because it's running later than before. Removing this allows it to boot just fine. Examining the code, the FreeBSD loader already does syncicache of the full kernel, and each module loaded, so this doesn't appear to be an actual problem. Initial code by Nathan Whitehorn. Added: head/sys/powerpc/aim/aim_machdep.c - copied, changed from r281722, head/sys/powerpc/aim/machdep.c head/sys/powerpc/booke/booke_machdep.c - copied, changed from r281722, head/sys/powerpc/booke/machdep.c head/sys/powerpc/powerpc/machdep.c - copied, changed from r281722, head/sys/powerpc/aim/machdep.c head/sys/powerpc/powerpc/uma_machdep.c - copied unchanged from r281722, head/sys/powerpc/aim/uma_machdep.c Deleted: head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/uma_machdep.c head/sys/powerpc/booke/machdep.c Modified: head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/conf/GENERIC Copied and modified: head/sys/powerpc/aim/aim_machdep.c (from r281722, head/sys/powerpc/aim/machdep.c) ============================================================================== --- head/sys/powerpc/aim/machdep.c Sun Apr 19 01:23:12 2015 (r281722, copy source) +++ head/sys/powerpc/aim/aim_machdep.c Thu Apr 30 01:24:25 2015 (r282264) @@ -129,106 +129,14 @@ __FBSDID("$FreeBSD$"); #include -int cold = 1; #ifdef __powerpc64__ extern int n_slbs; -int cacheline_size = 128; -#else -int cacheline_size = 32; #endif -int hw_direct_map = 1; - -extern void *ap_pcpu; - -struct pcpu __pcpu[MAXCPU]; - -static struct trapframe frame0; - -char machine[] = "powerpc"; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); - -static void cpu_startup(void *); -SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); - -SYSCTL_INT(_machdep, CPU_CACHELINE, cacheline_size, - CTLFLAG_RD, &cacheline_size, 0, ""); - -uintptr_t powerpc_init(vm_offset_t, vm_offset_t, vm_offset_t, void *); - -long Maxmem = 0; -long realmem = 0; #ifndef __powerpc64__ struct bat battable[16]; #endif -struct kva_md_info kmi; - -static void -cpu_startup(void *dummy) -{ - - /* - * Initialise the decrementer-based clock. - */ - decr_init(); - - /* - * Good {morning,afternoon,evening,night}. - */ - cpu_setup(PCPU_GET(cpuid)); - -#ifdef PERFMON - perfmon_init(); -#endif - printf("real memory = %ld (%ld MB)\n", ptoa(physmem), - ptoa(physmem) / 1048576); - realmem = physmem; - - if (bootverbose) - printf("available KVA = %zd (%zd MB)\n", - virtual_end - virtual_avail, - (virtual_end - virtual_avail) / 1048576); - - /* - * Display any holes after the first chunk of extended memory. - */ - if (bootverbose) { - int indx; - - printf("Physical memory chunk(s):\n"); - for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { - vm_offset_t size1 = - phys_avail[indx + 1] - phys_avail[indx]; - - #ifdef __powerpc64__ - printf("0x%016lx - 0x%016lx, %ld bytes (%ld pages)\n", - #else - printf("0x%08x - 0x%08x, %d bytes (%ld pages)\n", - #endif - phys_avail[indx], phys_avail[indx + 1] - 1, size1, - size1 / PAGE_SIZE); - } - } - - vm_ksubmap_init(&kmi); - - printf("avail memory = %ld (%ld MB)\n", ptoa(vm_cnt.v_free_count), - ptoa(vm_cnt.v_free_count) / 1048576); - - /* - * Set up buffers, so they can be used to read disk labels. - */ - bufinit(); - vm_pager_bufferinit(); -} - -extern vm_offset_t __startkernel, __endkernel; -extern unsigned char __bss_start[]; -extern unsigned char __sbss_start[]; -extern unsigned char __sbss_end[]; -extern unsigned char _end[]; - #ifndef __powerpc64__ /* Bits for running on 64-bit systems in 32-bit mode. */ extern void *testppc64, *testppc64size; @@ -252,121 +160,25 @@ extern void *imisstrap, *imisssize; extern void *dlmisstrap, *dlmisssize; extern void *dsmisstrap, *dsmisssize; -uintptr_t -powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp) +extern void *ap_pcpu; + +void aim_cpu_init(vm_offset_t toc); + +void +aim_cpu_init(vm_offset_t toc) { - struct pcpu *pc; - vm_offset_t startkernel, endkernel; size_t trap_offset, trapsize; vm_offset_t trap; - void *kmdp; - char *env; register_t msr, scratch; uint8_t *cache_check; int cacheline_warn; #ifndef __powerpc64__ int ppc64; #endif -#ifdef DDB - vm_offset_t ksym_start; - vm_offset_t ksym_end; -#endif - kmdp = NULL; trap_offset = 0; cacheline_warn = 0; - /* First guess at start/end kernel positions */ - startkernel = __startkernel; - endkernel = __endkernel; - - /* Check for ePAPR loader, which puts a magic value into r6 */ - if (mdp == (void *)0x65504150) - mdp = NULL; - - /* - * Parse metadata if present and fetch parameters. Must be done - * before console is inited so cninit gets the right value of - * boothowto. - */ - if (mdp != NULL) { - preload_metadata = mdp; - kmdp = preload_search_by_type("elf kernel"); - if (kmdp != NULL) { - boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); - kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); - endkernel = ulmax(endkernel, MD_FETCH(kmdp, - MODINFOMD_KERNEND, vm_offset_t)); -#ifdef DDB - ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); - ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); - db_fetch_ksymtab(ksym_start, ksym_end); -#endif - } - } else { - bzero(__sbss_start, __sbss_end - __sbss_start); - bzero(__bss_start, _end - __bss_start); - } - - /* Store boot environment state */ - OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry); - - /* - * Init params/tunables that can be overridden by the loader - */ - init_param1(); - - /* - * Start initializing proc0 and thread0. - */ - proc_linkup0(&proc0, &thread0); - thread0.td_frame = &frame0; - - /* - * Set up per-cpu data. - */ - pc = __pcpu; - pcpu_init(pc, 0, sizeof(struct pcpu)); - pc->pc_curthread = &thread0; -#ifdef __powerpc64__ - __asm __volatile("mr 13,%0" :: "r"(pc->pc_curthread)); -#else - __asm __volatile("mr 2,%0" :: "r"(pc->pc_curthread)); -#endif - pc->pc_cpuid = 0; - - __asm __volatile("mtsprg 0, %0" :: "r"(pc)); - - /* - * Init mutexes, which we use heavily in PMAP - */ - - mutex_init(); - - /* - * Install the OF client interface - */ - - OF_bootstrap(); - - /* - * Initialize the console before printing anything. - */ - cninit(); - - /* - * Complain if there is no metadata. - */ - if (mdp == NULL || kmdp == NULL) { - printf("powerpc_init: no loader metadata.\n"); - } - - /* - * Init KDB - */ - - kdb_init(); - /* Various very early CPU fix ups */ switch (mfpvr() >> 16) { /* @@ -431,9 +243,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_ cacheline_size = 32; } - /* Make sure the kernel icache is valid before we go too much further */ - __syncicache((caddr_t)startkernel, endkernel - startkernel); - #ifndef __powerpc64__ /* * Figure out whether we need to use the 64 bit PMAP. This works by @@ -552,12 +361,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_ } /* - * Choose a platform module so we can get the physical memory map. - */ - - platform_probe_and_attach(); - - /* * Initialise virtual memory. Use BUS_PROBE_GENERIC priority * in case the platform module had a better idea of what we * should do. @@ -566,96 +369,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_ pmap_mmu_install(MMU_TYPE_G5, BUS_PROBE_GENERIC); else pmap_mmu_install(MMU_TYPE_OEA, BUS_PROBE_GENERIC); - - pmap_bootstrap(startkernel, endkernel); - mtmsr(PSL_KERNSET & ~PSL_EE); - - /* - * Initialize params/tunables that are derived from memsize - */ - init_param2(physmem); - - /* - * Grab booted kernel's name - */ - env = kern_getenv("kernelname"); - if (env != NULL) { - strlcpy(kernelname, env, sizeof(kernelname)); - freeenv(env); - } - - /* - * Finish setting up thread0. - */ - thread0.td_pcb = (struct pcb *) - ((thread0.td_kstack + thread0.td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~15UL); - bzero((void *)thread0.td_pcb, sizeof(struct pcb)); - pc->pc_curpcb = thread0.td_pcb; - - /* Initialise the message buffer. */ - msgbufinit(msgbufp, msgbufsize); - -#ifdef KDB - if (boothowto & RB_KDB) - kdb_enter(KDB_WHY_BOOTFLAGS, - "Boot flags requested debugger"); -#endif - - return (((uintptr_t)thread0.td_pcb - - (sizeof(struct callframe) - 3*sizeof(register_t))) & ~15UL); -} - -void -bzero(void *buf, size_t len) -{ - caddr_t p; - - p = buf; - - while (((vm_offset_t) p & (sizeof(u_long) - 1)) && len) { - *p++ = 0; - len--; - } - - while (len >= sizeof(u_long) * 8) { - *(u_long*) p = 0; - *((u_long*) p + 1) = 0; - *((u_long*) p + 2) = 0; - *((u_long*) p + 3) = 0; - len -= sizeof(u_long) * 8; - *((u_long*) p + 4) = 0; - *((u_long*) p + 5) = 0; - *((u_long*) p + 6) = 0; - *((u_long*) p + 7) = 0; - p += sizeof(u_long) * 8; - } - - while (len >= sizeof(u_long)) { - *(u_long*) p = 0; - len -= sizeof(u_long); - p += sizeof(u_long); - } - - while (len) { - *p++ = 0; - len--; - } -} - -void -cpu_boot(int howto) -{ -} - -/* - * Flush the D-cache for non-DMA I/O so that the I-cache can - * be made coherent later. - */ -void -cpu_flush_dcache(void *ptr, size_t len) -{ - /* TBD */ } /* @@ -669,17 +382,6 @@ cpu_halt(void) } int -ptrace_set_pc(struct thread *td, unsigned long addr) -{ - struct trapframe *tf; - - tf = td->td_frame; - tf->srr0 = (register_t)addr; - - return (0); -} - -int ptrace_single_step(struct thread *td) { struct trapframe *tf; @@ -727,41 +429,7 @@ memcpy(pcpu->pc_slb, PCPU_GET(slb), size #endif } -void -spinlock_enter(void) -{ - struct thread *td; - register_t msr; - - td = curthread; - if (td->td_md.md_spinlock_count == 0) { - __asm __volatile("or 2,2,2"); /* Set high thread priority */ - msr = intr_disable(); - td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_msr = msr; - } else - td->td_md.md_spinlock_count++; - critical_enter(); -} - -void -spinlock_exit(void) -{ - struct thread *td; - register_t msr; - - td = curthread; - critical_exit(); - msr = td->td_md.md_saved_msr; - td->td_md.md_spinlock_count--; - if (td->td_md.md_spinlock_count == 0) { - intr_restore(msr); - __asm __volatile("or 6,6,6"); /* Set normal thread priority */ - } -} - #ifndef __powerpc64__ - uint64_t va_to_vsid(pmap_t pm, vm_offset_t va) { @@ -945,3 +613,4 @@ cpu_sleep() enable_vec(curthread); powerpc_sync(); } + Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Thu Apr 30 00:35:45 2015 (r282263) +++ head/sys/powerpc/aim/mmu_oea64.c Thu Apr 30 01:24:25 2015 (r282264) @@ -137,8 +137,6 @@ struct ofw_map { extern unsigned char _etext[]; extern unsigned char _end[]; -extern int ofw_real_mode; - /* * Map of physical memory regions. */ @@ -852,8 +850,7 @@ moea64_late_bootstrap(mmu_t mmup, vm_off */ chosen = OF_finddevice("/chosen"); - if (!ofw_real_mode && chosen != -1 && - OF_getprop(chosen, "mmu", &mmui, 4) != -1) { + if (chosen != -1 && OF_getprop(chosen, "mmu", &mmui, 4) != -1) { mmu = OF_instance_to_package(mmui); if (mmu == -1 || (sz = OF_getproplen(mmu, "translations")) == -1) Copied and modified: head/sys/powerpc/booke/booke_machdep.c (from r281722, head/sys/powerpc/booke/machdep.c) ============================================================================== --- head/sys/powerpc/booke/machdep.c Sun Apr 19 01:23:12 2015 (r281722, copy source) +++ head/sys/powerpc/booke/booke_machdep.c Thu Apr 30 01:24:25 2015 (r282264) @@ -163,6 +163,7 @@ extern unsigned char __bss_start[]; extern unsigned char __sbss_start[]; extern unsigned char __sbss_end[]; extern unsigned char _end[]; +extern vm_offset_t __endkernel; /* * Bootinfo is passed to us by legacy loaders. Save the address of the @@ -170,25 +171,6 @@ extern unsigned char _end[]; */ uint32_t *bootinfo; -struct kva_md_info kmi; -struct pcpu __pcpu[MAXCPU]; -struct trapframe frame0; -int cold = 1; -long realmem = 0; -long Maxmem = 0; -char machine[] = "powerpc"; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, ""); - -int cacheline_size = 32; - -SYSCTL_INT(_machdep, CPU_CACHELINE, cacheline_size, - CTLFLAG_RD, &cacheline_size, 0, ""); - -int hw_direct_map = 0; - -static void cpu_booke_startup(void *); -SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_booke_startup, NULL); - void print_kernel_section_addr(void); void print_kenv(void); u_int booke_init(uint32_t, uint32_t); @@ -219,6 +201,16 @@ extern void *int_performance_counter; ("Handler " #handler " too far from interrupt vector base")); \ mtspr(ivor, (uintptr_t)(&handler) & 0xffffUL); +uintptr_t powerpc_init(vm_offset_t fdt, vm_offset_t, vm_offset_t, void *mdp); +void booke_cpu_init(void); + +void +booke_cpu_init(void) +{ + + pmap_mmu_install(MMU_TYPE_BOOKE, BUS_PROBE_GENERIC); +} + void ivor_setup(void) { @@ -244,90 +236,6 @@ ivor_setup(void) #endif } -static void -cpu_booke_startup(void *dummy) -{ - int indx; - unsigned long size; - - /* Initialise the decrementer-based clock. */ - decr_init(); - - /* Good {morning,afternoon,evening,night}. */ - cpu_setup(PCPU_GET(cpuid)); - - printf("real memory = %lu (%ld MB)\n", ptoa(physmem), - ptoa(physmem) / 1048576); - realmem = physmem; - - /* Display any holes after the first chunk of extended memory. */ - if (bootverbose) { - printf("Physical memory chunk(s):\n"); - for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) { - size = phys_avail[indx + 1] - phys_avail[indx]; - - printf("0x%08x - 0x%08x, %lu bytes (%lu pages)\n", - phys_avail[indx], phys_avail[indx + 1] - 1, - size, size / PAGE_SIZE); - } - } - - vm_ksubmap_init(&kmi); - - printf("avail memory = %lu (%ld MB)\n", ptoa(vm_cnt.v_free_count), - ptoa(vm_cnt.v_free_count) / 1048576); - - /* Set up buffers, so they can be used to read disk labels. */ - bufinit(); - vm_pager_bufferinit(); -} - -static char * -kenv_next(char *cp) -{ - - if (cp != NULL) { - while (*cp != 0) - cp++; - cp++; - if (*cp == 0) - cp = NULL; - } - return (cp); -} - -void -print_kenv(void) -{ - int len; - char *cp; - - debugf("loader passed (static) kenv:\n"); - if (kern_envp == NULL) { - debugf(" no env, null ptr\n"); - return; - } - debugf(" kern_envp = 0x%08x\n", (u_int32_t)kern_envp); - - len = 0; - for (cp = kern_envp; cp != NULL; cp = kenv_next(cp)) - debugf(" %x %s\n", (u_int32_t)cp, cp); -} - -void -print_kernel_section_addr(void) -{ - - debugf("kernel image addresses:\n"); - debugf(" kernel_text = 0x%08x\n", (uint32_t)kernel_text); - debugf(" _etext (sdata) = 0x%08x\n", (uint32_t)_etext); - debugf(" _edata = 0x%08x\n", (uint32_t)_edata); - debugf(" __sbss_start = 0x%08x\n", (uint32_t)__sbss_start); - debugf(" __sbss_end = 0x%08x\n", (uint32_t)__sbss_end); - debugf(" __sbss_start = 0x%08x\n", (uint32_t)__bss_start); - debugf(" _end = 0x%08x\n", (uint32_t)_end); -} - static int booke_check_for_fdt(uint32_t arg1, vm_offset_t *dtbp) { @@ -345,24 +253,20 @@ booke_check_for_fdt(uint32_t arg1, vm_of return (0); } -u_int +uintptr_t booke_init(uint32_t arg1, uint32_t arg2) { - struct pcpu *pc; - void *kmdp, *mdp; + uintptr_t ret; + void *mdp; vm_offset_t dtbp, end; -#ifdef DDB - vm_offset_t ksym_start; - vm_offset_t ksym_end; -#endif - - kmdp = NULL; end = (uintptr_t)_end; dtbp = (vm_offset_t)NULL; /* Set up TLB initially */ bootinfo = NULL; + bzero(__sbss_start, __sbss_end - __sbss_start); + bzero(__bss_start, _end - __bss_start); tlb1_init(); /* @@ -391,152 +295,22 @@ booke_init(uint32_t arg1, uint32_t arg2) memmove((void *)end, (void *)dtbp, fdt_totalsize((void *)dtbp)); dtbp = end; end += fdt_totalsize((void *)dtbp); + __endkernel = end; mdp = NULL; } else if (arg1 > (uintptr_t)kernel_text) /* FreeBSD loader */ mdp = (void *)arg1; else /* U-Boot */ mdp = NULL; - /* - * Parse metadata and fetch parameters. - */ - if (mdp != NULL) { - preload_metadata = mdp; - kmdp = preload_search_by_type("elf kernel"); - if (kmdp != NULL) { - boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int); - kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *); - dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t); - end = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); - - bootinfo = (uint32_t *)preload_search_info(kmdp, - MODINFO_METADATA | MODINFOMD_BOOTINFO); - -#ifdef DDB - ksym_start = MD_FETCH(kmdp, MODINFOMD_SSYM, uintptr_t); - ksym_end = MD_FETCH(kmdp, MODINFOMD_ESYM, uintptr_t); - db_fetch_ksymtab(ksym_start, ksym_end); -#endif - } - } else { - bzero(__sbss_start, __sbss_end - __sbss_start); - bzero(__bss_start, _end - __bss_start); - } - -#if defined(FDT_DTB_STATIC) - /* - * In case the device tree blob was not retrieved (from metadata) try - * to use the statically embedded one. - */ - if (dtbp == (vm_offset_t)NULL) - dtbp = (vm_offset_t)&fdt_static_dtb; -#endif - - if (OF_install(OFW_FDT, 0) == FALSE) - while (1); - - if (OF_init((void *)dtbp) != 0) - while (1); - - OF_interpret("perform-fixup", 0); - /* Reset TLB1 to get rid of temporary mappings */ tlb1_init(); - /* Reset Time Base */ - mttb(0); - - /* Init params/tunables that can be overridden by the loader. */ - init_param1(); - - /* Start initializing proc0 and thread0. */ - proc_linkup0(&proc0, &thread0); - thread0.td_frame = &frame0; - - /* Set up per-cpu data and store the pointer in SPR general 0. */ - pc = &__pcpu[0]; - pcpu_init(pc, 0, sizeof(struct pcpu)); - pc->pc_curthread = &thread0; -#ifdef __powerpc64__ - __asm __volatile("mr 13,%0" :: "r"(pc->pc_curthread)); -#else - __asm __volatile("mr 2,%0" :: "r"(pc->pc_curthread)); -#endif - __asm __volatile("mtsprg 0, %0" :: "r"(pc)); - - /* Initialize system mutexes. */ - mutex_init(); - - /* Initialize the console before printing anything. */ - cninit(); - - /* Print out some debug info... */ - debugf("%s: console initialized\n", __func__); - debugf(" arg3 mdp = 0x%08x\n", (u_int32_t)mdp); - debugf(" end = 0x%08x\n", (u_int32_t)end); - debugf(" boothowto = 0x%08x\n", boothowto); -#ifdef MPC85XX - debugf(" kernel ccsrbar = 0x%08x\n", CCSRBAR_VA); -#endif - debugf(" MSR = 0x%08x\n", mfmsr()); -#if defined(BOOKE_E500) - debugf(" HID0 = 0x%08x\n", mfspr(SPR_HID0)); - debugf(" HID1 = 0x%08x\n", mfspr(SPR_HID1)); - debugf(" BUCSR = 0x%08x\n", mfspr(SPR_BUCSR)); -#endif - - debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp); - - print_kernel_section_addr(); - print_kenv(); -#if defined(BOOKE_E500) - //tlb1_print_entries(); - //tlb1_print_tlbentries(); -#endif - - kdb_init(); - -#ifdef KDB - if (boothowto & RB_KDB) - kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger"); -#endif - - /* Initialise platform module */ - platform_probe_and_attach(); - - /* Initialise virtual memory. */ - pmap_mmu_install(MMU_TYPE_BOOKE, 0); - pmap_bootstrap((uintptr_t)kernel_text, end); - debugf("MSR = 0x%08x\n", mfmsr()); -#if defined(BOOKE_E500) - //tlb1_print_entries(); - //tlb1_print_tlbentries(); -#endif - - /* Initialize params/tunables that are derived from memsize. */ - init_param2(physmem); - - /* Finish setting up thread0. */ - thread0.td_pcb = (struct pcb *) - ((thread0.td_kstack + thread0.td_kstack_pages * PAGE_SIZE - - sizeof(struct pcb)) & ~15); - bzero((void *)thread0.td_pcb, sizeof(struct pcb)); - pc->pc_curpcb = thread0.td_pcb; - - /* Initialise the message buffer. */ - msgbufinit(msgbufp, msgbufsize); - - /* Enable Machine Check interrupt. */ - mtmsr(mfmsr() | PSL_ME); - isync(); + ret = powerpc_init(dtbp, 0, 0, mdp); /* Enable L1 caches */ booke_enable_l1_cache(); - debugf("%s: SP = 0x%08x\n", __func__, - ((uintptr_t)thread0.td_pcb - 16) & ~15); - - return (((uintptr_t)thread0.td_pcb - 16) & ~15); + return (ret); } #define RES_GRANULE 32 @@ -560,63 +334,6 @@ cpu_pcpu_init(struct pcpu *pcpu, int cpu #endif } -/* - * Flush the D-cache for non-DMA I/O so that the I-cache can - * be made coherent later. - */ -void -cpu_flush_dcache(void *ptr, size_t len) -{ - register_t addr, off; - - /* - * Align the address to a cacheline and adjust the length - * accordingly. Then round the length to a multiple of the - * cacheline for easy looping. - */ - addr = (uintptr_t)ptr; - off = addr & (cacheline_size - 1); - addr -= off; - len = (len + off + cacheline_size - 1) & ~(cacheline_size - 1); - - while (len > 0) { - __asm __volatile ("dcbf 0,%0" :: "r"(addr)); - __asm __volatile ("sync"); - addr += cacheline_size; - len -= cacheline_size; - } -} - -void -spinlock_enter(void) -{ - struct thread *td; - register_t msr; - - td = curthread; - if (td->td_md.md_spinlock_count == 0) { - msr = intr_disable(); - td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_msr = msr; - } else - td->td_md.md_spinlock_count++; - critical_enter(); -} - -void -spinlock_exit(void) -{ - struct thread *td; - register_t msr; - - td = curthread; - critical_exit(); - msr = td->td_md.md_saved_msr; - td->td_md.md_spinlock_count--; - if (td->td_md.md_spinlock_count == 0) - intr_restore(msr); -} - /* Shutdown the CPU as much as possible. */ void cpu_halt(void) @@ -628,17 +345,6 @@ cpu_halt(void) } int -ptrace_set_pc(struct thread *td, unsigned long addr) -{ - struct trapframe *tf; - - tf = td->td_frame; - tf->srr0 = (register_t)addr; - - return (0); -} - -int ptrace_single_step(struct thread *td) { struct trapframe *tf; @@ -680,40 +386,3 @@ kdb_cpu_set_singlestep(void) kdb_frame->srr1 |= PSL_DE; } -void -bzero(void *buf, size_t len) -{ - caddr_t p; - - p = buf; - - while (((vm_offset_t) p & (sizeof(u_long) - 1)) && len) { - *p++ = 0; - len--; - } - - while (len >= sizeof(u_long) * 8) { - *(u_long*) p = 0; - *((u_long*) p + 1) = 0; - *((u_long*) p + 2) = 0; - *((u_long*) p + 3) = 0; - len -= sizeof(u_long) * 8; - *((u_long*) p + 4) = 0; - *((u_long*) p + 5) = 0; - *((u_long*) p + 6) = 0; - *((u_long*) p + 7) = 0; - p += sizeof(u_long) * 8; - } - - while (len >= sizeof(u_long)) { - *(u_long*) p = 0; - len -= sizeof(u_long); - p += sizeof(u_long); - } - - while (len) { - *p++ = 0; - len--; - } -} - Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Thu Apr 30 00:35:45 2015 (r282263) +++ head/sys/powerpc/booke/pmap.c Thu Apr 30 01:24:25 2015 (r282264) @@ -1031,13 +1031,8 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset * Align kernel start and end address (kernel image). * Note that kernel end does not necessarily relate to kernsize. * kernsize is the size of the kernel that is actually mapped. - * Also note that "start - 1" is deliberate. With SMP, the - * entry point is exactly a page from the actual load address. - * As such, trunc_page() has no effect and we're off by a page. - * Since we always have the ELF header between the load address - * and the entry point, we can safely subtract 1 to compensate. */ - kernstart = trunc_page(start - 1); + kernstart = trunc_page(start); data_start = round_page(kernelend); data_end = data_start; Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Thu Apr 30 00:35:45 2015 (r282263) +++ head/sys/powerpc/conf/GENERIC Thu Apr 30 01:24:25 2015 (r282264) @@ -32,6 +32,7 @@ options PSIM #GDB PSIM ppc simulator options MAMBO #IBM Mambo Full System Simulator options PSERIES #PAPR-compliant systems +options FDT options SCHED_ULE #ULE scheduler options PREEMPTION #Enable kernel thread preemption options INET #InterNETworking Copied and modified: head/sys/powerpc/powerpc/machdep.c (from r281722, head/sys/powerpc/aim/machdep.c) ============================================================================== --- head/sys/powerpc/aim/machdep.c Sun Apr 19 01:23:12 2015 (r281722, copy source) +++ head/sys/powerpc/powerpc/machdep.c Thu Apr 30 01:24:25 2015 (r282264) @@ -131,7 +131,6 @@ __FBSDID("$FreeBSD$"); int cold = 1; #ifdef __powerpc64__ -extern int n_slbs; int cacheline_size = 128; #else int cacheline_size = 32; @@ -158,10 +157,6 @@ uintptr_t powerpc_init(vm_offset_t, vm_o long Maxmem = 0; long realmem = 0; -#ifndef __powerpc64__ -struct bat battable[16]; -#endif - struct kva_md_info kmi; static void @@ -229,52 +224,22 @@ extern unsigned char __sbss_start[]; extern unsigned char __sbss_end[]; extern unsigned char _end[]; -#ifndef __powerpc64__ -/* Bits for running on 64-bit systems in 32-bit mode. */ -extern void *testppc64, *testppc64size; -extern void *restorebridge, *restorebridgesize; -extern void *rfid_patch, *rfi_patch1, *rfi_patch2; -extern void *trapcode64; - -extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; -#endif - -extern void *rstcode, *rstcodeend; -extern void *trapcode, *trapcodeend; -extern void *generictrap, *generictrap64; -extern void *slbtrap, *slbtrapend; -extern void *alitrap, *aliend; -extern void *dsitrap, *dsiend; -extern void *decrint, *decrsize; -extern void *extint, *extsize; -extern void *dblow, *dbend; -extern void *imisstrap, *imisssize; -extern void *dlmisstrap, *dlmisssize; -extern void *dsmisstrap, *dsmisssize; +void aim_cpu_init(vm_offset_t toc); +void booke_cpu_init(void); uintptr_t powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp) { struct pcpu *pc; vm_offset_t startkernel, endkernel; - size_t trap_offset, trapsize; - vm_offset_t trap; void *kmdp; char *env; - register_t msr, scratch; - uint8_t *cache_check; - int cacheline_warn; - #ifndef __powerpc64__ - int ppc64; - #endif #ifdef DDB vm_offset_t ksym_start; vm_offset_t ksym_end; #endif kmdp = NULL; - trap_offset = 0; - cacheline_warn = 0; /* First guess at start/end kernel positions */ startkernel = __startkernel; @@ -307,6 +272,9 @@ powerpc_init(vm_offset_t fdt, vm_offset_ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 02:08:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F23A0D0E; Thu, 30 Apr 2015 02:08:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0CFE1940; Thu, 30 Apr 2015 02:08:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3U28aJo087790; Thu, 30 Apr 2015 02:08:36 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3U28a8S087789; Thu, 30 Apr 2015 02:08:36 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201504300208.t3U28a8S087789@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 30 Apr 2015 02:08:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282265 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 02:08:37 -0000 Author: sbruno Date: Thu Apr 30 02:08:36 2015 New Revision: 282265 URL: https://svnweb.freebsd.org/changeset/base/282265 Log: Setting PATH to anything is useless as a bare command. Its only relevant if its set in the environement of each command seperately. Move the PATH setting to the NXBMAKE variable so its picked up to find the one-off gperf build for the native-xtools target. Pointed Out by: ngie Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Apr 30 01:24:25 2015 (r282264) +++ head/Makefile.inc1 Thu Apr 30 02:08:36 2015 (r282265) @@ -1522,7 +1522,8 @@ cross-tools: .MAKE NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ - VERSION="${VERSION}" + VERSION="${VERSION}" \ + PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin NXBMAKE= ${NXBENV} ${MAKE} \ TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \ CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \ @@ -1549,7 +1550,6 @@ native-xtools: .MAKE ${NXBMAKE} DIRPRFX=${_gperf}/ depend && \ ${NXBMAKE} DIRPRFX=${_gperf}/ all && \ ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install - PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin .endif mkdir -p ${OBJTREE}/nxb-bin/bin mkdir -p ${OBJTREE}/nxb-bin/sbin From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 02:10:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 205ACE69; Thu, 30 Apr 2015 02:10:19 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBA031954; Thu, 30 Apr 2015 02:10:18 +0000 (UTC) Received: from [192.168.200.207] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id F019B193655; Thu, 30 Apr 2015 02:10:15 +0000 (UTC) Message-ID: <55418F06.5090100@ignoranthack.me> Date: Wed, 29 Apr 2015 19:10:14 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: ngie@freebsd.org CC: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282260 - head References: <201504300017.t3U0HXgf032607@svn.freebsd.org> <55417856.9020109@ignoranthack.me> <246BD160-EB31-48FD-ADBE-526C198C7937@gmail.com> <55417A43.3080704@ignoranthack.me> <092A08AC-D733-481E-B207-9276D97B97E0@gmail.com> In-Reply-To: <092A08AC-D733-481E-B207-9276D97B97E0@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 02:10:19 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 04/29/15 17:44, Garrett Cooper wrote: > On Apr 29, 2015, at 17:41, Sean Bruno > wrote: > >> Signed PGP part On 04/29/15 17:39, Garrett Cooper wrote: >>> On Apr 29, 2015, at 17:33, Sean Bruno >>> wrote: >>> >>>> Signed PGP part On 04/29/15 17:29, Garrett Cooper wrote: >>>>> This $PATH doesn’t get used though… >>>> >>>> What? As far as I can tell it does. Did I miss something >>>> obvious? Because if the PATH wasn't working, gperf wouldn't >>>> be found and the builds for a native-xtools target would fail >>>> for the gcc ARCH's >>> >>> "PATH=${PATH}:${OBJTREE}/gperf_for_gcc/usr/bin” is a >>> standalone line, without a continuation, so the value should >>> have been executed in a separate shell instance and doesn’t get >>> inherited in the environment following it. Here’s an example: >>> >>> $ make -f r282260.mk A=B echo A is: $A A is: $ cat r282260.mk >>> all: A=B echo A is: $$A $ >>> >>> Cheers! >>> >> >> Like I said, what am I missing if my broken Make-foo can't >> possibly work. Isn't PATH global to the Makefile/ENV or >> something in this contex t? > > Not unless it’s operating in a mode I’m not specifying… > > all: PATH=${PATH}:A echo path is: ${PATH} echo path is: $$PATH > > echo path is: > /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ngi e/bin > > path is: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ngie/ bin > echo path is: $PATH path is: > /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/ngi e/bin > > See r282265 as my attempt to resolve this. sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVQY8DXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k9v0IAK3GhzuzeFk6JuaVowoPltkk 5XR0ut7dgYeKpQmhRs/c4/8MVCp84t+UDHmfVUGxQNvqz4b5ODuPRtBKQOEvj/SI FUU7aGtR1mM1ymWTJdlYlwBn1tUm53AqvzadVkcQbK4xAAewbjRTiwcO3Impresp gfJ5HXp8Iu4x3XfC7LDBbz2CRzY/ULsKsTjwLrNw2ZFtwsBb2kdC6zUMUw5i/wqa Pzv6KKde4BuZ9jYKuywsOY421Y8DcvhSNMv/Ni1+ckWd3VKH1IsElRqdKgudFkDi L3i9HII4re0nLvyzPbcN5mNeuFbv4u2xikNI7tAp2ESScHUCiC8yQzDlz4EAotk= =oNLo -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 02:47:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D8F242D; Thu, 30 Apr 2015 02:47:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B91B1D7E; Thu, 30 Apr 2015 02:47:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3U2lLIv007506; Thu, 30 Apr 2015 02:47:21 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3U2lLjA007505; Thu, 30 Apr 2015 02:47:21 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201504300247.t3U2lLjA007505@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 30 Apr 2015 02:47:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282266 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 02:47:22 -0000 Author: kevlo Date: Thu Apr 30 02:47:21 2015 New Revision: 282266 URL: https://svnweb.freebsd.org/changeset/base/282266 Log: - Disable usb aggregation mode by default since it boots performance - Minor tweak PR: 199718 Submitted by: Mikhail Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Thu Apr 30 02:08:36 2015 (r282265) +++ head/sys/dev/usb/wlan/if_urtwn.c Thu Apr 30 02:47:21 2015 (r282266) @@ -2578,7 +2578,6 @@ urtwn_r88e_dma_init(struct urtwn_softc * return (EIO); /* Set number of pages for normal priority queue. */ - urtwn_write_2(sc, R92C_RQPN_NPQ, 0); urtwn_write_2(sc, R92C_RQPN_NPQ, 0x000d); urtwn_write_4(sc, R92C_RQPN, 0x808e000d); @@ -3397,16 +3396,17 @@ urtwn_init_locked(void *arg) urtwn_write_1(sc, R92C_TRXDMA_CTRL, urtwn_read_1(sc, R92C_TRXDMA_CTRL) | R92C_TRXDMA_CTRL_RXDMA_AGG_EN); - urtwn_write_1(sc, R92C_USB_SPECIAL_OPTION, - urtwn_read_1(sc, R92C_USB_SPECIAL_OPTION) | - R92C_USB_SPECIAL_OPTION_AGG_EN); urtwn_write_1(sc, R92C_RXDMA_AGG_PG_TH, 48); if (sc->chip & URTWN_CHIP_88E) urtwn_write_1(sc, R92C_RXDMA_AGG_PG_TH + 1, 4); - else + else { urtwn_write_1(sc, R92C_USB_DMA_AGG_TO, 4); - urtwn_write_1(sc, R92C_USB_AGG_TH, 8); - urtwn_write_1(sc, R92C_USB_AGG_TO, 6); + urtwn_write_1(sc, R92C_USB_SPECIAL_OPTION, + urtwn_read_1(sc, R92C_USB_SPECIAL_OPTION) | + R92C_USB_SPECIAL_OPTION_AGG_EN); + urtwn_write_1(sc, R92C_USB_AGG_TH, 8); + urtwn_write_1(sc, R92C_USB_AGG_TO, 6); + } /* Initialize beacon parameters. */ urtwn_write_2(sc, R92C_BCN_CTRL, 0x1010); From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 03:15:08 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0761D1D; Thu, 30 Apr 2015 03:15:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4C8211C6; Thu, 30 Apr 2015 03:15:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3U3F76e023239; Thu, 30 Apr 2015 03:15:07 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3U3F7J5023238; Thu, 30 Apr 2015 03:15:07 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504300315.t3U3F7J5023238@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 30 Apr 2015 03:15:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282267 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 03:15:08 -0000 Author: jhibbits Date: Thu Apr 30 03:15:07 2015 New Revision: 282267 URL: https://svnweb.freebsd.org/changeset/base/282267 Log: Missed ofw_machdep.c in r282264. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Thu Apr 30 02:47:21 2015 (r282266) +++ head/sys/powerpc/ofw/ofw_machdep.c Thu Apr 30 03:15:07 2015 (r282267) @@ -62,11 +62,12 @@ __FBSDID("$FreeBSD$"); #include #include +static void *fdt; +int ofw_real_mode; + #ifdef AIM extern register_t ofmsr[5]; extern void *openfirmware_entry; -static void *fdt; -int ofw_real_mode; char save_trap_init[0x2f00]; /* EXC_LAST */ char save_trap_of[0x2f00]; /* EXC_LAST */ @@ -336,10 +337,10 @@ ofw_mem_regions(struct mem_region *memp, *availsz = asz; } -#ifdef AIM void OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *)) { +#ifdef AIM ofmsr[0] = mfmsr(); #ifdef __powerpc64__ ofmsr[0] &= ~PSL_SF; @@ -348,22 +349,25 @@ OF_initial_setup(void *fdt_ptr, void *ju __asm __volatile("mfsprg1 %0" : "=&r"(ofmsr[2])); __asm __volatile("mfsprg2 %0" : "=&r"(ofmsr[3])); __asm __volatile("mfsprg3 %0" : "=&r"(ofmsr[4])); + openfirmware_entry = openfirm; if (ofmsr[0] & PSL_DR) ofw_real_mode = 0; else ofw_real_mode = 1; + ofw_save_trap_vec(save_trap_init); +#else + ofw_real_mode = 1; +#endif + fdt = fdt_ptr; - openfirmware_entry = openfirm; #ifdef FDT_DTB_STATIC /* Check for a statically included blob */ if (fdt == NULL) fdt = &fdt_static_dtb; #endif - - ofw_save_trap_vec(save_trap_init); } boolean_t @@ -371,6 +375,7 @@ OF_bootstrap() { boolean_t status = FALSE; +#ifdef AIM if (openfirmware_entry != NULL) { if (ofw_real_mode) { status = OF_install(OFW_STD_REAL, 0); @@ -386,18 +391,22 @@ OF_bootstrap() return status; OF_init(openfirmware); - } else if (fdt != NULL) { + } else +#endif + if (fdt != NULL) { status = OF_install(OFW_FDT, 0); if (status != TRUE) return status; OF_init(fdt); + OF_interpret("perform-fixup", 0); } return (status); } +#ifdef AIM void ofw_quiesce(void) { From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 03:20:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5AF42EBA for ; Thu, 30 Apr 2015 03:20:20 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4418E1294 for ; Thu, 30 Apr 2015 03:20:20 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t3U3KKhL045004 for ; Thu, 30 Apr 2015 03:20:20 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t3U3KKVD045000 for svn-src-head@freebsd.org; Thu, 30 Apr 2015 03:20:20 GMT (envelope-from bdrewery) Received: (qmail 27648 invoked from network); 29 Apr 2015 22:20:17 -0500 Received: from unknown (HELO blah) (freebsd@shatow.net@10.10.1.90) by sweb.xzibition.com with ESMTPA; 29 Apr 2015 22:20:17 -0500 Message-ID: <55419F71.9080505@FreeBSD.org> Date: Wed, 29 Apr 2015 22:20:17 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282265 - head References: <201504300208.t3U28a8S087789@svn.freebsd.org> In-Reply-To: <201504300208.t3U28a8S087789@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 03:20:20 -0000 On 4/29/15 9:08 PM, Sean Bruno wrote: > Author: sbruno > Date: Thu Apr 30 02:08:36 2015 > New Revision: 282265 > URL: https://svnweb.freebsd.org/changeset/base/282265 > > Log: > Setting PATH to anything is useless as a bare command. Its only relevant > if its set in the environement of each command seperately. > > Move the PATH setting to the NXBMAKE variable so its picked up to find > the one-off gperf build for the native-xtools target. > > Pointed Out by: ngie > Thanks. This does fix the cross-build native-xtools build for me for gperf. -- Regards, Bryan Drewery From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 04:44:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF1F78DD; Thu, 30 Apr 2015 04:44:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A39001ADF; Thu, 30 Apr 2015 04:44:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3U4igNf067368; Thu, 30 Apr 2015 04:44:42 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3U4igKm067367; Thu, 30 Apr 2015 04:44:42 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201504300444.t3U4igKm067367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 30 Apr 2015 04:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282268 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 04:44:42 -0000 Author: jhibbits Date: Thu Apr 30 04:44:41 2015 New Revision: 282268 URL: https://svnweb.freebsd.org/changeset/base/282268 Log: Also happened to miss this in r282264. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Apr 30 03:15:07 2015 (r282267) +++ head/sys/conf/files.powerpc Thu Apr 30 04:44:41 2015 (r282268) @@ -97,17 +97,16 @@ libkern/udivdi3.c optional powerpc libkern/umoddi3.c optional powerpc powerpc/aim/interrupt.c optional aim powerpc/aim/locore.S optional aim no-obj -powerpc/aim/machdep.c optional aim +powerpc/aim/aim_machdep.c optional aim powerpc/aim/mmu_oea.c optional aim powerpc powerpc/aim/mmu_oea64.c optional aim powerpc/aim/moea64_if.m optional aim powerpc/aim/moea64_native.c optional aim powerpc/aim/mp_cpudep.c optional aim powerpc/aim/slb.c optional aim powerpc64 -powerpc/aim/uma_machdep.c optional aim powerpc/booke/interrupt.c optional booke powerpc/booke/locore.S optional booke no-obj -powerpc/booke/machdep.c optional booke +powerpc/booke/booke_machdep.c optional booke powerpc/booke/machdep_e500.c optional booke_e500 powerpc/booke/mp_cpudep.c optional booke smp powerpc/booke/platform_bare.c optional booke @@ -195,6 +194,7 @@ powerpc/powerpc/gdb_machdep.c optional g powerpc/powerpc/in_cksum.c optional inet | inet6 powerpc/powerpc/intr_machdep.c standard powerpc/powerpc/iommu_if.m standard +powerpc/powerpc/machdep.c standard powerpc/powerpc/mem.c optional mem powerpc/powerpc/mmu_if.m standard powerpc/powerpc/mp_machdep.c optional smp @@ -217,6 +217,7 @@ powerpc/powerpc/syncicache.c standard powerpc/powerpc/sys_machdep.c standard powerpc/powerpc/trap.c standard powerpc/powerpc/uio_machdep.c standard +powerpc/powerpc/uma_machdep.c standard powerpc/powerpc/vm_machdep.c standard powerpc/ps3/ehci_ps3.c optional ps3 ehci powerpc/ps3/ohci_ps3.c optional ps3 ohci From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 07:00:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2523F64F; Thu, 30 Apr 2015 07:00:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1346F196B; Thu, 30 Apr 2015 07:00:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3U70PBB034521; Thu, 30 Apr 2015 07:00:25 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3U70PLC034520; Thu, 30 Apr 2015 07:00:25 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201504300700.t3U70PLC034520@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Thu, 30 Apr 2015 07:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282269 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 07:00:26 -0000 Author: royger Date: Thu Apr 30 07:00:25 2015 New Revision: 282269 URL: https://svnweb.freebsd.org/changeset/base/282269 Log: atkbd: remove usage of x86bios Instead of trying to get the keyboard repeat rate set by the BIOS just set a default one. This allows removing the usage of x86bios from atkbd. Sponsored by: Citrix Systems R&D Reviewed by: jkim, delphij Differential Revision: https://reviews.freebsd.org/D2399 MFC after: 2 weeks Modified: head/sys/dev/atkbdc/atkbd.c Modified: head/sys/dev/atkbdc/atkbd.c ============================================================================== --- head/sys/dev/atkbdc/atkbd.c Thu Apr 30 04:44:41 2015 (r282268) +++ head/sys/dev/atkbdc/atkbd.c Thu Apr 30 07:00:25 2015 (r282269) @@ -47,8 +47,6 @@ __FBSDID("$FreeBSD$"); #if defined(__i386__) || defined(__amd64__) #include #include -#include -#include #include #include @@ -82,6 +80,9 @@ static int atkbd_reset(KBDC kbdc, int f #define HAS_QUIRK(p, q) (((atkbdc_softc_t *)(p))->quirks & q) #define ALLOW_DISABLE_KBD(kbdc) !HAS_QUIRK(kbdc, KBDC_QUIRK_KEEP_ACTIVATED) +#define DEFAULT_DELAY 0x1 /* 500ms */ +#define DEFAULT_RATE 0x10 /* 14Hz */ + int atkbd_probe_unit(device_t dev, int irq, int flags) { @@ -249,7 +250,7 @@ static keyboard_switch_t atkbdsw = { KEYBOARD_DRIVER(atkbd, atkbdsw, atkbd_configure); /* local functions */ -static int get_typematic(keyboard_t *kbd); +static int set_typematic(keyboard_t *kbd); static int setup_kbd_port(KBDC kbdc, int port, int intr); static int get_kbd_echo(KBDC kbdc); static int probe_keyboard(KBDC kbdc, int flags); @@ -443,7 +444,7 @@ atkbd_init(int unit, keyboard_t **kbdp, goto bad; } atkbd_ioctl(kbd, KDSETLED, (caddr_t)&state->ks_state); - get_typematic(kbd); + set_typematic(kbd); delay[0] = kbd->kb_delay1; delay[1] = kbd->kb_delay2; atkbd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); @@ -503,7 +504,7 @@ atkbd_intr(keyboard_t *kbd, void *arg) init_keyboard(state->kbdc, &kbd->kb_type, kbd->kb_config); KBD_FOUND_DEVICE(kbd); atkbd_ioctl(kbd, KDSETLED, (caddr_t)&state->ks_state); - get_typematic(kbd); + set_typematic(kbd); delay[0] = kbd->kb_delay1; delay[1] = kbd->kb_delay2; atkbd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay); @@ -1135,57 +1136,19 @@ atkbd_reset(KBDC kbdc, int flags, int c) /* local functions */ static int -get_typematic(keyboard_t *kbd) +set_typematic(keyboard_t *kbd) { -#if defined(__i386__) || defined(__amd64__) - /* - * Only some systems allow us to retrieve the keyboard repeat - * rate previously set via the BIOS... - */ - x86regs_t regs; - uint8_t *p; + int val, error; + atkbd_state_t *state = kbd->kb_data; - /* - * Traditional entry points of int 0x15 and 0x16 are fixed - * and later BIOSes follow them. (U)EFI CSM specification - * also mandates these fixed entry points. - * - * Validate the entry points here before we proceed further. - * It's known that some recent laptops does not have the - * same entry point and hang on boot if we call it. - */ - if (x86bios_get_intr(0x15) != 0xf000f859 || - x86bios_get_intr(0x16) != 0xf000e82e) - return (ENODEV); - - /* Is BIOS system configuration table supported? */ - x86bios_init_regs(®s); - regs.R_AH = 0xc0; - x86bios_intr(®s, 0x15); - if ((regs.R_FLG & PSL_C) != 0 || regs.R_AH != 0) - return (ENODEV); - - /* Is int 0x16, function 0x09 supported? */ - p = x86bios_offset((regs.R_ES << 4) + regs.R_BX); - if (readw(p) < 5 || (readb(p + 6) & 0x40) == 0) - return (ENODEV); - - /* Is int 0x16, function 0x0306 supported? */ - x86bios_init_regs(®s); - regs.R_AH = 0x09; - x86bios_intr(®s, 0x16); - if ((regs.R_AL & 0x08) == 0) - return (ENODEV); - - x86bios_init_regs(®s); - regs.R_AX = 0x0306; - x86bios_intr(®s, 0x16); - kbd->kb_delay1 = typematic_delay(regs.R_BH << 5); - kbd->kb_delay2 = typematic_rate(regs.R_BL); - return (0); -#else - return (ENODEV); -#endif /* __i386__ || __amd64__ */ + val = typematic(DEFAULT_DELAY, DEFAULT_RATE); + error = write_kbd(state->kbdc, KBDC_SET_TYPEMATIC, val); + if (error == 0) { + kbd->kb_delay1 = typematic_delay(val); + kbd->kb_delay2 = typematic_rate(val); + } + + return (error); } static int From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 12:55:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96C75A93; Thu, 30 Apr 2015 12:55:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 840A0153A; Thu, 30 Apr 2015 12:55:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UCtSsM008226; Thu, 30 Apr 2015 12:55:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UCtSG5008224; Thu, 30 Apr 2015 12:55:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201504301255.t3UCtSG5008224@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 30 Apr 2015 12:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282272 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 12:55:28 -0000 Author: trasz Date: Thu Apr 30 12:55:27 2015 New Revision: 282272 URL: https://svnweb.freebsd.org/changeset/base/282272 Log: Remove oldnfs remnants from nfsd(8). Reviewed by: rmacklem@ Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/nfsd/nfsd.8 head/usr.sbin/nfsd/nfsd.c Modified: head/usr.sbin/nfsd/nfsd.8 ============================================================================== --- head/usr.sbin/nfsd/nfsd.8 Thu Apr 30 12:44:20 2015 (r282271) +++ head/usr.sbin/nfsd/nfsd.8 Thu Apr 30 12:55:27 2015 (r282272) @@ -28,7 +28,7 @@ .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd January 1, 2015 +.Dd April 25, 2015 .Dt NFSD 8 .Os .Sh NAME @@ -38,7 +38,7 @@ server .Sh SYNOPSIS .Nm -.Op Fl arduteo +.Op Fl ardute .Op Fl n Ar num_servers .Op Fl h Ar bindip .Op Fl Fl maxthreads Ar max_threads @@ -112,10 +112,7 @@ Serve .Tn UDP NFS clients. .It Fl e -Enable NFSv4 support. -It is enabled by default; this option should be considered deprecated. -.It Fl o -Disable NFSv4 support. +Ignored; included for backward compatibility. .El .Pp For example, Modified: head/usr.sbin/nfsd/nfsd.c ============================================================================== --- head/usr.sbin/nfsd/nfsd.c Thu Apr 30 12:44:20 2015 (r282271) +++ head/usr.sbin/nfsd/nfsd.c Thu Apr 30 12:55:27 2015 (r282272) @@ -87,8 +87,6 @@ static int nfsdcnt; /* number of childr static int nfsdcnt_set; static int minthreads; static int maxthreads; -static int new_syscall; -static int run_v4server = 1; /* Force running of nfsv4 server */ static int nfssvc_nfsd; /* Set to correct NFSSVC_xxx flag */ static int stablefd = -1; /* Fd for the stable restart file */ static int backupfd; /* Fd for the backup stable restart file */ @@ -156,7 +154,7 @@ main(int argc, char **argv) socklen_t len; int on = 1, unregister, reregister, sock; int tcp6sock, ip6flag, tcpflag, tcpsock; - int udpflag, ecode, error, s, srvcnt; + int udpflag, ecode, error, s; int bindhostc, bindanyflag, rpcbreg, rpcbregcnt; int nfssvc_addsock; int longindex = 0; @@ -167,10 +165,10 @@ main(int argc, char **argv) nfsdcnt = DEFNFSDCNT; unregister = reregister = tcpflag = maxsock = 0; bindanyflag = udpflag = connect_type_cnt = bindhostc = 0; - getopt_shortopts = "ah:n:rdtueo"; + getopt_shortopts = "ah:n:rdtue"; getopt_usage = "usage:\n" - " nfsd [-ardtueo] [-h bindip]\n" + " nfsd [-ardtue] [-h bindip]\n" " [-n numservers] [--minthreads #] [--maxthreads #]\n"; while ((ch = getopt_long(argc, argv, getopt_shortopts, longopts, &longindex)) != -1) @@ -205,9 +203,6 @@ main(int argc, char **argv) case 'e': /* now a no-op, since this is the default */ break; - case 'o': - run_v4server = 0; - break; case 0: lopt = longopts[longindex].name; if (!strcmp(lopt, "minthreads")) { @@ -242,15 +237,9 @@ main(int argc, char **argv) * Unless the "-o" option was specified, try and run "nfsd". * If "-o" was specified, try and run "nfsserver". */ - if (run_v4server > 0) { - if (modfind("nfsd") < 0) { - /* Not present in kernel, try loading it */ - if (kldload("nfsd") < 0 || modfind("nfsd") < 0) - errx(1, "NFS server is not available"); - } - } else if (modfind("nfsserver") < 0) { + if (modfind("nfsd") < 0) { /* Not present in kernel, try loading it */ - if (kldload("nfsserver") < 0 || modfind("nfsserver") < 0) + if (kldload("nfsd") < 0 || modfind("nfsd") < 0) errx(1, "NFS server is not available"); } @@ -392,55 +381,21 @@ main(int argc, char **argv) * level write-back caching. (See SCSI doc for more information * on how to prevent write-back caching on SCSI disks.) */ - if (run_v4server > 0) { - open_stable(&stablefd, &backupfd); - if (stablefd < 0) { - syslog(LOG_ERR, "Can't open %s: %m\n", NFSD_STABLERESTART); - exit(1); - } - /* This system call will fail for old kernels, but that's ok. */ - nfssvc(NFSSVC_BACKUPSTABLE, NULL); - if (nfssvc(NFSSVC_STABLERESTART, (caddr_t)&stablefd) < 0) { - syslog(LOG_ERR, "Can't read stable storage file: %m\n"); - exit(1); - } - nfssvc_addsock = NFSSVC_NFSDADDSOCK; - nfssvc_nfsd = NFSSVC_NFSDNFSD; - new_syscall = TRUE; - } else { - nfssvc_addsock = NFSSVC_ADDSOCK; - nfssvc_nfsd = NFSSVC_NFSD; - /* - * Figure out if the kernel supports the new-style - * NFSSVC_NFSD. Old kernels will return ENXIO because they - * don't recognise the flag value, new ones will return EINVAL - * because argp is NULL. - */ - new_syscall = FALSE; - if (nfssvc(NFSSVC_NFSD, NULL) < 0 && errno == EINVAL) - new_syscall = TRUE; + open_stable(&stablefd, &backupfd); + if (stablefd < 0) { + syslog(LOG_ERR, "Can't open %s: %m\n", NFSD_STABLERESTART); + exit(1); + } + /* This system call will fail for old kernels, but that's ok. */ + nfssvc(NFSSVC_BACKUPSTABLE, NULL); + if (nfssvc(NFSSVC_STABLERESTART, (caddr_t)&stablefd) < 0) { + syslog(LOG_ERR, "Can't read stable storage file: %m\n"); + exit(1); } + nfssvc_addsock = NFSSVC_NFSDADDSOCK; + nfssvc_nfsd = NFSSVC_NFSDNFSD; - if (!new_syscall) { - /* If we use UDP only, we start the last server below. */ - srvcnt = tcpflag ? nfsdcnt : nfsdcnt - 1; - for (i = 0; i < srvcnt; i++) { - switch ((pid = fork())) { - case -1: - syslog(LOG_ERR, "fork: %m"); - nfsd_exit(1); - case 0: - break; - default: - children[i] = pid; - continue; - } - (void)signal(SIGUSR1, child_cleanup); - setproctitle("server"); - - start_server(0); - } - } else if (tcpflag) { + if (tcpflag) { /* * For TCP mode, we fork once to start the first * kernel nfsd thread. The kernel will add more @@ -976,11 +931,6 @@ get_tuned_nfsdcount(void) } else { tuned_nfsdcnt = ncpu * 8; } - if (!new_syscall && tuned_nfsdcnt > MAXNFSDCNT) { - warnx("nfsd count %d; truncated to %d", tuned_nfsdcnt, - MAXNFSDCNT); - tuned_nfsdcnt = MAXNFSDCNT; - } return tuned_nfsdcnt; } @@ -994,55 +944,48 @@ start_server(int master) struct addrinfo *aip, hints; status = 0; - if (new_syscall) { - gethostname(hostname, sizeof (hostname)); - snprintf(principal, sizeof (principal), "nfs@%s", hostname); - if ((cp = strchr(hostname, '.')) == NULL || - *(cp + 1) == '\0') { - /* If not fully qualified, try getaddrinfo() */ - memset((void *)&hints, 0, sizeof (hints)); - hints.ai_flags = AI_CANONNAME; - error = getaddrinfo(hostname, NULL, &hints, &aip); - if (error == 0) { - if (aip->ai_canonname != NULL && - (cp = strchr(aip->ai_canonname, '.')) != - NULL && *(cp + 1) != '\0') - snprintf(principal, sizeof (principal), - "nfs@%s", aip->ai_canonname); - freeaddrinfo(aip); - } - } - nfsdargs.principal = principal; - - if (nfsdcnt_set) - nfsdargs.minthreads = nfsdargs.maxthreads = nfsdcnt; - else { - nfsdargs.minthreads = minthreads_set ? minthreads : get_tuned_nfsdcount(); - nfsdargs.maxthreads = maxthreads_set ? maxthreads : nfsdargs.minthreads; - if (nfsdargs.maxthreads < nfsdargs.minthreads) - nfsdargs.maxthreads = nfsdargs.minthreads; - } + gethostname(hostname, sizeof (hostname)); + snprintf(principal, sizeof (principal), "nfs@%s", hostname); + if ((cp = strchr(hostname, '.')) == NULL || + *(cp + 1) == '\0') { + /* If not fully qualified, try getaddrinfo() */ + memset((void *)&hints, 0, sizeof (hints)); + hints.ai_flags = AI_CANONNAME; + error = getaddrinfo(hostname, NULL, &hints, &aip); + if (error == 0) { + if (aip->ai_canonname != NULL && + (cp = strchr(aip->ai_canonname, '.')) != + NULL && *(cp + 1) != '\0') + snprintf(principal, sizeof (principal), + "nfs@%s", aip->ai_canonname); + freeaddrinfo(aip); + } + } + nfsdargs.principal = principal; + + if (nfsdcnt_set) + nfsdargs.minthreads = nfsdargs.maxthreads = nfsdcnt; + else { + nfsdargs.minthreads = minthreads_set ? minthreads : get_tuned_nfsdcount(); + nfsdargs.maxthreads = maxthreads_set ? maxthreads : nfsdargs.minthreads; + if (nfsdargs.maxthreads < nfsdargs.minthreads) + nfsdargs.maxthreads = nfsdargs.minthreads; + } + error = nfssvc(nfssvc_nfsd, &nfsdargs); + if (error < 0 && errno == EAUTH) { + /* + * This indicates that it could not register the + * rpcsec_gss credentials, usually because the + * gssd daemon isn't running. + * (only the experimental server with nfsv4) + */ + syslog(LOG_ERR, "No gssd, using AUTH_SYS only"); + principal[0] = '\0'; error = nfssvc(nfssvc_nfsd, &nfsdargs); - if (error < 0 && errno == EAUTH) { - /* - * This indicates that it could not register the - * rpcsec_gss credentials, usually because the - * gssd daemon isn't running. - * (only the experimental server with nfsv4) - */ - syslog(LOG_ERR, "No gssd, using AUTH_SYS only"); - principal[0] = '\0'; - error = nfssvc(nfssvc_nfsd, &nfsdargs); - } - if (error < 0) { - syslog(LOG_ERR, "nfssvc: %m"); - status = 1; - } - } else { - if (nfssvc(NFSSVC_OLDNFSD, NULL) < 0) { - syslog(LOG_ERR, "nfssvc: %m"); - status = 1; - } + } + if (error < 0) { + syslog(LOG_ERR, "nfssvc: %m"); + status = 1; } if (master) nfsd_exit(status); From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 15:25:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A83E5AE9; Thu, 30 Apr 2015 15:25:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9696317E7; Thu, 30 Apr 2015 15:25:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UFPVGV083601; Thu, 30 Apr 2015 15:25:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UFPV8o083600; Thu, 30 Apr 2015 15:25:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504301525.t3UFPV8o083600@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 30 Apr 2015 15:25:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282273 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 15:25:31 -0000 Author: jhb Date: Thu Apr 30 15:25:30 2015 New Revision: 282273 URL: https://svnweb.freebsd.org/changeset/base/282273 Log: Update this page to note that XENHVM now works on i386. (It shipped enabled in GENERIC in 10.0.) Reviewed by: royger (earlier version) MFC after: 1 week Modified: head/share/man/man4/xen.4 Modified: head/share/man/man4/xen.4 ============================================================================== --- head/share/man/man4/xen.4 Thu Apr 30 12:55:27 2015 (r282272) +++ head/share/man/man4/xen.4 Thu Apr 30 15:25:30 2015 (r282273) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 17, 2010 +.Dd April 30, 2015 .Dt XEN 4 .Os .Sh NAME @@ -44,8 +44,8 @@ the following lines in your kernel confi .Ed .Pp To compile hardware-assisted virtualization (HVM) Xen guest support with -para-virtualized drivers into an amd64 kernel, place the following lines in -your kernel configuration file: +para-virtualized drivers into an amd64 or i386 kernel, +place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "options XENHVM" .Cd "device xenpci" @@ -176,9 +176,6 @@ is only able to run as a Xen guest (DomU A fully para-virtualized (PV) kernel is only supported on i386, and not amd64. .Pp -Para-virtualized drivers under hardware-assisted virtualization (HVM) kernel -are only supported on amd64, not i386. -.Pp As of this release, Xen PV DomU support is not heavily tested; instability has been reported during VM migration of PV kernels. .Pp From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 15:48:54 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A04E20A; Thu, 30 Apr 2015 15:48:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E89011A6E; Thu, 30 Apr 2015 15:48:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UFmrt4093964; Thu, 30 Apr 2015 15:48:53 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UFmnKt093935; Thu, 30 Apr 2015 15:48:49 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504301548.t3UFmnKt093935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 30 Apr 2015 15:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282274 - in head: share/man/man4 sys/amd64/include/xen sys/conf sys/dev/xen/balloon sys/dev/xen/blkback sys/dev/xen/control sys/dev/xen/grant_table sys/dev/xen/netback sys/dev/xen/netf... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 15:48:54 -0000 Author: jhb Date: Thu Apr 30 15:48:48 2015 New Revision: 282274 URL: https://svnweb.freebsd.org/changeset/base/282274 Log: Remove support for Xen PV domU kernels. Support for HVM domU kernels remains. Xen is planning to phase out support for PV upstream since it is harder to maintain and has more overhead. Modern x86 CPUs include virtualization extensions that support HVM guests instead of PV guests. In addition, the PV code was i386 only and not as well maintained recently as the HVM code. - Remove the i386-only NATIVE option that was used to disable certain components for PV kernels. These components are now standard as they are on amd64. - Remove !XENHVM bits from PV drivers. - Remove various shims required for XEN (e.g. PT_UPDATES_FLUSH, LOAD_CR3, etc.) - Remove duplicate copy of . - Remove unused, i386-only xenstored.h. Differential Revision: https://reviews.freebsd.org/D2362 Reviewed by: royger Tested by: royger (i386/amd64 HVM domU and amd64 PVH dom0) Relnotes: yes Deleted: head/sys/amd64/include/xen/xenpmap.h head/sys/i386/conf/XEN head/sys/i386/include/xen/features.h head/sys/i386/include/xen/xenpmap.h head/sys/i386/include/xen/xenstored.h head/sys/i386/xen/ Modified: head/share/man/man4/xen.4 head/sys/amd64/include/xen/xenfunc.h head/sys/amd64/include/xen/xenvar.h head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/options.i386 head/sys/dev/xen/balloon/balloon.c head/sys/dev/xen/blkback/blkback.c head/sys/dev/xen/control/control.c head/sys/dev/xen/grant_table/grant_table.c head/sys/dev/xen/netback/netback.c head/sys/dev/xen/netfront/netfront.c head/sys/i386/conf/DEFAULTS head/sys/i386/i386/apic_vector.s head/sys/i386/i386/genassym.c head/sys/i386/i386/machdep.c head/sys/i386/i386/minidump_machdep.c head/sys/i386/i386/support.s head/sys/i386/i386/swtch.s head/sys/i386/i386/sys_machdep.c head/sys/i386/i386/vm_machdep.c head/sys/i386/include/asmacros.h head/sys/i386/include/cpufunc.h head/sys/i386/include/intr_machdep.h head/sys/i386/include/pcpu.h head/sys/i386/include/pmap.h head/sys/i386/include/segments.h head/sys/i386/include/smp.h head/sys/i386/include/vmparam.h head/sys/i386/include/xen/hypercall.h head/sys/i386/include/xen/xen-os.h head/sys/i386/include/xen/xenfunc.h head/sys/i386/include/xen/xenvar.h head/sys/i386/isa/npx.c head/sys/i386/pci/pci_cfgreg.c head/sys/i386/pci/pci_pir.c head/sys/kern/kern_intr.c head/sys/kern/kern_synch.c head/sys/kern/subr_param.c head/sys/kern/subr_trap.c head/sys/vm/vm_page.c head/sys/x86/include/segments.h head/sys/x86/x86/busdma_bounce.c head/sys/x86/x86/cpu_machdep.c head/sys/x86/x86/identcpu.c head/sys/x86/x86/intr_machdep.c head/sys/x86/x86/local_apic.c head/sys/x86/xen/xen_intr.c head/sys/x86/xen/xen_nexus.c Modified: head/share/man/man4/xen.4 ============================================================================== --- head/share/man/man4/xen.4 Thu Apr 30 15:25:30 2015 (r282273) +++ head/share/man/man4/xen.4 Thu Apr 30 15:48:48 2015 (r282274) @@ -35,14 +35,6 @@ .Nm xen .Nd Xen Hypervisor Guest (DomU) Support .Sh SYNOPSIS -To compile para-virtualized (PV) Xen guest support into an i386 kernel, place -the following lines in your kernel configuration file: -.Bd -ragged -offset indent -.Cd "options PAE" -.Cd "options XEN" -.Cd "nooptions NATIVE" -.Ed -.Pp To compile hardware-assisted virtualization (HVM) Xen guest support with para-virtualized drivers into an amd64 or i386 kernel, place the following lines in your kernel configuration file: @@ -69,34 +61,14 @@ and hence able to optimize certain behav semantics. .Pp .Fx -supports a fully para-virtualized (PV) kernel on the i386 architecture using -.Cd "options XEN" -and -.Cd "nooptions NATIVE" ; -currently, this requires use of a PAE kernel, enabled via -.Cd "options PAE" . -.Pp -.Fx -supports hardware-assisted virtualization (HVM) on both the i386 and amd64 -kernels; however, PV device drivers with an HVM kernel are only supported on -the amd64 architecture, and require -.Cd "options XENHVM" -and -.Cd "device xenpci" . +supports hardware-assisted virtualization (HVM) on both i386 and amd64 +kernels. .Pp Para-virtualized device drivers are required in order to support certain functionality, such as processing management requests, returning idle physical memory pages to the hypervisor, etc. .Ss Xen DomU device drivers -Xen para-virtualized drivers are automatically added to the kernel if a PV -kernel is compiled using -.Cd "options XEN" ; -for HVM environments, -.Cd "options XENHVM" -and -.Cd "device xenpci" -are required. -The follow drivers are supported: +These para-virtualized drivers are supported: .Bl -hang -offset indent -width blkfront .It Nm balloon Allow physical memory pages to be returned to the hypervisor as a result of @@ -148,8 +120,6 @@ It is recommended that adaptive locking .Cd "options NO_ADAPTIVE_RWLOCKS" .Cd "options NO_ADAPTIVE_SX" .Ed -.Sh SEE ALSO -.Xr pae 4 .Sh HISTORY Support for .Nm @@ -173,9 +143,6 @@ This manual page was written by .Fx is only able to run as a Xen guest (DomU) and not as a Xen host (Dom0). .Pp -A fully para-virtualized (PV) kernel is only supported on i386, and not -amd64. -.Pp As of this release, Xen PV DomU support is not heavily tested; instability has been reported during VM migration of PV kernels. .Pp Modified: head/sys/amd64/include/xen/xenfunc.h ============================================================================== --- head/sys/amd64/include/xen/xenfunc.h Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/amd64/include/xen/xenfunc.h Thu Apr 30 15:48:48 2015 (r282274) @@ -29,12 +29,7 @@ #ifndef _XEN_XENFUNC_H_ #define _XEN_XENFUNC_H_ -#ifdef XENHVM #include -#else -#include -#include -#endif #define BKPT __asm__("int3"); #define XPQ_CALL_DEPTH 5 @@ -64,10 +59,6 @@ void _xen_machphys_update(vm_paddr_t, vm #define xen_machphys_update(a, b) _xen_machphys_update((a), (b), NULL, 0) #endif -#ifndef XENHVM -void xen_update_descriptor(union descriptor *, union descriptor *); -#endif - extern struct mtx balloon_lock; #if 0 #define balloon_lock(__flags) mtx_lock_irqsave(&balloon_lock, __flags) Modified: head/sys/amd64/include/xen/xenvar.h ============================================================================== --- head/sys/amd64/include/xen/xenvar.h Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/amd64/include/xen/xenvar.h Thu Apr 30 15:48:48 2015 (r282274) @@ -48,68 +48,7 @@ if (xendebug_flags & argflags) XENPRINTF #define TRACE_DEBUG(argflags, _f, _a...) #endif -#ifdef XENHVM - -static inline vm_paddr_t -phystomach(vm_paddr_t pa) -{ - - return (pa); -} - -static inline vm_paddr_t -machtophys(vm_paddr_t ma) -{ - - return (ma); -} - #define vtomach(va) pmap_kextract((vm_offset_t) (va)) -#define PFNTOMFN(pa) (pa) -#define MFNTOPFN(ma) (ma) - -#define set_phys_to_machine(pfn, mfn) ((void)0) -#define phys_to_machine_mapping_valid(pfn) (TRUE) -#define PT_UPDATES_FLUSH() ((void)0) - -#else - -extern xen_pfn_t *xen_phys_machine; - - -extern xen_pfn_t *xen_machine_phys; -/* Xen starts physical pages after the 4MB ISA hole - - * FreeBSD doesn't - */ - - -#undef ADD_ISA_HOLE /* XXX */ - -#ifdef ADD_ISA_HOLE -#define ISA_INDEX_OFFSET 1024 -#define ISA_PDR_OFFSET 1 -#else -#define ISA_INDEX_OFFSET 0 -#define ISA_PDR_OFFSET 0 -#endif - - -#define PFNTOMFN(i) (xen_phys_machine[(i)]) -#define MFNTOPFN(i) ((vm_paddr_t)xen_machine_phys[(i)]) - -#define VTOP(x) ((((uintptr_t)(x))) - KERNBASE) -#define PTOV(x) (((uintptr_t)(x)) + KERNBASE) - -#define VTOPFN(x) (VTOP(x) >> PAGE_SHIFT) -#define PFNTOV(x) PTOV((vm_paddr_t)(x) << PAGE_SHIFT) - -#define VTOMFN(va) (vtomach(va) >> PAGE_SHIFT) -#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) - -#define phystomach(pa) (((vm_paddr_t)(PFNTOMFN((pa) >> PAGE_SHIFT))) << PAGE_SHIFT) -#define machtophys(ma) (((vm_paddr_t)(MFNTOPFN((ma) >> PAGE_SHIFT))) << PAGE_SHIFT) - -#endif void xpq_init(void); Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/conf/files Thu Apr 30 15:48:48 2015 (r282274) @@ -2676,24 +2676,24 @@ 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 | xenhvm -dev/xen/console/xencons_ring.c optional xen | xenhvm -dev/xen/control/control.c optional xen | xenhvm -dev/xen/grant_table/grant_table.c optional xen | xenhvm -dev/xen/netback/netback.c optional xen | xenhvm -dev/xen/netfront/netfront.c optional xen | xenhvm +dev/xen/balloon/balloon.c optional xenhvm +dev/xen/blkfront/blkfront.c optional xenhvm +dev/xen/blkback/blkback.c optional xenhvm +dev/xen/console/console.c optional xenhvm +dev/xen/console/xencons_ring.c optional xenhvm +dev/xen/control/control.c optional xenhvm +dev/xen/grant_table/grant_table.c optional xenhvm +dev/xen/netback/netback.c optional xenhvm +dev/xen/netfront/netfront.c optional xenhvm dev/xen/xenpci/xenpci.c optional xenpci -dev/xen/timer/timer.c optional xen | xenhvm -dev/xen/pvcpu/pvcpu.c optional xen | xenhvm -dev/xen/xenstore/xenstore.c optional xen | xenhvm -dev/xen/xenstore/xenstore_dev.c optional xen | xenhvm -dev/xen/xenstore/xenstored_dev.c optional xen | xenhvm -dev/xen/evtchn/evtchn_dev.c optional xen | xenhvm -dev/xen/privcmd/privcmd.c optional xen | xenhvm -dev/xen/debug/debug.c optional xen | xenhvm +dev/xen/timer/timer.c optional xenhvm +dev/xen/pvcpu/pvcpu.c optional xenhvm +dev/xen/xenstore/xenstore.c optional xenhvm +dev/xen/xenstore/xenstore_dev.c optional xenhvm +dev/xen/xenstore/xenstored_dev.c optional xenhvm +dev/xen/evtchn/evtchn_dev.c optional xenhvm +dev/xen/privcmd/privcmd.c optional xenhvm +dev/xen/debug/debug.c optional xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/autofs/autofs.c optional autofs @@ -4043,13 +4043,13 @@ vm/vm_reserv.c standard vm/vm_unix.c standard vm/vm_zeroidle.c standard vm/vnode_pager.c standard -xen/features.c optional xen | xenhvm -xen/xenbus/xenbus_if.m optional xen | xenhvm -xen/xenbus/xenbus.c optional xen | xenhvm -xen/xenbus/xenbusb_if.m optional xen | xenhvm -xen/xenbus/xenbusb.c optional xen | xenhvm -xen/xenbus/xenbusb_front.c optional xen | xenhvm -xen/xenbus/xenbusb_back.c optional xen | xenhvm +xen/features.c optional xenhvm +xen/xenbus/xenbus_if.m optional xenhvm +xen/xenbus/xenbus.c optional xenhvm +xen/xenbus/xenbusb_if.m optional xenhvm +xen/xenbus/xenbusb.c optional xenhvm +xen/xenbus/xenbusb_front.c optional xenhvm +xen/xenbus/xenbusb_back.c optional xenhvm xdr/xdr.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_array.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_mbuf.c optional krpc | nfslockd | nfscl | nfsd Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/conf/files.amd64 Thu Apr 30 15:48:48 2015 (r282274) @@ -577,7 +577,7 @@ x86/x86/pvclock.c standard x86/x86/tsc.c standard x86/x86/delay.c standard x86/xen/hvm.c optional xenhvm -x86/xen/xen_intr.c optional xen | xenhvm +x86/xen/xen_intr.c optional xenhvm x86/xen/pv.c optional xenhvm x86/xen/pvcpu_enum.c optional xenhvm x86/xen/xen_apic.c optional xenhvm Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/conf/files.i386 Thu Apr 30 15:48:48 2015 (r282274) @@ -428,16 +428,15 @@ i386/bios/smapi_bios.S optional smapi i386/i386/atomic.c standard \ compile-with "${CC} -c ${CFLAGS} ${DEFINED_PROF:S/^$/-fomit-frame-pointer/} ${.IMPSRC}" i386/i386/autoconf.c standard -i386/i386/bios.c optional native -i386/i386/bioscall.s optional native +i386/i386/bios.c standard +i386/i386/bioscall.s standard i386/i386/bpf_jit_machdep.c optional bpf_jitter i386/i386/db_disasm.c optional ddb i386/i386/db_interface.c optional ddb i386/i386/db_trace.c optional ddb i386/i386/elan-mmcr.c optional cpu_elan | cpu_soekris i386/i386/elf_machdep.c standard -i386/i386/exception.s optional native -i386/xen/exception.s optional xen +i386/i386/exception.s standard i386/i386/gdb_machdep.c optional gdb i386/i386/geode.c optional cpu_geode i386/i386/i686_mem.c optional mem @@ -445,22 +444,17 @@ i386/i386/in_cksum.c optional inet | in i386/i386/initcpu.c standard i386/i386/io.c optional io i386/i386/k6_mem.c optional mem -i386/i386/locore.s optional native no-obj -i386/xen/locore.s optional xen no-obj +i386/i386/locore.s standard no-obj i386/i386/longrun.c optional cpu_enable_longrun i386/i386/machdep.c standard -i386/xen/xen_machdep.c optional xen i386/i386/mem.c optional mem i386/i386/minidump_machdep.c standard i386/i386/mp_clock.c optional smp -i386/i386/mp_machdep.c optional native smp -i386/xen/mp_machdep.c optional xen smp +i386/i386/mp_machdep.c optional smp i386/i386/mp_watchdog.c optional mp_watchdog smp -i386/i386/mpboot.s optional smp native -i386/xen/mptable.c optional apic xen +i386/i386/mpboot.s optional smp i386/i386/perfmon.c optional perfmon -i386/i386/pmap.c optional native -i386/xen/pmap.c optional xen +i386/i386/pmap.c standard i386/i386/ptrace_machdep.c standard i386/i386/stack_machdep.c optional ddb | stack i386/i386/support.s standard @@ -489,7 +483,6 @@ i386/ibcs2/ibcs2_util.c optional ibcs2 i386/ibcs2/ibcs2_xenix.c optional ibcs2 i386/ibcs2/ibcs2_xenix_sysent.c optional ibcs2 i386/ibcs2/imgact_coff.c optional ibcs2 -i386/xen/clock.c optional xen i386/isa/elink.c optional ep | ie i386/isa/npx.c optional npx i386/isa/pmtimer.c optional pmtimer @@ -566,9 +559,9 @@ x86/iommu/intel_qi.c optional acpi acpi x86/iommu/intel_quirks.c optional acpi acpi_dmar pci x86/iommu/intel_utils.c optional acpi acpi_dmar pci x86/isa/atpic.c optional atpic -x86/isa/atrtc.c optional native -x86/isa/clock.c optional native -x86/isa/elcr.c optional atpic | apic native +x86/isa/atrtc.c standard +x86/isa/clock.c standard +x86/isa/elcr.c optional atpic | apic x86/isa/isa.c optional isa x86/isa/isa_dma.c optional isa x86/isa/nmi.c standard @@ -583,20 +576,20 @@ x86/x86/fdt_machdep.c optional fdt x86/x86/identcpu.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic -x86/x86/legacy.c optional native +x86/x86/legacy.c standard x86/x86/local_apic.c optional apic x86/x86/mca.c standard -x86/x86/mptable.c optional apic native -x86/x86/mptable_pci.c optional apic native pci -x86/x86/mp_x86.c optional native smp +x86/x86/mptable.c optional apic +x86/x86/mptable_pci.c optional apic pci +x86/x86/mp_x86.c optional smp x86/x86/msi.c optional apic pci x86/x86/nexus.c standard x86/x86/tsc.c standard x86/x86/pvclock.c standard x86/x86/delay.c standard x86/xen/hvm.c optional xenhvm -x86/xen/xen_intr.c optional xen | xenhvm +x86/xen/xen_intr.c optional xenhvm x86/xen/xen_apic.c optional xenhvm -x86/xen/xenpv.c optional xen | xenhvm -x86/xen/xen_nexus.c optional xen | xenhvm -x86/xen/xen_msi.c optional xen | xenhvm +x86/xen/xenpv.c optional xenhvm +x86/xen/xen_nexus.c optional xenhvm +x86/xen/xen_msi.c optional xenhvm Modified: head/sys/conf/options.i386 ============================================================================== --- head/sys/conf/options.i386 Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/conf/options.i386 Thu Apr 30 15:48:48 2015 (r282274) @@ -121,8 +121,6 @@ NPX_DEBUG opt_npx.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h -NATIVE opt_global.h -XEN opt_global.h XENHVM opt_global.h HYPERV opt_global.h Modified: head/sys/dev/xen/balloon/balloon.c ============================================================================== --- head/sys/dev/xen/balloon/balloon.c Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/dev/xen/balloon/balloon.c Thu Apr 30 15:48:48 2015 (r282274) @@ -118,11 +118,6 @@ current_target(void) static unsigned long minimum_target(void) { -#ifdef XENHVM -#define max_pfn realmem -#else -#define max_pfn HYPERVISOR_shared_info->arch.max_pfn -#endif unsigned long min_pages, curr_pages = current_target(); #define MB2PAGES(mb) ((mb) << (20 - PAGE_SHIFT)) @@ -139,16 +134,15 @@ minimum_target(void) * 32768 1320 * 131072 4392 */ - if (max_pfn < MB2PAGES(128)) - min_pages = MB2PAGES(8) + (max_pfn >> 1); - else if (max_pfn < MB2PAGES(512)) - min_pages = MB2PAGES(40) + (max_pfn >> 2); - else if (max_pfn < MB2PAGES(2048)) - min_pages = MB2PAGES(104) + (max_pfn >> 3); + if (realmem < MB2PAGES(128)) + min_pages = MB2PAGES(8) + (realmem >> 1); + else if (realmem < MB2PAGES(512)) + min_pages = MB2PAGES(40) + (realmem >> 2); + else if (realmem < MB2PAGES(2048)) + min_pages = MB2PAGES(104) + (realmem >> 3); else - min_pages = MB2PAGES(296) + (max_pfn >> 5); + min_pages = MB2PAGES(296) + (realmem >> 5); #undef MB2PAGES -#undef max_pfn /* Don't enforce growth */ return (min(min_pages, curr_pages)); @@ -204,12 +198,9 @@ increase_reservation(unsigned long nr_pa bs.balloon_low--; pfn = (VM_PAGE_TO_PHYS(page) >> PAGE_SHIFT); - KASSERT((xen_feature(XENFEAT_auto_translated_physmap) || - !phys_to_machine_mapping_valid(pfn)), + KASSERT(xen_feature(XENFEAT_auto_translated_physmap), ("auto translated physmap but mapping is valid")); - set_phys_to_machine(pfn, frame_list[i]); - vm_page_free(page); } @@ -258,9 +249,8 @@ decrease_reservation(unsigned long nr_pa } pfn = (VM_PAGE_TO_PHYS(page) >> PAGE_SHIFT); - frame_list[i] = PFNTOMFN(pfn); + frame_list[i] = pfn; - set_phys_to_machine(pfn, INVALID_P2M_ENTRY); TAILQ_INSERT_HEAD(&ballooned_pages, page, plinks.q); bs.balloon_low++; } @@ -393,21 +383,11 @@ static int xenballoon_attach(device_t dev) { int err; -#ifndef XENHVM - vm_page_t page; - unsigned long pfn; - -#define max_pfn HYPERVISOR_shared_info->arch.max_pfn -#endif mtx_init(&balloon_mutex, "balloon_mutex", NULL, MTX_DEF); -#ifndef XENHVM - bs.current_pages = min(xen_start_info->nr_pages, max_pfn); -#else bs.current_pages = xen_pv_domain() ? HYPERVISOR_start_info->nr_pages : realmem; -#endif bs.target_pages = bs.current_pages; bs.balloon_low = 0; bs.balloon_high = 0; @@ -416,16 +396,6 @@ xenballoon_attach(device_t dev) kproc_create(balloon_process, NULL, NULL, 0, 0, "balloon"); -#ifndef XENHVM - /* Initialise the balloon with excess memory space. */ - for (pfn = xen_start_info->nr_pages; pfn < max_pfn; pfn++) { - page = PHYS_TO_VM_PAGE(pfn << PAGE_SHIFT); - TAILQ_INSERT_HEAD(&ballooned_pages, page, plinks.q); - bs.balloon_low++; - } -#undef max_pfn -#endif - target_watch.callback = watch_target; err = xs_register_watch(&target_watch); Modified: head/sys/dev/xen/blkback/blkback.c ============================================================================== --- head/sys/dev/xen/blkback/blkback.c Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/dev/xen/blkback/blkback.c Thu Apr 30 15:48:48 2015 (r282274) @@ -742,7 +742,6 @@ struct xbb_softc { /** Mutex protecting per-instance data. */ struct mtx lock; -#ifdef XENHVM /** * Resource representing allocated physical address space * associated with our per-instance kva region. @@ -751,7 +750,6 @@ struct xbb_softc { /** Resource id for allocated physical address space. */ int pseudo_phys_res_id; -#endif /** * I/O statistics from BlockBack dispatch down. These are @@ -2818,16 +2816,12 @@ static void xbb_free_communication_mem(struct xbb_softc *xbb) { if (xbb->kva != 0) { -#ifndef XENHVM - kva_free(xbb->kva, xbb->kva_size); -#else if (xbb->pseudo_phys_res != NULL) { bus_release_resource(xbb->dev, SYS_RES_MEMORY, xbb->pseudo_phys_res_id, xbb->pseudo_phys_res); xbb->pseudo_phys_res = NULL; } -#endif } xbb->kva = 0; xbb->gnt_base_addr = 0; @@ -3055,12 +3049,6 @@ xbb_alloc_communication_mem(struct xbb_s DPRINTF("%s: kva_size = %d, reqlist_kva_size = %d\n", device_get_nameunit(xbb->dev), xbb->kva_size, xbb->reqlist_kva_size); -#ifndef XENHVM - xbb->kva = kva_alloc(xbb->kva_size); - if (xbb->kva == 0) - return (ENOMEM); - xbb->gnt_base_addr = xbb->kva; -#else /* XENHVM */ /* * Reserve a range of pseudo physical memory that we can map * into kva. These pages will only be backed by machine @@ -3078,7 +3066,6 @@ xbb_alloc_communication_mem(struct xbb_s } xbb->kva = (vm_offset_t)rman_get_virtual(xbb->pseudo_phys_res); xbb->gnt_base_addr = rman_get_start(xbb->pseudo_phys_res); -#endif /* XENHVM */ DPRINTF("%s: kva: %#jx, gnt_base_addr: %#jx\n", device_get_nameunit(xbb->dev), (uintmax_t)xbb->kva, Modified: head/sys/dev/xen/control/control.c ============================================================================== --- head/sys/dev/xen/control/control.c Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/dev/xen/control/control.c Thu Apr 30 15:48:48 2015 (r282274) @@ -138,9 +138,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef XENHVM #include -#endif #include #include @@ -192,133 +190,6 @@ xctrl_reboot() shutdown_nice(0); } -#ifndef XENHVM -extern void xencons_suspend(void); -extern void xencons_resume(void); - -/* Full PV mode suspension. */ -static void -xctrl_suspend() -{ - int i, j, k, fpp, suspend_cancelled; - unsigned long max_pfn, start_info_mfn; - - EVENTHANDLER_INVOKE(power_suspend); - -#ifdef SMP - struct thread *td; - cpuset_t map; - u_int cpuid; - - /* - * Bind us to CPU 0 and stop any other VCPUs. - */ - td = curthread; - thread_lock(td); - sched_bind(td, 0); - thread_unlock(td); - cpuid = PCPU_GET(cpuid); - KASSERT(cpuid == 0, ("xen_suspend: not running on cpu 0")); - - map = all_cpus; - CPU_CLR(cpuid, &map); - CPU_NAND(&map, &stopped_cpus); - if (!CPU_EMPTY(&map)) - stop_cpus(map); -#endif - - /* - * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE - * drivers need this. - */ - mtx_lock(&Giant); - if (DEVICE_SUSPEND(root_bus) != 0) { - mtx_unlock(&Giant); - printf("%s: device_suspend failed\n", __func__); -#ifdef SMP - if (!CPU_EMPTY(&map)) - restart_cpus(map); -#endif - return; - } - mtx_unlock(&Giant); - - local_irq_disable(); - - xencons_suspend(); - gnttab_suspend(); - intr_suspend(); - - max_pfn = HYPERVISOR_shared_info->arch.max_pfn; - - void *shared_info = HYPERVISOR_shared_info; - HYPERVISOR_shared_info = NULL; - pmap_kremove((vm_offset_t) shared_info); - PT_UPDATES_FLUSH(); - - xen_start_info->store_mfn = MFNTOPFN(xen_start_info->store_mfn); - xen_start_info->console.domU.mfn = MFNTOPFN(xen_start_info->console.domU.mfn); - - /* - * We'll stop somewhere inside this hypercall. When it returns, - * we'll start resuming after the restore. - */ - start_info_mfn = VTOMFN(xen_start_info); - pmap_suspend(); - suspend_cancelled = HYPERVISOR_suspend(start_info_mfn); - pmap_resume(); - - pmap_kenter_ma((vm_offset_t) shared_info, xen_start_info->shared_info); - HYPERVISOR_shared_info = shared_info; - - HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = - VTOMFN(xen_pfn_to_mfn_frame_list_list); - - fpp = PAGE_SIZE/sizeof(unsigned long); - for (i = 0, j = 0, k = -1; i < max_pfn; i += fpp, j++) { - if ((j % fpp) == 0) { - k++; - xen_pfn_to_mfn_frame_list_list[k] = - VTOMFN(xen_pfn_to_mfn_frame_list[k]); - j = 0; - } - xen_pfn_to_mfn_frame_list[k][j] = - VTOMFN(&xen_phys_machine[i]); - } - HYPERVISOR_shared_info->arch.max_pfn = max_pfn; - - gnttab_resume(NULL); - intr_resume(suspend_cancelled != 0); - local_irq_enable(); - xencons_resume(); - -#ifdef CONFIG_SMP - for_each_cpu(i) - vcpu_prepare(i); - -#endif - - /* - * Only resume xenbus /after/ we've prepared our VCPUs; otherwise - * the VCPU hotplug callback can race with our vcpu_prepare - */ - mtx_lock(&Giant); - DEVICE_RESUME(root_bus); - mtx_unlock(&Giant); - -#ifdef SMP - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); - if (!CPU_EMPTY(&map)) - restart_cpus(map); -#endif - EVENTHANDLER_INVOKE(power_resume); -} - -#else - -/* HVM mode suspension. */ static void xctrl_suspend() { @@ -417,7 +288,6 @@ xctrl_suspend() printf("System resumed after suspension\n"); } -#endif static void xctrl_crash() Modified: head/sys/dev/xen/grant_table/grant_table.c ============================================================================== --- head/sys/dev/xen/grant_table/grant_table.c Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/dev/xen/grant_table/grant_table.c Thu Apr 30 15:48:48 2015 (r282274) @@ -53,7 +53,6 @@ static int gnttab_free_count; static grant_ref_t gnttab_free_head; static struct mtx gnttab_list_lock; -#ifdef XENHVM /* * Resource representing allocated physical address space * for the grant table metainfo @@ -62,7 +61,6 @@ static struct resource *gnttab_pseudo_ph /* Resource id for allocated physical address space. */ static int gnttab_pseudo_phys_res_id; -#endif static grant_entry_t *shared; @@ -510,72 +508,6 @@ unmap_pte_fn(pte_t *pte, struct page *pm } #endif -#ifndef XENHVM - -static int -gnttab_map(unsigned int start_idx, unsigned int end_idx) -{ - struct gnttab_setup_table setup; - u_long *frames; - - unsigned int nr_gframes = end_idx + 1; - int i, rc; - - frames = malloc(nr_gframes * sizeof(unsigned long), M_DEVBUF, M_NOWAIT); - if (!frames) - return (ENOMEM); - - setup.dom = DOMID_SELF; - setup.nr_frames = nr_gframes; - set_xen_guest_handle(setup.frame_list, frames); - - rc = HYPERVISOR_grant_table_op(GNTTABOP_setup_table, &setup, 1); - if (rc == -ENOSYS) { - free(frames, M_DEVBUF); - return (ENOSYS); - } - KASSERT(!(rc || setup.status), - ("unexpected result from grant_table_op")); - - if (shared == NULL) { - vm_offset_t area; - - area = kva_alloc(PAGE_SIZE * max_nr_grant_frames()); - KASSERT(area, ("can't allocate VM space for grant table")); - shared = (grant_entry_t *)area; - } - - for (i = 0; i < nr_gframes; i++) - PT_SET_MA(((caddr_t)shared) + i*PAGE_SIZE, - ((vm_paddr_t)frames[i]) << PAGE_SHIFT | PG_RW | PG_V); - - free(frames, M_DEVBUF); - - return (0); -} - -int -gnttab_resume(device_t dev) -{ - - if (max_nr_grant_frames() < nr_grant_frames) - return (ENOSYS); - return (gnttab_map(0, nr_grant_frames - 1)); -} - -int -gnttab_suspend(void) -{ - int i; - - for (i = 0; i < nr_grant_frames; i++) - pmap_kremove((vm_offset_t) shared + i * PAGE_SIZE); - - return (0); -} - -#else /* XENHVM */ - static vm_paddr_t resume_frames; static int @@ -638,8 +570,6 @@ gnttab_resume(device_t dev) return (gnttab_map(0, nr_gframes - 1)); } -#endif - static int gnttab_expand(unsigned int req_entries) { Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/dev/xen/netback/netback.c Thu Apr 30 15:48:48 2015 (r282274) @@ -473,7 +473,6 @@ struct xnb_softc { */ gnttab_copy_table tx_gnttab; -#ifdef XENHVM /** * Resource representing allocated physical address space * associated with our per-instance kva region. @@ -482,7 +481,6 @@ struct xnb_softc { /** Resource id for allocated physical address space. */ int pseudo_phys_res_id; -#endif /** Ring mapping and interrupt configuration data. */ struct xnb_ring_config ring_configs[XNB_NUM_RING_TYPES]; @@ -626,16 +624,12 @@ static void xnb_free_communication_mem(struct xnb_softc *xnb) { if (xnb->kva != 0) { -#ifndef XENHVM - kva_free(xnb->kva, xnb->kva_size); -#else if (xnb->pseudo_phys_res != NULL) { bus_release_resource(xnb->dev, SYS_RES_MEMORY, xnb->pseudo_phys_res_id, xnb->pseudo_phys_res); xnb->pseudo_phys_res = NULL; } -#endif /* XENHVM */ } xnb->kva = 0; xnb->gnt_base_addr = 0; @@ -816,12 +810,7 @@ xnb_alloc_communication_mem(struct xnb_s for (i=0; i < XNB_NUM_RING_TYPES; i++) { xnb->kva_size += xnb->ring_configs[i].ring_pages * PAGE_SIZE; } -#ifndef XENHVM - xnb->kva = kva_alloc(xnb->kva_size); - if (xnb->kva == 0) - return (ENOMEM); - xnb->gnt_base_addr = xnb->kva; -#else /* defined XENHVM */ + /* * Reserve a range of pseudo physical memory that we can map * into kva. These pages will only be backed by machine @@ -840,7 +829,6 @@ xnb_alloc_communication_mem(struct xnb_s } xnb->kva = (vm_offset_t)rman_get_virtual(xnb->pseudo_phys_res); xnb->gnt_base_addr = rman_get_start(xnb->pseudo_phys_res); -#endif /* !defined XENHVM */ return (0); } Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/dev/xen/netfront/netfront.c Thu Apr 30 15:48:48 2015 (r282274) @@ -879,12 +879,11 @@ refill: if (sc->copying_receiver == 0) { gnttab_grant_foreign_transfer_ref(ref, otherend_id, pfn); - sc->rx_pfn_array[nr_flips] = PFNTOMFN(pfn); + sc->rx_pfn_array[nr_flips] = pfn; if (!xen_feature(XENFEAT_auto_translated_physmap)) { /* Remove this page before passing * back to Xen. */ - set_phys_to_machine(pfn, INVALID_P2M_ENTRY); MULTI_update_va_mapping(&sc->rx_mcl[i], vaddr, 0, 0); } @@ -892,7 +891,7 @@ refill: } else { gnttab_grant_foreign_access_ref(ref, otherend_id, - PFNTOMFN(pfn), 0); + pfn, 0); } req->id = id; req->gref = ref; @@ -907,7 +906,6 @@ refill: * We may have allocated buffers which have entries outstanding * in the page * update queue -- make sure we flush those first! */ - PT_UPDATES_FLUSH(); if (nr_flips != 0) { #ifdef notyet /* Tell the ballon driver what is going on. */ @@ -1361,8 +1359,6 @@ xennet_get_responses(struct netfront_inf mmu->ptr = ((vm_paddr_t)mfn << PAGE_SHIFT) | MMU_MACHPHYS_UPDATE; mmu->val = pfn; - - set_phys_to_machine(pfn, mfn); } pages_flipped++; } else { @@ -1927,7 +1923,7 @@ network_connect(struct netfront_info *np } else { gnttab_grant_foreign_access_ref(ref, xenbus_get_otherend_id(np->xbdev), - PFNTOMFN(pfn), 0); + pfn, 0); } req->gref = ref; req->id = requeue_idx; Modified: head/sys/i386/conf/DEFAULTS ============================================================================== --- head/sys/i386/conf/DEFAULTS Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/i386/conf/DEFAULTS Thu Apr 30 15:48:48 2015 (r282274) @@ -26,7 +26,6 @@ options GEOM_PART_EBR_COMPAT options GEOM_PART_MBR # enable support for native hardware -options NATIVE device atpic options NEW_PCIB Modified: head/sys/i386/i386/apic_vector.s ============================================================================== --- head/sys/i386/i386/apic_vector.s Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/i386/i386/apic_vector.s Thu Apr 30 15:48:48 2015 (r282274) @@ -266,7 +266,6 @@ IDTVEC(invlcache) /* * Handler for IPIs sent via the per-cpu IPI bitmap. */ -#ifndef XEN .text SUPERALIGN_TEXT IDTVEC(ipi_intr_bitmap_handler) @@ -281,7 +280,7 @@ IDTVEC(ipi_intr_bitmap_handler) call ipi_bitmap_handler MEXITCOUNT jmp doreti -#endif + /* * Executed by a CPU when it receives an IPI_STOP from another CPU. */ @@ -301,7 +300,6 @@ IDTVEC(cpustop) /* * Executed by a CPU when it receives an IPI_SUSPEND from another CPU. */ -#ifndef XEN .text SUPERALIGN_TEXT IDTVEC(cpususpend) @@ -314,7 +312,6 @@ IDTVEC(cpususpend) POP_FRAME jmp doreti_iret -#endif /* * Executed by a CPU when it receives a RENDEZVOUS IPI from another CPU. Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/i386/i386/genassym.c Thu Apr 30 15:48:48 2015 (r282274) @@ -238,11 +238,6 @@ ASSYM(BUS_SPACE_HANDLE_BASE, offsetof(st ASSYM(BUS_SPACE_HANDLE_IAT, offsetof(struct bus_space_handle, bsh_iat)); #endif -#ifdef XEN -ASSYM(PC_CR3, offsetof(struct pcpu, pc_cr3)); -ASSYM(XEN_HYPERVISOR_VIRT_START, HYPERVISOR_VIRT_START); -#endif - #ifdef HWPMC_HOOKS ASSYM(PMC_FN_USER_CALLCHAIN, PMC_FN_USER_CALLCHAIN); #endif Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Apr 30 15:25:30 2015 (r282273) +++ head/sys/i386/i386/machdep.c Thu Apr 30 15:48:48 2015 (r282274) @@ -160,24 +160,6 @@ int arch_i386_is_xbox = 0; uint32_t arch_i386_xbox_memsize = 0; #endif -#ifdef XEN -/* XEN includes */ -#include -#include -#include -#include -#include - -void Xhypervisor_callback(void); -void failsafe_callback(void); - -extern trap_info_t trap_table[]; -struct proc_ldt default_proc_ldt; -extern int init_first; -int running_xen = 1; -extern unsigned long physfree; -#endif /* XEN */ - /* Sanity check for __curthread() */ CTASSERT(offsetof(struct pcpu, pc_curthread) == 0); @@ -356,9 +338,7 @@ cpu_startup(dummy) */ bufinit(); vm_pager_bufferinit(); -#ifndef XEN cpu_setregs(); -#endif } /* @@ -1291,13 +1271,8 @@ SYSCTL_STRING(_machdep, OID_AUTO, bootme int _default_ldt; -#ifdef XEN -union descriptor *gdt; -union descriptor *ldt; -#else union descriptor gdt[NGDT * MAXCPU]; /* global descriptor table */ union descriptor ldt[NLDT]; /* local descriptor table */ -#endif static struct gate_descriptor idt0[NIDT]; struct gate_descriptor *idt = &idt0[0]; /* interrupt descriptor table */ struct region_descriptor r_gdt, r_idt; /* table descriptors */ @@ -1397,7 +1372,6 @@ struct soft_segment_descriptor gdt_segs[ .ssd_xx = 0, .ssd_xx1 = 0, .ssd_def32 = 1, .ssd_gran = 1 }, -#ifndef XEN /* GPROC0_SEL 9 Proc 0 Tss Descriptor */ { .ssd_base = 0x0, @@ -1489,7 +1463,6 @@ struct soft_segment_descriptor gdt_segs[ .ssd_xx = 0, .ssd_xx1 = 0, .ssd_def32 = 0, .ssd_gran = 0 }, -#endif /* !XEN */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 15:50:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABA8F398; Thu, 30 Apr 2015 15:50:38 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 855141A9C; Thu, 30 Apr 2015 15:50:38 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 20FBFB91F; Thu, 30 Apr 2015 11:50:37 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282274 - in head: share/man/man4 sys/amd64/include/xen sys/conf sys/dev/xen/balloon sys/dev/xen/blkback sys/dev/xen/control sys/dev/xen/grant_table sys/dev/xen/netback sys/dev/xen/netf... Date: Thu, 30 Apr 2015 11:50:25 -0400 Message-ID: <2157167.0KNEAOyALl@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201504301548.t3UFmnKt093935@svn.freebsd.org> References: <201504301548.t3UFmnKt093935@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 30 Apr 2015 11:50:37 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 15:50:38 -0000 On Thursday, April 30, 2015 03:48:49 PM John Baldwin wrote: > Author: jhb > Date: Thu Apr 30 15:48:48 2015 > New Revision: 282274 > URL: https://svnweb.freebsd.org/changeset/base/282274 > > Log: > Remove support for Xen PV domU kernels. Support for HVM domU kernels > remains. Xen is planning to phase out support for PV upstream since it > is harder to maintain and has more overhead. Modern x86 CPUs include > virtualization extensions that support HVM guests instead of PV guests. > In addition, the PV code was i386 only and not as well maintained recently > as the HVM code. > - Remove the i386-only NATIVE option that was used to disable certain > components for PV kernels. These components are now standard as they > are on amd64. > - Remove !XENHVM bits from PV drivers. > - Remove various shims required for XEN (e.g. PT_UPDATES_FLUSH, LOAD_CR3, > etc.) > - Remove duplicate copy of . > - Remove unused, i386-only xenstored.h. > > Differential Revision: https://reviews.freebsd.org/D2362 > Reviewed by: royger > Tested by: royger (i386/amd64 HVM domU and amd64 PVH dom0) > Relnotes: yes Forgot to add: Discussed with: cperciva Colin assured me that everyone using FreeBSD in EC2 is using HVM, not PV domU. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 17:43:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E578461; Thu, 30 Apr 2015 17:43:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D289172B; Thu, 30 Apr 2015 17:43:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UHhfaP053057; Thu, 30 Apr 2015 17:43:41 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UHhf4j053056; Thu, 30 Apr 2015 17:43:41 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201504301743.t3UHhf4j053056@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 30 Apr 2015 17:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282276 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 17:43:41 -0000 Author: gnn Date: Thu Apr 30 17:43:40 2015 New Revision: 282276 URL: https://svnweb.freebsd.org/changeset/base/282276 Log: Move the SIFTR DTrace probe out of the writing thread context and directly into the place where the data is collected. Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Thu Apr 30 16:08:47 2015 (r282275) +++ head/sys/netinet/siftr.c Thu Apr 30 17:43:40 2015 (r282276) @@ -549,7 +549,6 @@ siftr_process_pkt(struct pkt_node * pkt_ } #endif - TCP_PROBE1(siftr, pkt_node); alq_post_flags(siftr_alq, log_buf, 0); } @@ -814,6 +813,8 @@ siftr_siftdata(struct pkt_node *pn, stru * maximum pps throughput processing when SIFTR is loaded and enabled. */ microtime(&pn->tval); + TCP_PROBE1(siftr, &pn); + } From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 17:49:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86B0B654; Thu, 30 Apr 2015 17:49:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B6CE175A; Thu, 30 Apr 2015 17:49:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UHnaO5053972; Thu, 30 Apr 2015 17:49:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UHnZd7053968; Thu, 30 Apr 2015 17:49:35 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201504301749.t3UHnZd7053968@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 30 Apr 2015 17:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282277 - in head/sys: conf dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 17:49:36 -0000 Author: jkim Date: Thu Apr 30 17:49:35 2015 New Revision: 282277 URL: https://svnweb.freebsd.org/changeset/base/282277 Log: Remove leftover from r282269. MFC after: 2 weeks X-MFC with: r282269 Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/atkbdc/atkbd.c Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Apr 30 17:43:40 2015 (r282276) +++ head/sys/conf/files.amd64 Thu Apr 30 17:49:35 2015 (r282277) @@ -514,10 +514,10 @@ compat/ndis/winx64_wrap.S optional ndisa libkern/memmove.c standard libkern/memset.c standard # -# x86 real mode BIOS emulator, required by atkbdc/dpms/pci/vesa +# x86 real mode BIOS emulator, required by dpms/pci/vesa # -compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | pci | vesa -contrib/x86emu/x86emu.c optional x86bios | atkbd | dpms | pci | vesa +compat/x86bios/x86bios.c optional x86bios | dpms | pci | vesa +contrib/x86emu/x86emu.c optional x86bios | dpms | pci | vesa # # bvm console # Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Apr 30 17:43:40 2015 (r282276) +++ head/sys/conf/files.i386 Thu Apr 30 17:49:35 2015 (r282277) @@ -525,9 +525,9 @@ i386/xbox/xboxfb.c optional xboxfb dev/fb/boot_font.c optional xboxfb i386/xbox/pic16l.s optional xbox # -# x86 real mode BIOS support, required by atkbdc/dpms/pci/vesa +# x86 real mode BIOS support, required by dpms/pci/vesa # -compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | pci | vesa +compat/x86bios/x86bios.c optional x86bios | dpms | pci | vesa # # bvm console # Modified: head/sys/dev/atkbdc/atkbd.c ============================================================================== --- head/sys/dev/atkbdc/atkbd.c Thu Apr 30 17:43:40 2015 (r282276) +++ head/sys/dev/atkbdc/atkbd.c Thu Apr 30 17:49:35 2015 (r282277) @@ -44,17 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__i386__) || defined(__amd64__) -#include -#include - -#include -#include -#include - -#include -#endif /* __i386__ || __amd64__ */ - #include #include #include From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 18:23:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54DA3D93; Thu, 30 Apr 2015 18:23:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 433801BC1; Thu, 30 Apr 2015 18:23:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UINeIS073190; Thu, 30 Apr 2015 18:23:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UINd74073186; Thu, 30 Apr 2015 18:23:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504301823.t3UINd74073186@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 30 Apr 2015 18:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 18:23:40 -0000 Author: jhb Date: Thu Apr 30 18:23:38 2015 New Revision: 282280 URL: https://svnweb.freebsd.org/changeset/base/282280 Log: Various fixes to the stats in igb(4), ixgbe(4), and ixl(4). - Use hardware counters for ifnet stats in igb(4) when possible. This ensures these stats include packets that bypass the regular stack via netmap. - Don't derefence values off the end of the igb(4) VF stats structure. Instead, add a dedicated if_get_counter method for igb(4) VF interfaces. - Report missed packets on igb(4) as input queue drops rather than an input error. - Report bug_ring drop counts as output queue drops for igb(4) and ixgbe(4). - Export the buf_ring drop stats for individual rings via sysctl on ixgbe(4). - Fix a typo that in ixl(4) that caused output queue drops to be reported as input queue drops and input queue drops to be unreported. Differential Revision: https://reviews.freebsd.org/D2402 Reviewed by: jfv, rstone (6) Sponsored by: Norse Corp, Inc. Modified: head/sys/dev/e1000/if_igb.c head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixl/ixl.h Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Thu Apr 30 18:11:43 2015 (r282279) +++ head/sys/dev/e1000/if_igb.c Thu Apr 30 18:23:38 2015 (r282280) @@ -1046,8 +1046,7 @@ igb_mq_start_locked(struct ifnet *ifp, s } drbr_advance(ifp, txr->br); enq++; - if_inc_counter(ifp, IFCOUNTER_OBYTES, next->m_pkthdr.len); - if (next->m_flags & M_MCAST) + if (next->m_flags & M_MCAST && adapter->vf_ifp) if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); ETHER_BPF_MTAP(ifp, next); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -4055,7 +4054,9 @@ static bool igb_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; +#ifdef DEV_NETMAP struct ifnet *ifp = adapter->ifp; +#endif /* DEV_NETMAP */ u32 work, processed = 0; u16 limit = txr->process_limit; struct igb_tx_buf *buf; @@ -4130,7 +4131,6 @@ igb_txeof(struct tx_ring *txr) } ++txr->packets; ++processed; - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); txr->watchdog_time = ticks; /* Try the next packet */ @@ -5127,7 +5127,6 @@ igb_rxeof(struct igb_queue *que, int cou if (eop) { rxr->fmp->m_pkthdr.rcvif = ifp; - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); rxr->rx_packets++; /* capture data for AIM */ rxr->packets++; @@ -5560,24 +5559,94 @@ igb_led_func(void *arg, int onoff) } static uint64_t +igb_get_vf_counter(if_t ifp, ift_counter cnt) +{ + struct adapter *adapter; + struct e1000_vf_stats *stats; +#ifndef IGB_LEGACY_TX + struct tx_ring *txr; + uint64_t rv; +#endif + + adapter = if_getsoftc(ifp); + stats = (struct e1000_vf_stats *)adapter->stats; + + switch (cnt) { + case IFCOUNTER_IPACKETS: + return (stats->gprc); + case IFCOUNTER_OPACKETS: + return (stats->gptc); + case IFCOUNTER_IBYTES: + return (stats->gorc); + case IFCOUNTER_OBYTES: + return (stats->gotc); + case IFCOUNTER_IMCASTS: + return (stats->mprc); + case IFCOUNTER_IERRORS: + return (adapter->dropped_pkts); + case IFCOUNTER_OERRORS: + return (adapter->watchdog_events); +#ifndef IGB_LEGACY_TX + case IFCOUNTER_OQDROPS: + rv = 0; + txr = adapter->tx_rings; + for (int i = 0; i < adapter->num_queues; i++, txr++) + rv += txr->br->br_drops; + return (rv); +#endif + default: + return (if_get_counter_default(ifp, cnt)); + } +} + +static uint64_t igb_get_counter(if_t ifp, ift_counter cnt) { struct adapter *adapter; struct e1000_hw_stats *stats; +#ifndef IGB_LEGACY_TX + struct tx_ring *txr; + uint64_t rv; +#endif adapter = if_getsoftc(ifp); + if (adapter->vf_ifp) + return (igb_get_vf_counter(ifp, cnt)); + stats = (struct e1000_hw_stats *)adapter->stats; switch (cnt) { + case IFCOUNTER_IPACKETS: + return (stats->gprc); + case IFCOUNTER_OPACKETS: + return (stats->gptc); + case IFCOUNTER_IBYTES: + return (stats->gorc); + case IFCOUNTER_OBYTES: + return (stats->gotc); + case IFCOUNTER_IMCASTS: + return (stats->mprc); + case IFCOUNTER_OMCASTS: + return (stats->mptc); case IFCOUNTER_IERRORS: return (adapter->dropped_pkts + stats->rxerrc + stats->crcerrs + stats->algnerrc + - stats->ruc + stats->roc + stats->mpc + stats->cexterr); + stats->ruc + stats->roc + stats->cexterr); case IFCOUNTER_OERRORS: return (stats->ecol + stats->latecol + adapter->watchdog_events); case IFCOUNTER_COLLISIONS: return (stats->colc); + case IFCOUNTER_IQDROPS: + return (stats->mpc); +#ifndef IGB_LEGACY_TX + case IFCOUNTER_OQDROPS: + rv = 0; + txr = adapter->tx_rings; + for (int i = 0; i < adapter->num_queues; i++, txr++) + rv += txr->br->br_drops; + return (rv); +#endif default: return (if_get_counter_default(ifp, cnt)); } Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Thu Apr 30 18:11:43 2015 (r282279) +++ head/sys/dev/ixgbe/if_ix.c Thu Apr 30 18:23:38 2015 (r282280) @@ -3592,6 +3592,8 @@ static uint64_t ixgbe_get_counter(struct ifnet *ifp, ift_counter cnt) { struct adapter *adapter; + struct tx_ring *txr; + uint64_t rv; adapter = if_getsoftc(ifp); @@ -3612,6 +3614,12 @@ ixgbe_get_counter(struct ifnet *ifp, ift return (0); case IFCOUNTER_IQDROPS: return (adapter->iqdrops); + case IFCOUNTER_OQDROPS: + rv = 0; + txr = adapter->tx_rings; + for (int i = 0; i < adapter->num_queues; i++, txr++) + rv += txr->br->br_drops; + return (rv); case IFCOUNTER_IERRORS: return (adapter->ierrors); default: @@ -3790,6 +3798,9 @@ ixgbe_add_hw_stats(struct adapter *adapt SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tx_packets", CTLFLAG_RD, &txr->total_packets, "Queue Packets Transmitted"); + SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "br_drops", + CTLFLAG_RD, &txr->br->br_drops, + "Packets dropped in buf_ring"); } for (int i = 0; i < adapter->num_queues; i++, rxr++) { Modified: head/sys/dev/ixl/ixl.h ============================================================================== --- head/sys/dev/ixl/ixl.h Thu Apr 30 18:11:43 2015 (r282279) +++ head/sys/dev/ixl/ixl.h Thu Apr 30 18:23:38 2015 (r282280) @@ -324,7 +324,7 @@ #define IXL_SET_IMCASTS(vsi, count) (vsi)->imcasts = (count) #define IXL_SET_OMCASTS(vsi, count) (vsi)->omcasts = (count) #define IXL_SET_IQDROPS(vsi, count) (vsi)->iqdrops = (count) -#define IXL_SET_OQDROPS(vsi, count) (vsi)->iqdrops = (count) +#define IXL_SET_OQDROPS(vsi, count) (vsi)->oqdrops = (count) #define IXL_SET_NOPROTO(vsi, count) (vsi)->noproto = (count) #else #define IXL_SET_IPACKETS(vsi, count) (vsi)->ifp->if_ipackets = (count) From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 18:28:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C1FFF98 for ; Thu, 30 Apr 2015 18:28:48 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9FEB1C03 for ; Thu, 30 Apr 2015 18:28:47 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UISldw060771 for ; Thu, 30 Apr 2015 18:28:47 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t3UISlPv060767 for svn-src-head@freebsd.org; Thu, 30 Apr 2015 18:28:47 GMT (envelope-from bdrewery) Received: (qmail 77159 invoked from network); 30 Apr 2015 13:28:45 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 30 Apr 2015 13:28:45 -0500 Message-ID: <55427462.8000504@FreeBSD.org> Date: Thu, 30 Apr 2015 13:28:50 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Mariusz Zaborski , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282257 - in head: lib/libnv sys/kern sys/sys References: <201504292257.t3TMv5A1091917@svn.freebsd.org> In-Reply-To: <201504292257.t3TMv5A1091917@svn.freebsd.org> OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="I1DeMETem9Su7PV8gVTs2vTkjrmX4h5QT" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 18:28:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --I1DeMETem9Su7PV8gVTs2vTkjrmX4h5QT Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/29/2015 5:57 PM, Mariusz Zaborski wrote: > Author: oshogbo > Date: Wed Apr 29 22:57:04 2015 > New Revision: 282257 > URL: https://svnweb.freebsd.org/changeset/base/282257 >=20 > Log: > Remove the nvlist_.*[fv] functions. > =20 > Those functions are problematic, because there is no way to report > memory allocation problems without complicating the API, so we can > either abort or potentially return invalid results. None of which is > acceptable. > =20 > In most cases the caller knows the size of the name, so he can alloca= te > buffer on the stack and use snprintf(3) to prepare the name. > =20 > After some discussion the conclusion is to removed those functions, > which also simplifies the API. > =20 > Discussed with: pjd, rstone > Approved by: pjd (mentor) >=20 > Modified: > head/lib/libnv/Makefile This breaks the ABI of libnv.so.0. You should either bump the SHLIB_MAJOR or consider making this a PRIVATELIB so it is not in the public /lib but in the private /usr/lib/private or use symbol versioning. Being in /lib we must maintain ABI compatibility among the same shlib version. Bumping the SHLIB_MAJOR or moving to PRIVATELIB will require adding the libnv.so.0 to the ObsoleteFiles.inc OLD_FILES list. --=20 Regards, Bryan Drewery --I1DeMETem9Su7PV8gVTs2vTkjrmX4h5QT 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 iQEcBAEBAgAGBQJVQnRiAAoJEDXXcbtuRpfP9LEH/2b1mVdxdf6ieQtaQLM0sqH7 NvJUKLzqow+IN7Tsi46U6/6vcUxoW0DdOO6bDU3RCthNlL7QYeNgHaPoHgMj0a6H ar+DU3pEDux6bOhiioXyu2QeX5B2y+yEMjY9CLvRzuMQNY0znjSLcZUv1xbxnro+ 4HMxJi/Kt81V8Om/IGN7OYbVQBFhwfL5HgATJEI1HTZc5fgAOJQeQTbKsMSDDjl4 2HG3M/7/Ovp/4d9z7pw+4AEuYOT5kNQuAgNTh3fpHbuXLKoRSmQqZQyDX5W2hYQf AGdUcmaam7tMD+H6rxniJ2D4ZOxGAbUK20E6iPnasANHNgZY/m3ZdH0/rGvdXYc= =AVHA -----END PGP SIGNATURE----- --I1DeMETem9Su7PV8gVTs2vTkjrmX4h5QT-- From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 19:23:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1ED08899; Thu, 30 Apr 2015 19:23:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D58511E9; Thu, 30 Apr 2015 19:23:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UJNppb002777; Thu, 30 Apr 2015 19:23:51 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UJNpcl002774; Thu, 30 Apr 2015 19:23:51 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504301923.t3UJNpcl002774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 30 Apr 2015 19:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282281 - in head/sys/amd64/vmm: . amd intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 19:23:52 -0000 Author: neel Date: Thu Apr 30 19:23:50 2015 New Revision: 282281 URL: https://svnweb.freebsd.org/changeset/base/282281 Log: Advertise the MTRR feature via CPUID and emulate the minimal set of MTRR MSRs. This is required for booting Windows guests. Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/sys/amd64/vmm/amd/svm_msr.c head/sys/amd64/vmm/intel/vmx_msr.c head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/amd/svm_msr.c ============================================================================== --- head/sys/amd64/vmm/amd/svm_msr.c Thu Apr 30 18:23:38 2015 (r282280) +++ head/sys/amd64/vmm/amd/svm_msr.c Thu Apr 30 19:23:50 2015 (r282281) @@ -27,12 +27,18 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include +#include +#include #include #include +#include +#include "svm.h" +#include "vmcb.h" +#include "svm_softc.h" #include "svm_msr.h" #ifndef MSR_AMDK8_IPM @@ -105,6 +111,13 @@ svm_rdmsr(struct svm_softc *sc, int vcpu int error = 0; switch (num) { + case MSR_MTRRcap: + case MSR_MTRRdefType: + case MSR_MTRR4kBase ... MSR_MTRR4kBase + 8: + case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: + case MSR_MTRR64kBase: + *result = 0; + break; case MSR_AMDK8_IPM: *result = 0; break; @@ -122,6 +135,14 @@ svm_wrmsr(struct svm_softc *sc, int vcpu int error = 0; switch (num) { + case MSR_MTRRcap: + vm_inject_gp(sc->vm, vcpu); + break; + case MSR_MTRRdefType: + case MSR_MTRR4kBase ... MSR_MTRR4kBase + 8: + case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: + case MSR_MTRR64kBase: + break; /* Ignore writes */ case MSR_AMDK8_IPM: /* * Ignore writes to the "Interrupt Pending Message" MSR. Modified: head/sys/amd64/vmm/intel/vmx_msr.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx_msr.c Thu Apr 30 18:23:38 2015 (r282280) +++ head/sys/amd64/vmm/intel/vmx_msr.c Thu Apr 30 19:23:50 2015 (r282281) @@ -396,6 +396,13 @@ vmx_rdmsr(struct vmx *vmx, int vcpuid, u error = 0; switch (num) { + case MSR_MTRRcap: + case MSR_MTRRdefType: + case MSR_MTRR4kBase ... MSR_MTRR4kBase + 8: + case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: + case MSR_MTRR64kBase: + *val = 0; + break; case MSR_IA32_MISC_ENABLE: *val = misc_enable; break; @@ -427,6 +434,14 @@ vmx_wrmsr(struct vmx *vmx, int vcpuid, u error = 0; switch (num) { + case MSR_MTRRcap: + vm_inject_gp(vmx->vm, vcpuid); + break; + case MSR_MTRRdefType: + case MSR_MTRR4kBase ... MSR_MTRR4kBase + 8: + case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: + case MSR_MTRR64kBase: + break; /* Ignore writes */ case MSR_IA32_MISC_ENABLE: changed = val ^ misc_enable; /* Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Thu Apr 30 18:23:38 2015 (r282280) +++ head/sys/amd64/vmm/x86.c Thu Apr 30 19:23:50 2015 (r282281) @@ -289,9 +289,8 @@ x86_emulate_cpuid(struct vm *vm, int vcp /* * Machine check handling is done in the host. - * Hide MTRR capability. */ - regs[3] &= ~(CPUID_MCA | CPUID_MCE | CPUID_MTRR); + regs[3] &= ~(CPUID_MCA | CPUID_MCE); /* * Hide the debug store capability. From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 19:52:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E29732D; Thu, 30 Apr 2015 19:52:26 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35FEA153F; Thu, 30 Apr 2015 19:52:26 +0000 (UTC) Received: by wgen6 with SMTP id n6so73746736wge.3; Thu, 30 Apr 2015 12:52:24 -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:message-id:subject :from:to:cc:content-type; bh=o04x+YSzQro3HnXklZ0ZrjQncgjsBQlaqR8FAMkvYCg=; b=zjATRsszx9BqObXVen6z3kxlr/Qomst4RP25mOv2HyMehib4axuWoCwZk00d6ptTFn a3aZRnz5F+z8MGm1qThP6mM3wTrhAlRfNrVadYpSkpR0WgFqPt7ZRReE7TFTbzeLBtfT xYMXeaSyaPG+l4mJ7spSTEmKbQKP7j/rhTPVcHsfS9td040fVMgtN+yKuY96vK8xP1fm +3R4fW6wUZAWZAILVQ31bni7o/KK0mqRIUU/S/oUDMFWsFNIfDowW0qZ+6U8kyEF6Fw2 2SLP9Rvhh90LoQ47ZvIy5fcAZJk4cL3SjQo+u4uoGb8OCL0oYeYADb1d+uXJKewBjWlf XXlA== MIME-Version: 1.0 X-Received: by 10.180.79.227 with SMTP id m3mr8480356wix.71.1430423544694; Thu, 30 Apr 2015 12:52:24 -0700 (PDT) Sender: oshogbo.vx@gmail.com Received: by 10.28.187.214 with HTTP; Thu, 30 Apr 2015 12:52:24 -0700 (PDT) In-Reply-To: <55427462.8000504@FreeBSD.org> References: <201504292257.t3TMv5A1091917@svn.freebsd.org> <55427462.8000504@FreeBSD.org> Date: Thu, 30 Apr 2015 21:52:24 +0200 X-Google-Sender-Auth: bxeYWxOMfsnmRPS6qISs1cLBoy0 Message-ID: Subject: Re: svn commit: r282257 - in head: lib/libnv sys/kern sys/sys From: Mariusz Zaborski To: Bryan Drewery Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 19:52:26 -0000 On 30 April 2015 at 20:28, Bryan Drewery wrote: > You should either bump the SHLIB_MAJOR or consider making this a > PRIVATELIB so it is not in the public /lib but in the private > /usr/lib/private or use symbol versioning. Being in /lib we must maintain ABI compatibility among the same shlib > version. > > Bumping the SHLIB_MAJOR or moving to PRIVATELIB will require adding the > libnv.so.0 to the ObsoleteFiles.inc OLD_FILES list. Oh, I didn't notice that. Bumping the SHLIB_MAJOR also refers to library which are only in HEAD? Cheers, Mariusz Zaborski From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 20:03:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F3729F0 for ; Thu, 30 Apr 2015 20:03:19 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 292C21691 for ; Thu, 30 Apr 2015 20:03:19 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UK3JCI096390 for ; Thu, 30 Apr 2015 20:03:19 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t3UK3I8h096385 for svn-src-head@freebsd.org; Thu, 30 Apr 2015 20:03:18 GMT (envelope-from bdrewery) Received: (qmail 91321 invoked from network); 30 Apr 2015 15:03:17 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 30 Apr 2015 15:03:17 -0500 Message-ID: <55428A8B.1030405@FreeBSD.org> Date: Thu, 30 Apr 2015 15:03:23 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Mariusz Zaborski CC: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282257 - in head: lib/libnv sys/kern sys/sys References: <201504292257.t3TMv5A1091917@svn.freebsd.org> <55427462.8000504@FreeBSD.org> In-Reply-To: OpenPGP: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M7CsELEwfbaHJClPW9LPgLf5i4q4Eh6dq" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 20:03:19 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --M7CsELEwfbaHJClPW9LPgLf5i4q4Eh6dq Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 4/30/2015 2:52 PM, Mariusz Zaborski wrote: > On 30 April 2015 at 20:28, Bryan Drewery > wrote: >=20 > You should either bump the SHLIB_MAJOR or consider making this a > PRIVATELIB so it is not in the public /lib but in the private > /usr/lib/private or use symbol versioning.=20 >=20 > =20 >=20 > Being in /lib we must maintain ABI compatibility among the same shl= ib > version. >=20 > Bumping the SHLIB_MAJOR or moving to PRIVATELIB will require adding= the > libnv.so.0 to the ObsoleteFiles.inc OLD_FILES list. >=20 > Oh, I didn't notice that. Bumping the SHLIB_MAJOR also refers to librar= y > which are only in HEAD? You are right. I mistakenly thought this was added pre-10.0 and was in stable/10. It is not there though. --=20 Regards, Bryan Drewery --M7CsELEwfbaHJClPW9LPgLf5i4q4Eh6dq 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 iQEcBAEBAgAGBQJVQoqLAAoJEDXXcbtuRpfP45cH/18+zwTZvnNvP8AMHexvTEsa geRoHDIkD5VcPHp/MdAvZocEN8hhEPkvHB4pScaj7VimeoYmPLl2DANfSa1cHB5Y OVFTrfwY40Io2l3L8o2lDTtDRgvqtL6LUKLw1cWKjcuB7iG1DahcuiPBvwa0qb8O djfMxKMV3ONv+gL0tNJug79ptiWsQzL736zPRSxJRkdwrwi/91VGfW3TYuyfxDhv qLevhbtwmL9teDjJA1OQEF/jL28GkUi5f82rAozmu/K4WWpa0GepYTHhjoh0oSDF GYdVpj3KcQrJw7fFdspgF0NaNcddtd/GH8pvfPog6aSef3esbWDCeHdwtoBXKDQ= =F1IU -----END PGP SIGNATURE----- --M7CsELEwfbaHJClPW9LPgLf5i4q4Eh6dq-- From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 20:47:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E79796DD; Thu, 30 Apr 2015 20:47:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5E6D1AF2; Thu, 30 Apr 2015 20:47:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UKlYo1044646; Thu, 30 Apr 2015 20:47:34 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UKlY1m044643; Thu, 30 Apr 2015 20:47:34 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504302047.t3UKlY1m044643@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 30 Apr 2015 20:47:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282282 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 20:47:35 -0000 Author: oshogbo Date: Thu Apr 30 20:47:33 2015 New Revision: 282282 URL: https://svnweb.freebsd.org/changeset/base/282282 Log: Rename macros to use prefix ERRNO. Add macro ERRNO_SET. Now ERRNO_{RESTORE/SAVE} must by used together, additional variable is not needed. Always use ERRNO_{SAVE/RESTORE/SET} macros. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c head/sys/kern/subr_nvpair.c head/sys/sys/nv_impl.h Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Thu Apr 30 19:23:50 2015 (r282281) +++ head/sys/kern/subr_nvlist.c Thu Apr 30 20:47:33 2015 (r282282) @@ -142,12 +142,11 @@ void nvlist_destroy(nvlist_t *nvl) { nvpair_t *nvp; - int serrno; if (nvl == NULL) return; - SAVE_ERRNO(serrno); + ERRNO_SAVE(); NVLIST_ASSERT(nvl); @@ -158,7 +157,7 @@ nvlist_destroy(nvlist_t *nvl) nvl->nvl_magic = 0; nv_free(nvl); - RESTORE_ERRNO(serrno); + ERRNO_RESTORE(); } void @@ -264,7 +263,7 @@ nvlist_find(const nvlist_t *nvl, int typ } if (nvp == NULL) - RESTORE_ERRNO(ENOENT); + ERRNO_SET(ENOENT); return (nvp); } @@ -307,7 +306,7 @@ nvlist_clone(const nvlist_t *nvl) NVLIST_ASSERT(nvl); if (nvl->nvl_error != 0) { - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); return (NULL); } @@ -596,7 +595,7 @@ nvlist_xpack(const nvlist_t *nvl, int64_ NVLIST_ASSERT(nvl); if (nvl->nvl_error != 0) { - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); return (NULL); } @@ -686,12 +685,12 @@ nvlist_pack(const nvlist_t *nvl, size_t NVLIST_ASSERT(nvl); if (nvl->nvl_error != 0) { - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); return (NULL); } if (nvlist_ndescriptors(nvl) > 0) { - RESTORE_ERRNO(EOPNOTSUPP); + ERRNO_SET(EOPNOTSUPP); return (NULL); } @@ -703,11 +702,11 @@ nvlist_check_header(struct nvlist_header { if (nvlhdrp->nvlh_magic != NVLIST_HEADER_MAGIC) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (false); } if ((nvlhdrp->nvlh_flags & ~NV_FLAG_ALL_MASK) != 0) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (false); } #if BYTE_ORDER == BIG_ENDIAN @@ -759,7 +758,7 @@ nvlist_unpack_header(nvlist_t *nvl, cons return (ptr); failed: - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -853,10 +852,10 @@ nvlist_send(int sock, const nvlist_t *nv int *fds; void *data; int64_t fdidx; - int serrno, ret; + int ret; if (nvlist_error(nvl) != 0) { - errno = nvlist_error(nvl); + ERRNO_SET(nvlist_error(nvl)); return (-1); } @@ -882,10 +881,10 @@ nvlist_send(int sock, const nvlist_t *nv ret = 0; out: - serrno = errno; + ERRNO_SAVE(); free(fds); free(data); - errno = serrno; + ERRNO_RESTORE(); return (ret); } @@ -896,7 +895,7 @@ nvlist_recv(int sock) nvlist_t *nvl, *ret; unsigned char *buf; size_t nfds, size, i; - int serrno, *fds; + int *fds; if (buf_recv(sock, &nvlhdr, sizeof(nvlhdr)) == -1) return (NULL); @@ -929,19 +928,19 @@ nvlist_recv(int sock) nvl = nvlist_xunpack(buf, size, fds, nfds); if (nvl == NULL) { - SAVE_ERRNO(serrno); + ERRNO_SAVE(); for (i = 0; i < nfds; i++) close(fds[i]); - RESTORE_ERRNO(serrno); + ERRNO_RESTORE(); goto out; } ret = nvl; out: - serrno = errno; + ERRNO_SAVE(); free(buf); free(fds); - errno = serrno; + ERRNO_RESTORE(); return (ret); } @@ -1054,19 +1053,19 @@ nvlist_add_nvpair(nvlist_t *nvl, const n NVPAIR_ASSERT(nvp); if (nvlist_error(nvl) != 0) { - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } if (nvlist_exists(nvl, nvpair_name(nvp))) { nvl->nvl_error = EEXIST; - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } newnvp = nvpair_clone(nvp); if (newnvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } @@ -1090,14 +1089,14 @@ nvlist_add_stringv(nvlist_t *nvl, const nvpair_t *nvp; if (nvlist_error(nvl) != 0) { - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_create_stringv(name, valuefmt, valueap); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } @@ -1109,14 +1108,14 @@ nvlist_add_null(nvlist_t *nvl, const cha nvpair_t *nvp; if (nvlist_error(nvl) != 0) { - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_create_null(name); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } @@ -1128,14 +1127,14 @@ nvlist_add_bool(nvlist_t *nvl, const cha nvpair_t *nvp; if (nvlist_error(nvl) != 0) { - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_create_bool(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } @@ -1147,14 +1146,14 @@ nvlist_add_number(nvlist_t *nvl, const c nvpair_t *nvp; if (nvlist_error(nvl) != 0) { - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_create_number(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } @@ -1166,14 +1165,14 @@ nvlist_add_string(nvlist_t *nvl, const c nvpair_t *nvp; if (nvlist_error(nvl) != 0) { - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_create_string(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } @@ -1185,14 +1184,14 @@ nvlist_add_nvlist(nvlist_t *nvl, const c nvpair_t *nvp; if (nvlist_error(nvl) != 0) { - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_create_nvlist(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } @@ -1224,14 +1223,14 @@ nvlist_add_binary(nvlist_t *nvl, const c nvpair_t *nvp; if (nvlist_error(nvl) != 0) { - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_create_binary(name, value, size); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } @@ -1246,13 +1245,13 @@ nvlist_move_nvpair(nvlist_t *nvl, nvpair if (nvlist_error(nvl) != 0) { nvpair_free(nvp); - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } if (nvlist_exists(nvl, nvpair_name(nvp))) { nvpair_free(nvp); nvl->nvl_error = EEXIST; - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); return; } @@ -1266,14 +1265,14 @@ nvlist_move_string(nvlist_t *nvl, const if (nvlist_error(nvl) != 0) { nv_free(value); - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_move_string(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } @@ -1287,14 +1286,14 @@ nvlist_move_nvlist(nvlist_t *nvl, const if (nvlist_error(nvl) != 0) { if (value != NULL && nvlist_get_nvpair_parent(value) != NULL) nvlist_destroy(value); - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_move_nvlist(name, value); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } @@ -1308,15 +1307,17 @@ nvlist_move_descriptor(nvlist_t *nvl, co if (nvlist_error(nvl) != 0) { close(value); - errno = nvlist_error(nvl); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_move_descriptor(name, value); - if (nvp == NULL) - nvl->nvl_error = errno = (errno != 0 ? errno : ENOMEM); - else + if (nvp == NULL) { + nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); + ERRNO_SET(nvl->nvl_error); + } else { nvlist_move_nvpair(nvl, nvp); + } } #endif @@ -1327,14 +1328,14 @@ nvlist_move_binary(nvlist_t *nvl, const if (nvlist_error(nvl) != 0) { nv_free(value); - RESTORE_ERRNO(nvlist_error(nvl)); + ERRNO_SET(nvlist_error(nvl)); return; } nvp = nvpair_move_binary(name, value, size); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - RESTORE_ERRNO(nvl->nvl_error); + ERRNO_SET(nvl->nvl_error); } else { nvlist_move_nvpair(nvl, nvp); } Modified: head/sys/kern/subr_nvpair.c ============================================================================== --- head/sys/kern/subr_nvpair.c Thu Apr 30 19:23:50 2015 (r282281) +++ head/sys/kern/subr_nvpair.c Thu Apr 30 20:47:33 2015 (r282282) @@ -468,7 +468,7 @@ nvpair_unpack_header(bool isbe, nvpair_t return (ptr); failed: - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -480,7 +480,7 @@ nvpair_unpack_null(bool isbe __unused, n PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NULL); if (nvp->nvp_datasize != 0) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -496,11 +496,11 @@ nvpair_unpack_bool(bool isbe __unused, n PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_BOOL); if (nvp->nvp_datasize != sizeof(value)) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } if (*leftp < sizeof(value)) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -509,7 +509,7 @@ nvpair_unpack_bool(bool isbe __unused, n *leftp -= sizeof(value); if (value != 0 && value != 1) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -526,11 +526,11 @@ nvpair_unpack_number(bool isbe, nvpair_t PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NUMBER); if (nvp->nvp_datasize != sizeof(uint64_t)) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } if (*leftp < sizeof(uint64_t)) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -552,13 +552,13 @@ nvpair_unpack_string(bool isbe __unused, PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_STRING); if (*leftp < nvp->nvp_datasize || nvp->nvp_datasize == 0) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } if (strnlen((const char *)ptr, nvp->nvp_datasize) != nvp->nvp_datasize - 1) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -581,7 +581,7 @@ nvpair_unpack_nvlist(bool isbe __unused, PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_NVLIST); if (*leftp < nvp->nvp_datasize || nvp->nvp_datasize == 0) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -609,11 +609,11 @@ nvpair_unpack_descriptor(bool isbe, nvpa PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_DESCRIPTOR); if (nvp->nvp_datasize != sizeof(idx)) { - errno = EINVAL; + ERRNO_SET(EINVAL); return (NULL); } if (*leftp < sizeof(idx)) { - errno = EINVAL; + ERRNO_SET(EINVAL); return (NULL); } @@ -623,12 +623,12 @@ nvpair_unpack_descriptor(bool isbe, nvpa idx = le64dec(ptr); if (idx < 0) { - errno = EINVAL; + ERRNO_SET(EINVAL); return (NULL); } if ((size_t)idx >= nfds) { - errno = EINVAL; + ERRNO_SET(EINVAL); return (NULL); } @@ -650,7 +650,7 @@ nvpair_unpack_binary(bool isbe __unused, PJDLOG_ASSERT(nvp->nvp_type == NV_TYPE_BINARY); if (*leftp < nvp->nvp_datasize || nvp->nvp_datasize == 0) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -725,7 +725,7 @@ nvpair_allocv(const char *name, int type namelen = strlen(name); if (namelen >= NV_NAME_MAX) { - RESTORE_ERRNO(ENAMETOOLONG); + ERRNO_SET(ENAMETOOLONG); return (NULL); } @@ -802,7 +802,7 @@ nvpair_create_string(const char *name, c char *data; if (value == NULL) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -826,7 +826,7 @@ nvpair_create_nvlist(const char *name, c nvpair_t *nvp; if (value == NULL) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -848,10 +848,9 @@ nvpair_t * nvpair_create_descriptor(const char *name, int value) { nvpair_t *nvp; - int serrno; if (value < 0 || !fd_is_valid(value)) { - errno = EBADF; + ERRNO_SET(EBADF); return (NULL); } @@ -862,9 +861,9 @@ nvpair_create_descriptor(const char *nam nvp = nvpair_allocv(name, NV_TYPE_DESCRIPTOR, (uint64_t)value, sizeof(int64_t)); if (nvp == NULL) { - SAVE_ERRNO(serrno); + ERRNO_SAVE(); close(value); - RESTORE_ERRNO(serrno); + ERRNO_RESTORE(); } return (nvp); @@ -878,7 +877,7 @@ nvpair_create_binary(const char *name, c void *data; if (value == NULL || size == 0) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } @@ -899,19 +898,18 @@ nvpair_t * nvpair_move_string(const char *name, char *value) { nvpair_t *nvp; - int serrno; if (value == NULL) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } nvp = nvpair_allocv(name, NV_TYPE_STRING, (uint64_t)(uintptr_t)value, strlen(value) + 1); if (nvp == NULL) { - SAVE_ERRNO(serrno); + ERRNO_SAVE(); nv_free(value); - RESTORE_ERRNO(serrno); + ERRNO_RESTORE(); } return (nvp); @@ -923,12 +921,12 @@ nvpair_move_nvlist(const char *name, nvl nvpair_t *nvp; if (value == NULL || nvlist_get_nvpair_parent(value) != NULL) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } if (nvlist_error(value) != 0) { - RESTORE_ERRNO(nvlist_error(value)); + ERRNO_SET(nvlist_error(value)); nvlist_destroy(value); return (NULL); } @@ -948,19 +946,18 @@ nvpair_t * nvpair_move_descriptor(const char *name, int value) { nvpair_t *nvp; - int serrno; if (value < 0 || !fd_is_valid(value)) { - errno = EBADF; + ERRNO_SET(EBADF); return (NULL); } nvp = nvpair_allocv(name, NV_TYPE_DESCRIPTOR, (uint64_t)value, sizeof(int64_t)); if (nvp == NULL) { - serrno = errno; + ERRNO_SAVE(); close(value); - errno = serrno; + ERRNO_RESTORE(); } return (nvp); @@ -971,19 +968,18 @@ nvpair_t * nvpair_move_binary(const char *name, void *value, size_t size) { nvpair_t *nvp; - int serrno; if (value == NULL || size == 0) { - RESTORE_ERRNO(EINVAL); + ERRNO_SET(EINVAL); return (NULL); } nvp = nvpair_allocv(name, NV_TYPE_BINARY, (uint64_t)(uintptr_t)value, size); if (nvp == NULL) { - SAVE_ERRNO(serrno); + ERRNO_SAVE(); nv_free(value); - RESTORE_ERRNO(serrno); + ERRNO_RESTORE(); } return (nvp); Modified: head/sys/sys/nv_impl.h ============================================================================== --- head/sys/sys/nv_impl.h Thu Apr 30 19:23:50 2015 (r282281) +++ head/sys/sys/nv_impl.h Thu Apr 30 20:47:33 2015 (r282282) @@ -56,8 +56,9 @@ typedef struct nvpair nvpair_t; #define nv_strdup(buf) strdup((buf), M_NVLIST) #define nv_vasprintf(ptr, ...) vasprintf(ptr, M_NVLIST, __VA_ARGS__) -#define SAVE_ERRNO(var) ((void)(var)) -#define RESTORE_ERRNO(var) ((void)(var)) +#define ERRNO_SET(var) do { } while (0) +#define ERRNO_SAVE() do { do { } while(0) +#define ERRNO_RESTORE() } while (0) #define ERRNO_OR_DEFAULT(default) (default) @@ -70,8 +71,14 @@ typedef struct nvpair nvpair_t; #define nv_strdup(buf) strdup((buf)) #define nv_vasprintf(ptr, ...) vasprintf(ptr, __VA_ARGS__) -#define SAVE_ERRNO(var) (var) = errno -#define RESTORE_ERRNO(var) errno = (var) +#define ERRNO_SET(var) do { errno = (var); } while (0) +#define ERRNO_SAVE() do { \ + int _serrno; \ + \ + _serrno = errno + +#define ERRNO_RESTORE() errno = _serrno; \ + } while (0) #define ERRNO_OR_DEFAULT(default) (errno == 0 ? (default) : errno) From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 20:50:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A46558D7; Thu, 30 Apr 2015 20:50:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93EDE1B0D; Thu, 30 Apr 2015 20:50:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UKohYn045834; Thu, 30 Apr 2015 20:50:43 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UKohfj045829; Thu, 30 Apr 2015 20:50:43 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201504302050.t3UKohfj045829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 30 Apr 2015 20:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282283 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 20:50:43 -0000 Author: oshogbo Date: Thu Apr 30 20:50:42 2015 New Revision: 282283 URL: https://svnweb.freebsd.org/changeset/base/282283 Log: Mark local function as static as a result of removing recursion. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c head/sys/sys/nvlist_impl.h Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Thu Apr 30 20:47:33 2015 (r282282) +++ head/sys/kern/subr_nvlist.c Thu Apr 30 20:50:42 2015 (r282283) @@ -583,7 +583,7 @@ nvlist_pack_header(const nvlist_t *nvl, return (ptr); } -void * +static void * nvlist_xpack(const nvlist_t *nvl, int64_t *fdidxp, size_t *sizep) { unsigned char *buf, *ptr; @@ -762,7 +762,7 @@ failed: return (NULL); } -nvlist_t * +static nvlist_t * nvlist_xunpack(const void *buf, size_t size, const int *fds, size_t nfds) { const unsigned char *ptr; Modified: head/sys/sys/nvlist_impl.h ============================================================================== --- head/sys/sys/nvlist_impl.h Thu Apr 30 20:47:33 2015 (r282282) +++ head/sys/sys/nvlist_impl.h Thu Apr 30 20:50:42 2015 (r282283) @@ -38,10 +38,6 @@ #include "nv.h" -void *nvlist_xpack(const nvlist_t *nvl, int64_t *fdidxp, size_t *sizep); -nvlist_t *nvlist_xunpack(const void *buf, size_t size, const int *fds, - size_t nfds); - nvpair_t *nvlist_get_nvpair_parent(const nvlist_t *nvl); const unsigned char *nvlist_unpack_header(nvlist_t *nvl, const unsigned char *ptr, size_t nfds, bool *isbep, size_t *leftp); From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 21:00:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4D3DC05; Thu, 30 Apr 2015 21:00:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A38CA1CDA; Thu, 30 Apr 2015 21:00:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UL0mGk052826; Thu, 30 Apr 2015 21:00:48 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UL0moJ052825; Thu, 30 Apr 2015 21:00:48 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504302100.t3UL0moJ052825@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 30 Apr 2015 21:00:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282284 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 21:00:48 -0000 Author: neel Date: Thu Apr 30 21:00:47 2015 New Revision: 282284 URL: https://svnweb.freebsd.org/changeset/base/282284 Log: When an instruction cannot be decoded just return to userspace so bhyve(8) can dump the instruction bytes. Requested by: grehan MFC after: 1 week Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Thu Apr 30 20:50:42 2015 (r282283) +++ head/sys/amd64/vmm/vmm.c Thu Apr 30 21:00:47 2015 (r282284) @@ -1293,8 +1293,12 @@ vm_handle_inst_emul(struct vm *vm, int v else if (error != 0) panic("%s: vmm_fetch_instruction error %d", __func__, error); - if (vmm_decode_instruction(vm, vcpuid, gla, cpu_mode, cs_d, vie) != 0) - return (EFAULT); + if (vmm_decode_instruction(vm, vcpuid, gla, cpu_mode, cs_d, vie) != 0) { + VCPU_CTR1(vm, vcpuid, "Error decoding instruction at %#lx", + vme->rip + cs_base); + *retu = true; /* dump instruction bytes in userspace */ + return (0); + } /* * If the instruction length was not specified then update it now From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 21:30:35 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B19D308; Thu, 30 Apr 2015 21:30:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F33E1F54; Thu, 30 Apr 2015 21:30:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ULUYwg067278; Thu, 30 Apr 2015 21:30:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ULUY8H067269; Thu, 30 Apr 2015 21:30:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504302130.t3ULUY8H067269@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 30 Apr 2015 21:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282285 - in head: gnu/usr.bin/cc tools/build/mk usr.bin X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 21:30:35 -0000 Author: emaste Date: Thu Apr 30 21:30:33 2015 New Revision: 282285 URL: https://svnweb.freebsd.org/changeset/base/282285 Log: Add ELF Tool Chain's c++filt to the build Differential Revision: https://reviews.freebsd.org/D2408 Reviewed by: brooks, imp Sponsored by: The FreeBSD Foundation Modified: head/gnu/usr.bin/cc/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile Modified: head/gnu/usr.bin/cc/Makefile ============================================================================== --- head/gnu/usr.bin/cc/Makefile Thu Apr 30 21:00:47 2015 (r282284) +++ head/gnu/usr.bin/cc/Makefile Thu Apr 30 21:30:33 2015 (r282285) @@ -12,7 +12,10 @@ SUBDIR+= cpp .endif .if ${MK_CXX} != "no" -SUBDIR+= cc1plus c++ c++filt +SUBDIR+= cc1plus c++ +.if ${MK_ELFTOOLCHAIN_TOOLS} == "no" +SUBDIR+= c++filt +.endif .endif .if ${MK_GCOV} != "no" Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Apr 30 21:00:47 2015 (r282284) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Apr 30 21:30:33 2015 (r282285) @@ -1004,7 +1004,9 @@ OLD_DIRS+=usr/include/fs/cuse .if ${MK_CXX} == no OLD_FILES+=usr/bin/CC OLD_FILES+=usr/bin/c++ +.if ${MK_ELFTOOLCHAIN_TOOLS} == no OLD_FILES+=usr/bin/c++filt +.endif OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus .if ${MK_GCC} == no Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Thu Apr 30 21:00:47 2015 (r282284) +++ head/usr.bin/Makefile Thu Apr 30 21:30:33 2015 (r282285) @@ -36,6 +36,7 @@ SUBDIR= ${_addr2line} \ csplit \ ctlstat \ cut \ + ${_cxxfilt} \ demandoc \ dirname \ dpv \ @@ -237,6 +238,7 @@ SUBDIR+= ee .if ${MK_ELFTOOLCHAIN_TOOLS} != "no" _addr2line= addr2line +_cxxfilt= cxxfilt _elfcopy= elfcopy _nm= nm _readelf= readelf From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 21:51:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E78E6876; Thu, 30 Apr 2015 21:51:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D597A11FD; Thu, 30 Apr 2015 21:51:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3ULpCdu080446; Thu, 30 Apr 2015 21:51:12 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3ULpC7M080445; Thu, 30 Apr 2015 21:51:12 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201504302151.t3ULpC7M080445@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 30 Apr 2015 21:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282286 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 21:51:13 -0000 Author: melifaro Date: Thu Apr 30 21:51:12 2015 New Revision: 282286 URL: https://svnweb.freebsd.org/changeset/base/282286 Log: Fix KASSERT introduced in r282155. Found by: dhw Modified: head/sys/netpfil/ipfw/ip_fw_table.c Modified: head/sys/netpfil/ipfw/ip_fw_table.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table.c Thu Apr 30 21:30:33 2015 (r282285) +++ head/sys/netpfil/ipfw/ip_fw_table.c Thu Apr 30 21:51:12 2015 (r282286) @@ -3399,9 +3399,10 @@ ref_rule_objects(struct ip_fw_chain *ch, IPFW_UH_WUNLOCK(ch); - KASSERT(found + unresolved == ci->object_opcodes, - ("refcount incosistency: found: %d unr: %d total: %d", - found, unresolved, ci->object_opcodes)); + found = pidx - oib; + KASSERT(found == ci->object_opcodes, + ("refcount inconsistency: found: %d total: %d", + found, ci->object_opcodes)); /* Perform auto-creation for non-existing objects */ if (numnew != 0) From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 22:01:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC59ACF5; Thu, 30 Apr 2015 22:01:29 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A97A61327; Thu, 30 Apr 2015 22:01:29 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 5F7D425D3897; Thu, 30 Apr 2015 22:01:26 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 8F347C770A0; Thu, 30 Apr 2015 22:01:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id cTV9oWzrOUWK; Thu, 30 Apr 2015 22:01:24 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:800:204c:2fa4:1b9] (unknown [IPv6:fde9:577b:c1a9:4410:800:204c:2fa4:1b9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B132DC77058; Thu, 30 Apr 2015 22:01:23 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r282285 - in head: gnu/usr.bin/cc tools/build/mk usr.bin From: "Bjoern A. Zeeb" In-Reply-To: <201504302130.t3ULUY8H067269@svn.freebsd.org> Date: Thu, 30 Apr 2015 22:01:06 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201504302130.t3ULUY8H067269@svn.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 22:01:30 -0000 > On 30 Apr 2015, at 21:30 , Ed Maste wrote: >=20 > Author: emaste > Date: Thu Apr 30 21:30:33 2015 > New Revision: 282285 > URL: https://svnweb.freebsd.org/changeset/base/282285 >=20 > Log: > Add ELF Tool Chain's c++filt to the build >=20 > Differential Revision: https://reviews.freebsd.org/D2408 > Reviewed by: brooks, imp > Sponsored by: The FreeBSD Foundation >=20 > Modified: > head/gnu/usr.bin/cc/Makefile > head/tools/build/mk/OptionalObsoleteFiles.inc > head/usr.bin/Makefile svn add usr.bin/cxxfilt svn commit -m =E2=80=9CMissed in r282285=E2=80=9D usr.bin/ ? =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 22:23:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C26440F; Thu, 30 Apr 2015 22:23:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D04D15BD; Thu, 30 Apr 2015 22:23:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UMNR3m096402; Thu, 30 Apr 2015 22:23:27 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UMNNmZ096369; Thu, 30 Apr 2015 22:23:23 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201504302223.t3UMNNmZ096369@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 30 Apr 2015 22:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282287 - in head/sys/amd64: include vmm vmm/amd vmm/intel vmm/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 22:23:27 -0000 Author: neel Date: Thu Apr 30 22:23:22 2015 New Revision: 282287 URL: https://svnweb.freebsd.org/changeset/base/282287 Log: Don't require to be always included before . Only a subset of source files that include need to use the APIs that require the inclusion of . MFC after: 1 week Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/amd/amdv.c head/sys/amd64/vmm/amd/svm_msr.c head/sys/amd64/vmm/amd/vmcb.c head/sys/amd64/vmm/intel/vmx_msr.c head/sys/amd64/vmm/io/vatpic.c head/sys/amd64/vmm/io/vatpit.c head/sys/amd64/vmm/io/vhpet.c head/sys/amd64/vmm/io/vioapic.c head/sys/amd64/vmm/io/vpmtmr.c head/sys/amd64/vmm/io/vrtc.c head/sys/amd64/vmm/vmm_ioport.c head/sys/amd64/vmm/vmm_stat.c head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/include/vmm.h Thu Apr 30 22:23:22 2015 (r282287) @@ -204,13 +204,12 @@ int vm_get_x2apic_state(struct vm *vm, i int vm_set_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state state); int vm_apicid2vcpuid(struct vm *vm, int apicid); int vm_activate_cpu(struct vm *vm, int vcpu); -cpuset_t vm_active_cpus(struct vm *vm); -cpuset_t vm_suspended_cpus(struct vm *vm); struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid); void vm_exit_suspended(struct vm *vm, int vcpuid, uint64_t rip); void vm_exit_rendezvous(struct vm *vm, int vcpuid, uint64_t rip); void vm_exit_astpending(struct vm *vm, int vcpuid, uint64_t rip); +#ifdef _SYS__CPUSET_H_ /* * Rendezvous all vcpus specified in 'dest' and execute 'func(arg)'. * The rendezvous 'func(arg)' is not allowed to do anything that will @@ -228,6 +227,9 @@ void vm_exit_astpending(struct vm *vm, i typedef void (*vm_rendezvous_func_t)(struct vm *vm, int vcpuid, void *arg); void vm_smp_rendezvous(struct vm *vm, int vcpuid, cpuset_t dest, vm_rendezvous_func_t func, void *arg); +cpuset_t vm_active_cpus(struct vm *vm); +cpuset_t vm_suspended_cpus(struct vm *vm); +#endif /* _SYS__CPUSET_H_ */ static __inline int vcpu_rendezvous_pending(void *rendezvous_cookie) Modified: head/sys/amd64/vmm/amd/amdv.c ============================================================================== --- head/sys/amd64/vmm/amd/amdv.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/amd/amdv.c Thu Apr 30 22:23:22 2015 (r282287) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "io/iommu.h" Modified: head/sys/amd64/vmm/amd/svm_msr.c ============================================================================== --- head/sys/amd64/vmm/amd/svm_msr.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/amd/svm_msr.c Thu Apr 30 22:23:22 2015 (r282287) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: head/sys/amd64/vmm/amd/vmcb.c ============================================================================== --- head/sys/amd64/vmm/amd/vmcb.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/amd/vmcb.c Thu Apr 30 22:23:22 2015 (r282287) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/amd64/vmm/intel/vmx_msr.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx_msr.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/intel/vmx_msr.c Thu Apr 30 22:23:22 2015 (r282287) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: head/sys/amd64/vmm/io/vatpic.c ============================================================================== --- head/sys/amd64/vmm/io/vatpic.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/io/vatpic.c Thu Apr 30 22:23:22 2015 (r282287) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/amd64/vmm/io/vatpit.c ============================================================================== --- head/sys/amd64/vmm/io/vatpit.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/io/vatpit.c Thu Apr 30 22:23:22 2015 (r282287) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/amd64/vmm/io/vhpet.c ============================================================================== --- head/sys/amd64/vmm/io/vhpet.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/io/vhpet.c Thu Apr 30 22:23:22 2015 (r282287) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/amd64/vmm/io/vioapic.c ============================================================================== --- head/sys/amd64/vmm/io/vioapic.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/io/vioapic.c Thu Apr 30 22:23:22 2015 (r282287) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/amd64/vmm/io/vpmtmr.c ============================================================================== --- head/sys/amd64/vmm/io/vpmtmr.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/io/vpmtmr.c Thu Apr 30 22:23:22 2015 (r282287) @@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/amd64/vmm/io/vrtc.c ============================================================================== --- head/sys/amd64/vmm/io/vrtc.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/io/vrtc.c Thu Apr 30 22:23:22 2015 (r282287) @@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/amd64/vmm/vmm_ioport.c ============================================================================== --- head/sys/amd64/vmm/vmm_ioport.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/vmm_ioport.c Thu Apr 30 22:23:22 2015 (r282287) @@ -28,16 +28,10 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include #include -#include - #include #include -#include #include "vatpic.h" #include "vatpit.h" Modified: head/sys/amd64/vmm/vmm_stat.c ============================================================================== --- head/sys/amd64/vmm/vmm_stat.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/vmm_stat.c Thu Apr 30 22:23:22 2015 (r282287) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "vmm_util.h" Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Thu Apr 30 21:51:12 2015 (r282286) +++ head/sys/amd64/vmm/x86.c Thu Apr 30 22:23:22 2015 (r282287) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 22:51:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4BB6B73; Thu, 30 Apr 2015 22:51:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2BF217F2; Thu, 30 Apr 2015 22:51:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UMpGPP010459; Thu, 30 Apr 2015 22:51:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UMpG8S010458; Thu, 30 Apr 2015 22:51:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504302251.t3UMpG8S010458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 30 Apr 2015 22:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282288 - head/usr.bin/cxxfilt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 22:51:16 -0000 Author: emaste Date: Thu Apr 30 22:51:15 2015 New Revision: 282288 URL: https://svnweb.freebsd.org/changeset/base/282288 Log: Actually add c++filt's Makefile Missed in r282285 Pointy hat to: emaste Added: head/usr.bin/cxxfilt/ head/usr.bin/cxxfilt/Makefile (contents, props changed) Added: head/usr.bin/cxxfilt/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/cxxfilt/Makefile Thu Apr 30 22:51:15 2015 (r282288) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +.include + +ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain +SRCDIR= ${ELFTCDIR}/cxxfilt + +.PATH: ${SRCDIR} + +PROG= c++filt +SRCS= cxxfilt.c + +LIBADD= elftc + +CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common + +.include From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 22:53:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6CEBCD4; Thu, 30 Apr 2015 22:53:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3F1218B0; Thu, 30 Apr 2015 22:53:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UMrSoh011279; Thu, 30 Apr 2015 22:53:28 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UMrSFL011277; Thu, 30 Apr 2015 22:53:28 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201504302253.t3UMrSFL011277@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Thu, 30 Apr 2015 22:53:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282289 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 22:53:29 -0000 Author: erj Date: Thu Apr 30 22:53:27 2015 New Revision: 282289 URL: https://svnweb.freebsd.org/changeset/base/282289 Log: Add support for certain Intel X550 devices. These include standalone X550 adapters, X552 10GbE backplane, and X552/X557-AT 10GBASE-T; with the latter two being integrated into Xeon D SoCs. As well, this bumps the ixgbe version number to 2.8.3, and includes updates to shared code for support for the new devices. Differential Revision: D2414 Reviewed by: gnn, adrian Approved by: jfv (mentor), gnn (mentor) Added: head/sys/dev/ixgbe/ixgbe_x550.c (contents, props changed) head/sys/dev/ixgbe/ixgbe_x550.h (contents, props changed) Modified: head/sys/dev/ixgbe/if_ix.c head/sys/dev/ixgbe/if_ixv.c head/sys/dev/ixgbe/ix_txrx.c head/sys/dev/ixgbe/ixgbe.h head/sys/dev/ixgbe/ixgbe_82598.c head/sys/dev/ixgbe/ixgbe_82598.h head/sys/dev/ixgbe/ixgbe_82599.c head/sys/dev/ixgbe/ixgbe_82599.h head/sys/dev/ixgbe/ixgbe_api.c head/sys/dev/ixgbe/ixgbe_api.h head/sys/dev/ixgbe/ixgbe_common.c head/sys/dev/ixgbe/ixgbe_common.h head/sys/dev/ixgbe/ixgbe_dcb.c head/sys/dev/ixgbe/ixgbe_dcb.h head/sys/dev/ixgbe/ixgbe_dcb_82598.c head/sys/dev/ixgbe/ixgbe_dcb_82598.h head/sys/dev/ixgbe/ixgbe_dcb_82599.c head/sys/dev/ixgbe/ixgbe_dcb_82599.h head/sys/dev/ixgbe/ixgbe_mbx.c head/sys/dev/ixgbe/ixgbe_mbx.h head/sys/dev/ixgbe/ixgbe_osdep.h head/sys/dev/ixgbe/ixgbe_phy.c head/sys/dev/ixgbe/ixgbe_phy.h head/sys/dev/ixgbe/ixgbe_type.h head/sys/dev/ixgbe/ixgbe_vf.c head/sys/dev/ixgbe/ixgbe_vf.h head/sys/dev/ixgbe/ixgbe_x540.c head/sys/dev/ixgbe/ixgbe_x540.h Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Thu Apr 30 22:51:15 2015 (r282288) +++ head/sys/dev/ixgbe/if_ix.c Thu Apr 30 22:53:27 2015 (r282289) @@ -54,7 +54,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.7.4"; +char ixgbe_driver_version[] = "2.8.3"; /********************************************************************* * PCI Device ID Table @@ -117,6 +117,8 @@ static int ixgbe_probe(device_t); static int ixgbe_attach(device_t); static int ixgbe_detach(device_t); static int ixgbe_shutdown(device_t); +static int ixgbe_suspend(device_t); +static int ixgbe_resume(device_t); static int ixgbe_ioctl(struct ifnet *, u_long, caddr_t); static void ixgbe_init(void *); static void ixgbe_init_locked(struct adapter *); @@ -136,7 +138,12 @@ static int ixgbe_setup_msix(struct adapt static void ixgbe_free_pci_resources(struct adapter *); static void ixgbe_local_timer(void *); static int ixgbe_setup_interface(device_t, struct adapter *); +static void ixgbe_config_dmac(struct adapter *); +static void ixgbe_config_delay_values(struct adapter *); static void ixgbe_config_link(struct adapter *); +static void ixgbe_check_eee_support(struct adapter *); +static void ixgbe_check_wol_support(struct adapter *); +static int ixgbe_setup_low_power_mode(struct adapter *); static void ixgbe_rearm_queues(struct adapter *, u64); static void ixgbe_initialize_transmit_units(struct adapter *); @@ -150,9 +157,6 @@ static void ixgbe_update_stats_count static void ixgbe_set_promisc(struct adapter *); static void ixgbe_set_multi(struct adapter *); static void ixgbe_update_link_status(struct adapter *); -static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS); -static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS); -static int ixgbe_set_thermal_test(SYSCTL_HANDLER_ARGS); static void ixgbe_set_ivar(struct adapter *, u8, u8, s8); static void ixgbe_configure_ivars(struct adapter *); static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *, u8 **, u32 *); @@ -161,7 +165,22 @@ static void ixgbe_setup_vlan_hw_support( static void ixgbe_register_vlan(void *, struct ifnet *, u16); static void ixgbe_unregister_vlan(void *, struct ifnet *, u16); -static void ixgbe_add_hw_stats(struct adapter *adapter); +static void ixgbe_add_device_sysctls(struct adapter *); +static void ixgbe_add_hw_stats(struct adapter *); + +/* Sysctl handlers */ +static int ixgbe_set_flowcntl(SYSCTL_HANDLER_ARGS); +static int ixgbe_set_advertise(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_thermal_test(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_dmac(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_phy_temp(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_phy_overtemp_occurred(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_wol_enable(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_wufc(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_eee_enable(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_eee_negotiated(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_eee_rx_lpi_status(SYSCTL_HANDLER_ARGS); +static int ixgbe_sysctl_eee_tx_lpi_status(SYSCTL_HANDLER_ARGS); /* Support for pluggable optic modules */ static bool ixgbe_sfp_probe(struct adapter *); @@ -179,6 +198,7 @@ static void ixgbe_handle_que(void *, int static void ixgbe_handle_link(void *, int); static void ixgbe_handle_msf(void *, int); static void ixgbe_handle_mod(void *, int); +static void ixgbe_handle_phy(void *, int); #ifdef IXGBE_FDIR static void ixgbe_reinit_fdir(void *, int); @@ -198,6 +218,8 @@ static device_method_t ix_methods[] = { DEVMETHOD(device_attach, ixgbe_attach), DEVMETHOD(device_detach, ixgbe_detach), DEVMETHOD(device_shutdown, ixgbe_shutdown), + DEVMETHOD(device_suspend, ixgbe_suspend), + DEVMETHOD(device_resume, ixgbe_resume), DEVMETHOD_END }; @@ -404,32 +426,6 @@ ixgbe_attach(device_t dev) /* Core Lock Init*/ IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev)); - /* SYSCTL APIs */ - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "fc", CTLTYPE_INT | CTLFLAG_RW, - adapter, 0, ixgbe_set_flowcntl, "I", IXGBE_SYSCTL_DESC_SET_FC); - - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "enable_aim", CTLFLAG_RW, - &ixgbe_enable_aim, 1, "Interrupt Moderation"); - - /* - ** Allow a kind of speed control by forcing the autoneg - ** advertised speed list to only a certain value, this - ** supports 1G on 82599 devices, and 100Mb on x540. - */ - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "advertise_speed", CTLTYPE_INT | CTLFLAG_RW, - adapter, 0, ixgbe_set_advertise, "I", IXGBE_SYSCTL_DESC_ADV_SPEED); - - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "ts", CTLTYPE_INT | CTLFLAG_RW, adapter, - 0, ixgbe_set_thermal_test, "I", "Thermal Test"); - /* Set up the timer callout */ callout_init_mtx(&adapter->timer, &adapter->core_mtx, 0); @@ -559,22 +555,26 @@ ixgbe_attach(device_t dev) adapter->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, ixgbe_unregister_vlan, adapter, EVENTHANDLER_PRI_FIRST); - /* - ** Check PCIE slot type/speed/width - */ + /* Check PCIE slot type/speed/width */ ixgbe_get_slot_info(hw); /* Set an initial default flow control value */ adapter->fc = ixgbe_fc_full; + /* Check for certain supported features */ + ixgbe_check_wol_support(adapter); + ixgbe_check_eee_support(adapter); + + /* Add sysctls */ + ixgbe_add_device_sysctls(adapter); + ixgbe_add_hw_stats(adapter); + /* let hardware know driver is loaded */ ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); ctrl_ext |= IXGBE_CTRL_EXT_DRV_LOAD; IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext); - ixgbe_add_hw_stats(adapter); - #ifdef DEV_NETMAP ixgbe_netmap_attach(adapter); #endif /* DEV_NETMAP */ @@ -618,8 +618,9 @@ ixgbe_detach(device_t dev) return (EBUSY); } + /* Stop the adapter */ IXGBE_CORE_LOCK(adapter); - ixgbe_stop(adapter); + ixgbe_setup_low_power_mode(adapter); IXGBE_CORE_UNLOCK(adapter); for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { @@ -637,6 +638,7 @@ ixgbe_detach(device_t dev) taskqueue_drain(adapter->tq, &adapter->link_task); taskqueue_drain(adapter->tq, &adapter->mod_task); taskqueue_drain(adapter->tq, &adapter->msf_task); + taskqueue_drain(adapter->tq, &adapter->phy_task); #ifdef IXGBE_FDIR taskqueue_drain(adapter->tq, &adapter->fdir_task); #endif @@ -681,9 +683,77 @@ static int ixgbe_shutdown(device_t dev) { struct adapter *adapter = device_get_softc(dev); + int error = 0; + + INIT_DEBUGOUT("ixgbe_shutdown: begin"); + + IXGBE_CORE_LOCK(adapter); + error = ixgbe_setup_low_power_mode(adapter); + IXGBE_CORE_UNLOCK(adapter); + + return (error); +} + +/** + * Methods for going from: + * D0 -> D3: ixgbe_suspend + * D3 -> D0: ixgbe_resume + */ +static int +ixgbe_suspend(device_t dev) +{ + struct adapter *adapter = device_get_softc(dev); + int error = 0; + + INIT_DEBUGOUT("ixgbe_suspend: begin"); + + IXGBE_CORE_LOCK(adapter); + + error = ixgbe_setup_low_power_mode(adapter); + + /* Save state and power down */ + pci_save_state(dev); + pci_set_powerstate(dev, PCI_POWERSTATE_D3); + + IXGBE_CORE_UNLOCK(adapter); + + return (error); +} + +static int +ixgbe_resume(device_t dev) +{ + struct adapter *adapter = device_get_softc(dev); + struct ifnet *ifp = adapter->ifp; + struct ixgbe_hw *hw = &adapter->hw; + u32 wus; + + INIT_DEBUGOUT("ixgbe_resume: begin"); + IXGBE_CORE_LOCK(adapter); - ixgbe_stop(adapter); + + pci_set_powerstate(dev, PCI_POWERSTATE_D0); + pci_restore_state(dev); + + /* Read & clear WUS register */ + wus = IXGBE_READ_REG(hw, IXGBE_WUS); + if (wus) + device_printf(dev, "Woken up by (WUS): %#010x\n", + IXGBE_READ_REG(hw, IXGBE_WUS)); + IXGBE_WRITE_REG(hw, IXGBE_WUS, 0xffffffff); + /* And clear WUFC until next low-power transition */ + IXGBE_WRITE_REG(hw, IXGBE_WUFC, 0); + + /* + * Required after D3->D0 transition; + * will re-advertise all previous advertised speeds + */ + if (ifp->if_flags & IFF_UP) + ixgbe_init_locked(adapter); + IXGBE_CORE_UNLOCK(adapter); + + INIT_DEBUGOUT("ixgbe_resume: end"); return (0); } @@ -736,13 +806,13 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c break; case SIOCSIFMTU: IOCTL_DEBUGOUT("ioctl: SIOCSIFMTU (Set Interface MTU)"); - if (ifr->ifr_mtu > IXGBE_MAX_FRAME_SIZE - ETHER_HDR_LEN) { + if (ifr->ifr_mtu > IXGBE_MAX_MTU) { error = EINVAL; } else { IXGBE_CORE_LOCK(adapter); ifp->if_mtu = ifr->ifr_mtu; adapter->max_frame_size = - ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + ifp->if_mtu + IXGBE_MTU_HDR; ixgbe_init_locked(adapter); IXGBE_CORE_UNLOCK(adapter); } @@ -891,7 +961,7 @@ ixgbe_init_locked(struct adapter *adapte /* Prepare transmit descriptors and buffers */ if (ixgbe_setup_transmit_structures(adapter)) { - device_printf(dev,"Could not setup transmit structures\n"); + device_printf(dev, "Could not setup transmit structures\n"); ixgbe_stop(adapter); return; } @@ -917,7 +987,7 @@ ixgbe_init_locked(struct adapter *adapte /* Prepare receive descriptors and buffers */ if (ixgbe_setup_receive_structures(adapter)) { - device_printf(dev,"Could not setup receive structures\n"); + device_printf(dev, "Could not setup receive structures\n"); ixgbe_stop(adapter); return; } @@ -932,11 +1002,16 @@ ixgbe_init_locked(struct adapter *adapte /* Add for Module detection */ if (hw->mac.type == ixgbe_mac_82599EB) - gpie |= IXGBE_SDP2_GPIEN_BY_MAC(hw); + gpie |= IXGBE_SDP2_GPIEN; - /* Thermal Failure Detection */ - if (hw->mac.type == ixgbe_mac_X540) - gpie |= IXGBE_SDP0_GPIEN_BY_MAC(hw); + /* + * Thermal Failure Detection (X540) + * Link Detection (X552) + */ + if (hw->mac.type == ixgbe_mac_X540 || + hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP || + hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) + gpie |= IXGBE_SDP0_GPIEN_X540; if (adapter->msix > 1) { /* Enable Enhanced MSIX mode */ @@ -948,6 +1023,7 @@ ixgbe_init_locked(struct adapter *adapte /* Set MTU size */ if (ifp->if_mtu > ETHERMTU) { + /* aka IXGBE_MAXFRS on 82599 and newer */ mhadd = IXGBE_READ_REG(hw, IXGBE_MHADD); mhadd &= ~IXGBE_MHADD_MFS_MASK; mhadd |= adapter->max_frame_size << IXGBE_MHADD_MFS_SHIFT; @@ -955,7 +1031,6 @@ ixgbe_init_locked(struct adapter *adapte } /* Now enable all the queues */ - for (int i = 0; i < adapter->num_queues; i++) { txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i)); txdctl |= IXGBE_TXDCTL_ENABLE; @@ -1072,55 +1147,25 @@ ixgbe_init_locked(struct adapter *adapte /* Set moderation on the Link interrupt */ IXGBE_WRITE_REG(hw, IXGBE_EITR(adapter->vector), IXGBE_LINK_ITR); + /* Configure Energy Efficient Ethernet for supported devices */ + if (adapter->eee_support) + ixgbe_setup_eee(hw, adapter->eee_enabled); + /* Config/Enable Link */ ixgbe_config_link(adapter); /* Hardware Packet Buffer & Flow Control setup */ - { - u32 rxpb, frame, size, tmp; - - frame = adapter->max_frame_size; - - /* Calculate High Water */ - switch (hw->mac.type) { - case ixgbe_mac_X540: - case ixgbe_mac_X550: - case ixgbe_mac_X550EM_a: - case ixgbe_mac_X550EM_x: - tmp = IXGBE_DV_X540(frame, frame); - break; - default: - tmp = IXGBE_DV(frame, frame); - break; - } - size = IXGBE_BT2KB(tmp); - rxpb = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(0)) >> 10; - hw->fc.high_water[0] = rxpb - size; + ixgbe_config_delay_values(adapter); - /* Now calculate Low Water */ - switch (hw->mac.type) { - case ixgbe_mac_X540: - case ixgbe_mac_X550: - case ixgbe_mac_X550EM_a: - case ixgbe_mac_X550EM_x: - tmp = IXGBE_LOW_DV_X540(frame); - break; - default: - tmp = IXGBE_LOW_DV(frame); - break; - } - hw->fc.low_water[0] = IXGBE_BT2KB(tmp); - - hw->fc.requested_mode = adapter->fc; - hw->fc.pause_time = IXGBE_FC_PAUSE; - hw->fc.send_xon = TRUE; - } /* Initialize the FC settings */ ixgbe_start_hw(hw); /* Set up VLAN support and filter */ ixgbe_setup_vlan_hw_support(adapter); + /* Setup DMA Coalescing */ + ixgbe_config_dmac(adapter); + /* And now turn on interrupts */ ixgbe_enable_intr(adapter); @@ -1141,6 +1186,46 @@ ixgbe_init(void *arg) return; } +static void +ixgbe_config_delay_values(struct adapter *adapter) +{ + struct ixgbe_hw *hw = &adapter->hw; + u32 rxpb, frame, size, tmp; + + frame = adapter->max_frame_size; + + /* Calculate High Water */ + switch (hw->mac.type) { + case ixgbe_mac_X540: + case ixgbe_mac_X550: + case ixgbe_mac_X550EM_x: + tmp = IXGBE_DV_X540(frame, frame); + break; + default: + tmp = IXGBE_DV(frame, frame); + break; + } + size = IXGBE_BT2KB(tmp); + rxpb = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(0)) >> 10; + hw->fc.high_water[0] = rxpb - size; + + /* Now calculate Low Water */ + switch (hw->mac.type) { + case ixgbe_mac_X540: + case ixgbe_mac_X550: + case ixgbe_mac_X550EM_x: + tmp = IXGBE_LOW_DV_X540(frame); + break; + default: + tmp = IXGBE_LOW_DV(frame); + break; + } + hw->fc.low_water[0] = IXGBE_BT2KB(tmp); + + hw->fc.requested_mode = adapter->fc; + hw->fc.pause_time = IXGBE_FC_PAUSE; + hw->fc.send_xon = TRUE; +} /* ** @@ -1195,9 +1280,10 @@ ixgbe_handle_que(void *context, int pend struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; struct ifnet *ifp = adapter->ifp; + bool more; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - ixgbe_rxeof(que); + more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); #ifndef IXGBE_LEGACY_TX @@ -1270,6 +1356,11 @@ ixgbe_legacy_irq(void *arg) if (reg_eicr & IXGBE_EICR_LSC) taskqueue_enqueue(adapter->tq, &adapter->link_task); + /* External PHY interrupt */ + if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T && + (reg_eicr & IXGBE_EICR_GPI_SDP0_X540)) + taskqueue_enqueue(adapter->tq, &adapter->phy_task); + if (more) taskqueue_enqueue(que->tq, &que->que_task); else @@ -1378,9 +1469,9 @@ ixgbe_msix_link(void *arg) { struct adapter *adapter = arg; struct ixgbe_hw *hw = &adapter->hw; - u32 reg_eicr; + u32 reg_eicr, mod_mask; - ++adapter->vector_irq; + ++adapter->link_irq; /* First get the cause */ reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICS); @@ -1408,42 +1499,46 @@ ixgbe_msix_link(void *arg) device_printf(adapter->dev, "\nCRITICAL: ECC ERROR!! " "Please Reboot!!\n"); IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC); - } else + } - if (ixgbe_is_sfp(hw)) { - if (reg_eicr & IXGBE_EICR_GPI_SDP1) { - IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1_BY_MAC(hw)); - taskqueue_enqueue(adapter->tq, &adapter->msf_task); - } else if (reg_eicr & IXGBE_EICR_GPI_SDP2) { - IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP2_BY_MAC(hw)); - taskqueue_enqueue(adapter->tq, &adapter->mod_task); - } + /* Check for over temp condition */ + if (reg_eicr & IXGBE_EICR_TS) { + device_printf(adapter->dev, "\nCRITICAL: OVER TEMP!! " + "PHY IS SHUT DOWN!!\n"); + device_printf(adapter->dev, "System shutdown required!\n"); + IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_TS); + } + } + + /* Pluggable optics-related interrupt */ + if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP) + mod_mask = IXGBE_EICR_GPI_SDP0_X540; + else + mod_mask = IXGBE_EICR_GPI_SDP2_BY_MAC(hw); + + if (ixgbe_is_sfp(hw)) { + if (reg_eicr & IXGBE_EICR_GPI_SDP1_BY_MAC(hw)) { + IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1_BY_MAC(hw)); + taskqueue_enqueue(adapter->tq, &adapter->msf_task); + } else if (reg_eicr & mod_mask) { + IXGBE_WRITE_REG(hw, IXGBE_EICR, mod_mask); + taskqueue_enqueue(adapter->tq, &adapter->mod_task); } - } + } /* Check for fan failure */ if ((hw->device_id == IXGBE_DEV_ID_82598AT) && - (reg_eicr & IXGBE_EICR_GPI_SDP1_BY_MAC(hw))) { + (reg_eicr & IXGBE_EICR_GPI_SDP1)) { + IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1); device_printf(adapter->dev, "\nCRITICAL: FAN FAILURE!! " "REPLACE IMMEDIATELY!!\n"); - IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1_BY_MAC(hw)); } - /* Check for over temp condition */ - switch (hw->mac.type) { - case ixgbe_mac_X540: - case ixgbe_mac_X550: - case ixgbe_mac_X550EM_a: - if (reg_eicr & IXGBE_EICR_TS) { - device_printf(adapter->dev, "\nCRITICAL: OVER TEMP!! " - "PHY IS SHUT DOWN!!\n"); - device_printf(adapter->dev, "System shutdown required\n"); - IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_TS); - } - break; - default: - /* Other MACs have no thermal sensor interrupt */ - break; + /* External PHY interrupt */ + if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T && + (reg_eicr & IXGBE_EICR_GPI_SDP0_X540)) { + IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP0_X540); + taskqueue_enqueue(adapter->tq, &adapter->phy_task); } IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_OTHER); @@ -1542,20 +1637,26 @@ ixgbe_media_status(struct ifnet * ifp, s if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR) switch (adapter->link_speed) { case IXGBE_LINK_SPEED_10GB_FULL: - ifmr->ifm_active |= IFM_10_T | IFM_FDX; + ifmr->ifm_active |= IFM_10G_SR | IFM_FDX; + break; + case IXGBE_LINK_SPEED_2_5GB_FULL: + ifmr->ifm_active |= IFM_2500_SX | IFM_FDX; break; case IXGBE_LINK_SPEED_1GB_FULL: - ifmr->ifm_active |= IFM_10_5 | IFM_FDX; + ifmr->ifm_active |= IFM_1000_CX | IFM_FDX; break; } - if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KX4 + else if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KX4 || layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX) switch (adapter->link_speed) { case IXGBE_LINK_SPEED_10GB_FULL: - ifmr->ifm_active |= IFM_10_2 | IFM_FDX; + ifmr->ifm_active |= IFM_10G_CX4 | IFM_FDX; + break; + case IXGBE_LINK_SPEED_2_5GB_FULL: + ifmr->ifm_active |= IFM_2500_SX | IFM_FDX; break; case IXGBE_LINK_SPEED_1GB_FULL: - ifmr->ifm_active |= IFM_10_5 | IFM_FDX; + ifmr->ifm_active |= IFM_1000_CX | IFM_FDX; break; } @@ -1564,10 +1665,12 @@ ixgbe_media_status(struct ifnet * ifp, s ifmr->ifm_active |= IFM_UNKNOWN; #if __FreeBSD_version >= 900025 - /* Flow control setting */ - if (adapter->fc == ixgbe_fc_rx_pause || adapter->fc == ixgbe_fc_full) + /* Display current flow control setting used on link */ + if (hw->fc.current_mode == ixgbe_fc_rx_pause || + hw->fc.current_mode == ixgbe_fc_full) ifmr->ifm_active |= IFM_ETH_RXPAUSE; - if (adapter->fc == ixgbe_fc_tx_pause || adapter->fc == ixgbe_fc_full) + if (hw->fc.current_mode == ixgbe_fc_tx_pause || + hw->fc.current_mode == ixgbe_fc_full) ifmr->ifm_active |= IFM_ETH_TXPAUSE; #endif @@ -1597,21 +1700,22 @@ ixgbe_media_change(struct ifnet * ifp) if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER) return (EINVAL); + if (hw->phy.media_type == ixgbe_media_type_backplane) + return (EPERM); + /* ** We don't actually need to check against the supported ** media types of the adapter; ifmedia will take care of ** that for us. - ** NOTE: this relies on falling thru the switch - ** to get all the values set, it can be confusing. */ switch (IFM_SUBTYPE(ifm->ifm_media)) { case IFM_AUTO: case IFM_10G_T: speed |= IXGBE_LINK_SPEED_100_FULL; case IFM_10G_LRM: - case IFM_10G_SR: /* KR, too */ + case IFM_10G_SR: /* KR, too */ case IFM_10G_LR: - case IFM_10G_CX4: /* KX4 for now */ + case IFM_10G_CX4: /* KX4 */ speed |= IXGBE_LINK_SPEED_1GB_FULL; case IFM_10G_TWINAX: speed |= IXGBE_LINK_SPEED_10GB_FULL; @@ -1620,7 +1724,7 @@ ixgbe_media_change(struct ifnet * ifp) speed |= IXGBE_LINK_SPEED_100_FULL; case IFM_1000_LX: case IFM_1000_SX: - case IFM_1000_CX: /* KX until there's real support */ + case IFM_1000_CX: /* KX */ speed |= IXGBE_LINK_SPEED_1GB_FULL; break; case IFM_100_TX: @@ -1640,7 +1744,7 @@ ixgbe_media_change(struct ifnet * ifp) return (0); invalid: - device_printf(adapter->dev, "Invalid media type\n"); + device_printf(adapter->dev, "Invalid media type!\n"); return (EINVAL); } @@ -1865,7 +1969,6 @@ ixgbe_update_link_status(struct adapter struct ifnet *ifp = adapter->ifp; device_t dev = adapter->dev; - if (adapter->link_up){ if (adapter->link_active == FALSE) { if (bootverbose) @@ -1875,6 +1978,8 @@ ixgbe_update_link_status(struct adapter adapter->link_active = TRUE; /* Update any Flow Control changes */ ixgbe_fc_enable(&adapter->hw); + /* Update DMA coalescing config */ + ixgbe_config_dmac(adapter); if_link_state_change(ifp, LINK_STATE_UP); } } else { /* Link down */ @@ -1961,7 +2066,7 @@ ixgbe_identify_hardware(struct adapter * /* We need this here to set the num_segs below */ ixgbe_set_mac_type(hw); - /* Pick up the 82599 and VF settings */ + /* Pick up the 82599 settings */ if (hw->mac.type != ixgbe_mac_82598EB) { hw->phy.smart_speed = ixgbe_smart_speed; adapter->num_segs = IXGBE_82599_SCATTER; @@ -2071,6 +2176,7 @@ ixgbe_allocate_legacy(struct adapter *ad TASK_INIT(&adapter->link_task, 0, ixgbe_handle_link, adapter); TASK_INIT(&adapter->mod_task, 0, ixgbe_handle_mod, adapter); TASK_INIT(&adapter->msf_task, 0, ixgbe_handle_msf, adapter); + TASK_INIT(&adapter->phy_task, 0, ixgbe_handle_phy, adapter); #ifdef IXGBE_FDIR TASK_INIT(&adapter->fdir_task, 0, ixgbe_reinit_fdir, adapter); #endif @@ -2136,8 +2242,6 @@ ixgbe_allocate_msix(struct adapter *adap } #endif - - for (int i = 0; i < adapter->num_queues; i++, vector++, que++, txr++) { rid = vector + 1; que->res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -2187,14 +2291,11 @@ ixgbe_allocate_msix(struct adapter *adap "Bound RSS bucket %d to CPU %d\n", i, cpu_id); #else -#if 0 // This is too noisy - device_printf(dev, - "Bound queue %d to cpu %d\n", - i, cpu_id); + if (bootverbose) + device_printf(dev, + "Bound queue %d to cpu %d\n", + i, cpu_id); #endif -#endif - - #ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); #endif @@ -2240,6 +2341,7 @@ ixgbe_allocate_msix(struct adapter *adap TASK_INIT(&adapter->link_task, 0, ixgbe_handle_link, adapter); TASK_INIT(&adapter->mod_task, 0, ixgbe_handle_mod, adapter); TASK_INIT(&adapter->msf_task, 0, ixgbe_handle_msf, adapter); + TASK_INIT(&adapter->phy_task, 0, ixgbe_handle_phy, adapter); #ifdef IXGBE_FDIR TASK_INIT(&adapter->fdir_task, 0, ixgbe_reinit_fdir, adapter); #endif @@ -2465,6 +2567,12 @@ ixgbe_setup_interface(device_t dev, stru #if __FreeBSD_version >= 1100036 if_setgetcounterfn(ifp, ixgbe_get_counter); #endif +#if __FreeBSD_version >= 1100045 + /* TSO parameters */ + ifp->if_hw_tsomax = 65518; + ifp->if_hw_tsomaxsegcount = IXGBE_82599_SCATTER; + ifp->if_hw_tsomaxsegsize = 2048; +#endif #ifndef IXGBE_LEGACY_TX ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; @@ -2548,10 +2656,6 @@ ixgbe_add_media_types(struct adapter *ad ifmedia_add(&adapter->media, IFM_ETHER | IFM_10G_CX4, 0, NULL); if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_SX) ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_SX, 0, NULL); -#if 0 - if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_LX) - ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_LX, 0, NULL); -#endif /* ** Other (no matching FreeBSD media type): @@ -2560,25 +2664,24 @@ ixgbe_add_media_types(struct adapter *ad */ if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KR) { device_printf(dev, "Media supported: 10GbaseKR\n"); - device_printf(dev, "10GbaseKR mapped to 10baseT\n"); - ifmedia_add(&adapter->media, IFM_ETHER | IFM_10_T, 0, NULL); + device_printf(dev, "10GbaseKR mapped to 10GbaseSR\n"); + ifmedia_add(&adapter->media, IFM_ETHER | IFM_10G_SR, 0, NULL); } if (layer & IXGBE_PHYSICAL_LAYER_10GBASE_KX4) { device_printf(dev, "Media supported: 10GbaseKX4\n"); - device_printf(dev, "10GbaseKX4 mapped to 10base2\n"); - ifmedia_add(&adapter->media, IFM_ETHER | IFM_10_2, 0, NULL); + device_printf(dev, "10GbaseKX4 mapped to 10GbaseCX4\n"); + ifmedia_add(&adapter->media, IFM_ETHER | IFM_10G_CX4, 0, NULL); } if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_KX) { device_printf(dev, "Media supported: 1000baseKX\n"); - device_printf(dev, "1000baseKX mapped to 10base5\n"); - ifmedia_add(&adapter->media, IFM_ETHER | IFM_10_5, 0, NULL); + device_printf(dev, "1000baseKX mapped to 1000baseCX\n"); + ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_CX, 0, NULL); } if (layer & IXGBE_PHYSICAL_LAYER_1000BASE_BX) { /* Someday, someone will care about you... */ device_printf(dev, "Media supported: 1000baseBX\n"); } - /* Very old */ if (hw->device_id == IXGBE_DEV_ID_82598AT) { ifmedia_add(&adapter->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL); @@ -2706,7 +2809,8 @@ ixgbe_initialise_rss_mapping(struct adap { struct ixgbe_hw *hw = &adapter->hw; uint32_t reta; - int i, j, queue_id; + int i, j, queue_id, table_size; + int index_mult; uint32_t rss_key[10]; uint32_t mrqc; #ifdef RSS @@ -2724,8 +2828,23 @@ ixgbe_initialise_rss_mapping(struct adap arc4rand(&rss_key, sizeof(rss_key), 0); #endif + /* Set multiplier for RETA setup and table size based on MAC */ + index_mult = 0x1; + table_size = 128; + switch (adapter->hw.mac.type) { + case ixgbe_mac_82598EB: + index_mult = 0x11; + break; + case ixgbe_mac_X550: + case ixgbe_mac_X550EM_x: + table_size = 512; + break; + default: + break; + } + /* Set up the redirection table */ - for (i = 0, j = 0; i < 128; i++, j++) { + for (i = 0, j = 0; i < table_size; i++, j++) { if (j == adapter->num_queues) j = 0; #ifdef RSS /* @@ -2736,7 +2855,7 @@ ixgbe_initialise_rss_mapping(struct adap queue_id = rss_get_indirection_to_bucket(i); queue_id = queue_id % adapter->num_queues; #else - queue_id = (j * 0x11); + queue_id = (j * index_mult); #endif /* * The low 8 bits are for hash value (n+0); @@ -2745,7 +2864,10 @@ ixgbe_initialise_rss_mapping(struct adap reta = reta >> 8; reta = reta | ( ((uint32_t) queue_id) << 24); if ((i & 3) == 3) { - IXGBE_WRITE_REG(hw, IXGBE_RETA(i >> 2), reta); + if (i < 128) + IXGBE_WRITE_REG(hw, IXGBE_RETA(i >> 2), reta); + else + IXGBE_WRITE_REG(hw, IXGBE_ERETA((i >> 2) - 32), reta); reta = 0; } } @@ -2834,8 +2956,10 @@ ixgbe_initialize_receive_units(struct ad /* Enable broadcasts */ fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); fctrl |= IXGBE_FCTRL_BAM; - fctrl |= IXGBE_FCTRL_DPF; - fctrl |= IXGBE_FCTRL_PMCF; + if (adapter->hw.mac.type == ixgbe_mac_82598EB) { + fctrl |= IXGBE_FCTRL_DPF; + fctrl |= IXGBE_FCTRL_PMCF; + } IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); /* Set for Jumbo Frames? */ @@ -3045,30 +3169,37 @@ ixgbe_enable_intr(struct adapter *adapte mask = (IXGBE_EIMS_ENABLE_MASK & ~IXGBE_EIMS_RTX_QUEUE); /* Enable Fan Failure detection */ if (hw->device_id == IXGBE_DEV_ID_82598AT) - mask |= IXGBE_EIMS_GPI_SDP1_BY_MAC(hw); + mask |= IXGBE_EIMS_GPI_SDP1; switch (adapter->hw.mac.type) { case ixgbe_mac_82599EB: mask |= IXGBE_EIMS_ECC; /* Temperature sensor on some adapters */ - mask |= IXGBE_EIMS_GPI_SDP0_BY_MAC(hw); + mask |= IXGBE_EIMS_GPI_SDP0; /* SFP+ (RX_LOS_N & MOD_ABS_N) */ - mask |= IXGBE_EIMS_GPI_SDP1_BY_MAC(hw); - mask |= IXGBE_EIMS_GPI_SDP2_BY_MAC(hw); + mask |= IXGBE_EIMS_GPI_SDP1; + mask |= IXGBE_EIMS_GPI_SDP2; #ifdef IXGBE_FDIR mask |= IXGBE_EIMS_FLOW_DIR; #endif break; case ixgbe_mac_X540: - case ixgbe_mac_X550: - case ixgbe_mac_X550EM_a: - case ixgbe_mac_X550EM_x: /* Detect if Thermal Sensor is enabled */ fwsm = IXGBE_READ_REG(hw, IXGBE_FWSM); if (fwsm & IXGBE_FWSM_TS_ENABLED) mask |= IXGBE_EIMS_TS; - /* XXX: Which SFP mode line does this look at? */ - if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP) + mask |= IXGBE_EIMS_ECC; +#ifdef IXGBE_FDIR + mask |= IXGBE_EIMS_FLOW_DIR; +#endif + break; + case ixgbe_mac_X550: + case ixgbe_mac_X550EM_x: + /* MAC thermal sensor is automatically enabled */ + mask |= IXGBE_EIMS_TS; + /* Some devices use SDP0 for important information */ + if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP || + hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) mask |= IXGBE_EIMS_GPI_SDP0_BY_MAC(hw); mask |= IXGBE_EIMS_ECC; #ifdef IXGBE_FDIR @@ -3081,7 +3212,7 @@ ixgbe_enable_intr(struct adapter *adapte IXGBE_WRITE_REG(hw, IXGBE_EIMS, mask); - /* With RSS we use auto clear */ + /* With MSI-X we use auto clear */ if (adapter->msix_mem) { mask = IXGBE_EIMS_ENABLE_MASK; /* Don't autoclear Link */ @@ -3135,10 +3266,12 @@ ixgbe_get_slot_info(struct ixgbe_hw *hw) if (hw->device_id != IXGBE_DEV_ID_82599_SFP_SF_QP) { ixgbe_get_bus_info(hw); /* These devices don't use PCI-E */ - if (hw->mac.type == ixgbe_mac_X550EM_x - || hw->mac.type == ixgbe_mac_X550EM_a) + switch (hw->mac.type) { + case ixgbe_mac_X550EM_x: return; - goto display; + default: + goto display; + } } /* @@ -3260,7 +3393,6 @@ ixgbe_set_ivar(struct adapter *adapter, case ixgbe_mac_82599EB: case ixgbe_mac_X540: case ixgbe_mac_X550: - case ixgbe_mac_X550EM_a: case ixgbe_mac_X550EM_x: if (type == -1) { /* MISC IVAR */ index = (entry & 1) * 8; @@ -3289,8 +3421,14 @@ ixgbe_configure_ivars(struct adapter *ad if (ixgbe_max_interrupt_rate > 0) newitr = (4000000 / ixgbe_max_interrupt_rate) & 0x0FF8; - else + else { + /* + ** Disable DMA coalescing if interrupt moderation is + ** disabled. + */ + adapter->dmac = 0; newitr = 0; + } for (int i = 0; i < adapter->num_queues; i++, que++) { /* First the RX queue entry */ @@ -3350,7 +3488,7 @@ ixgbe_handle_link(void *context, int pen ixgbe_check_link(&adapter->hw, &adapter->link_speed, &adapter->link_up, 0); - ixgbe_update_link_status(adapter); + ixgbe_update_link_status(adapter); } /* @@ -3410,6 +3548,28 @@ ixgbe_handle_msf(void *context, int pend return; } +/* +** Tasklet for handling interrupts from an external PHY +*/ +static void +ixgbe_handle_phy(void *context, int pending) +{ + struct adapter *adapter = context; + struct ixgbe_hw *hw = &adapter->hw; + int error; + + error = hw->phy.ops.handle_lasi(hw); + if (error == IXGBE_ERR_OVERTEMP) + device_printf(adapter->dev, + "CRITICAL: EXTERNAL PHY OVER TEMP!! " + " PHY will downshift to lower power state!\n"); + else if (error) + device_printf(adapter->dev, + "Error handling LASI interrupt: %d\n", + error); + return; +} + #ifdef IXGBE_FDIR /* ** Tasklet for reinitializing the Flow Director filter table @@ -3432,6 +3592,127 @@ ixgbe_reinit_fdir(void *context, int pen } #endif +/********************************************************************* + * + * Configure DMA Coalescing + * + **********************************************************************/ +static void +ixgbe_config_dmac(struct adapter *adapter) +{ + struct ixgbe_hw *hw = &adapter->hw; + struct ixgbe_dmac_config *dcfg = &hw->mac.dmac_config; + + if (hw->mac.type < ixgbe_mac_X550 || + !hw->mac.ops.dmac_config) + return; + + if (dcfg->watchdog_timer ^ adapter->dmac || + dcfg->link_speed ^ adapter->link_speed) { + dcfg->watchdog_timer = adapter->dmac; + dcfg->fcoe_en = false; + dcfg->link_speed = adapter->link_speed; + dcfg->num_tcs = 1; + + INIT_DEBUGOUT2("dmac settings: watchdog %d, link speed %d\n", + dcfg->watchdog_timer, dcfg->link_speed); + + hw->mac.ops.dmac_config(hw); + } +} + +/* + * Checks whether the adapter supports Energy Efficient Ethernet + * or not, based on device ID. + */ +static void +ixgbe_check_eee_support(struct adapter *adapter) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 22:56:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2B76171; Thu, 30 Apr 2015 22:56:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0A3C18DD; Thu, 30 Apr 2015 22:56:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UMuiRd011924; Thu, 30 Apr 2015 22:56:44 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UMuikt011921; Thu, 30 Apr 2015 22:56:44 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201504302256.t3UMuikt011921@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Thu, 30 Apr 2015 22:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282290 - in head/sys/modules: ix ixv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 22:56:44 -0000 Author: erj Date: Thu Apr 30 22:56:43 2015 New Revision: 282290 URL: https://svnweb.freebsd.org/changeset/base/282290 Log: Include makefiles necessary to make ixgbe build with the new code. Originally supposed to be included in r282289. Differential Revision: D2414 Modified: head/sys/modules/ix/Makefile head/sys/modules/ixv/Makefile Modified: head/sys/modules/ix/Makefile ============================================================================== --- head/sys/modules/ix/Makefile Thu Apr 30 22:53:27 2015 (r282289) +++ head/sys/modules/ix/Makefile Thu Apr 30 22:56:43 2015 (r282290) @@ -9,7 +9,7 @@ SRCS += if_ix.c ix_txrx.c # Shared source SRCS += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c SRCS += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c -SRCS += ixgbe_82599.c ixgbe_82598.c ixgbe_x540.c +SRCS += ixgbe_82598.c ixgbe_82599.c ixgbe_x540.c ixgbe_x550.c CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP .include Modified: head/sys/modules/ixv/Makefile ============================================================================== --- head/sys/modules/ixv/Makefile Thu Apr 30 22:53:27 2015 (r282289) +++ head/sys/modules/ixv/Makefile Thu Apr 30 22:56:43 2015 (r282290) @@ -9,7 +9,7 @@ SRCS += if_ixv.c ix_txrx.c # Shared source SRCS += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c SRCS += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c -SRCS += ixgbe_82599.c ixgbe_82598.c ixgbe_x540.c +SRCS += ixgbe_82598.c ixgbe_82599.c ixgbe_x540.c ixgbe_x550.c CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP .include From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 23:27:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE4656BC; Thu, 30 Apr 2015 23:27:46 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 395171C1B; Thu, 30 Apr 2015 23:27:45 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t3UNRbmd024945 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 1 May 2015 02:27:37 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t3UNRbj0024944; Fri, 1 May 2015 02:27:37 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 1 May 2015 02:27:37 +0300 From: Gleb Smirnoff To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl Message-ID: <20150430232736.GB546@FreeBSD.org> References: <201504301823.t3UINd74073186@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201504301823.t3UINd74073186@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 23:27:46 -0000 John, On Thu, Apr 30, 2015 at 06:23:39PM +0000, John Baldwin wrote: J> Author: jhb J> Date: Thu Apr 30 18:23:38 2015 J> New Revision: 282280 J> URL: https://svnweb.freebsd.org/changeset/base/282280 J> J> Log: J> Various fixes to the stats in igb(4), ixgbe(4), and ixl(4). J> - Use hardware counters for ifnet stats in igb(4) when possible. This J> ensures these stats include packets that bypass the regular stack via J> netmap. J> - Don't derefence values off the end of the igb(4) VF stats structure. J> Instead, add a dedicated if_get_counter method for igb(4) VF interfaces. J> - Report missed packets on igb(4) as input queue drops rather than an J> input error. J> - Report bug_ring drop counts as output queue drops for igb(4) and ixgbe(4). J> - Export the buf_ring drop stats for individual rings via sysctl on J> ixgbe(4).^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ While you are here, let me remind you about this plan: https://lists.freebsd.org/pipermail/svn-src-head/2014-October/063575.html We can prototype the API to userland now, write down a utility that uses it, or add the functionality to an existing utility. And start with Intel drivers, that seem to be most interested in extra stats. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Apr 30 23:48:06 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24AD5B3E; Thu, 30 Apr 2015 23:48:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1226D1E08; Thu, 30 Apr 2015 23:48:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3UNm5r4036782; Thu, 30 Apr 2015 23:48:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3UNm5qX036781; Thu, 30 Apr 2015 23:48:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504302348.t3UNm5qX036781@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 30 Apr 2015 23:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282291 - head/usr.sbin/crunch/crunchide X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2015 23:48:06 -0000 Author: emaste Date: Thu Apr 30 23:48:05 2015 New Revision: 282291 URL: https://svnweb.freebsd.org/changeset/base/282291 Log: crunchide: Restore local EM_AARCH64 constant for bootstrapping Most of the EM_* constants are available in all supported host branches, but EM_AARCH64 was added relatively recently. Add it back to fix building HEAD on 10.x. Noticed by: adrian, jmallett Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- head/usr.sbin/crunch/crunchide/exec_elf32.c Thu Apr 30 22:56:43 2015 (r282290) +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Thu Apr 30 23:48:05 2015 (r282291) @@ -178,6 +178,9 @@ ELFNAMEEND(check)(int fd, const char *fn switch (xe16toh(eh.e_machine)) { case EM_386: break; case EM_ALPHA: break; +#ifndef EM_AARCH64 +#define EM_AARCH64 183 +#endif case EM_AARCH64: break; case EM_ARM: break; case EM_MIPS: break; From owner-svn-src-head@FreeBSD.ORG Fri May 1 03:33:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52C72A9D; Fri, 1 May 2015 03:33:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41E3C1534; Fri, 1 May 2015 03:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t413XWXA051498; Fri, 1 May 2015 03:33:32 GMT (envelope-from erj@FreeBSD.org) Received: (from erj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t413XW4A051497; Fri, 1 May 2015 03:33:32 GMT (envelope-from erj@FreeBSD.org) Message-Id: <201505010333.t413XW4A051497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: erj set sender to erj@FreeBSD.org using -f From: Eric Joyner Date: Fri, 1 May 2015 03:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282293 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 03:33:32 -0000 Author: erj Date: Fri May 1 03:33:31 2015 New Revision: 282293 URL: https://svnweb.freebsd.org/changeset/base/282293 Log: Fix build by adding ixgbe_x550.c to sys/conf/files for ixgbe. Submitted by: neel Approved by: jfv (mentor) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri May 1 00:31:40 2015 (r282292) +++ head/sys/conf/files Fri May 1 03:33:31 2015 (r282293) @@ -1779,6 +1779,8 @@ dev/ixgbe/ixgbe_82599.c optional ix ixv compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x540.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" +dev/ixgbe/ixgbe_x550.c optional ix ixv inet \ + compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb.c optional ix ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82598.c optional ix ixv inet \ From owner-svn-src-head@FreeBSD.ORG Fri May 1 04:35:43 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62C7DC61; Fri, 1 May 2015 04:35:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51F671B4B; Fri, 1 May 2015 04:35:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t414Zh66081728; Fri, 1 May 2015 04:35:43 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t414ZhfM081727; Fri, 1 May 2015 04:35:43 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201505010435.t414ZhfM081727@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 1 May 2015 04:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282294 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 04:35:43 -0000 Author: bdrewery Date: Fri May 1 04:35:42 2015 New Revision: 282294 URL: https://svnweb.freebsd.org/changeset/base/282294 Log: Fix a comment Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Fri May 1 03:33:31 2015 (r282293) +++ head/tools/build/check-links.sh Fri May 1 04:35:42 2015 (r282294) @@ -83,7 +83,7 @@ if [ ${CHECK_UNRESOLVED} -eq 1 ]; then libkey "crt1.o" setvar "${libkey}" "${lib_symbols}" - # No search libs for all symbols and report missing ones. + # Now search libs for all symbols and report missing ones. for sym in ${unresolved_symbols}; do found=0 for lib in ${list_libs}; do From owner-svn-src-head@FreeBSD.ORG Fri May 1 05:01:57 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 590DCE48; Fri, 1 May 2015 05:01:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4918A1017; Fri, 1 May 2015 05:01:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4151vja096002; Fri, 1 May 2015 05:01:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4151uAx096000; Fri, 1 May 2015 05:01:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201505010501.t4151uAx096000@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 1 May 2015 05:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282295 - head/tools/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 05:01:57 -0000 Author: bdrewery Date: Fri May 1 05:01:56 2015 New Revision: 282295 URL: https://svnweb.freebsd.org/changeset/base/282295 Log: Add a -v to tell where each symbol is resolved from. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/check-links.sh Modified: head/tools/build/check-links.sh ============================================================================== --- head/tools/build/check-links.sh Fri May 1 04:35:42 2015 (r282294) +++ head/tools/build/check-links.sh Fri May 1 05:01:56 2015 (r282295) @@ -20,9 +20,11 @@ libkey() { ret=0 CHECK_UNRESOLVED=1 -while getopts "U" flag; do +VERBOSE_RESOLVED=0 +while getopts "Uv" flag; do case "${flag}" in U) CHECK_UNRESOLVED=0 ;; + v) VERBOSE_RESOLVED=1 ;; esac done shift $((OPTIND-1)) @@ -91,7 +93,12 @@ if [ ${CHECK_UNRESOLVED} -eq 1 ]; then eval "lib_symbols=\"\${${libkey}}\"" # lib_symbols now contains symbols for the lib. case " ${lib_symbols} " in - *\ ${sym}\ *) found=1 && break ;; + *\ ${sym}\ *) + [ ${VERBOSE_RESOLVED} -eq 1 ] && + echo "Resolved symbol ${sym} from ${lib}" + found=1 + break + ;; esac done if [ $found -eq 0 ]; then From owner-svn-src-head@FreeBSD.ORG Fri May 1 05:11:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55A7C3E5; Fri, 1 May 2015 05:11:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 445761455; Fri, 1 May 2015 05:11:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t415BFMg098505; Fri, 1 May 2015 05:11:15 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t415BFcj098504; Fri, 1 May 2015 05:11:15 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505010511.t415BFcj098504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Fri, 1 May 2015 05:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282296 - head/sys/amd64/vmm/amd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 05:11:15 -0000 Author: neel Date: Fri May 1 05:11:14 2015 New Revision: 282296 URL: https://svnweb.freebsd.org/changeset/base/282296 Log: Emulate MSR_SYSCFG which is accessed by Linux on AMD cpus when MTRRs are enabled. MFC after: 2 weeks Modified: head/sys/amd64/vmm/amd/svm_msr.c Modified: head/sys/amd64/vmm/amd/svm_msr.c ============================================================================== --- head/sys/amd64/vmm/amd/svm_msr.c Fri May 1 05:01:56 2015 (r282295) +++ head/sys/amd64/vmm/amd/svm_msr.c Fri May 1 05:11:14 2015 (r282296) @@ -115,6 +115,7 @@ svm_rdmsr(struct svm_softc *sc, int vcpu case MSR_MTRR4kBase ... MSR_MTRR4kBase + 8: case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: case MSR_MTRR64kBase: + case MSR_SYSCFG: *result = 0; break; case MSR_AMDK8_IPM: @@ -141,6 +142,7 @@ svm_wrmsr(struct svm_softc *sc, int vcpu case MSR_MTRR4kBase ... MSR_MTRR4kBase + 8: case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: case MSR_MTRR64kBase: + case MSR_SYSCFG: break; /* Ignore writes */ case MSR_AMDK8_IPM: /* From owner-svn-src-head@FreeBSD.ORG Fri May 1 11:35:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 121DEAD5; Fri, 1 May 2015 11:35:58 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BDC091C3C; Fri, 1 May 2015 11:35:56 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 0AF9125D389C; Fri, 1 May 2015 11:35:46 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id C4F8BC76FDF; Fri, 1 May 2015 11:35:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id nBkJ8tjSiBaS; Fri, 1 May 2015 11:35:44 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 4AC0DC76FD3; Fri, 1 May 2015 11:35:44 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r282252 - head/lib/libcapsicum From: "Bjoern A. Zeeb" In-Reply-To: <201504292219.t3TMJeGn071528@svn.freebsd.org> Date: Fri, 1 May 2015 11:35:42 +0000 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <8BF65590-BE5D-4C77-BCB5-F26BF9606AB8@lists.zabbadoz.net> References: <201504292219.t3TMJeGn071528@svn.freebsd.org> To: Mariusz Zaborski X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 11:35:58 -0000 > On 29 Apr 2015, at 22:19 , Mariusz Zaborski = wrote: >=20 > Author: oshogbo > Date: Wed Apr 29 22:19:40 2015 > New Revision: 282252 > URL: https://svnweb.freebsd.org/changeset/base/282252 >=20 > Log: > Remove the use of nvlist_.*[vf] functions from libcapsicum and = replace > them with snprintf(3). Assert the results of snprintf(3). >=20 > Approved by: pjd (mentor) This broke at least ping (see current@). Concluded by binary search. >=20 > Modified: > head/lib/libcapsicum/libcapsicum_dns.c > head/lib/libcapsicum/libcapsicum_grp.c > head/lib/libcapsicum/libcapsicum_pwd.c =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-head@FreeBSD.ORG Fri May 1 11:46:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EB5BC94; Fri, 1 May 2015 11:46:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D8011D13; Fri, 1 May 2015 11:46:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41BkO9e094165; Fri, 1 May 2015 11:46:24 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41BkOOY094164; Fri, 1 May 2015 11:46:24 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505011146.t41BkOOY094164@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 11:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282297 - head/share/doc/papers/bufbio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 11:46:25 -0000 Author: bapt Date: Fri May 1 11:46:24 2015 New Revision: 282297 URL: https://svnweb.freebsd.org/changeset/base/282297 Log: Fix font issues Submitted by: heirloom doctools upstream Modified: head/share/doc/papers/bufbio/bio.ms Modified: head/share/doc/papers/bufbio/bio.ms ============================================================================== --- head/share/doc/papers/bufbio/bio.ms Fri May 1 05:11:14 2015 (r282296) +++ head/share/doc/papers/bufbio/bio.ms Fri May 1 11:46:24 2015 (r282297) @@ -40,7 +40,7 @@ This paper contains the road-map for a s FreeBSD, which will support these facilities. .AE .NH -The miseducation of \fCstruct buf\fP. +The miseducation of \f(CW.)struct buf\fP. .PP To fully appreciate the topic, I include a little historic overview of struct buf, it is a most enlightening case of not exactly bit-rot @@ -51,7 +51,7 @@ memory is was introduced into UNIX, all to a struct buf. In the 6th edition sources, as printed in Lions Book, struct buf looks like this: .DS -.ft C +.ft CW .ps -1 struct buf { @@ -95,7 +95,7 @@ aspect and only a few fields relate excl If we step forward to the BSD 4.4-Lite-2 release, struct buf has grown a bit here or there: .DS -.ft C +.ft CW .ps -1 struct buf { LIST_ENTRY(buf) b_hash; /* Hash chain. */ @@ -144,7 +144,7 @@ aspect, link buffers to the VM system, p .PP By the time we get to FreeBSD 3.0 more stuff has grown on struct buf: .DS -.ft C +.ft CW .ps -1 struct buf { LIST_ENTRY(buf) b_hash; /* Hash chain. */ @@ -215,7 +215,7 @@ and Vinum. They all basically do the sa a logical space to a physical space, and the mappings they perform can be 1:1 or 1:N. \** .FS -It is interesting to note that Lions in his comments to the \fCrkaddr\fP +It is interesting to note that Lions in his comments to the \f(CW.)rkaddr\fP routine (p. 16-2) writes \fIThe code in this procedure incorporates a special feature for files which extend over more than one disk drive. This feature is described in the UPM Section "RK(IV)". Its @@ -258,7 +258,7 @@ limited extent diskslice/label, which need only the I/O aspect, not the vnode, caching or VM linkage. .IP .I -The I/O aspect of struct buf should be put in a separate \fCstruct bio\fP. +The I/O aspect of struct buf should be put in a separate \f(CW.)struct bio\fP. .R .NH 1 Implications for future struct buf improvements @@ -296,7 +296,7 @@ Anything that could be added to or done the I/O aspect of struct buf can also be added to or done with the I/O aspect if it lives in a new "struct bio". .NH 1 -Implementing a \fCstruct bio\fP +Implementing a \f(CW.)struct bio\fP .PP The first decision to be made was who got to use the name "struct buf", and considering the fact that it is the I/O aspect which gets separated @@ -344,7 +344,7 @@ Definition of struct bio .PP With the cleanup of b_flags in place, the definition of struct bio looks like this: .DS -.ft C +.ft CW .ps -1 struct bio { u_int bio_cmd; /* I/O operation. */ @@ -375,7 +375,7 @@ Definition of struct buf After adding a struct bio to struct buf and the fields aliased into it struct buf looks like this: .DS -.ft C +.ft CW .ps -1 struct buf { /* XXX: b_io must be the first element of struct buf for now /phk */ @@ -424,7 +424,7 @@ And can be found at http://phk.freebsd.d .FE and consists mainly of systematic substitutions like these .DS -.ft C +.ft CW s/struct buf/struct bio/ s/b_flags/bio_flags/ s/b_bcount/bio_bcount/ From owner-svn-src-head@FreeBSD.ORG Fri May 1 11:56:22 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97A9C118; Fri, 1 May 2015 11:56:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86CB51E0F; Fri, 1 May 2015 11:56:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41BuMWM099202; Fri, 1 May 2015 11:56:22 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41BuM75099201; Fri, 1 May 2015 11:56:22 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201505011156.t41BuM75099201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 1 May 2015 11:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282298 - head/lib/libcapsicum X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 11:56:22 -0000 Author: bz Date: Fri May 1 11:56:21 2015 New Revision: 282298 URL: https://svnweb.freebsd.org/changeset/base/282298 Log: Unreak DNS usage through libcapsicum, which broke, e.g., ping in r282252 with what looks like a copy and paste error. Sponsored by: DARPA/AFRL Modified: head/lib/libcapsicum/libcapsicum_dns.c Modified: head/lib/libcapsicum/libcapsicum_dns.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_dns.c Fri May 1 11:46:24 2015 (r282297) +++ head/lib/libcapsicum/libcapsicum_dns.c Fri May 1 11:56:21 2015 (r282298) @@ -357,7 +357,7 @@ cap_dns_family_limit(cap_channel_t *chan else limit_remove(limits, "family"); for (i = 0; i < nfamilies; i++) { - n = snprintf(nvlname, sizeof(nvlname), "type%u", i); + n = snprintf(nvlname, sizeof(nvlname), "family%u", i); assert(n > 0 && n < (int)sizeof(nvlname)); nvlist_add_number(limits, nvlname, (uint64_t)families[i]); } From owner-svn-src-head@FreeBSD.ORG Fri May 1 12:10:37 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A853372D; Fri, 1 May 2015 12:10:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 976131F78; Fri, 1 May 2015 12:10:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41CAbEp006539; Fri, 1 May 2015 12:10:37 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41CAbWa006538; Fri, 1 May 2015 12:10:37 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201505011210.t41CAbWa006538@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 1 May 2015 12:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282299 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 12:10:37 -0000 Author: bz Date: Fri May 1 12:10:36 2015 New Revision: 282299 URL: https://svnweb.freebsd.org/changeset/base/282299 Log: Remove the extra extern which makes gcc complain; I assume it came from r282289. We do include ixgbe.h which does include ixgbe_common.h which has the extern statement for ixgbe_stop_mac_link_on_d3_82599(). Modified: head/sys/dev/ixgbe/if_ix.c Modified: head/sys/dev/ixgbe/if_ix.c ============================================================================== --- head/sys/dev/ixgbe/if_ix.c Fri May 1 11:56:21 2015 (r282298) +++ head/sys/dev/ixgbe/if_ix.c Fri May 1 12:10:36 2015 (r282299) @@ -204,10 +204,6 @@ static void ixgbe_handle_phy(void *, int static void ixgbe_reinit_fdir(void *, int); #endif - -/* Missing shared code prototype */ -extern void ixgbe_stop_mac_link_on_d3_82599(struct ixgbe_hw *hw); - /********************************************************************* * FreeBSD Device Interface Entry Points *********************************************************************/ From owner-svn-src-head@FreeBSD.ORG Fri May 1 12:49:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36EBAD60; Fri, 1 May 2015 12:49:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25EAB130E; Fri, 1 May 2015 12:49:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41Cn4Uh024340; Fri, 1 May 2015 12:49:04 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41Cn4RO024339; Fri, 1 May 2015 12:49:04 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201505011249.t41Cn4RO024339@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Fri, 1 May 2015 12:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282300 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 12:49:04 -0000 Author: gnn Date: Fri May 1 12:49:03 2015 New Revision: 282300 URL: https://svnweb.freebsd.org/changeset/base/282300 Log: Add a state transition call to show that we have entered TIME_WAIT. Although this is not important to the rest of the TCP processing it is a conveneint way to make the DTrace state-transition probe catch this important state change. MFC after: 1 week Modified: head/sys/netinet/tcp_timewait.c Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Fri May 1 12:10:36 2015 (r282299) +++ head/sys/netinet/tcp_timewait.c Fri May 1 12:49:03 2015 (r282300) @@ -251,6 +251,13 @@ tcp_twstart(struct tcpcb *tp) } } + + /* + * For use only by DTrace. We do not reference the state + * after this point so modifying it in place is not a problem. + */ + tcp_state_change(tp, TCPS_TIME_WAIT); + tw = uma_zalloc(V_tcptw_zone, M_NOWAIT); if (tw == NULL) { /* From owner-svn-src-head@FreeBSD.ORG Fri May 1 13:30:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37D6E1D4; Fri, 1 May 2015 13:30:42 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1314B17B0; Fri, 1 May 2015 13:30:42 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0779EB979; Fri, 1 May 2015 09:30:41 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl Date: Fri, 01 May 2015 09:11:54 -0400 Message-ID: <1998053.shmPH6saZj@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150430232736.GB546@FreeBSD.org> References: <201504301823.t3UINd74073186@svn.freebsd.org> <20150430232736.GB546@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 01 May 2015 09:30:41 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 13:30:42 -0000 On Friday, May 01, 2015 02:27:37 AM Gleb Smirnoff wrote: > John, > > On Thu, Apr 30, 2015 at 06:23:39PM +0000, John Baldwin wrote: > J> Author: jhb > J> Date: Thu Apr 30 18:23:38 2015 > J> New Revision: 282280 > J> URL: https://svnweb.freebsd.org/changeset/base/282280 > J> > J> Log: > J> Various fixes to the stats in igb(4), ixgbe(4), and ixl(4). > J> - Use hardware counters for ifnet stats in igb(4) when possible. This > J> ensures these stats include packets that bypass the regular stack via > J> netmap. > J> - Don't derefence values off the end of the igb(4) VF stats structure. > J> Instead, add a dedicated if_get_counter method for igb(4) VF interfaces. > J> - Report missed packets on igb(4) as input queue drops rather than an > J> input error. > J> - Report bug_ring drop counts as output queue drops for igb(4) and ixgbe(4). > J> - Export the buf_ring drop stats for individual rings via sysctl on > J> ixgbe(4).^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > ^^^^^^^^^ > > While you are here, let me remind you about this plan: > > https://lists.freebsd.org/pipermail/svn-src-head/2014-October/063575.html > > We can prototype the API to userland now, write down a utility that uses > it, or add the functionality to an existing utility. And start with Intel > drivers, that seem to be most interested in extra stats. So the importaing thing here is that if_get_counter() is still doing per-ifnet stats. The stat you underlined above is per-queue instead. We well need more explicitly knowledge of queues outside of drivers and in the stack itself to support a generic framework for per-queue stats. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri May 1 13:51:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EF29672; Fri, 1 May 2015 13:51:39 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 85EB319C1; Fri, 1 May 2015 13:51:37 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t41DpYZ1027917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 1 May 2015 16:51:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t41DpYYm027916; Fri, 1 May 2015 16:51:34 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 1 May 2015 16:51:34 +0300 From: Gleb Smirnoff To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl Message-ID: <20150501135134.GC546@FreeBSD.org> References: <201504301823.t3UINd74073186@svn.freebsd.org> <20150430232736.GB546@FreeBSD.org> <1998053.shmPH6saZj@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1998053.shmPH6saZj@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 13:51:39 -0000 On Fri, May 01, 2015 at 09:11:54AM -0400, John Baldwin wrote: J> > On Thu, Apr 30, 2015 at 06:23:39PM +0000, John Baldwin wrote: J> > J> Author: jhb J> > J> Date: Thu Apr 30 18:23:38 2015 J> > J> New Revision: 282280 J> > J> URL: https://svnweb.freebsd.org/changeset/base/282280 J> > J> J> > J> Log: J> > J> Various fixes to the stats in igb(4), ixgbe(4), and ixl(4). J> > J> - Use hardware counters for ifnet stats in igb(4) when possible. This J> > J> ensures these stats include packets that bypass the regular stack via J> > J> netmap. J> > J> - Don't derefence values off the end of the igb(4) VF stats structure. J> > J> Instead, add a dedicated if_get_counter method for igb(4) VF interfaces. J> > J> - Report missed packets on igb(4) as input queue drops rather than an J> > J> input error. J> > J> - Report bug_ring drop counts as output queue drops for igb(4) and ixgbe(4). J> > J> - Export the buf_ring drop stats for individual rings via sysctl on J> > J> ixgbe(4).^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ J> > ^^^^^^^^^ J> > J> > While you are here, let me remind you about this plan: J> > J> > https://lists.freebsd.org/pipermail/svn-src-head/2014-October/063575.html J> > J> > We can prototype the API to userland now, write down a utility that uses J> > it, or add the functionality to an existing utility. And start with Intel J> > drivers, that seem to be most interested in extra stats. J> J> So the importaing thing here is that if_get_counter() is still doing J> per-ifnet stats. The stat you underlined above is per-queue instead. J> We well need more explicitly knowledge of queues outside of drivers J> and in the stack itself to support a generic framework for per-queue J> stats. This depends on how generic we want the API to be. Of course, we can add an extra argument to if_get_counter(). However, if we don't expect the number of queues to exceed a reasonable number of 255 :), we can fit the functionality into existing API. We can keep the queue number in the highest 8 bits of the ift_counter parameter. #define IFCOUNTER_MASK 0x00ffffff #define IFCOUNTER_QUEUE(c) ((c) >> 24) -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Fri May 1 14:48:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A79072CE; Fri, 1 May 2015 14:48:01 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 819A81F45; Fri, 1 May 2015 14:48:01 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9A32EB939; Fri, 1 May 2015 10:48:00 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl Date: Fri, 01 May 2015 10:47:43 -0400 Message-ID: <2197979.EUYqekgM4M@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150501135134.GC546@FreeBSD.org> References: <201504301823.t3UINd74073186@svn.freebsd.org> <1998053.shmPH6saZj@ralph.baldwin.cx> <20150501135134.GC546@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 01 May 2015 10:48:00 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 14:48:01 -0000 On Friday, May 01, 2015 04:51:34 PM Gleb Smirnoff wrote: > On Fri, May 01, 2015 at 09:11:54AM -0400, John Baldwin wrote: > J> > On Thu, Apr 30, 2015 at 06:23:39PM +0000, John Baldwin wrote: > J> > J> Author: jhb > J> > J> Date: Thu Apr 30 18:23:38 2015 > J> > J> New Revision: 282280 > J> > J> URL: https://svnweb.freebsd.org/changeset/base/282280 > J> > J> > J> > J> Log: > J> > J> Various fixes to the stats in igb(4), ixgbe(4), and ixl(4). > J> > J> - Use hardware counters for ifnet stats in igb(4) when possible. This > J> > J> ensures these stats include packets that bypass the regular stack via > J> > J> netmap. > J> > J> - Don't derefence values off the end of the igb(4) VF stats structure. > J> > J> Instead, add a dedicated if_get_counter method for igb(4) VF interfaces. > J> > J> - Report missed packets on igb(4) as input queue drops rather than an > J> > J> input error. > J> > J> - Report bug_ring drop counts as output queue drops for igb(4) and ixgbe(4). > J> > J> - Export the buf_ring drop stats for individual rings via sysctl on > J> > J> ixgbe(4).^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > J> > ^^^^^^^^^ > J> > > J> > While you are here, let me remind you about this plan: > J> > > J> > https://lists.freebsd.org/pipermail/svn-src-head/2014-October/063575.html > J> > > J> > We can prototype the API to userland now, write down a utility that uses > J> > it, or add the functionality to an existing utility. And start with Intel > J> > drivers, that seem to be most interested in extra stats. > J> > J> So the importaing thing here is that if_get_counter() is still doing > J> per-ifnet stats. The stat you underlined above is per-queue instead. > J> We well need more explicitly knowledge of queues outside of drivers > J> and in the stack itself to support a generic framework for per-queue > J> stats. > > This depends on how generic we want the API to be. Of course, we can add > an extra argument to if_get_counter(). > > However, if we don't expect the number of queues to exceed a reasonable > number of 255 :), we can fit the functionality into existing API. > We can keep the queue number in the highest 8 bits of the ift_counter > parameter. > > #define IFCOUNTER_MASK 0x00ffffff > #define IFCOUNTER_QUEUE(c) ((c) >> 24) I'd prefer that expose queues more directly and figure out how to handle per-queue stats then (e.g. do we have some sort of driver-independent structure that each ifnet has 1 or more of that maps to a queue and has driver provided methods, etc. If so you could have a driver method for queue stats). Note that I did use if_get_counter to report the per-interface stats instead of adding a new sysctl. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri May 1 15:40:23 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56C4139C; Fri, 1 May 2015 15:40:23 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2E5014D3; Fri, 1 May 2015 15:40:22 +0000 (UTC) Received: by wiun10 with SMTP id n10so51386494wiu.1; Fri, 01 May 2015 08:40:21 -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:message-id:subject :from:to:cc:content-type; bh=gfU3IfuIOqpKSf/WgFwPFbWmLpNn1o9npbBi12D83ZU=; b=KDERnqaIplAv8i3sVYfQ0NvnDNH2TkZYMGZ/KWrT0RE1EAsJddSXA8wSAlfIDBHNDe HdIFvsQGgrApJ93xs8i67B+R9698rhgyE7UJz9DB90oUaQ+NbX0BWXEKkiaciVLZBvu6 hTEqixFdCMs55VpwyeU7PaVBtxLTObl805tSW97BEbvSTiOKawtq0cmqPugt+2VbZRuT ZdLHWSjnSKLpDqMLAb2MTSikIoTjTFEcGX+zzEqZ5MZU96Gi3ipmdQmS3nS+0tbNIAsP fGCTB+uJFbYSeKfZBN0j+HN5Y9QPAqT70lt5mtSbP6YSwb7pBmcZLSW+nnc7gRcE0D47 nEEw== MIME-Version: 1.0 X-Received: by 10.180.78.65 with SMTP id z1mr15440026wiw.14.1430494821532; Fri, 01 May 2015 08:40:21 -0700 (PDT) Sender: oshogbo.vx@gmail.com Received: by 10.28.187.214 with HTTP; Fri, 1 May 2015 08:40:21 -0700 (PDT) In-Reply-To: <201505011156.t41BuM75099201@svn.freebsd.org> References: <201505011156.t41BuM75099201@svn.freebsd.org> Date: Fri, 1 May 2015 17:40:21 +0200 X-Google-Sender-Auth: Mu9M_CL9vd1XJ4HMa8Mh8aWI3UE Message-ID: Subject: Re: svn commit: r282298 - head/lib/libcapsicum From: Mariusz Zaborski To: "Bjoern A. Zeeb" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 15:40:23 -0000 On 1 May 2015 at 13:56, Bjoern A. Zeeb wrote: > Author: bz > Date: Fri May 1 11:56:21 2015 > New Revision: 282298 > URL: https://svnweb.freebsd.org/changeset/base/282298 > > Log: > Unreak DNS usage through libcapsicum, which broke, e.g., ping in r282252 > with what looks like a copy and paste error. > > Sponsored by: DARPA/AFRL > > Modified: > head/lib/libcapsicum/libcapsicum_dns.c > > Modified: head/lib/libcapsicum/libcapsicum_dns.c > > ============================================================================== > --- head/lib/libcapsicum/libcapsicum_dns.c Fri May 1 11:46:24 2015 > (r282297) > +++ head/lib/libcapsicum/libcapsicum_dns.c Fri May 1 11:56:21 2015 > (r282298) > @@ -357,7 +357,7 @@ cap_dns_family_limit(cap_channel_t *chan > else > limit_remove(limits, "family"); > for (i = 0; i < nfamilies; i++) { > - n = snprintf(nvlname, sizeof(nvlname), "type%u", i); > + n = snprintf(nvlname, sizeof(nvlname), "family%u", i); > assert(n > 0 && n < (int)sizeof(nvlname)); > nvlist_add_number(limits, nvlname, (uint64_t)families[i]); > } > Oh, crap. Thanks. From owner-svn-src-head@FreeBSD.ORG Fri May 1 16:00:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F51B957; Fri, 1 May 2015 16:00:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 451D21741; Fri, 1 May 2015 16:00:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41G0Uo6021148; Fri, 1 May 2015 16:00:30 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41G0UEK021147; Fri, 1 May 2015 16:00:30 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505011600.t41G0UEK021147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Fri, 1 May 2015 16:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282301 - head/sys/amd64/vmm/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 16:00:30 -0000 Author: neel Date: Fri May 1 16:00:29 2015 New Revision: 282301 URL: https://svnweb.freebsd.org/changeset/base/282301 Log: r281630 relaxed the limits on the vectors that can be asserted in the IRRs. Do the same when transitioning a vector from the IRR to the ISR and also when extinguishing it from the ISR in response to an EOI. Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/sys/amd64/vmm/io/vlapic.c Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Fri May 1 12:49:03 2015 (r282300) +++ head/sys/amd64/vmm/io/vlapic.c Fri May 1 16:00:29 2015 (r282301) @@ -547,6 +547,8 @@ vlapic_update_ppr(struct vlapic *vlapic) VLAPIC_CTR1(vlapic, "vlapic_update_ppr 0x%02x", ppr); } +static VMM_STAT(VLAPIC_GRATUITOUS_EOI, "EOI without any in-service interrupt"); + static void vlapic_process_eoi(struct vlapic *vlapic) { @@ -557,11 +559,7 @@ vlapic_process_eoi(struct vlapic *vlapic isrptr = &lapic->isr0; tmrptr = &lapic->tmr0; - /* - * The x86 architecture reserves the the first 32 vectors for use - * by the processor. - */ - for (i = 7; i > 0; i--) { + for (i = 7; i >= 0; i--) { idx = i * 4; bitpos = fls(isrptr[idx]); if (bitpos-- != 0) { @@ -570,17 +568,21 @@ vlapic_process_eoi(struct vlapic *vlapic vlapic->isrvec_stk_top); } isrptr[idx] &= ~(1 << bitpos); + vector = i * 32 + bitpos; + VCPU_CTR1(vlapic->vm, vlapic->vcpuid, "EOI vector %d", + vector); VLAPIC_CTR_ISR(vlapic, "vlapic_process_eoi"); vlapic->isrvec_stk_top--; vlapic_update_ppr(vlapic); if ((tmrptr[idx] & (1 << bitpos)) != 0) { - vector = i * 32 + bitpos; vioapic_process_eoi(vlapic->vm, vlapic->vcpuid, vector); } return; } } + VCPU_CTR0(vlapic->vm, vlapic->vcpuid, "Gratuitous EOI"); + vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_GRATUITOUS_EOI, 1); } static __inline int @@ -1092,11 +1094,7 @@ vlapic_pending_intr(struct vlapic *vlapi irrptr = &lapic->irr0; - /* - * The x86 architecture reserves the the first 32 vectors for use - * by the processor. - */ - for (i = 7; i > 0; i--) { + for (i = 7; i >= 0; i--) { idx = i * 4; val = atomic_load_acq_int(&irrptr[idx]); bitpos = fls(val); From owner-svn-src-head@FreeBSD.ORG Fri May 1 16:31:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 018A1696; Fri, 1 May 2015 16:31:18 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF5F81E01; Fri, 1 May 2015 16:31:17 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YoDqG-000GiD-Ez; Fri, 01 May 2015 19:31:08 +0300 Date: Fri, 1 May 2015 19:31:08 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Cc: John Baldwin , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl Message-ID: <20150501163108.GZ1394@zxy.spb.ru> References: <201504301823.t3UINd74073186@svn.freebsd.org> <20150430232736.GB546@FreeBSD.org> <1998053.shmPH6saZj@ralph.baldwin.cx> <20150501135134.GC546@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150501135134.GC546@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 16:31:18 -0000 On Fri, May 01, 2015 at 04:51:34PM +0300, Gleb Smirnoff wrote: > On Fri, May 01, 2015 at 09:11:54AM -0400, John Baldwin wrote: > J> > On Thu, Apr 30, 2015 at 06:23:39PM +0000, John Baldwin wrote: > J> > J> Author: jhb > J> > J> Date: Thu Apr 30 18:23:38 2015 > J> > J> New Revision: 282280 > J> > J> URL: https://svnweb.freebsd.org/changeset/base/282280 > J> > J> > J> > J> Log: > J> > J> Various fixes to the stats in igb(4), ixgbe(4), and ixl(4). > J> > J> - Use hardware counters for ifnet stats in igb(4) when possible. This > J> > J> ensures these stats include packets that bypass the regular stack via > J> > J> netmap. > J> > J> - Don't derefence values off the end of the igb(4) VF stats structure. > J> > J> Instead, add a dedicated if_get_counter method for igb(4) VF interfaces. > J> > J> - Report missed packets on igb(4) as input queue drops rather than an > J> > J> input error. > J> > J> - Report bug_ring drop counts as output queue drops for igb(4) and ixgbe(4). > J> > J> - Export the buf_ring drop stats for individual rings via sysctl on > J> > J> ixgbe(4).^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > J> > ^^^^^^^^^ > J> > > J> > While you are here, let me remind you about this plan: > J> > > J> > https://lists.freebsd.org/pipermail/svn-src-head/2014-October/063575.html > J> > > J> > We can prototype the API to userland now, write down a utility that uses > J> > it, or add the functionality to an existing utility. And start with Intel > J> > drivers, that seem to be most interested in extra stats. > J> > J> So the importaing thing here is that if_get_counter() is still doing > J> per-ifnet stats. The stat you underlined above is per-queue instead. > J> We well need more explicitly knowledge of queues outside of drivers > J> and in the stack itself to support a generic framework for per-queue > J> stats. > > This depends on how generic we want the API to be. Of course, we can add > an extra argument to if_get_counter(). > > However, if we don't expect the number of queues to exceed a reasonable > number of 255 :), we can fit the functionality into existing API. > We can keep the queue number in the highest 8 bits of the ift_counter > parameter. In case of hardware-assist NIC emulation numbers may be rise: x710 have 1536 queue per port. From owner-svn-src-head@FreeBSD.ORG Fri May 1 16:31:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87B9D7E5; Fri, 1 May 2015 16:31:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7538D1EA3; Fri, 1 May 2015 16:31:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41GVtWq037654; Fri, 1 May 2015 16:31:55 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41GVtAK037653; Fri, 1 May 2015 16:31:55 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505011631.t41GVtAK037653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Fri, 1 May 2015 16:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282302 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 16:31:55 -0000 Author: oshogbo Date: Fri May 1 16:31:54 2015 New Revision: 282302 URL: https://svnweb.freebsd.org/changeset/base/282302 Log: Remove symlinks to the nvlist_.*[vf] functions. This should be done with r282257 commit. Approved by: pjd (mentor) Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri May 1 16:00:29 2015 (r282301) +++ head/ObsoleteFiles.inc Fri May 1 16:31:54 2015 (r282302) @@ -38,6 +38,65 @@ # xargs -n1 | sort | uniq -d; # done +# 20150501: Remove the nvlist_.*[vf] functions manpages. +OLD_FILES+=usr/share/man/man3/nvlist_addf_binary.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addf_bool.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addf_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addf_null.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addf_number.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addf_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addf_string.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addv_binary.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addv_bool.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addv_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addv_null.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addv_number.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addv_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_addv_string.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsf_binary.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsf_bool.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsf_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsf_null.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsf_number.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsf_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsf_string.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsf_type.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsv_binary.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsv_bool.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsv_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsv_null.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsv_number.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsv_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsv_string.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_existsv_type.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freef_binary.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freef_bool.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freef_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freef_null.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freef_number.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freef_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freef_string.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freef_type.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freev_binary.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freev_bool.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freev_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freev_null.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freev_number.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freev_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freev_string.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_freev_type.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getf_binary.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getf_bool.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getf_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getf_number.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getf_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getf_string.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getv_binary.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getv_bool.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getv_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getv_number.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getv_nvlist.3.gz +OLD_FILES+=usr/share/man/man3/nvlist_getv_string.3.gz # 20150429: OLD_FILES+=usr/share/docs/papers/hwpmc.ascii.gz # 20150427: test/sys/kern/mmap_test moved to test/sys/vm/mmap_test From owner-svn-src-head@FreeBSD.ORG Fri May 1 16:37:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F0369BF; Fri, 1 May 2015 16:37:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D03F1EE4; Fri, 1 May 2015 16:37:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41Gbf9f039002; Fri, 1 May 2015 16:37:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41GbfQm039001; Fri, 1 May 2015 16:37:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201505011637.t41GbfQm039001@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 1 May 2015 16:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282303 - head/tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 16:37:41 -0000 Author: emaste Date: Fri May 1 16:37:40 2015 New Revision: 282303 URL: https://svnweb.freebsd.org/changeset/base/282303 Log: OptionalObsoleteFiles: don't remove c++filt when using ELF Tool Chain c++filt is listed here twice, for MK_CXX == no and MK_GCC == no, but r282285 only caught one of them. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 1 16:31:54 2015 (r282302) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 1 16:37:40 2015 (r282303) @@ -1722,7 +1722,9 @@ OLD_FILES+=usr/share/man/man8/unstr.8.gz .endif .if ${MK_GCC} == no +.if ${MK_ELFTOOLCHAIN_TOOLS} == no OLD_FILES+=usr/bin/c++filt +.endif OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/bin/gcc OLD_FILES+=usr/bin/gcov From owner-svn-src-head@FreeBSD.ORG Fri May 1 16:38:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CAADB11; Fri, 1 May 2015 16:38:47 +0000 (UTC) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 16DB91EF1; Fri, 1 May 2015 16:38:47 +0000 (UTC) Received: by igbyr2 with SMTP id yr2so43026314igb.0; Fri, 01 May 2015 09:38: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:from:date:message-id :subject:to:content-type; bh=073RWpUQpq8phst3a3CYc7XlNExoD4K40kBIdls0Ui8=; b=jACCO5qfQryUdt09v1UMOVxVgERGueVeBiy2rLNM8OpxAmWki/4qnxd+xcRj+Q2qzL pkK6FLN4wjeSVjhbXSmNqfXVEEk1kxJY++qNprh2RNDtMRIzOaaoLrcewuYiO9Qh/Ud6 c5qcOtybqRjaqwQCPw8LqY31s8w6LYokPDGkHbFOW1EtkXGzXSl418hpbTWkaf72oqde vF9dPlmp/vzSErsHxVfT5RuUzrihm/OX1kXAQplX4YqZR58PRrGnE7KzhkXnRpnDRqqu zpetxHYzQBCyL7Loc/IBJjXO3qXcWebM9UWFe1NAMgjiBGXPkV1H+PVP2tsUpqcVu0br c7UA== X-Received: by 10.43.12.136 with SMTP id pi8mr15711760icb.6.1430498326503; Fri, 01 May 2015 09:38:46 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.48.3 with HTTP; Fri, 1 May 2015 09:38:25 -0700 (PDT) In-Reply-To: <201504302130.t3ULUY8H067269@svn.freebsd.org> References: <201504302130.t3ULUY8H067269@svn.freebsd.org> From: Ed Maste Date: Fri, 1 May 2015 12:38:25 -0400 X-Google-Sender-Auth: dR5UMMkPVZW0GGd51ZVucec_dvI Message-ID: Subject: Re: svn commit: r282285 - in head: gnu/usr.bin/cc tools/build/mk usr.bin To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 16:38:47 -0000 On 30 April 2015 at 17:30, Ed Maste wrote: > Author: emaste > Date: Thu Apr 30 21:30:33 2015 > New Revision: 282285 > URL: https://svnweb.freebsd.org/changeset/base/282285 > > Log: > Add ELF Tool Chain's c++filt to the build This should also have Relnotes: Yes From owner-svn-src-head@FreeBSD.ORG Fri May 1 16:41:47 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 702F6C6C; Fri, 1 May 2015 16:41:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DB671FAE; Fri, 1 May 2015 16:41:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41GflOw042006; Fri, 1 May 2015 16:41:47 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41GflDH042005; Fri, 1 May 2015 16:41:47 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505011641.t41GflDH042005@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Fri, 1 May 2015 16:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282304 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 16:41:47 -0000 Author: oshogbo Date: Fri May 1 16:41:46 2015 New Revision: 282304 URL: https://svnweb.freebsd.org/changeset/base/282304 Log: Sort MLINKS alphabetically. Approved by: pjd (mentor) Modified: head/lib/libnv/Makefile Modified: head/lib/libnv/Makefile ============================================================================== --- head/lib/libnv/Makefile Fri May 1 16:37:40 2015 (r282303) +++ head/lib/libnv/Makefile Fri May 1 16:41:46 2015 (r282304) @@ -22,65 +22,65 @@ MAN+= nv.3 MLINKS+=nv.3 libnv.3 \ nv.3 nvlist.3 -MLINKS+=nv.3 nvlist_create.3 \ - nv.3 nvlist_destroy.3 \ - nv.3 nvlist_error.3 \ - nv.3 nvlist_set_error.3 \ - nv.3 nvlist_empty.3 \ +MLINKS+=nv.3 nvlist_add_binary.3 \ + nv.3 nvlist_add_bool.3 \ + nv.3 nvlist_add_descriptor.3 \ + nv.3 nvlist_add_null.3 \ + nv.3 nvlist_add_number.3 \ + nv.3 nvlist_add_nvlist.3 \ + nv.3 nvlist_add_string.3 \ + nv.3 nvlist_add_stringf.3 \ + nv.3 nvlist_add_stringv.3 \ nv.3 nvlist_clone.3 \ + nv.3 nvlist_create.3 \ + nv.3 nvlist_destroy.3 \ nv.3 nvlist_dump.3 \ - nv.3 nvlist_fdump.3 \ - nv.3 nvlist_size.3 \ - nv.3 nvlist_pack.3 \ - nv.3 nvlist_unpack.3 \ - nv.3 nvlist_send.3 \ - nv.3 nvlist_recv.3 \ - nv.3 nvlist_xfer.3 \ - nv.3 nvlist_next.3 \ + nv.3 nvlist_empty.3 \ + nv.3 nvlist_error.3 \ nv.3 nvlist_exists.3 \ - nv.3 nvlist_exists_type.3 \ - nv.3 nvlist_exists_null.3 \ + nv.3 nvlist_exists_binary.3 \ nv.3 nvlist_exists_bool.3 \ + nv.3 nvlist_exists_descriptor.3 \ + nv.3 nvlist_exists_null.3 \ nv.3 nvlist_exists_number.3 \ - nv.3 nvlist_exists_string.3 \ nv.3 nvlist_exists_nvlist.3 \ - nv.3 nvlist_exists_descriptor.3 \ - nv.3 nvlist_exists_binary.3 \ - nv.3 nvlist_add_null.3 \ - nv.3 nvlist_add_bool.3 \ - nv.3 nvlist_add_number.3 \ - nv.3 nvlist_add_string.3 \ - nv.3 nvlist_add_stringf.3 \ - nv.3 nvlist_add_stringv.3 \ - nv.3 nvlist_add_nvlist.3 \ - nv.3 nvlist_add_descriptor.3 \ - nv.3 nvlist_add_binary.3 \ - nv.3 nvlist_move_string.3 \ - nv.3 nvlist_move_nvlist.3 \ - nv.3 nvlist_move_descriptor.3 \ - nv.3 nvlist_move_binary.3 \ + nv.3 nvlist_exists_string.3 \ + nv.3 nvlist_exists_type.3 \ + nv.3 nvlist_fdump.3 \ + nv.3 nvlist_free.3 \ + nv.3 nvlist_free_binary.3 \ + nv.3 nvlist_free_bool.3 \ + nv.3 nvlist_free_descriptor.3 \ + nv.3 nvlist_free_null.3 \ + nv.3 nvlist_free_number.3 \ + nv.3 nvlist_free_nvlist.3 \ + nv.3 nvlist_free_string.3 \ + nv.3 nvlist_free_type.3 \ + nv.3 nvlist_get_binary.3 \ nv.3 nvlist_get_bool.3 \ + nv.3 nvlist_get_descriptor.3 \ nv.3 nvlist_get_number.3 \ - nv.3 nvlist_get_string.3 \ nv.3 nvlist_get_nvlist.3 \ - nv.3 nvlist_get_descriptor.3 \ - nv.3 nvlist_get_binary.3 \ nv.3 nvlist_get_parent.3 \ + nv.3 nvlist_get_string.3 \ + nv.3 nvlist_move_binary.3 \ + nv.3 nvlist_move_descriptor.3 \ + nv.3 nvlist_move_nvlist.3 \ + nv.3 nvlist_move_string.3 \ + nv.3 nvlist_next.3 \ + nv.3 nvlist_pack.3 \ + nv.3 nvlist_recv.3 \ + nv.3 nvlist_send.3 \ + nv.3 nvlist_set_error.3 \ + nv.3 nvlist_size.3 \ + nv.3 nvlist_take_binary.3 \ nv.3 nvlist_take_bool.3 \ + nv.3 nvlist_take_descriptor.3 \ nv.3 nvlist_take_number.3 \ - nv.3 nvlist_take_string.3 \ nv.3 nvlist_take_nvlist.3 \ - nv.3 nvlist_take_descriptor.3 \ - nv.3 nvlist_take_binary.3 \ - nv.3 nvlist_free.3 \ - nv.3 nvlist_free_type.3 \ - nv.3 nvlist_free_null.3 \ - nv.3 nvlist_free_bool.3 \ - nv.3 nvlist_free_number.3 \ - nv.3 nvlist_free_string.3 \ - nv.3 nvlist_free_nvlist.3 \ - nv.3 nvlist_free_descriptor.3 \ - nv.3 nvlist_free_binary.3 + nv.3 nvlist_take_string.3 \ + nv.3 nvlist_unpack.3 \ + nv.3 nvlist_xfer.3 WARNS?= 6 From owner-svn-src-head@FreeBSD.ORG Fri May 1 17:18:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9A793D8; Fri, 1 May 2015 17:18:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7C7F131D; Fri, 1 May 2015 17:18:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41HI7FV059184; Fri, 1 May 2015 17:18:07 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41HI7Av059183; Fri, 1 May 2015 17:18:07 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505011718.t41HI7Av059183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 17:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282305 - head/usr.bin/col X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 17:18:08 -0000 Author: bapt Date: Fri May 1 17:18:07 2015 New Revision: 282305 URL: https://svnweb.freebsd.org/changeset/base/282305 Log: col: fixing 25 year old bug Makes col(1) respect POSIX again for escape sequences as decribed in its manpage The bug was introduced in CSRG in 1990 This also reverts r280911 Differential Revision: https://reviews.freebsd.org/D2424 Reviewed by: jhb MFC after: 2 weeks Modified: head/usr.bin/col/col.c Modified: head/usr.bin/col/col.c ============================================================================== --- head/usr.bin/col/col.c Fri May 1 16:41:46 2015 (r282304) +++ head/usr.bin/col/col.c Fri May 1 17:18:07 2015 (r282305) @@ -63,9 +63,9 @@ __FBSDID("$FreeBSD$"); #define SI '\017' /* shift in to normal character set */ #define SO '\016' /* shift out to alternate character set */ #define VT '\013' /* vertical tab (aka reverse line feed) */ -#define RLF '\007' /* ESC-07 reverse line feed */ -#define RHLF '\010' /* ESC-010 reverse half-line feed */ -#define FHLF '\011' /* ESC-011 forward half-line feed */ +#define RLF '7' /* ESC-7 reverse line feed */ +#define RHLF '8' /* ESC-8 reverse half-line feed */ +#define FHLF '9' /* ESC-9 forward half-line feed */ /* build up at least this many lines before flushing them out */ #define BUFFER_MARGIN 32 @@ -378,7 +378,7 @@ flush_blanks(void) PUTC('\n'); if (half) { PUTC('\033'); - PUTC('\011'); + PUTC('9'); if (!nb) PUTC('\r'); } From owner-svn-src-head@FreeBSD.ORG Fri May 1 17:26:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC227827; Fri, 1 May 2015 17:26:26 +0000 (UTC) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50C031469; Fri, 1 May 2015 17:26:26 +0000 (UTC) Received: by wgen6 with SMTP id n6so96235383wge.3; Fri, 01 May 2015 10:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ELj3iSM84ieMGMSsY5cg6UMOJ3v+0dR/93KGYRHQGOg=; b=qirX6kqAn6UVH7yFH/MurYV0c2es7SzgjG6sCM3G8WQjMbPKTbn0pTbTNzK2oK/0ZM XZ0TKAjilRxE9Yl7I8amigJPlh/yR0AF3oGlMnCMB66zVt8mCz3buCbyYMkx0Pf6KPMg n0XImvc9915ppSyBU2JiGFJrBrrVLOTdT5LfRxWuDmAxdEDkx/VH8i5NQo5C4Uq4gpmV P+0+EkYrB5E/wWWPNciSzxSfU6gYYkuUQe6XcGC/mkt+TdjZtyNACmf3Sr0dFREPvjRe 3fkTcbwqFy2FrS0AVIkEPUgEJHxq1efBN8cVb46Nk3h27pg3nk4LG8w+uhKv6ryhZCEd 2fMg== X-Received: by 10.180.101.2 with SMTP id fc2mr13198347wib.82.1430501184788; Fri, 01 May 2015 10:26:24 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id n8sm7510069wiy.19.2015.05.01.10.26.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 10:26:24 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 1 May 2015 19:26:22 +0200 From: Baptiste Daroussin To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282305 - head/usr.bin/col Message-ID: <20150501172622.GS13141@ivaldir.etoilebsd.net> References: <201505011718.t41HI7Av059183@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QRtLtq+kfJNLc57H" Content-Disposition: inline In-Reply-To: <201505011718.t41HI7Av059183@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 17:26:26 -0000 --QRtLtq+kfJNLc57H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 01, 2015 at 05:18:07PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Fri May 1 17:18:07 2015 > New Revision: 282305 > URL: https://svnweb.freebsd.org/changeset/base/282305 >=20 > Log: > col: fixing 25 year old bug > =20 > Makes col(1) respect POSIX again for escape sequences as decribed in it= s manpage > The bug was introduced in CSRG in 1990 > This also reverts r280911 One should have read: revert r273242 Best regards, Bapt --QRtLtq+kfJNLc57H Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVDtz4ACgkQ8kTtMUmk6EzQyACgi4DHe4y8l7WmtkkvP+pfPC4g PgoAn05Xgrk6mtjk7wUNTa5y0YtG21Nk =AEtg -----END PGP SIGNATURE----- --QRtLtq+kfJNLc57H-- From owner-svn-src-head@FreeBSD.ORG Fri May 1 17:32:07 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 363EFC74; Fri, 1 May 2015 17:32:07 +0000 (UTC) Received: from mail-pa0-x229.google.com (mail-pa0-x229.google.com [IPv6:2607:f8b0:400e:c03::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0120B1591; Fri, 1 May 2015 17:32:07 +0000 (UTC) Received: by pabtp1 with SMTP id tp1so96391936pab.2; Fri, 01 May 2015 10:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=BayjJzmxtfu8t+LZOPck7kigaKa8fxYQ9Z1weyKgglg=; b=rinQwaTbBk4WUgJOLptFDWwLHgFluvlG5/hFDNDtO2l1i5mFmjHxyo4OPeyW3IbBn6 SAHj5CHpw2+65OgTij2gsB6cbOGZt3JyLNfVIzpGP46iOcsAw8fA8lc56yFztDN0R7cd gtZApOg/75W3R79S+6tAqeQ8oUHquGVSv8Sq8HSE47CCYdZt4fVSzeqDRKftScwlhBsz xSX7p7PEboDzgeUNGmhvENDobqk5ceszlR7CXiKTmrLqTnb8+ZwsW65ismindQLIGKgT akjklnuHE2+t3w6DdbMZoWG0137pN8JO8LLfcWAOEDlY1hC7gy0OluMkj25ybPVa8yPP gDfg== X-Received: by 10.68.194.6 with SMTP id hs6mr19825369pbc.58.1430501526263; Fri, 01 May 2015 10:32:06 -0700 (PDT) Received: from nparhar-pc (nat-198-95-226-228.netapp.com. [198.95.226.228]) by mx.google.com with ESMTPSA id v7sm5385827pde.81.2015.05.01.10.32.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 10:32:05 -0700 (PDT) Date: Fri, 1 May 2015 10:32:00 -0700 From: Navdeep Parhar To: Slawa Olhovchenkov Cc: Gleb Smirnoff , John Baldwin , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl Message-ID: <20150501173200.GA2869@nparhar-pc> Mail-Followup-To: Slawa Olhovchenkov , Gleb Smirnoff , John Baldwin , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201504301823.t3UINd74073186@svn.freebsd.org> <20150430232736.GB546@FreeBSD.org> <1998053.shmPH6saZj@ralph.baldwin.cx> <20150501135134.GC546@FreeBSD.org> <20150501163108.GZ1394@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150501163108.GZ1394@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 17:32:07 -0000 On Fri, May 01, 2015 at 07:31:08PM +0300, Slawa Olhovchenkov wrote: > On Fri, May 01, 2015 at 04:51:34PM +0300, Gleb Smirnoff wrote: ... > > > > However, if we don't expect the number of queues to exceed a reasonable > > number of 255 :), we can fit the functionality into existing API. > > We can keep the queue number in the highest 8 bits of the ift_counter > > parameter. > > In case of hardware-assist NIC emulation numbers may be rise: x710 > have 1536 queue per port. I agree that 255 is pretty low. cxgbe(4) hardware also supports more queues than this already (it supports 1K rx queues and 64K tx queues). Regards, Navdeep From owner-svn-src-head@FreeBSD.ORG Fri May 1 17:33:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6F97F00; Fri, 1 May 2015 17:33:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D505315A9; Fri, 1 May 2015 17:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41HXWuW069087; Fri, 1 May 2015 17:33:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41HXWql069086; Fri, 1 May 2015 17:33:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505011733.t41HXWql069086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 17:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282309 - head/usr.bin/col X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 17:33:33 -0000 Author: bapt Date: Fri May 1 17:33:32 2015 New Revision: 282309 URL: https://svnweb.freebsd.org/changeset/base/282309 Log: Use defines to improve clarity MFC after: 2 weeks Modified: head/usr.bin/col/col.c Modified: head/usr.bin/col/col.c ============================================================================== --- head/usr.bin/col/col.c Fri May 1 17:33:17 2015 (r282308) +++ head/usr.bin/col/col.c Fri May 1 17:33:32 2015 (r282309) @@ -321,7 +321,7 @@ main(int argc, char **argv) /* make sure we leave things in a sane state */ if (last_set != CS_NORMAL) - PUTC('\017'); + PUTC(SI); /* flush out the last few blank lines */ nblank_lines = max_line - this_line; @@ -377,8 +377,8 @@ flush_blanks(void) for (i = nb; --i >= 0;) PUTC('\n'); if (half) { - PUTC('\033'); - PUTC('9'); + PUTC(ESC); + PUTC(FHLF); if (!nb) PUTC('\r'); } @@ -480,10 +480,10 @@ flush_line(LINE *l) if (c->c_set != last_set) { switch (c->c_set) { case CS_NORMAL: - PUTC('\017'); + PUTC(SI); break; case CS_ALTERNATE: - PUTC('\016'); + PUTC(SO); } last_set = c->c_set; } From owner-svn-src-head@FreeBSD.ORG Fri May 1 17:50:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A808D4F9; Fri, 1 May 2015 17:50:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8902016FA; Fri, 1 May 2015 17:50:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41HoQqT076332; Fri, 1 May 2015 17:50:26 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41HoPYE075773; Fri, 1 May 2015 17:50:25 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505011750.t41HoPYE075773@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Fri, 1 May 2015 17:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282312 - in head: lib/libnv sys/kern 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 17:50:26 -0000 Author: oshogbo Date: Fri May 1 17:50:24 2015 New Revision: 282312 URL: https://svnweb.freebsd.org/changeset/base/282312 Log: Add nvlist_flags() function, which returns nvlist's public flags. Approved by: pjd (mentor) Modified: head/lib/libnv/Makefile head/lib/libnv/nv.3 head/sys/kern/subr_nvlist.c head/sys/sys/nv.h Modified: head/lib/libnv/Makefile ============================================================================== --- head/lib/libnv/Makefile Fri May 1 17:36:13 2015 (r282311) +++ head/lib/libnv/Makefile Fri May 1 17:50:24 2015 (r282312) @@ -47,6 +47,7 @@ MLINKS+=nv.3 nvlist_add_binary.3 \ nv.3 nvlist_exists_string.3 \ nv.3 nvlist_exists_type.3 \ nv.3 nvlist_fdump.3 \ + nv.3 nvlist_flags.3 \ nv.3 nvlist_free.3 \ nv.3 nvlist_free_binary.3 \ nv.3 nvlist_free_bool.3 \ Modified: head/lib/libnv/nv.3 ============================================================================== --- head/lib/libnv/nv.3 Fri May 1 17:36:13 2015 (r282311) +++ head/lib/libnv/nv.3 Fri May 1 17:50:24 2015 (r282312) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 30, 2015 +.Dd May 1, 2015 .Dt NV 3 .Os .Sh NAME @@ -37,6 +37,7 @@ .Nm nvlist_error , .Nm nvlist_set_error , .Nm nvlist_empty , +.Nm nvlist_flags , .Nm nvlist_exists , .Nm nvlist_free , .Nm nvlist_clone , @@ -68,6 +69,8 @@ .Fn nvlist_set_error "nvlist_t *nvl, int error" .Ft bool .Fn nvlist_empty "const nvlist_t *nvl" +.Ft int +.Fn nvlist_flags "const nvlist_t *nvl" .\" .Ft "nvlist_t *" .Fn nvlist_clone "const nvlist_t *nvl" @@ -269,6 +272,12 @@ otherwise. The nvlist must not be in error state. .Pp The +.Fn nvlist_flags +function returns flags used to create the nvlist with the +.Fn nvlist_create +function. +.Pp +The .Fn nvlist_clone functions clones the given nvlist. The clone shares no resources with its origin. Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Fri May 1 17:36:13 2015 (r282311) +++ head/sys/kern/subr_nvlist.c Fri May 1 17:50:24 2015 (r282312) @@ -230,6 +230,17 @@ nvlist_empty(const nvlist_t *nvl) return (nvlist_first_nvpair(nvl) == NULL); } +int +nvlist_flags(const nvlist_t *nvl) +{ + + NVLIST_ASSERT(nvl); + PJDLOG_ASSERT(nvl->nvl_error == 0); + PJDLOG_ASSERT((nvl->nvl_flags & ~(NV_FLAG_PUBLIC_MASK)) == 0); + + return (nvl->nvl_flags); +} + static void nvlist_report_missing(int type, const char *name) { Modified: head/sys/sys/nv.h ============================================================================== --- head/sys/sys/nv.h Fri May 1 17:36:13 2015 (r282311) +++ head/sys/sys/nv.h Fri May 1 17:50:24 2015 (r282312) @@ -75,6 +75,7 @@ nvlist_t *nvlist_create(int flags); void nvlist_destroy(nvlist_t *nvl); int nvlist_error(const nvlist_t *nvl); bool nvlist_empty(const nvlist_t *nvl); +int nvlist_flags(const nvlist_t *nvl); void nvlist_set_error(nvlist_t *nvl, int error); nvlist_t *nvlist_clone(const nvlist_t *nvl); From owner-svn-src-head@FreeBSD.ORG Fri May 1 18:32:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 593B91EC; Fri, 1 May 2015 18:32:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A6A51C23; Fri, 1 May 2015 18:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41IWI5r002292; Fri, 1 May 2015 18:32:18 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41IWGSs002284; Fri, 1 May 2015 18:32:16 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505011832.t41IWGSs002284@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 18:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282314 - in head: include lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 18:32:18 -0000 Author: bapt Date: Fri May 1 18:32:16 2015 New Revision: 282314 URL: https://svnweb.freebsd.org/changeset/base/282314 Log: Import reallocarray(3) from OpenBSD Add a manpage for it, assign the copyright to the OpenBSD project on it since it is mostly copy/paste from OpenBSD manpage. style(9) fixes Differential Revision: https://reviews.freebsd.org/D2420 Reviewed by: kib Added: head/lib/libc/stdlib/reallocarray.3 (contents, props changed) head/lib/libc/stdlib/reallocarray.c (contents, props changed) Modified: head/include/stdlib.h head/lib/libc/stdlib/Makefile.inc head/lib/libc/stdlib/Symbol.map Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Fri May 1 18:07:18 2015 (r282313) +++ head/include/stdlib.h Fri May 1 18:32:16 2015 (r282314) @@ -111,6 +111,9 @@ long double strtold(const char * __restrict, char ** __restrict); unsigned long strtoul(const char * __restrict, char ** __restrict, int); +#ifdef __BSD_VISIBLE +void *reallocarray(void *, size_t, size_t); +#endif int system(const char *); int wctomb(char *, wchar_t); size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); Modified: head/lib/libc/stdlib/Makefile.inc ============================================================================== --- head/lib/libc/stdlib/Makefile.inc Fri May 1 18:07:18 2015 (r282313) +++ head/lib/libc/stdlib/Makefile.inc Fri May 1 18:32:16 2015 (r282314) @@ -10,7 +10,8 @@ MISRCS+=_Exit.c a64l.c abort.c abs.c ate insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \ merge.c mergesort_b.c ptsname.c qsort.c qsort_r.c quick_exit.c \ radixsort.c rand.c \ - random.c reallocf.c realpath.c remque.c strfmon.c strtoimax.c \ + random.c reallocarray.c reallocf.c realpath.c remque.c strfmon.c \ + strtoimax.c \ strtol.c strtoll.c strtoq.c strtoul.c strtonum.c strtoull.c \ strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c @@ -25,7 +26,7 @@ MAN+= a64l.3 abort.3 abs.3 alloca.3 atex hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 llabs.3 lldiv.3 \ lsearch.3 memory.3 ptsname.3 qsort.3 \ quick_exit.3 \ - radixsort.3 rand.3 random.3 reallocf.3 \ + radixsort.3 rand.3 random.3 reallocarray.3 reallocf.3 \ realpath.3 strfmon.3 strtod.3 strtol.3 strtonum.3 strtoul.3 system.3 \ tsearch.3 Modified: head/lib/libc/stdlib/Symbol.map ============================================================================== --- head/lib/libc/stdlib/Symbol.map Fri May 1 18:07:18 2015 (r282313) +++ head/lib/libc/stdlib/Symbol.map Fri May 1 18:32:16 2015 (r282314) @@ -113,6 +113,7 @@ FBSD_1.4 { hcreate_r; hdestroy_r; hsearch_r; + reallocarray; }; FBSDprivate_1.0 { Added: head/lib/libc/stdlib/reallocarray.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/stdlib/reallocarray.3 Fri May 1 18:32:16 2015 (r282314) @@ -0,0 +1,136 @@ +.\" Copyright (c) 2015 OpenBSD +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" the American National Standards Committee X3, on Information +.\" Processing Systems. +.\" +.\" 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 1, 2015 +.Dt REALLOCARRAY 3 +.Os +.Sh NAME +.Nm reallocarray +.Nd memory reallocation function +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In stdlib.h +.Ft void * +.Fn reallocarray "void *ptr" "size_t nmemb" "size_t size" +.Sh DESCRIPTION +The +.Fn reallocarray +except it operates on +.Fa nmemb +members of size +.Fa size +and checks for integer overflow in the calculation +.Fa nmemb +* +.Fa size . +.Sh RETURN VALUES +.Fn reallocarray +return a pointer to the allocated space; otherwise, a +.Dv NULL +pointer is returned and +.Va errno +is set to +.Er ENOMEM . +.Sh EXAMPLES +Consider +.Fn reallocarray +when there is multiplication in the +.Fa size +argument of +.Fn malloc +or +.Fn realloc . +For example, avoid this common idiom as it may lead to integer overflow: +.Bd -literal -offset indent +if ((p = malloc(num * size)) == NULL) + err(1, "malloc"); +.Ed +.Pp +A drop-in replacement is the +.Ox +extension +.Fn reallocarray : +.Bd -literal -offset indent +if ((p = reallocarray(NULL, num, size)) == NULL) + err(1, "reallocarray"); +.Ed +.Pp +When using +.Fn realloc , +be careful to avoid the following idiom: +.Bd -literal -offset indent +size += 50; +if ((p = realloc(p, size)) == NULL) + return (NULL); +.Ed +.Pp +Do not adjust the variable describing how much memory has been allocated +until the allocation has been successful. +This can cause aberrant program behavior if the incorrect size value is used. +In most cases, the above sample will also result in a leak of memory. +As stated earlier, a return value of +.Dv NULL +indicates that the old object still remains allocated. +Better code looks like this: +.Bd -literal -offset indent +newsize = size + 50; +if ((newp = realloc(p, newsize)) == NULL) { + free(p); + p = NULL; + size = 0; + return (NULL); +} +p = newp; +size = newsize; +.Ed +.Pp +As with +.Fn malloc , +it is important to ensure the new size value will not overflow; +i.e. avoid allocations like the following: +.Bd -literal -offset indent +if ((newp = realloc(p, num * size)) == NULL) { + ... +.Ed +.Pp +Instead, use +.Fn reallocarray : +.Bd -literal -offset indent +if ((newp = reallocarray(p, num, size)) == NULL) { + ... +.Ed +.Sh SEE ALSO +.Xr realloc 3 +.Sh HISTORY +The +.Fn reallocf +function first appeared in +.Ox 5.6 . Added: head/lib/libc/stdlib/reallocarray.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/stdlib/reallocarray.c Fri May 1 18:32:16 2015 (r282314) @@ -0,0 +1,42 @@ +/* $OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $ */ +/* + * Copyright (c) 2008 Otto Moerbeek + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +/* + * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX + * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW + */ +#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) + +void * +reallocarray(void *optr, size_t nmemb, size_t size) +{ + + if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && + nmemb > 0 && SIZE_MAX / nmemb < size) { + errno = ENOMEM; + return (NULL); + } + return (realloc(optr, size * nmemb)); +} From owner-svn-src-head@FreeBSD.ORG Fri May 1 18:32:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 762A2332; Fri, 1 May 2015 18:32:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6A41C2B; Fri, 1 May 2015 18:32:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41IWtuS002484; Fri, 1 May 2015 18:32:55 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41IWtH0002483; Fri, 1 May 2015 18:32:55 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505011832.t41IWtH0002483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 18:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282315 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 18:32:55 -0000 Author: bapt Date: Fri May 1 18:32:54 2015 New Revision: 282315 URL: https://svnweb.freebsd.org/changeset/base/282315 Log: Remove bundled reallocarray(3) since it is now in libc Modified: head/usr.bin/m4/misc.c Modified: head/usr.bin/m4/misc.c ============================================================================== --- head/usr.bin/m4/misc.c Fri May 1 18:32:16 2015 (r282314) +++ head/usr.bin/m4/misc.c Fri May 1 18:32:54 2015 (r282315) @@ -64,8 +64,6 @@ unsigned char *bbase[MAXINP]; /* the ba unsigned char *bp; /* first available character */ unsigned char *endpbb; /* end of push-back buffer */ -static void *reallocarray(void *, size_t, size_t); - /* * find the index of second str in the first str. */ @@ -467,37 +465,3 @@ dump_buffer(FILE *f, size_t m) for (s = bp; s-buf > (long)m;) fputc(*--s, f); } - -/* $OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $ */ -/* - * Copyright (c) 2008 Otto Moerbeek - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX - * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW - */ -#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) - -void * -reallocarray(void *optr, size_t nmemb, size_t size) -{ - if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && - nmemb > 0 && SIZE_MAX / nmemb < size) { - errno = ENOMEM; - return NULL; - } - return realloc(optr, size * nmemb); -} From owner-svn-src-head@FreeBSD.ORG Fri May 1 18:34:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 545D649A; Fri, 1 May 2015 18:34:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 426EF1C42; Fri, 1 May 2015 18:34:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41IYUVT002967; Fri, 1 May 2015 18:34:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41IYTaA002963; Fri, 1 May 2015 18:34:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505011834.t41IYTaA002963@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 18:34:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282316 - in head: contrib/mdocml lib/libmandoc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 18:34:30 -0000 Author: bapt Date: Fri May 1 18:34:29 2015 New Revision: 282316 URL: https://svnweb.freebsd.org/changeset/base/282316 Log: libc now has reallocarray Modified: head/contrib/mdocml/config.h head/lib/libmandoc/Makefile Modified: head/contrib/mdocml/config.h ============================================================================== --- head/contrib/mdocml/config.h Fri May 1 18:32:54 2015 (r282315) +++ head/contrib/mdocml/config.h Fri May 1 18:34:29 2015 (r282316) @@ -12,7 +12,7 @@ #define HAVE_FTS 1 #define HAVE_GETSUBOPT 1 #define HAVE_MMAP 1 -#define HAVE_REALLOCARRAY 0 +#define HAVE_REALLOCARRAY 1 #define HAVE_STRCASESTR 1 #define HAVE_STRLCAT 1 #define HAVE_STRLCPY 1 Modified: head/lib/libmandoc/Makefile ============================================================================== --- head/lib/libmandoc/Makefile Fri May 1 18:32:54 2015 (r282315) +++ head/lib/libmandoc/Makefile Fri May 1 18:34:29 2015 (r282316) @@ -28,11 +28,9 @@ LIBROFF_SRCS= eqn.c \ tbl_layout.c \ tbl_opts.c -COMPAT_SRCS= compat_reallocarray.c SRCS= ${LIBMAN_SRCS} \ ${LIBMDOC_SRCS} \ ${LIBROFF_SRCS} \ - ${COMPAT_SRCS} \ chars.c \ mandoc.c \ mandoc_aux.c \ From owner-svn-src-head@FreeBSD.ORG Fri May 1 19:09:14 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C9ABD18 for ; Fri, 1 May 2015 19:09:14 +0000 (UTC) Received: from nm5-vm0.bullet.mail.bf1.yahoo.com (nm5-vm0.bullet.mail.bf1.yahoo.com [98.139.213.150]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE9E41FC7 for ; Fri, 1 May 2015 19:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1430506980; bh=iKvW+I0h+0Ka2Y7BqeTTSRVJ89KwI9TcGdSAHYGXx3I=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=moqOr3zMgAahED6HMjTPPI5yo2GV89x8nC3mumv5he1QeMJMHzsTgIkRYQ0UtbpHss6Mvjb0qrpqyPYk07tKm//aTh5GaKjW8MZawlZ7/bETFwkIusXP9vn3oh9MMyV4GE9PSJQ/aXtjjWmnzBZv75nmVkzyfuPIgbEXVO1+8/M5usmOJw3y44V1y/zOXBGkNyy6tkNNyd5bqi2US4SvCjXXzc0ug75U4DyaZ001G3GbO/0bbgEA0HP3qCuQWP9O5BtN6ZwXo5lj5bebzpo0Anq0OaXi5F7JrK4/LTdqdD5cgrQRn7n/xCBIilkuUtFfYD0LihohcqdWHVMbNmZKOg== Received: from [66.196.81.172] by nm5.bullet.mail.bf1.yahoo.com with NNFMP; 01 May 2015 19:03:00 -0000 Received: from [68.142.230.76] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 01 May 2015 19:03:00 -0000 Received: from [127.0.0.1] by smtp233.mail.bf1.yahoo.com with NNFMP; 01 May 2015 19:03:00 -0000 X-Yahoo-Newman-Id: 883890.88086.bm@smtp233.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: BaZMBQ0VM1kvvdHPrqs.6dnaeAblr2SEjan2DFT8BfFvDx5 c2a.8Qy0WNO2qdaa5we6nDHX18qfwxlRwIMJ5bdzAkpeP71ryc0zM0CtVlwD Vu3ogMpvl34NO2b0odfisGenX4bsJXt4nIcLjBQTi9XjvudUTJXEIxfSnA0j OsNyvMivrbyGBfwUrT3X5jZ2q43HpZW5RUgFNrtGLs1jRH4f5PBtF_M99rCk hCk1_OLw43XM8AeRes3eYiqQ8dN1RbVepzmBLO.8bejNpybz2Woz4Bp6wGVS jo7yvQjA7EpV4jbxUcWESHnqsvBwieH5c3CYGHsRUGMThbJg2gY25S7EKe.R E017hJBAjSzxc.Qs_MA9iB4MP0ZhejJXoFPSL3ZXFajxap_WEZ6E0_xCry9E ho_na9Ujk41mvb1NTcXikBPxrMLoHEdRX6kBcBT5qdGCE_7BX2_HoI0CzoGV xw.z4JYpFnwYqhUfNFu1g_GyXk00eZIyX.roM4pQcg.bpgTUy7netfAKdIJP T9Er3j7cMvRH0cAhOG2F3HGDmv5VIe.hv X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <5543CDD9.4050902@FreeBSD.org> Date: Fri, 01 May 2015 14:02:49 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Baptiste Daroussin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282314 - in head: include lib/libc/stdlib References: <201505011832.t41IWGSs002284@svn.freebsd.org> In-Reply-To: <201505011832.t41IWGSs002284@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 19:09:14 -0000 Hi; Sorry that I missed the review ... On 05/01/15 13:32, Baptiste Daroussin wrote: > ... > Modified: head/include/stdlib.h > ============================================================================== > --- head/include/stdlib.h Fri May 1 18:07:18 2015 (r282313) > +++ head/include/stdlib.h Fri May 1 18:32:16 2015 (r282314) > @@ -111,6 +111,9 @@ long double > strtold(const char * __restrict, char ** __restrict); > unsigned long > strtoul(const char * __restrict, char ** __restrict, int); > +#ifdef __BSD_VISIBLE > +void *reallocarray(void *, size_t, size_t); > +#endif > int system(const char *); > int wctomb(char *, wchar_t); > size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); Please move it to the _BSD_VISIBLE section, along with reallocf. Also please add the __alloc_size attributes[1] while there. For the record, I dislike adding this non-standard function, especially considering that NetBSD added yet another variant, but I guess it helps importing new stuff from OpenBSD. Pedro. [1] It should be __result_use_check __alloc_size(2) __alloc_size(3) From owner-svn-src-head@FreeBSD.ORG Fri May 1 19:14:32 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1B91FCC; Fri, 1 May 2015 19:14:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFF0610AF; Fri, 1 May 2015 19:14:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41JEWAI023564; Fri, 1 May 2015 19:14:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41JEWKc023563; Fri, 1 May 2015 19:14:32 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505011914.t41JEWKc023563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 19:14:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282317 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 19:14:33 -0000 Author: bapt Date: Fri May 1 19:14:32 2015 New Revision: 282317 URL: https://svnweb.freebsd.org/changeset/base/282317 Log: Move reallocarray definition to the _BSD_VISIBLE block Add the required __alloc_size attributes Requested by: pfg Modified: head/include/stdlib.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Fri May 1 18:34:29 2015 (r282316) +++ head/include/stdlib.h Fri May 1 19:14:32 2015 (r282317) @@ -111,9 +111,6 @@ long double strtold(const char * __restrict, char ** __restrict); unsigned long strtoul(const char * __restrict, char ** __restrict, int); -#ifdef __BSD_VISIBLE -void *reallocarray(void *, size_t, size_t); -#endif int system(const char *); int wctomb(char *, wchar_t); size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); @@ -306,6 +303,8 @@ void qsort_r(void *, size_t, size_t, vo int (*)(void *, const void *, const void *)); int radixsort(const unsigned char **, int, const unsigned char *, unsigned); +void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) + __alloc_size(3); void *reallocf(void *, size_t) __result_use_check __alloc_size(2); int rpmatch(const char *); void setprogname(const char *); From owner-svn-src-head@FreeBSD.ORG Fri May 1 19:22:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BFA8218; Fri, 1 May 2015 19:22:52 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9886711A2; Fri, 1 May 2015 19:22:51 +0000 (UTC) Received: by widdi4 with SMTP id di4so61440796wid.0; Fri, 01 May 2015 12:22:50 -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:message-id:subject :from:to:cc:content-type; bh=bZ/RqG39aTDAFIIVNoKCqfHZgQCs2lgK6rVS76KYZn0=; b=AwXGYZHsgXvGI7PVdVQyN7bLOUVMqgpsSPLcM7mo0TkSBcbTSN5Hcs5j4Fsh20LLAg geE1mgWolVXL4MhxdJM57/43rz1L995e4bndOs/Jrt+d8VS5R8xTJ6VY8EFyalq7YRSo sD+DBXT50r1vzoU9+h1/QD7EsXN+sCmzWLPRm7wuw8BHNexl/64llO585o9jY+JUrUaB rMdr+EknM0cZdCtj/sMfuA97JeWc+YQl2UZKZmi+oKDB75Ywz7GDjlC5JB5sZU04qQPj CrHF5uMjmasceq3H5w5+5X0qsrtNQzCEg/Dc/bwqQXOvqgpTqZ/Hf2yj4BJm3ytX4m6b Bw/A== MIME-Version: 1.0 X-Received: by 10.194.80.5 with SMTP id n5mr20619531wjx.123.1430508170163; Fri, 01 May 2015 12:22:50 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.27.80.202 with HTTP; Fri, 1 May 2015 12:22:50 -0700 (PDT) In-Reply-To: <201505011832.t41IWGSs002284@svn.freebsd.org> References: <201505011832.t41IWGSs002284@svn.freebsd.org> Date: Fri, 1 May 2015 22:22:50 +0300 X-Google-Sender-Auth: XQpzbHwYPrpRKmafkzUyFMOYL_4 Message-ID: Subject: Re: svn commit: r282314 - in head: include lib/libc/stdlib From: Sergey Kandaurov To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 19:22:52 -0000 On 1 May 2015 at 21:32, Baptiste Daroussin wrote: > Author: bapt > Date: Fri May 1 18:32:16 2015 > New Revision: 282314 > URL: https://svnweb.freebsd.org/changeset/base/282314 > > Log: > Import reallocarray(3) from OpenBSD > > Add a manpage for it, assign the copyright to the OpenBSD project on it since it > is mostly copy/paste from OpenBSD manpage. > style(9) fixes >[..] > Added: head/lib/libc/stdlib/reallocarray.3 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libc/stdlib/reallocarray.3 Fri May 1 18:32:16 2015 (r282314) > @@ -0,0 +1,136 @@ > +.\" Copyright (c) 2015 OpenBSD > +.\" All rights reserved. This copyright notice looks suspicious. > +.\" > +.\" This code is derived from software contributed to Berkeley by > +.\" the American National Standards Committee X3, on Information > +.\" Processing Systems. > +.\" > +.\" 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd May 1, 2015 > +.Dt REALLOCARRAY 3 > +.Os > +.Sh NAME > +.Nm reallocarray > +.Nd memory reallocation function > +.Sh LIBRARY > +.Lb libc > +.Sh SYNOPSIS > +.In stdlib.h > +.Ft void * > +.Fn reallocarray "void *ptr" "size_t nmemb" "size_t size" > +.Sh DESCRIPTION > +The > +.Fn reallocarray > +except it operates on This is not parseable. > +.Fa nmemb > +members of size > +.Fa size > +and checks for integer overflow in the calculation > +.Fa nmemb > +* > +.Fa size . > +.Sh RETURN VALUES > +.Fn reallocarray > +return a pointer to the allocated space; otherwise, a > +.Dv NULL > +pointer is returned and > +.Va errno > +is set to > +.Er ENOMEM . > +.Sh EXAMPLES > +Consider > +.Fn reallocarray > +when there is multiplication in the > +.Fa size > +argument of > +.Fn malloc > +or > +.Fn realloc . > +For example, avoid this common idiom as it may lead to integer overflow: > +.Bd -literal -offset indent > +if ((p = malloc(num * size)) == NULL) > + err(1, "malloc"); > +.Ed > +.Pp > +A drop-in replacement is the > +.Ox > +extension > +.Fn reallocarray : > +.Bd -literal -offset indent > +if ((p = reallocarray(NULL, num, size)) == NULL) > + err(1, "reallocarray"); > +.Ed > +.Pp > +When using > +.Fn realloc , > +be careful to avoid the following idiom: > +.Bd -literal -offset indent > +size += 50; > +if ((p = realloc(p, size)) == NULL) > + return (NULL); > +.Ed > +.Pp > +Do not adjust the variable describing how much memory has been allocated > +until the allocation has been successful. > +This can cause aberrant program behavior if the incorrect size value is used. > +In most cases, the above sample will also result in a leak of memory. > +As stated earlier, a return value of > +.Dv NULL > +indicates that the old object still remains allocated. > +Better code looks like this: > +.Bd -literal -offset indent > +newsize = size + 50; > +if ((newp = realloc(p, newsize)) == NULL) { > + free(p); > + p = NULL; > + size = 0; > + return (NULL); > +} > +p = newp; > +size = newsize; > +.Ed > +.Pp > +As with > +.Fn malloc , > +it is important to ensure the new size value will not overflow; > +i.e. avoid allocations like the following: > +.Bd -literal -offset indent > +if ((newp = realloc(p, num * size)) == NULL) { > + ... > +.Ed > +.Pp > +Instead, use > +.Fn reallocarray : > +.Bd -literal -offset indent > +if ((newp = reallocarray(p, num, size)) == NULL) { > + ... > +.Ed > +.Sh SEE ALSO > +.Xr realloc 3 > +.Sh HISTORY > +The > +.Fn reallocf > +function first appeared in > +.Ox 5.6 . This looks unrelative and untrue. -- wbr, pluknet From owner-svn-src-head@FreeBSD.ORG Fri May 1 19:34:12 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4165F4D5; Fri, 1 May 2015 19:34:12 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C862D12B5; Fri, 1 May 2015 19:34:11 +0000 (UTC) Received: by wief7 with SMTP id f7so37447684wie.0; Fri, 01 May 2015 12:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=OjLVsT7uAoKIEi2IGgwsC2dW+InB3uLrPjET/5uANMk=; b=eii3ouCTUTF+dPpppaLnEM5RcI3J+AjFCzod3B8EjtNxO6eozVGK4qIoNL28TwCPZi /GCeyhWxQ+TVYGOMXCZi0/JQqhoP/tj0+StaS6LA++J07z0Yt8Fhwrsw1Q2iZwRY90wE IJJ+lzjE50rUN5DiehdoqZA8LJj6X7tbNX5oMJ/UHyN9OlKNt23FZZiP0iyymDFFn6U4 kOIM792+NRFHc3MqHxFvIQoUZcqJbF/GngKibJn8nUhdH245jJI0UOHi1nNX+GATazD7 dQlp1VKZfY3/uOdSZ9tsS0CTkrweyELu69jd5zQkd4gW3SqWbUq0ndzXbWxV/FNbHKcr jf/g== X-Received: by 10.194.236.33 with SMTP id ur1mr20138935wjc.77.1430508850361; Fri, 01 May 2015 12:34:10 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id s4sm7925528wix.14.2015.05.01.12.34.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 12:34:09 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 1 May 2015 21:34:07 +0200 From: Baptiste Daroussin To: Sergey Kandaurov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282314 - in head: include lib/libc/stdlib Message-ID: <20150501193407.GT13141@ivaldir.etoilebsd.net> References: <201505011832.t41IWGSs002284@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IQvoI1rdlCKiYEYW" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 19:34:12 -0000 --IQvoI1rdlCKiYEYW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 01, 2015 at 10:22:50PM +0300, Sergey Kandaurov wrote: > On 1 May 2015 at 21:32, Baptiste Daroussin wrote: > > Author: bapt > > Date: Fri May 1 18:32:16 2015 > > New Revision: 282314 > > URL: https://svnweb.freebsd.org/changeset/base/282314 > > > > Log: > > Import reallocarray(3) from OpenBSD > > > > Add a manpage for it, assign the copyright to the OpenBSD project on = it since it > > is mostly copy/paste from OpenBSD manpage. > > style(9) fixes > >[..] >=20 > > Added: head/lib/libc/stdlib/reallocarray.3 > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/lib/libc/stdlib/reallocarray.3 Fri May 1 18:32:16 2015 = (r282314) > > @@ -0,0 +1,136 @@ > > +.\" Copyright (c) 2015 OpenBSD > > +.\" All rights reserved. >=20 > This copyright notice looks suspicious. >=20 Well I wrote the man page but by copy/pasting code from OpenBSD malloc(3) manpage which copyright should I set? Best regards, Bapt --IQvoI1rdlCKiYEYW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVD1S8ACgkQ8kTtMUmk6ExP5gCfcLaC4NbwuieVmW7SwkkRTpfS JnUAnRGPgSxrt/kBsGJALYmsdwbY/htY =hJFi -----END PGP SIGNATURE----- --IQvoI1rdlCKiYEYW-- From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:08:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3E4EC25; Fri, 1 May 2015 20:08:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 94E591661; Fri, 1 May 2015 20:08:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41K8SHc048921; Fri, 1 May 2015 20:08:28 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41K8QUk048909; Fri, 1 May 2015 20:08:26 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505012008.t41K8QUk048909@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 20:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282318 - in head: . gnu/usr.bin/groff/src/preproc tools/build/mk usr.bin usr.bin/soelim usr.bin/soeliminate X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:08:28 -0000 Author: bapt Date: Fri May 1 20:08:25 2015 New Revision: 282318 URL: https://svnweb.freebsd.org/changeset/base/282318 Log: Replace groff's soelim by soeliminate(1) renamed soelim(1) Added: head/usr.bin/soelim/ - copied from r281993, head/usr.bin/soeliminate/ head/usr.bin/soelim/soelim.1 - copied, changed from r281993, head/usr.bin/soeliminate/soeliminate.1 head/usr.bin/soelim/soelim.c - copied, changed from r281993, head/usr.bin/soeliminate/soeliminate.c Deleted: head/usr.bin/soelim/soeliminate.1 head/usr.bin/soelim/soeliminate.c head/usr.bin/soeliminate/ Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/gnu/usr.bin/groff/src/preproc/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/Makefile head/usr.bin/soelim/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri May 1 19:14:32 2015 (r282317) +++ head/Makefile.inc1 Fri May 1 20:08:25 2015 (r282318) @@ -1263,7 +1263,8 @@ _gperf= gnu/usr.bin/gperf .endif .if ${MK_GROFF} != "no" -_groff= gnu/usr.bin/groff +_groff= gnu/usr.bin/groff \ + usr.bin/soelim .endif .if ${MK_VT} != "no" Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri May 1 19:14:32 2015 (r282317) +++ head/ObsoleteFiles.inc Fri May 1 20:08:25 2015 (r282318) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20150501 +OLD_FILES+=usr/bin/soeliminate +OLD_FILES+=usr/share/man/man1/soeliminate.1.gz # 20150501: Remove the nvlist_.*[vf] functions manpages. OLD_FILES+=usr/share/man/man3/nvlist_addf_binary.3.gz OLD_FILES+=usr/share/man/man3/nvlist_addf_bool.3.gz Modified: head/gnu/usr.bin/groff/src/preproc/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/Makefile Fri May 1 19:14:32 2015 (r282317) +++ head/gnu/usr.bin/groff/src/preproc/Makefile Fri May 1 20:08:25 2015 (r282318) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= eqn grn html pic refer soelim tbl +SUBDIR= eqn grn html pic refer tbl SUBDIR_PARALLEL= Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 1 19:14:32 2015 (r282317) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri May 1 20:08:25 2015 (r282318) @@ -1839,7 +1839,6 @@ OLD_FILES+=usr/bin/post-grohtml OLD_FILES+=usr/bin/pre-grohtml OLD_FILES+=usr/bin/psroff OLD_FILES+=usr/bin/refer -OLD_FILES+=usr/bin/soelim OLD_FILES+=usr/bin/tbl OLD_FILES+=usr/bin/tfmtodit OLD_FILES+=usr/bin/troff @@ -2246,7 +2245,6 @@ OLD_FILES+=usr/share/man/man1/pfbtops.1. OLD_FILES+=usr/share/man/man1/pic.1.gz OLD_FILES+=usr/share/man/man1/psroff.1.gz OLD_FILES+=usr/share/man/man1/refer.1.gz -OLD_FILES+=usr/share/man/man1/soelim.1.gz OLD_FILES+=usr/share/man/man1/tbl.1.gz OLD_FILES+=usr/share/man/man1/tfmtodit.1.gz OLD_FILES+=usr/share/man/man1/troff.1.gz Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Fri May 1 19:14:32 2015 (r282317) +++ head/usr.bin/Makefile Fri May 1 20:08:25 2015 (r282318) @@ -151,7 +151,7 @@ SUBDIR= ${_addr2line} \ showmount \ ${_size} \ sockstat \ - soeliminate \ + soelim \ sort \ split \ stat \ Modified: head/usr.bin/soelim/Makefile ============================================================================== --- head/usr.bin/soeliminate/Makefile Sun Apr 26 06:52:19 2015 (r281993) +++ head/usr.bin/soelim/Makefile Fri May 1 20:08:25 2015 (r282318) @@ -1,5 +1,5 @@ # $FreeBSD$ -PROG= soeliminate +PROG= soelim .include Copied and modified: head/usr.bin/soelim/soelim.1 (from r281993, head/usr.bin/soeliminate/soeliminate.1) ============================================================================== --- head/usr.bin/soeliminate/soeliminate.1 Sun Apr 26 06:52:19 2015 (r281993, copy source) +++ head/usr.bin/soelim/soelim.1 Fri May 1 20:08:25 2015 (r282318) @@ -24,11 +24,11 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2014 -.Dt SOELIMINATE 1 +.Dd May 1, 2015 +.Dt SOELIM 1 .Os .Sh NAME -.Nm soeliminate +.Nm soelim .Nd interpret .so directive in manpages .Sh SYNOPSIS .Nm Copied and modified: head/usr.bin/soelim/soelim.c (from r281993, head/usr.bin/soeliminate/soeliminate.c) ============================================================================== --- head/usr.bin/soeliminate/soeliminate.c Sun Apr 26 06:52:19 2015 (r281993, copy source) +++ head/usr.bin/soelim/soelim.c Fri May 1 20:08:25 2015 (r282318) @@ -45,7 +45,7 @@ static void usage(void) { - fprintf(stderr, "usage: soeliminate [-Crtv] [-I dir] [files]\n"); + fprintf(stderr, "usage: soelim [-Crtv] [-I dir] [files]\n"); exit(EXIT_FAILURE); } From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:10:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B53CAD86; Fri, 1 May 2015 20:10:15 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 94CE81673; Fri, 1 May 2015 20:10:15 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [12.229.62.2]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id DD224427E; Fri, 1 May 2015 13:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1430511015; x=1430525415; bh=axD5U3Ry1NRGm9UqpAiJW3mDj4hAHkpklmrb4cTCKXs=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=lB4EmRUvMFZTnPr46IBGo4p7UFyZC3VnJEJX8NXt8bo9rZQgxUy7WfnbPuE7R1hJk iMZ3p3Zw7HFYR/BR8a0i8ffa7yx2kymKxwSSYhfAcCu/lnM5VA41xWhQA9GqmCuBjf RQt69XMiRQglG3plx72/Rpjpyem3hZrXEJz4gNlE= Message-ID: <5543DDA6.6080702@delphij.net> Date: Fri, 01 May 2015 13:10:14 -0700 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Baptiste Daroussin , Sergey Kandaurov CC: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282314 - in head: include lib/libc/stdlib References: <201505011832.t41IWGSs002284@svn.freebsd.org> <20150501193407.GT13141@ivaldir.etoilebsd.net> In-Reply-To: <20150501193407.GT13141@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:10:15 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/01/15 12:34, Baptiste Daroussin wrote: > On Fri, May 01, 2015 at 10:22:50PM +0300, Sergey Kandaurov wrote: >> On 1 May 2015 at 21:32, Baptiste Daroussin >> wrote: >>> Author: bapt Date: Fri May 1 18:32:16 2015 New Revision: >>> 282314 URL: https://svnweb.freebsd.org/changeset/base/282314 >>> >>> Log: Import reallocarray(3) from OpenBSD >>> >>> Add a manpage for it, assign the copyright to the OpenBSD >>> project on it since it is mostly copy/paste from OpenBSD >>> manpage. style(9) fixes [..] >> >>> Added: head/lib/libc/stdlib/reallocarray.3 >>> ==================================================================== ========== >>> >>> - --- /dev/null 00:00:00 1970 (empty, because file is newly added) >>> +++ head/lib/libc/stdlib/reallocarray.3 Fri May 1 18:32:16 >>> 2015 (r282314) @@ -0,0 +1,136 @@ +.\" Copyright (c) 2015 >>> OpenBSD +.\" All rights reserved. >> >> This copyright notice looks suspicious. >> > Well I wrote the man page but by copy/pasting code from OpenBSD > malloc(3) manpage which copyright should I set? "OpenBSD" is not a legal entity so the declaration _may_ be invalid (IANL). OpenBSD developers are very careful here, and there is no reason we should do the opposite. Normally you copy the copyright notice altogether (in this case, since the text are mostly new creation from Theo de Raadt, he may have the right to just license this portion to us; they probably didn't do it because the new addition to the malloc(3) manual page is too small to warrant additional owners) or rewrite it to make the copyright ownership clear. I'm kinda disappointed with the fact that there is no seek for public review (e.g. -arch@ or -standard@) on wider audience level for essential system libraries like libc, as others may already working on this in private, by the way. But since the API is already there I guess it should stay. Two comments on the code change itself: a) __FreeBSD_version should be bumped and this should be documented. b) It may be sensible to use __builtin_umul_overflow instead of hand-rolling the same functionality. I think the compiler is not smart enough to handle that. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1.2 (FreeBSD) iQIcBAEBCgAGBQJVQ92iAAoJEJW2GBstM+nsBv4P/RadRIHMLOrhlh+31/1Ydwf+ Wv3pQ6SGCDU88Tiqwf0WuuIrMzihyTLMk1AJ6B6uYgV+AEo1dXeCGSfW7aTRgebc oJzxfG/42XvJcZI0SZVIEmGCOOezjkNF0yvx7xJkH7Lqs+wlpTN4nsuROyKlB3K+ 8zYkVIG4SPMZtZRgJbXCdB9/loEETjpCj52Fbku/n+zTKBcraeUiKIliHAhjQOV0 S9Q/+WjpjmK1WukZAn3QB+0abCrsJoHlQNZ/wL6f6IpIilxHJ7oebtgnY3UbzJie nxbPfLDGR2G4n9nZp6sftaSQnIbFiLG20Bs3lWhjXoP0nN05xG3nT9Q5Y7AL/TLZ KLq9phaROT3ssAlxwGEoDXS5aEQIs8LrPs4xLIVtazHAr9bQz8uA3VM/y6a3XDqv u0JreETjyWNNuA27T/Zx8g7/V9+sOVxygtB+MWj7HQocqMw6GBpFs+LoprgyJ76W /7xUqZ8qW7l/Fk1mqgybtxfLckjAdiqgHEWXHeGZHeaJ0smKU+IsPq0PcTD9MDQG CLTDAbkEtfKIm6BHVWwqk8EuEL+yYB1qmXHlx/ejuKZWgBHHZYHDCBN0zbGK868x DMmjzOZDQBH19rCEHemdy945v+SngqSheLLnUQlNnfzuQ4ccTtn+V7fqQDiH1txT KnL/1PZlEWdtSH2bhK+t =HGeH -----END PGP SIGNATURE----- From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:14:27 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9E91CB; Fri, 1 May 2015 20:14:27 +0000 (UTC) Received: from smtp.vnode.se (smtp.vnode.se [IPv6:2001:67c:40c:e1aa::4]) by mx1.freebsd.org (Postfix) with ESMTP id AA33F1747; Fri, 1 May 2015 20:14:27 +0000 (UTC) Received: from ymer.vnode.se (h71n10-th-c-d4.ias.bredband.telia.com [81.234.63.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.vnode.se (Postfix) with ESMTPSA id DB5F911EB8; Fri, 1 May 2015 22:14:24 +0200 (CEST) Date: Fri, 1 May 2015 22:14:24 +0200 From: Joel Dahl To: Baptiste Daroussin Cc: Sergey Kandaurov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282314 - in head: include lib/libc/stdlib Message-ID: <20150501201424.GA44548@ymer.vnode.se> Mail-Followup-To: Baptiste Daroussin , Sergey Kandaurov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org References: <201505011832.t41IWGSs002284@svn.freebsd.org> <20150501193407.GT13141@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150501193407.GT13141@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:14:28 -0000 On Fri, May 01, 2015 at 09:34:07PM +0200, Baptiste Daroussin wrote: > On Fri, May 01, 2015 at 10:22:50PM +0300, Sergey Kandaurov wrote: > > On 1 May 2015 at 21:32, Baptiste Daroussin wrote: > > > Author: bapt > > > Date: Fri May 1 18:32:16 2015 > > > New Revision: 282314 > > > URL: https://svnweb.freebsd.org/changeset/base/282314 > > > > > > Log: > > > Import reallocarray(3) from OpenBSD > > > > > > Add a manpage for it, assign the copyright to the OpenBSD project on it since it > > > is mostly copy/paste from OpenBSD manpage. > > > style(9) fixes > > >[..] > > > > > Added: head/lib/libc/stdlib/reallocarray.3 > > > ============================================================================== > > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > > +++ head/lib/libc/stdlib/reallocarray.3 Fri May 1 18:32:16 2015 (r282314) > > > @@ -0,0 +1,136 @@ > > > +.\" Copyright (c) 2015 OpenBSD > > > +.\" All rights reserved. > > > > This copyright notice looks suspicious. > > > Well I wrote the man page but by copy/pasting code from OpenBSD malloc(3) > manpage which copyright should I set? If you copied it from the malloc(3) manpage, you should use the copyright notice from the same manpage. -- Joel From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:25:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AFFD3AB; Fri, 1 May 2015 20:25:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED95D1872; Fri, 1 May 2015 20:25:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41KPlB8058584; Fri, 1 May 2015 20:25:47 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41KPlNS058583; Fri, 1 May 2015 20:25:47 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505012025.t41KPlNS058583@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 20:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282319 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:25:48 -0000 Author: bapt Date: Fri May 1 20:25:47 2015 New Revision: 282319 URL: https://svnweb.freebsd.org/changeset/base/282319 Log: Bump _FreeBSD_version after reallocarray import Requested by: delphij Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri May 1 20:08:25 2015 (r282318) +++ head/sys/sys/param.h Fri May 1 20:25:47 2015 (r282319) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100071 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100072 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:35:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E494718; Fri, 1 May 2015 20:35:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C4F31971; Fri, 1 May 2015 20:35:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41KZAod063601; Fri, 1 May 2015 20:35:10 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41KZAoZ063600; Fri, 1 May 2015 20:35:10 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <201505012035.t41KZAoZ063600@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 1 May 2015 20:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282320 - head/sys/boot/sparc64/loader X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:35:10 -0000 Author: andreast Date: Fri May 1 20:35:09 2015 New Revision: 282320 URL: https://svnweb.freebsd.org/changeset/base/282320 Log: Fix the loader for sparc64. The commit from r279799 missed the adaptation of md_load in sparc64/loader/main.c. This resulted in Memory Address Align issues at the early boot stage. Tested on a netbooted Fire 120. Modified: head/sys/boot/sparc64/loader/main.c Modified: head/sys/boot/sparc64/loader/main.c ============================================================================== --- head/sys/boot/sparc64/loader/main.c Fri May 1 20:25:47 2015 (r282319) +++ head/sys/boot/sparc64/loader/main.c Fri May 1 20:35:09 2015 (r282320) @@ -101,7 +101,7 @@ static inline u_long itlb_get_data_sun4u static int itlb_enter_sun4u(u_int, u_long data, vm_offset_t); static vm_offset_t itlb_va_to_pa_sun4u(vm_offset_t); static void itlb_relocate_locked0_sun4u(void); -extern vm_offset_t md_load(char *, vm_offset_t *); +extern vm_offset_t md_load(char *, vm_offset_t *, vm_offset_t *); static int sparc64_autoload(void); static ssize_t sparc64_readin(const int, vm_offset_t, const size_t); static ssize_t sparc64_copyin(const void *, vm_offset_t, size_t); @@ -340,7 +340,7 @@ static int __elfN(exec)(struct preloaded_file *fp) { struct file_metadata *fmp; - vm_offset_t mdp; + vm_offset_t mdp, dtbp; Elf_Addr entry; Elf_Ehdr *e; int error; @@ -349,7 +349,7 @@ __elfN(exec)(struct preloaded_file *fp) return (EFTYPE); e = (Elf_Ehdr *)&fmp->md_data; - if ((error = md_load(fp->f_args, &mdp)) != 0) + if ((error = md_load(fp->f_args, &mdp, &dtbp)) != 0) return (error); printf("jumping to kernel entry at %#lx.\n", e->e_entry); From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:37:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE19B8E3; Fri, 1 May 2015 20:37:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC7531990; Fri, 1 May 2015 20:37:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41KbxnT064080; Fri, 1 May 2015 20:37:59 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41KbxUj064079; Fri, 1 May 2015 20:37:59 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505012037.t41KbxUj064079@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 20:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282321 - head/lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:38:00 -0000 Author: bapt Date: Fri May 1 20:37:59 2015 New Revision: 282321 URL: https://svnweb.freebsd.org/changeset/base/282321 Log: Apply the copyright the the same owners as the original malloc(3) where most of the text here comes from Reported by: many Discussed with: miod@OpenBSD.org Pointyhat to: bapt Modified: head/lib/libc/stdlib/reallocarray.3 Modified: head/lib/libc/stdlib/reallocarray.3 ============================================================================== --- head/lib/libc/stdlib/reallocarray.3 Fri May 1 20:35:09 2015 (r282320) +++ head/lib/libc/stdlib/reallocarray.3 Fri May 1 20:37:59 2015 (r282321) @@ -1,5 +1,6 @@ -.\" Copyright (c) 2015 OpenBSD -.\" All rights reserved. +.\" +.\" Copyright (c) 1980, 1991, 1993 +.\">----The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the American National Standards Committee X3, on Information From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:38:19 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB946A31; Fri, 1 May 2015 20:38:19 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CBC8A1998; Fri, 1 May 2015 20:38:19 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t41KURVF044441 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 1 May 2015 13:30:27 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t41KUReW044440; Fri, 1 May 2015 13:30:27 -0700 (PDT) (envelope-from sgk) Date: Fri, 1 May 2015 13:30:27 -0700 From: Steve Kargl To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282318 - in head: . gnu/usr.bin/groff/src/preproc tools/build/mk usr.bin usr.bin/soelim usr.bin/soeliminate Message-ID: <20150501203027.GA44320@troutmask.apl.washington.edu> References: <201505012008.t41K8QUk048909@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201505012008.t41K8QUk048909@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:38:20 -0000 On Fri, May 01, 2015 at 08:08:26PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Fri May 1 20:08:25 2015 > New Revision: 282318 > URL: https://svnweb.freebsd.org/changeset/base/282318 > > Log: > Replace groff's soelim by soeliminate(1) renamed soelim(1) > Given that soeliminate(1) does not implement 4 of the 5 options available to soelim, how are these utilities at all compatiablity? src/UPDATING? -- Steve From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:40:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2B4BB95; Fri, 1 May 2015 20:40:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A10301A46; Fri, 1 May 2015 20:40:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41Kenlb065534; Fri, 1 May 2015 20:40:49 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41Ken6C065533; Fri, 1 May 2015 20:40:49 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201505012040.t41Ken6C065533@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 1 May 2015 20:40:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282322 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:40:49 -0000 Author: pfg Date: Fri May 1 20:40:48 2015 New Revision: 282322 URL: https://svnweb.freebsd.org/changeset/base/282322 Log: No need for result_use_check attribute in reallocf(3). Modified: head/include/stdlib.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Fri May 1 20:37:59 2015 (r282321) +++ head/include/stdlib.h Fri May 1 20:40:48 2015 (r282322) @@ -305,7 +305,7 @@ int radixsort(const unsigned char **, i unsigned); void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) __alloc_size(3); -void *reallocf(void *, size_t) __result_use_check __alloc_size(2); +void *reallocf(void *, size_t) __alloc_size(2); int rpmatch(const char *); void setprogname(const char *); int sradixsort(const unsigned char **, int, const unsigned char *, From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:42:16 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A268DDF; Fri, 1 May 2015 20:42:16 +0000 (UTC) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0B8E1A61; Fri, 1 May 2015 20:42:15 +0000 (UTC) Received: by widdi4 with SMTP id di4so63166897wid.0; Fri, 01 May 2015 13:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=8HEXaJwsJQe8o/c2An/bm+dh+Xo15NbbDVeTCF8/+fM=; b=lW0aN/ur+Moj9zJ681GZbFbf540qZZ3LUw42HFqkrfSfNa3vbIrDwKzq5MFeDkne4k cziqW32SoVeWU50kqnklRPc5BCAud2Wr7q7NEvk0yvZGNLRP2kAAOKLg61xDSO8bD8QZ zQdZNGPg5/IYv6H/tx9LXJ6DFCiB1npnBStgTE25aYlWDC0HGM88UUwZHN1LX+ZzZ6hT Ip+I3Ne9RsjikBkJg99el/wfJwWdPjF7etzgUMJcG0gXa38xMXzt82b3QacJuxU+J1kG P15T0WeeVAVrl0sIX1qCO8qtpbHbNBQkemFzsVRD0HV3jad2ilOTK4LhfjmakEz0H8k4 uxWg== X-Received: by 10.194.200.42 with SMTP id jp10mr20515837wjc.66.1430512934088; Fri, 01 May 2015 13:42:14 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id dq4sm8124737wid.17.2015.05.01.13.42.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 13:42:13 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 1 May 2015 22:42:11 +0200 From: Baptiste Daroussin To: Steve Kargl Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282318 - in head: . gnu/usr.bin/groff/src/preproc tools/build/mk usr.bin usr.bin/soelim usr.bin/soeliminate Message-ID: <20150501204210.GV13141@ivaldir.etoilebsd.net> References: <201505012008.t41K8QUk048909@svn.freebsd.org> <20150501203027.GA44320@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kD0q5DIPXzY/lIlp" Content-Disposition: inline In-Reply-To: <20150501203027.GA44320@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:42:16 -0000 --kD0q5DIPXzY/lIlp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 01, 2015 at 01:30:27PM -0700, Steve Kargl wrote: > On Fri, May 01, 2015 at 08:08:26PM +0000, Baptiste Daroussin wrote: > > Author: bapt > > Date: Fri May 1 20:08:25 2015 > > New Revision: 282318 > > URL: https://svnweb.freebsd.org/changeset/base/282318 > >=20 > > Log: > > Replace groff's soelim by soeliminate(1) renamed soelim(1) > >=20 >=20 > Given that soeliminate(1) does not implement 4 of the 5 > options available to soelim, how are these utilities at > all compatiablity? >=20 > src/UPDATING? I have not been able to find a single usage of soelim(1) that uses any of t= he other options than the one I did implement in soeliminate otherwise I would= have implemented them. UPDATING is not for when a user operation is needed while updating? here it should be transparent and I will implement all the missing bits if incompatibilities are really found. Best regards, Bapt --kD0q5DIPXzY/lIlp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVD5SIACgkQ8kTtMUmk6EwH7ACgtSPr7I2pXoy7n1rNOKUS/q1E xrAAn01fjqY/bhYPnKNupfSNZMJeAmNy =qqvJ -----END PGP SIGNATURE----- --kD0q5DIPXzY/lIlp-- From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:57:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A90AD2D0; Fri, 1 May 2015 20:57:05 +0000 (UTC) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CB701BC7; Fri, 1 May 2015 20:57:05 +0000 (UTC) Received: by wgso17 with SMTP id o17so100502438wgs.1; Fri, 01 May 2015 13:57:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=OjXnzgIsyP7lrSnSrqeWINZ5xqOmgAUNlQxzz8h92S8=; b=b9f9laV7kDWdOl9clD6ExjjckypIX+g6sLG+w0rPhvKKXcBTCzl982ptTt+j/BVTbw UclE1NfrURvLXL+TzibtHEg4zcywzdEQFx5sqtki85JEsoHbvnnpKmGHcwpg8m67kPZ/ Y/RCXifKwlU37HYkKNATdgL0CB88sxlvI5ykbwIFxDKuJNN+R3h3KlHknTVlxIbI+QMX DHuB+bI3HtOsF0p1i4dGi27EYK3ZbNz4Z1F8d5ZO3KXetl5g8yCW7tN3DagtEQtIXp1g SoRp6OwNUeFjrAGtZHLgGiQ2yCBM4ydzCW/0rxVRMj6cBQIpZxcOd+n/GJbm6zxrPjZh we8g== X-Received: by 10.180.37.73 with SMTP id w9mr17143728wij.7.1430513823780; Fri, 01 May 2015 13:57:03 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id y7sm9047115wjw.16.2015.05.01.13.57.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 13:57:02 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 1 May 2015 22:57:00 +0200 From: Baptiste Daroussin To: d@delphij.net Cc: Sergey Kandaurov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282314 - in head: include lib/libc/stdlib Message-ID: <20150501205700.GW13141@ivaldir.etoilebsd.net> References: <201505011832.t41IWGSs002284@svn.freebsd.org> <20150501193407.GT13141@ivaldir.etoilebsd.net> <5543DDA6.6080702@delphij.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1gsfN/+pS0/2Ta7u" Content-Disposition: inline In-Reply-To: <5543DDA6.6080702@delphij.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:57:05 -0000 --1gsfN/+pS0/2Ta7u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 01, 2015 at 01:10:14PM -0700, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 >=20 > On 05/01/15 12:34, Baptiste Daroussin wrote: > > On Fri, May 01, 2015 at 10:22:50PM +0300, Sergey Kandaurov wrote: > >> On 1 May 2015 at 21:32, Baptiste Daroussin > >> wrote: > >>> Author: bapt Date: Fri May 1 18:32:16 2015 New Revision: > >>> 282314 URL: https://svnweb.freebsd.org/changeset/base/282314 > >>>=20 > >>> Log: Import reallocarray(3) from OpenBSD > >>>=20 > >>> Add a manpage for it, assign the copyright to the OpenBSD > >>> project on it since it is mostly copy/paste from OpenBSD > >>> manpage. style(9) fixes [..] > >>=20 > >>> Added: head/lib/libc/stdlib/reallocarray.3=20 > >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >>> > >>>=20 > - --- /dev/null 00:00:00 1970 (empty, because file is newly added) > >>> +++ head/lib/libc/stdlib/reallocarray.3 Fri May 1 18:32:16 > >>> 2015 (r282314) @@ -0,0 +1,136 @@ +.\" Copyright (c) 2015 > >>> OpenBSD +.\" All rights reserved. > >>=20 > >> This copyright notice looks suspicious. > >>=20 > > Well I wrote the man page but by copy/pasting code from OpenBSD > > malloc(3) manpage which copyright should I set? >=20 > "OpenBSD" is not a legal entity so the declaration _may_ be invalid > (IANL). OpenBSD developers are very careful here, and there is no > reason we should do the opposite. Fixed >=20 > Normally you copy the copyright notice altogether (in this case, since > the text are mostly new creation from Theo de Raadt, he may have the > right to just license this portion to us; they probably didn't do it > because the new addition to the malloc(3) manual page is too small to > warrant additional owners) or rewrite it to make the copyright > ownership clear. >=20 > I'm kinda disappointed with the fact that there is no seek for public > review (e.g. -arch@ or -standard@) on wider audience level for > essential system libraries like libc, as others may already working on > this in private, by the way. But since the API is already there I > guess it should stay. >=20 > Two comments on the code change itself: >=20 > a) __FreeBSD_version should be bumped and this should be documented. Done >=20 > b) It may be sensible to use __builtin_umul_overflow instead of > hand-rolling the same functionality. I think the compiler is not > smart enough to handle that. >=20 That I have no opinion about it, I just wanted to get the avoid the duplica= tion of that code anywhere in base. Bapt --1gsfN/+pS0/2Ta7u Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVD6JwACgkQ8kTtMUmk6ExAyACZAXBVOSDTgEeTDHEtXDX8wBcL vp0AoJOXFXcXrsbIFNlZR16ur6syEkvv =JkVu -----END PGP SIGNATURE----- --1gsfN/+pS0/2Ta7u-- From owner-svn-src-head@FreeBSD.ORG Fri May 1 20:58:15 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBBD947E; Fri, 1 May 2015 20:58:15 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A9AEA1BD7; Fri, 1 May 2015 20:58:15 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t41KwFJJ044617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 1 May 2015 13:58:15 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t41KwFw4044616; Fri, 1 May 2015 13:58:15 -0700 (PDT) (envelope-from sgk) Date: Fri, 1 May 2015 13:58:15 -0700 From: Steve Kargl To: Baptiste Daroussin Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282318 - in head: . gnu/usr.bin/groff/src/preproc tools/build/mk usr.bin usr.bin/soelim usr.bin/soeliminate Message-ID: <20150501205815.GA44481@troutmask.apl.washington.edu> References: <201505012008.t41K8QUk048909@svn.freebsd.org> <20150501203027.GA44320@troutmask.apl.washington.edu> <20150501204210.GV13141@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150501204210.GV13141@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 20:58:15 -0000 On Fri, May 01, 2015 at 10:42:11PM +0200, Baptiste Daroussin wrote: > On Fri, May 01, 2015 at 01:30:27PM -0700, Steve Kargl wrote: > > On Fri, May 01, 2015 at 08:08:26PM +0000, Baptiste Daroussin wrote: > > > Author: bapt > > > Date: Fri May 1 20:08:25 2015 > > > New Revision: 282318 > > > URL: https://svnweb.freebsd.org/changeset/base/282318 > > > > > > Log: > > > Replace groff's soelim by soeliminate(1) renamed soelim(1) > > > > > > > Given that soeliminate(1) does not implement 4 of the 5 > > options available to soelim, how are these utilities at > > all compatiablity? > > > > src/UPDATING? > > I have not been able to find a single usage of soelim(1) that uses any of the > other options than the one I did implement in soeliminate otherwise I would have > implemented them. Your presuming that no user uses one or more of these options in their own projects. > UPDATING is not for when a user operation is needed while updating? here it > should be transparent and I will implement all the missing bits if > incompatibilities are really found. UPDATING is for warning users that a gratuitious incompatible change has been introduced into the functionality once offered by the base system. 20150501: soelim(1) from gnu/usr.bin/groff has been replaced by usr.bin/soeliminate, which has reduced functionality. If you need a functional soelim(1), then install textproc/groff. -- Steve From owner-svn-src-head@FreeBSD.ORG Fri May 1 21:00:55 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19893678; Fri, 1 May 2015 21:00:55 +0000 (UTC) Received: from mail-wg0-x235.google.com (mail-wg0-x235.google.com [IPv6:2a00:1450:400c:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0E8D1BF2; Fri, 1 May 2015 21:00:54 +0000 (UTC) Received: by wgen6 with SMTP id n6so100467357wge.3; Fri, 01 May 2015 14:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=uQNYcPlioyGEz09iP8CtFYh8uJ9eTe4X80ee3K0e8RI=; b=JMfEyZ5fH9mAPoLpw93jJERNQKzUZDBYrCtnrKC2/6InXHrP6qbODYT8/KHTPKRCBJ 7M4UhOM7rhBYqDrv8KxdIBb+JZxUttiQQVselGVSnqtWNadvN9Szbr4Kc3OPgm6Xd5cJ 3qz1BsKrc3aK+FvXnX2J+CsO0nfK4emCWFxqPiE/dJ46nFNNqYWjM9wBFDqtb4HnHPrd BbRBvMQPhGmPbCfRH4vMpI+B9KIGACab1MXCjS7VOuDIr+8OvUJGjdY21bZ2mpR0Bs/w OIr4o0CANMeKbhLIJ7GPgwc1hUM7pFmtiWvOxH1jbZvESgeMQiCv8X0+bbwzLJGNZ/5W GUKA== X-Received: by 10.194.121.163 with SMTP id ll3mr12027697wjb.142.1430514052767; Fri, 01 May 2015 14:00:52 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id yr1sm9031688wjc.37.2015.05.01.14.00.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 14:00:51 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 1 May 2015 23:00:49 +0200 From: Baptiste Daroussin To: Steve Kargl Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282318 - in head: . gnu/usr.bin/groff/src/preproc tools/build/mk usr.bin usr.bin/soelim usr.bin/soeliminate Message-ID: <20150501210049.GX13141@ivaldir.etoilebsd.net> References: <201505012008.t41K8QUk048909@svn.freebsd.org> <20150501203027.GA44320@troutmask.apl.washington.edu> <20150501204210.GV13141@ivaldir.etoilebsd.net> <20150501205815.GA44481@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v6gilOcl2gU05R9Q" Content-Disposition: inline In-Reply-To: <20150501205815.GA44481@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 21:00:55 -0000 --v6gilOcl2gU05R9Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 01, 2015 at 01:58:15PM -0700, Steve Kargl wrote: > On Fri, May 01, 2015 at 10:42:11PM +0200, Baptiste Daroussin wrote: > > On Fri, May 01, 2015 at 01:30:27PM -0700, Steve Kargl wrote: > > > On Fri, May 01, 2015 at 08:08:26PM +0000, Baptiste Daroussin wrote: > > > > Author: bapt > > > > Date: Fri May 1 20:08:25 2015 > > > > New Revision: 282318 > > > > URL: https://svnweb.freebsd.org/changeset/base/282318 > > > >=20 > > > > Log: > > > > Replace groff's soelim by soeliminate(1) renamed soelim(1) > > > >=20 > > >=20 > > > Given that soeliminate(1) does not implement 4 of the 5 > > > options available to soelim, how are these utilities at > > > all compatiablity? > > >=20 > > > src/UPDATING? > >=20 > > I have not been able to find a single usage of soelim(1) that uses any = of the > > other options than the one I did implement in soeliminate otherwise I w= ould have > > implemented them. >=20 > Your presuming that no user uses one or more of these options > in their own projects. >=20 > > UPDATING is not for when a user operation is needed while updating? her= e it > > should be transparent and I will implement all the missing bits if > > incompatibilities are really found. >=20 > UPDATING is for warning users that a gratuitious incompatible > change has been introduced into the functionality once offered > by the base system. >=20 > 20150501: > soelim(1) from gnu/usr.bin/groff has been replaced by=20 > usr.bin/soeliminate, which has reduced functionality. If you > need a functional soelim(1), then install textproc/groff.=20 soelim(1) has multiple implementations, the version from groff is just "spe= cial" by adding plenty of options, all other implementation out there have 0 opti= ons incluing the original soelim(1) Best regards, Bapt --v6gilOcl2gU05R9Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVD6YEACgkQ8kTtMUmk6ExdEgCgiDKJSzsH90C67fV1+cJJuQrS 1BQAn2uVzacC1cbrYbUs2WDoz/K+h8Yl =Sl5W -----END PGP SIGNATURE----- --v6gilOcl2gU05R9Q-- From owner-svn-src-head@FreeBSD.ORG Fri May 1 21:17:36 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAD64C53; Fri, 1 May 2015 21:17:36 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A92761DDD; Fri, 1 May 2015 21:17:36 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t41LHatR044726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 1 May 2015 14:17:36 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t41LHZCn044725; Fri, 1 May 2015 14:17:35 -0700 (PDT) (envelope-from sgk) Date: Fri, 1 May 2015 14:17:35 -0700 From: Steve Kargl To: Baptiste Daroussin Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r282318 - in head: . gnu/usr.bin/groff/src/preproc tools/build/mk usr.bin usr.bin/soelim usr.bin/soeliminate Message-ID: <20150501211735.GA44638@troutmask.apl.washington.edu> References: <201505012008.t41K8QUk048909@svn.freebsd.org> <20150501203027.GA44320@troutmask.apl.washington.edu> <20150501204210.GV13141@ivaldir.etoilebsd.net> <20150501205815.GA44481@troutmask.apl.washington.edu> <20150501210049.GX13141@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150501210049.GX13141@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 21:17:36 -0000 On Fri, May 01, 2015 at 11:00:49PM +0200, Baptiste Daroussin wrote: > On Fri, May 01, 2015 at 01:58:15PM -0700, Steve Kargl wrote: > > On Fri, May 01, 2015 at 10:42:11PM +0200, Baptiste Daroussin wrote: > > > On Fri, May 01, 2015 at 01:30:27PM -0700, Steve Kargl wrote: > > > > On Fri, May 01, 2015 at 08:08:26PM +0000, Baptiste Daroussin wrote: > > > > > Author: bapt > > > > > Date: Fri May 1 20:08:25 2015 > > > > > New Revision: 282318 > > > > > URL: https://svnweb.freebsd.org/changeset/base/282318 > > > > > > > > > > Log: > > > > > Replace groff's soelim by soeliminate(1) renamed soelim(1) > > > > > > > > > > > > > Given that soeliminate(1) does not implement 4 of the 5 > > > > options available to soelim, how are these utilities at > > > > all compatiablity? > > > > > > > > src/UPDATING? > > > > > > I have not been able to find a single usage of soelim(1) that uses any of the > > > other options than the one I did implement in soeliminate otherwise I would have > > > implemented them. > > > > Your presuming that no user uses one or more of these options > > in their own projects. > > > > > UPDATING is not for when a user operation is needed while updating? here it > > > should be transparent and I will implement all the missing bits if > > > incompatibilities are really found. > > > > UPDATING is for warning users that a gratuitious incompatible > > change has been introduced into the functionality once offered > > by the base system. > > > > 20150501: > > soelim(1) from gnu/usr.bin/groff has been replaced by > > usr.bin/soeliminate, which has reduced functionality. If you > > need a functional soelim(1), then install textproc/groff. > > soelim(1) has multiple implementations, the version from groff is just "special" > by adding plenty of options, all other implementation out there have 0 options > incluing the original soelim(1) > All those other implementations of soelim(1) were not the one offered by FreeBSD. -- Steve From owner-svn-src-head@FreeBSD.ORG Fri May 1 21:26:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77013D7; Fri, 1 May 2015 21:26:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6615F1ECE; Fri, 1 May 2015 21:26:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41LQfbw089149; Fri, 1 May 2015 21:26:41 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41LQfKk089148; Fri, 1 May 2015 21:26:41 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505012126.t41LQfKk089148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 21:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282323 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 21:26:41 -0000 Author: bapt Date: Fri May 1 21:26:40 2015 New Revision: 282323 URL: https://svnweb.freebsd.org/changeset/base/282323 Log: Add a note about the replacement of GNU groff's soelim(1) Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri May 1 20:40:48 2015 (r282322) +++ head/UPDATING Fri May 1 21:26:40 2015 (r282323) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150501: + soelim(1) from gnu/usr.bin/groff has been replaced by usr.bin/soelim. + If you need the GNU extension from groff soelim(1), install groff + from package: pkg install groff, or via ports: textproc/groff. + 20150423: chmod, chflags, chown and chgrp now affect symlinks in -R mode as defined in symlink(7); previously symlinks were silently ignored. From owner-svn-src-head@FreeBSD.ORG Fri May 1 21:59:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 072E2171; Fri, 1 May 2015 21:59:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8A58121C; Fri, 1 May 2015 21:59:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41LxX5U005508; Fri, 1 May 2015 21:59:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41LxX7f005504; Fri, 1 May 2015 21:59:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505012159.t41LxX7f005504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 21:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282328 - head/contrib/sqlite3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 21:59:34 -0000 Author: bapt Date: Fri May 1 21:59:32 2015 New Revision: 282328 URL: https://svnweb.freebsd.org/changeset/base/282328 Log: Import sqlite3 3.8.9 Modified: head/contrib/sqlite3/configure head/contrib/sqlite3/configure.ac head/contrib/sqlite3/shell.c head/contrib/sqlite3/sqlite3.1 head/contrib/sqlite3/sqlite3.c head/contrib/sqlite3/sqlite3.h Directory Properties: head/contrib/sqlite3/ (props changed) Modified: head/contrib/sqlite3/configure ============================================================================== --- head/contrib/sqlite3/configure Fri May 1 21:54:39 2015 (r282327) +++ head/contrib/sqlite3/configure Fri May 1 21:59:32 2015 (r282328) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sqlite 3.8.7.2. +# Generated by GNU Autoconf 2.69 for sqlite 3.8.9. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.8.7.2' -PACKAGE_STRING='sqlite 3.8.7.2' +PACKAGE_VERSION='3.8.9' +PACKAGE_STRING='sqlite 3.8.9' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1313,7 +1313,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.8.7.2 to adapt to many kinds of systems. +\`configure' configures sqlite 3.8.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1383,7 +1383,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.8.7.2:";; + short | recursive ) echo "Configuration of sqlite 3.8.9:";; esac cat <<\_ACEOF @@ -1489,7 +1489,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.8.7.2 +sqlite configure 3.8.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1813,7 +1813,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.8.7.2, which was +It was created by sqlite $as_me 3.8.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2631,7 +2631,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.8.7.2' + VERSION='3.8.9' cat >>confdefs.h <<_ACEOF @@ -13196,7 +13196,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.8.7.2, which was +This file was extended by sqlite $as_me 3.8.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13253,7 +13253,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sqlite config.status 3.8.7.2 +sqlite config.status 3.8.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: head/contrib/sqlite3/configure.ac ============================================================================== --- head/contrib/sqlite3/configure.ac Fri May 1 21:54:39 2015 (r282327) +++ head/contrib/sqlite3/configure.ac Fri May 1 21:59:32 2015 (r282328) @@ -8,7 +8,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.8.7.2, http://www.sqlite.org) +AC_INIT(sqlite, 3.8.9, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) # Use automake. Modified: head/contrib/sqlite3/shell.c ============================================================================== --- head/contrib/sqlite3/shell.c Fri May 1 21:54:39 2015 (r282327) +++ head/contrib/sqlite3/shell.c Fri May 1 21:59:32 2015 (r282328) @@ -18,6 +18,20 @@ #endif /* +** If requested, include the SQLite compiler options file for MSVC. +*/ +#if defined(INCLUDE_MSVC_H) +#include "msvc.h" +#endif + +/* +** No support for loadable extensions in VxWorks. +*/ +#if (defined(__RTP__) || defined(_WRS_KERNEL)) && !SQLITE_OMIT_LOAD_EXTENSION +# define SQLITE_OMIT_LOAD_EXTENSION 1 +#endif + +/* ** Enable large-file support for fopen() and friends on unix. */ #ifndef SQLITE_DISABLE_LFS @@ -48,23 +62,42 @@ # include #endif -#if defined(HAVE_READLINE) && HAVE_READLINE!=0 +#if HAVE_READLINE # include # include -#else -# undef HAVE_READLINE #endif -#if defined(HAVE_EDITLINE) && !defined(HAVE_READLINE) -# define HAVE_READLINE 1 + +#if HAVE_EDITLINE # include #endif -#if !defined(HAVE_READLINE) -# define add_history(X) -# define read_history(X) -# define write_history(X) -# define stifle_history(X) + +#if HAVE_EDITLINE || HAVE_READLINE + +# define shell_add_history(X) add_history(X) +# define shell_read_history(X) read_history(X) +# define shell_write_history(X) write_history(X) +# define shell_stifle_history(X) stifle_history(X) +# define shell_readline(X) readline(X) + +#elif HAVE_LINENOISE + +# include "linenoise.h" +# define shell_add_history(X) linenoiseHistoryAdd(X) +# define shell_read_history(X) linenoiseHistoryLoad(X) +# define shell_write_history(X) linenoiseHistorySave(X) +# define shell_stifle_history(X) linenoiseHistorySetMaxLen(X) +# define shell_readline(X) linenoise(X) + +#else + +# define shell_read_history(X) +# define shell_write_history(X) +# define shell_stifle_history(X) + +# define SHELL_USE_LOCAL_GETLINE 1 #endif + #if defined(_WIN32) || defined(WIN32) # include # include @@ -81,10 +114,15 @@ */ extern int isatty(int); -/* popen and pclose are not C89 functions and so are sometimes omitted from -** the header */ -extern FILE *popen(const char*,const char*); -extern int pclose(FILE*); +#if !defined(__RTP__) && !defined(_WRS_KERNEL) + /* popen and pclose are not C89 functions and so are sometimes omitted from + ** the header */ + extern FILE *popen(const char*,const char*); + extern int pclose(FILE*); +#else +# define SQLITE_OMIT_POPEN 1 +#endif + #endif #if defined(_WIN32_WCE) @@ -100,6 +138,26 @@ extern int pclose(FILE*); #define IsDigit(X) isdigit((unsigned char)X) #define ToLower(X) (char)tolower((unsigned char)X) +/* On Windows, we normally run with output mode of TEXT so that \n characters +** are automatically translated into \r\n. However, this behavior needs +** to be disabled in some cases (ex: when generating CSV output and when +** rendering quoted strings that contain \n characters). The following +** routines take care of that. +*/ +#if defined(_WIN32) || defined(WIN32) +static void setBinaryMode(FILE *out){ + fflush(out); + _setmode(_fileno(out), _O_BINARY); +} +static void setTextMode(FILE *out){ + fflush(out); + _setmode(_fileno(out), _O_TEXT); +} +#else +# define setBinaryMode(X) +# define setTextMode(X) +#endif + /* True if the timer is enabled */ static int enableTimer = 0; @@ -119,11 +177,19 @@ static sqlite3_int64 timeOfDay(void){ return t; } -#if !defined(_WIN32) && !defined(WIN32) && !defined(_WRS_KERNEL) \ - && !defined(__minux) +#if !defined(_WIN32) && !defined(WIN32) && !defined(__minux) #include #include +/* VxWorks does not support getrusage() as far as we can determine */ +#if defined(_WRS_KERNEL) || defined(__RTP__) +struct rusage { + struct timeval ru_utime; /* user CPU time used */ + struct timeval ru_stime; /* system CPU time used */ +}; +#define getrusage(A,B) memset(B,0,sizeof(*B)) +#endif + /* Saved resource information for the beginning of an operation */ static struct rusage sBegin; /* CPU time at start */ static sqlite3_int64 iBegin; /* Wall-clock time at start */ @@ -149,8 +215,8 @@ static double timeDiff(struct timeval *p */ static void endTimer(void){ if( enableTimer ){ - struct rusage sEnd; sqlite3_int64 iEnd = timeOfDay(); + struct rusage sEnd; getrusage(RUSAGE_SELF, &sEnd); printf("Run Time: real %.3f user %f sys %f\n", (iEnd - iBegin)*0.001, @@ -172,7 +238,8 @@ static HANDLE hProcess; static FILETIME ftKernelBegin; static FILETIME ftUserBegin; static sqlite3_int64 ftWallBegin; -typedef BOOL (WINAPI *GETPROCTIMES)(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME, LPFILETIME); +typedef BOOL (WINAPI *GETPROCTIMES)(HANDLE, LPFILETIME, LPFILETIME, + LPFILETIME, LPFILETIME); static GETPROCTIMES getProcessTimesAddr = NULL; /* @@ -183,15 +250,16 @@ static int hasTimer(void){ if( getProcessTimesAddr ){ return 1; } else { - /* GetProcessTimes() isn't supported in WIN95 and some other Windows versions. - ** See if the version we are running on has it, and if it does, save off - ** a pointer to it and the current process handle. + /* GetProcessTimes() isn't supported in WIN95 and some other Windows + ** versions. See if the version we are running on has it, and if it + ** does, save off a pointer to it and the current process handle. */ hProcess = GetCurrentProcess(); if( hProcess ){ HINSTANCE hinstLib = LoadLibrary(TEXT("Kernel32.dll")); if( NULL != hinstLib ){ - getProcessTimesAddr = (GETPROCTIMES) GetProcAddress(hinstLib, "GetProcessTimes"); + getProcessTimesAddr = + (GETPROCTIMES) GetProcAddress(hinstLib, "GetProcessTimes"); if( NULL != getProcessTimesAddr ){ return 1; } @@ -208,7 +276,8 @@ static int hasTimer(void){ static void beginTimer(void){ if( enableTimer && getProcessTimesAddr ){ FILETIME ftCreation, ftExit; - getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelBegin, &ftUserBegin); + getProcessTimesAddr(hProcess,&ftCreation,&ftExit, + &ftKernelBegin,&ftUserBegin); ftWallBegin = timeOfDay(); } } @@ -227,7 +296,7 @@ static void endTimer(void){ if( enableTimer && getProcessTimesAddr){ FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd; sqlite3_int64 ftWallEnd = timeOfDay(); - getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd); + getProcessTimesAddr(hProcess,&ftCreation,&ftExit,&ftKernelEnd,&ftUserEnd); printf("Run Time: real %.3f user %f sys %f\n", (ftWallEnd - ftWallBegin)*0.001, timeDiff(&ftUserBegin, &ftUserEnd), @@ -301,7 +370,7 @@ static FILE *iotrace = 0; ** is written to iotrace. */ #ifdef SQLITE_ENABLE_IOTRACE -static void iotracePrintf(const char *zFormat, ...){ +static void SQLITE_CDECL iotracePrintf(const char *zFormat, ...){ va_list ap; char *z; if( iotrace==0 ) return; @@ -422,14 +491,14 @@ static char *one_input_line(FILE *in, ch zResult = local_getline(zPrior, in); }else{ zPrompt = isContinuation ? continuePrompt : mainPrompt; -#if defined(HAVE_READLINE) - free(zPrior); - zResult = readline(zPrompt); - if( zResult && *zResult ) add_history(zResult); -#else +#if SHELL_USE_LOCAL_GETLINE printf("%s", zPrompt); fflush(stdout); zResult = local_getline(zPrior, stdin); +#else + free(zPrior); + zResult = shell_readline(zPrompt); + if( zResult && *zResult ) shell_add_history(zResult); #endif } return zResult; @@ -457,6 +526,7 @@ struct ShellState { int echoOn; /* True to echo input commands */ int autoEQP; /* Run EXPLAIN QUERY PLAN prior to seach SQL stmt */ int statsOn; /* True to display memory stats before each finalize */ + int scanstatsOn; /* True to display scan stats before each finalize */ int outCount; /* Revert to stdout when reaching zero */ int cnt; /* Number of records displayed so far */ FILE *out; /* Write results here */ @@ -467,11 +537,11 @@ struct ShellState { int showHeader; /* True to show column names in List or Column mode */ unsigned shellFlgs; /* Various flags */ char *zDestTable; /* Name of destination table when MODE_Insert */ - char separator[20]; /* Separator character for MODE_List */ - char newline[20]; /* Record separator in MODE_Csv */ + char colSeparator[20]; /* Column separator character for several modes */ + char rowSeparator[20]; /* Row separator character for MODE_Ascii */ int colWidth[100]; /* Requested width of each column when in column mode*/ int actualWidth[100]; /* Actual width of each column */ - char nullvalue[20]; /* The text to print when a NULL comes back from + char nullValue[20]; /* The text to print when a NULL comes back from ** the database */ SavedModeInfo normalMode;/* Holds the mode just before .explain ON */ char outfile[FILENAME_MAX]; /* Filename for *out */ @@ -504,6 +574,7 @@ struct ShellState { #define MODE_Tcl 6 /* Generate ANSI-C or TCL quoted elements */ #define MODE_Csv 7 /* Quote strings, numbers are plain */ #define MODE_Explain 8 /* Like MODE_Column, but do not truncate data */ +#define MODE_Ascii 9 /* Use ASCII unit and record separators (0x1F/0x1E) */ static const char *modeDescr[] = { "line", @@ -515,9 +586,23 @@ static const char *modeDescr[] = { "tcl", "csv", "explain", + "ascii", }; /* +** These are the column/row/line separators used by the various +** import/export modes. +*/ +#define SEP_Column "|" +#define SEP_Row "\n" +#define SEP_Tab "\t" +#define SEP_Space " " +#define SEP_Comma "," +#define SEP_CrLf "\r\n" +#define SEP_Unit "\x1F" +#define SEP_Record "\x1E" + +/* ** Number of elements in an array */ #define ArraySize(X) (int)(sizeof(X)/sizeof(X[0])) @@ -559,6 +644,7 @@ static void output_hex_blob(FILE *out, c static void output_quoted_string(FILE *out, const char *z){ int i; int nSingle = 0; + setBinaryMode(out); for(i=0; z[i]; i++){ if( z[i]=='\'' ) nSingle++; } @@ -581,6 +667,7 @@ static void output_quoted_string(FILE *o } fprintf(out,"'"); } + setTextMode(out); } /* @@ -673,22 +760,22 @@ static const char needCsvQuote[] = { }; /* -** Output a single term of CSV. Actually, p->separator is used for -** the separator, which may or may not be a comma. p->nullvalue is +** Output a single term of CSV. Actually, p->colSeparator is used for +** the separator, which may or may not be a comma. p->nullValue is ** the null value. Strings are quoted if necessary. The separator ** is only issued if bSep is true. */ static void output_csv(ShellState *p, const char *z, int bSep){ FILE *out = p->out; if( z==0 ){ - fprintf(out,"%s",p->nullvalue); + fprintf(out,"%s",p->nullValue); }else{ int i; - int nSep = strlen30(p->separator); + int nSep = strlen30(p->colSeparator); for(i=0; z[i]; i++){ if( needCsvQuote[((unsigned char*)z)[i]] - || (z[i]==p->separator[0] && - (nSep==1 || memcmp(z, p->separator, nSep)==0)) ){ + || (z[i]==p->colSeparator[0] && + (nSep==1 || memcmp(z, p->colSeparator, nSep)==0)) ){ i = 0; break; } @@ -705,7 +792,7 @@ static void output_csv(ShellState *p, co } } if( bSep ){ - fprintf(p->out, "%s", p->separator); + fprintf(p->out, "%s", p->colSeparator); } } @@ -725,7 +812,13 @@ static void interrupt_handler(int NotUse ** This is the callback routine that the shell ** invokes for each row of a query result. */ -static int shell_callback(void *pArg, int nArg, char **azArg, char **azCol, int *aiType){ +static int shell_callback( + void *pArg, + int nArg, /* Number of result columns */ + char **azArg, /* Text of each result column */ + char **azCol, /* Column names */ + int *aiType /* Column types */ +){ int i; ShellState *p = (ShellState*)pArg; @@ -737,10 +830,10 @@ static int shell_callback(void *pArg, in int len = strlen30(azCol[i] ? azCol[i] : ""); if( len>w ) w = len; } - if( p->cnt++>0 ) fprintf(p->out,"\n"); + if( p->cnt++>0 ) fprintf(p->out, "%s", p->rowSeparator); for(i=0; iout,"%*s = %s\n", w, azCol[i], - azArg[i] ? azArg[i] : p->nullvalue); + fprintf(p->out,"%*s = %s%s", w, azCol[i], + azArg[i] ? azArg[i] : p->nullValue, p->rowSeparator); } break; } @@ -757,7 +850,7 @@ static int shell_callback(void *pArg, in if( w==0 ){ w = strlen30(azCol[i] ? azCol[i] : ""); if( w<10 ) w = 10; - n = strlen30(azArg && azArg[i] ? azArg[i] : p->nullvalue); + n = strlen30(azArg && azArg[i] ? azArg[i] : p->nullValue); if( wactualWidth) ){ @@ -765,9 +858,11 @@ static int shell_callback(void *pArg, in } if( p->showHeader ){ if( w<0 ){ - fprintf(p->out,"%*.*s%s",-w,-w,azCol[i], i==nArg-1 ? "\n": " "); + fprintf(p->out,"%*.*s%s",-w,-w,azCol[i], + i==nArg-1 ? p->rowSeparator : " "); }else{ - fprintf(p->out,"%-*.*s%s",w,w,azCol[i], i==nArg-1 ? "\n": " "); + fprintf(p->out,"%-*.*s%s",w,w,azCol[i], + i==nArg-1 ? p->rowSeparator : " "); } } } @@ -782,7 +877,7 @@ static int shell_callback(void *pArg, in } fprintf(p->out,"%-*.*s%s",w,w,"-----------------------------------" "----------------------------------------------------------", - i==nArg-1 ? "\n": " "); + i==nArg-1 ? p->rowSeparator : " "); } } } @@ -805,10 +900,12 @@ static int shell_callback(void *pArg, in } if( w<0 ){ fprintf(p->out,"%*.*s%s",-w,-w, - azArg[i] ? azArg[i] : p->nullvalue, i==nArg-1 ? "\n": " "); + azArg[i] ? azArg[i] : p->nullValue, + i==nArg-1 ? p->rowSeparator : " "); }else{ fprintf(p->out,"%-*.*s%s",w,w, - azArg[i] ? azArg[i] : p->nullvalue, i==nArg-1 ? "\n": " "); + azArg[i] ? azArg[i] : p->nullValue, + i==nArg-1 ? p->rowSeparator : " "); } } break; @@ -817,20 +914,21 @@ static int shell_callback(void *pArg, in case MODE_List: { if( p->cnt++==0 && p->showHeader ){ for(i=0; iout,"%s%s",azCol[i], i==nArg-1 ? "\n" : p->separator); + fprintf(p->out,"%s%s",azCol[i], + i==nArg-1 ? p->rowSeparator : p->colSeparator); } } if( azArg==0 ) break; for(i=0; inullvalue; + if( z==0 ) z = p->nullValue; fprintf(p->out, "%s", z); if( iout, "%s", p->separator); + fprintf(p->out, "%s", p->colSeparator); }else if( p->mode==MODE_Semi ){ - fprintf(p->out, ";\n"); + fprintf(p->out, ";%s", p->rowSeparator); }else{ - fprintf(p->out, "\n"); + fprintf(p->out, "%s", p->rowSeparator); } } break; @@ -849,7 +947,7 @@ static int shell_callback(void *pArg, in fprintf(p->out,""); for(i=0; iout,""); - output_html_string(p->out, azArg[i] ? azArg[i] : p->nullvalue); + output_html_string(p->out, azArg[i] ? azArg[i] : p->nullValue); fprintf(p->out,"\n"); } fprintf(p->out,"\n"); @@ -859,39 +957,33 @@ static int shell_callback(void *pArg, in if( p->cnt++==0 && p->showHeader ){ for(i=0; iout,azCol[i] ? azCol[i] : ""); - if(iout, "%s", p->separator); + if(iout, "%s", p->colSeparator); } - fprintf(p->out,"\n"); + fprintf(p->out, "%s", p->rowSeparator); } if( azArg==0 ) break; for(i=0; iout, azArg[i] ? azArg[i] : p->nullvalue); - if(iout, "%s", p->separator); + output_c_string(p->out, azArg[i] ? azArg[i] : p->nullValue); + if(iout, "%s", p->colSeparator); } - fprintf(p->out,"\n"); + fprintf(p->out, "%s", p->rowSeparator); break; } case MODE_Csv: { -#if defined(WIN32) || defined(_WIN32) - fflush(p->out); - _setmode(_fileno(p->out), _O_BINARY); -#endif + setBinaryMode(p->out); if( p->cnt++==0 && p->showHeader ){ for(i=0; iout,"%s",p->newline); + fprintf(p->out, "%s", p->rowSeparator); } - if( azArg>0 ){ + if( nArg>0 ){ for(i=0; iout,"%s",p->newline); + fprintf(p->out, "%s", p->rowSeparator); } -#if defined(WIN32) || defined(_WIN32) - fflush(p->out); - _setmode(_fileno(p->out), _O_TEXT); -#endif + setTextMode(p->out); break; } case MODE_Insert: { @@ -923,6 +1015,22 @@ static int shell_callback(void *pArg, in fprintf(p->out,");\n"); break; } + case MODE_Ascii: { + if( p->cnt++==0 && p->showHeader ){ + for(i=0; i0 ) fprintf(p->out, "%s", p->colSeparator); + fprintf(p->out,"%s",azCol[i] ? azCol[i] : ""); + } + fprintf(p->out, "%s", p->rowSeparator); + } + if( azArg==0 ) break; + for(i=0; i0 ) fprintf(p->out, "%s", p->colSeparator); + fprintf(p->out,"%s",azArg[i] ? azArg[i] : p->nullValue); + } + fprintf(p->out, "%s", p->rowSeparator); + break; + } } return 0; } @@ -1104,57 +1212,77 @@ static int display_stats( iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_MEMORY_USED, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Memory Used: %d (max %d) bytes\n", iCur, iHiwtr); + fprintf(pArg->out, + "Memory Used: %d (max %d) bytes\n", + iCur, iHiwtr); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_MALLOC_COUNT, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Number of Outstanding Allocations: %d (max %d)\n", iCur, iHiwtr); + fprintf(pArg->out, "Number of Outstanding Allocations: %d (max %d)\n", + iCur, iHiwtr); if( pArg->shellFlgs & SHFLG_Pagecache ){ iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_PAGECACHE_USED, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Number of Pcache Pages Used: %d (max %d) pages\n", iCur, iHiwtr); + fprintf(pArg->out, + "Number of Pcache Pages Used: %d (max %d) pages\n", + iCur, iHiwtr); } iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_PAGECACHE_OVERFLOW, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Number of Pcache Overflow Bytes: %d (max %d) bytes\n", iCur, iHiwtr); + fprintf(pArg->out, + "Number of Pcache Overflow Bytes: %d (max %d) bytes\n", + iCur, iHiwtr); if( pArg->shellFlgs & SHFLG_Scratch ){ iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_SCRATCH_USED, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Number of Scratch Allocations Used: %d (max %d)\n", iCur, iHiwtr); + fprintf(pArg->out, "Number of Scratch Allocations Used: %d (max %d)\n", + iCur, iHiwtr); } iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_SCRATCH_OVERFLOW, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Number of Scratch Overflow Bytes: %d (max %d) bytes\n", iCur, iHiwtr); + fprintf(pArg->out, + "Number of Scratch Overflow Bytes: %d (max %d) bytes\n", + iCur, iHiwtr); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_MALLOC_SIZE, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Largest Allocation: %d bytes\n", iHiwtr); + fprintf(pArg->out, "Largest Allocation: %d bytes\n", + iHiwtr); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_PAGECACHE_SIZE, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Largest Pcache Allocation: %d bytes\n", iHiwtr); + fprintf(pArg->out, "Largest Pcache Allocation: %d bytes\n", + iHiwtr); iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_SCRATCH_SIZE, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Largest Scratch Allocation: %d bytes\n", iHiwtr); + fprintf(pArg->out, "Largest Scratch Allocation: %d bytes\n", + iHiwtr); #ifdef YYTRACKMAXSTACKDEPTH iHiwtr = iCur = -1; sqlite3_status(SQLITE_STATUS_PARSER_STACK, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Deepest Parser Stack: %d (max %d)\n", iCur, iHiwtr); + fprintf(pArg->out, "Deepest Parser Stack: %d (max %d)\n", + iCur, iHiwtr); #endif } if( pArg && pArg->out && db ){ if( pArg->shellFlgs & SHFLG_Lookaside ){ iHiwtr = iCur = -1; - sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_USED, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Lookaside Slots Used: %d (max %d)\n", iCur, iHiwtr); - sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_HIT, &iCur, &iHiwtr, bReset); + sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_USED, + &iCur, &iHiwtr, bReset); + fprintf(pArg->out, "Lookaside Slots Used: %d (max %d)\n", + iCur, iHiwtr); + sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_HIT, + &iCur, &iHiwtr, bReset); fprintf(pArg->out, "Successful lookaside attempts: %d\n", iHiwtr); - sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE, &iCur, &iHiwtr, bReset); + sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE, + &iCur, &iHiwtr, bReset); fprintf(pArg->out, "Lookaside failures due to size: %d\n", iHiwtr); - sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL, &iCur, &iHiwtr, bReset); + sqlite3_db_status(db, SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL, + &iCur, &iHiwtr, bReset); fprintf(pArg->out, "Lookaside failures due to OOM: %d\n", iHiwtr); } iHiwtr = iCur = -1; sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_USED, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Pager Heap Usage: %d bytes\n", iCur); iHiwtr = iCur = -1; + fprintf(pArg->out, "Pager Heap Usage: %d bytes\n",iCur); + iHiwtr = iCur = -1; sqlite3_db_status(db, SQLITE_DBSTATUS_CACHE_HIT, &iCur, &iHiwtr, 1); fprintf(pArg->out, "Page cache hits: %d\n", iCur); iHiwtr = iCur = -1; @@ -1165,18 +1293,19 @@ static int display_stats( fprintf(pArg->out, "Page cache writes: %d\n", iCur); iHiwtr = iCur = -1; sqlite3_db_status(db, SQLITE_DBSTATUS_SCHEMA_USED, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Schema Heap Usage: %d bytes\n", iCur); + fprintf(pArg->out, "Schema Heap Usage: %d bytes\n",iCur); iHiwtr = iCur = -1; sqlite3_db_status(db, SQLITE_DBSTATUS_STMT_USED, &iCur, &iHiwtr, bReset); - fprintf(pArg->out, "Statement Heap/Lookaside Usage: %d bytes\n", iCur); + fprintf(pArg->out, "Statement Heap/Lookaside Usage: %d bytes\n",iCur); } if( pArg && pArg->out && db && pArg->pStmt ){ - iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_FULLSCAN_STEP, bReset); + iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_FULLSCAN_STEP, + bReset); fprintf(pArg->out, "Fullscan Steps: %d\n", iCur); iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_SORT, bReset); fprintf(pArg->out, "Sort Operations: %d\n", iCur); - iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_AUTOINDEX, bReset); + iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_AUTOINDEX,bReset); fprintf(pArg->out, "Autoindex Inserts: %d\n", iCur); iCur = sqlite3_stmt_status(pArg->pStmt, SQLITE_STMTSTATUS_VM_STEP, bReset); fprintf(pArg->out, "Virtual Machine Steps: %d\n", iCur); @@ -1186,6 +1315,51 @@ static int display_stats( } /* +** Display scan stats. +*/ +static void display_scanstats( + sqlite3 *db, /* Database to query */ + ShellState *pArg /* Pointer to ShellState */ +){ +#ifdef SQLITE_ENABLE_STMT_SCANSTATUS + int i, k, n, mx; + fprintf(pArg->out, "-------- scanstats --------\n"); + mx = 0; + for(k=0; k<=mx; k++){ + double rEstLoop = 1.0; + for(i=n=0; 1; i++){ + sqlite3_stmt *p = pArg->pStmt; + sqlite3_int64 nLoop, nVisit; + double rEst; + int iSid; + const char *zExplain; + if( sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_NLOOP, (void*)&nLoop) ){ + break; + } + sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_SELECTID, (void*)&iSid); + if( iSid>mx ) mx = iSid; + if( iSid!=k ) continue; + if( n==0 ){ + rEstLoop = (double)nLoop; + if( k>0 ) fprintf(pArg->out, "-------- subquery %d -------\n", k); + } + n++; + sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_NVISIT, (void*)&nVisit); + sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_EST, (void*)&rEst); + sqlite3_stmt_scanstatus(p, i, SQLITE_SCANSTAT_EXPLAIN, (void*)&zExplain); + fprintf(pArg->out, "Loop %2d: %s\n", n, zExplain); + rEstLoop *= rEst; + fprintf(pArg->out, + " nLoop=%-8lld nRow=%-8lld estRow=%-8lld estRow/Loop=%-8g\n", + nLoop, nVisit, (sqlite3_int64)(rEstLoop+0.5), rEst + ); + } + } + fprintf(pArg->out, "---------------------------\n"); +#endif +} + +/* ** Parameter azArray points to a zero-terminated array of strings. zStr ** points to a single nul-terminated string. Return non-zero if zStr ** is equal, according to strcmp(), to any of the strings in the array. @@ -1226,7 +1400,8 @@ static void explain_data_prepare(ShellSt const char *azNext[] = { "Next", "Prev", "VPrev", "VNext", "SorterNext", "NextIfOpen", "PrevIfOpen", 0 }; - const char *azYield[] = { "Yield", "SeekLT", "SeekGT", "RowSetRead", "Rewind", 0 }; + const char *azYield[] = { "Yield", "SeekLT", "SeekGT", "RowSetRead", + "Rewind", 0 }; const char *azGoto[] = { "Goto", 0 }; /* Try to figure out if this is really an EXPLAIN statement. If this @@ -1339,7 +1514,8 @@ static int shell_exec( /* Show the EXPLAIN QUERY PLAN if .eqp is on */ if( pArg && pArg->autoEQP ){ sqlite3_stmt *pExplain; - char *zEQP = sqlite3_mprintf("EXPLAIN QUERY PLAN %s", sqlite3_sql(pStmt)); + char *zEQP = sqlite3_mprintf("EXPLAIN QUERY PLAN %s", + sqlite3_sql(pStmt)); rc = sqlite3_prepare_v2(db, zEQP, -1, &pExplain, 0); if( rc==SQLITE_OK ){ while( sqlite3_step(pExplain)==SQLITE_ROW ){ @@ -1423,6 +1599,11 @@ static int shell_exec( display_stats(db, pArg, 0); } + /* print loop-counters if required */ + if( pArg && pArg->scanstatsOn ){ + display_scanstats(db, pArg); + } + /* Finalize the statement just executed. If this fails, save a ** copy of the error message. Otherwise, set zSql to point to the ** next statement to execute. */ @@ -1592,6 +1773,7 @@ static char zHelp[] = ".bail on|off Stop after hitting an error. Default OFF\n" ".clone NEWDB Clone data into NEWDB from the existing database\n" ".databases List names and files of attached databases\n" + ".dbinfo ?DB? Show status information about the database\n" ".dump ?TABLE? ... Dump the database in an SQL text format\n" " If TABLE specified, only dump tables matching\n" " LIKE pattern TABLE.\n" @@ -1604,8 +1786,8 @@ static char zHelp[] = ".headers on|off Turn display of headers on or off\n" ".help Show this message\n" ".import FILE TABLE Import data from FILE into TABLE\n" - ".indices ?TABLE? Show names of all indices\n" - " If TABLE specified, only show indices for tables\n" + ".indexes ?TABLE? Show names of all indexes\n" + " If TABLE specified, only show indexes for tables\n" " matching LIKE pattern TABLE.\n" #ifdef SQLITE_ENABLE_IOTRACE ".iotrace FILE Enable I/O diagnostic logging to FILE\n" @@ -1615,12 +1797,13 @@ static char zHelp[] = #endif ".log FILE|off Turn logging on or off. FILE can be stderr/stdout\n" ".mode MODE ?TABLE? Set output mode where MODE is one of:\n" + " ascii Columns/rows delimited by 0x1F and 0x1E\n" " csv Comma-separated values\n" " column Left-aligned columns. (See .width)\n" " html HTML code\n" " insert SQL insert statements for TABLE\n" " line One value per line\n" - " list Values delimited by .separator string\n" + " list Values delimited by .separator strings\n" " tabs Tab-separated values\n" " tcl TCL list elements\n" ".nullvalue STRING Use STRING in place of NULL values\n" @@ -1633,11 +1816,12 @@ static char zHelp[] = ".read FILENAME Execute SQL in FILENAME\n" ".restore ?DB? FILE Restore content of DB (default \"main\") from FILE\n" ".save FILE Write in-memory database into FILE\n" + ".scanstats on|off Turn sqlite3_stmt_scanstatus() metrics on or off\n" ".schema ?TABLE? Show the CREATE statements\n" " If TABLE specified, only show tables matching\n" " LIKE pattern TABLE.\n" - ".separator STRING ?NL? Change separator used by output mode and .import\n" - " NL is the end-of-line mark for CSV\n" + ".separator COL ?ROW? Change the column separator and optionally the row\n" + " separator for both the output mode and .import\n" ".shell CMD ARGS... Run CMD ARGS... in a system shell\n" ".show Show the current values for various settings\n" ".stats on|off Turn stats on or off\n" @@ -1918,10 +2102,10 @@ static void test_breakpoint(void){ } /* -** An object used to read a CSV file +** An object used to read a CSV and other files for import. */ -typedef struct CSVReader CSVReader; -struct CSVReader { +typedef struct ImportCtx ImportCtx; +struct ImportCtx { const char *zFile; /* Name of the input file */ FILE *in; /* Read the CSV text from this input stream */ char *z; /* Accumulated text for a field */ @@ -1929,11 +2113,12 @@ struct CSVReader { int nAlloc; /* Space allocated for z[] */ int nLine; /* Current line number */ int cTerm; /* Character that terminated the most recent field */ - int cSeparator; /* The separator character. (Usually ",") */ + int cColSep; /* The column separator character. (Usually ",") */ + int cRowSep; /* The row separator character. (Usually "\n") */ }; /* Append a single byte to z[] */ -static void csv_append_char(CSVReader *p, int c){ +static void import_append_char(ImportCtx *p, int c){ if( p->n+1>=p->nAlloc ){ p->nAlloc += p->nAlloc + 100; p->z = sqlite3_realloc(p->z, p->nAlloc); @@ -1951,15 +2136,17 @@ static void csv_append_char(CSVReader *p ** + Input comes from p->in. ** + Store results in p->z of length p->n. Space to hold p->z comes ** from sqlite3_malloc(). -** + Use p->cSep as the separator. The default is ",". +** + Use p->cSep as the column separator. The default is ",". +** + Use p->rSep as the row separator. The default is "\n". ** + Keep track of the line number in p->nLine. ** + Store the character that terminates the field in p->cTerm. Store ** EOF on end-of-file. ** + Report syntax errors on stderr */ -static char *csv_read_one_field(CSVReader *p){ - int c, pc, ppc; - int cSep = p->cSeparator; +static char *SQLITE_CDECL csv_read_one_field(ImportCtx *p){ + int c; + int cSep = p->cColSep; + int rSep = p->cRowSep; p->n = 0; c = fgetc(p->in); if( c==EOF || seenInterrupt ){ @@ -1967,12 +2154,13 @@ static char *csv_read_one_field(CSVReade return 0; } if( c=='"' ){ + int pc, ppc; int startLine = p->nLine; int cQuote = c; pc = ppc = 0; while( 1 ){ c = fgetc(p->in); - if( c=='\n' ) p->nLine++; + if( c==rSep ) p->nLine++; if( c==cQuote ){ if( pc==cQuote ){ pc = 0; @@ -1980,8 +2168,8 @@ static char *csv_read_one_field(CSVReade } } if( (c==cSep && pc==cQuote) - || (c=='\n' && pc==cQuote) - || (c=='\n' && pc=='\r' && ppc==cQuote) + || (c==rSep && pc==cQuote) + || (c==rSep && pc=='\r' && ppc==cQuote) || (c==EOF && pc==cQuote) ){ do{ p->n--; }while( p->z[p->n]!=cQuote ); @@ -1995,19 +2183,19 @@ static char *csv_read_one_field(CSVReade if( c==EOF ){ fprintf(stderr, "%s:%d: unterminated %c-quoted field\n", p->zFile, startLine, cQuote); - p->cTerm = EOF; + p->cTerm = c; break; } - csv_append_char(p, c); + import_append_char(p, c); ppc = pc; pc = c; } }else{ - while( c!=EOF && c!=cSep && c!='\n' ){ - csv_append_char(p, c); + while( c!=EOF && c!=cSep && c!=rSep ){ + import_append_char(p, c); c = fgetc(p->in); } - if( c=='\n' ){ + if( c==rSep ){ p->nLine++; if( p->n>0 && p->z[p->n-1]=='\r' ) p->n--; } @@ -2017,6 +2205,40 @@ static char *csv_read_one_field(CSVReade return p->z; } +/* Read a single field of ASCII delimited text. +** +** + Input comes from p->in. +** + Store results in p->z of length p->n. Space to hold p->z comes +** from sqlite3_malloc(). +** + Use p->cSep as the column separator. The default is "\x1F". +** + Use p->rSep as the row separator. The default is "\x1E". +** + Keep track of the row number in p->nLine. +** + Store the character that terminates the field in p->cTerm. Store +** EOF on end-of-file. +** + Report syntax errors on stderr +*/ +static char *SQLITE_CDECL ascii_read_one_field(ImportCtx *p){ + int c; + int cSep = p->cColSep; + int rSep = p->cRowSep; + p->n = 0; + c = fgetc(p->in); + if( c==EOF || seenInterrupt ){ + p->cTerm = EOF; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri May 1 22:43:26 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EBBCCB81; Fri, 1 May 2015 22:43:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA72B1718; Fri, 1 May 2015 22:43:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41MhQFn029591; Fri, 1 May 2015 22:43:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41MhQTJ029590; Fri, 1 May 2015 22:43:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201505012243.t41MhQTJ029590@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 1 May 2015 22:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282329 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 22:43:27 -0000 Author: delphij Date: Fri May 1 22:43:26 2015 New Revision: 282329 URL: https://svnweb.freebsd.org/changeset/base/282329 Log: Correct - handling. Reported by: pkg-fallout X-MFC-with: r282318 Modified: head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Fri May 1 21:59:32 2015 (r282328) +++ head/usr.bin/soelim/soelim.c Fri May 1 22:43:26 2015 (r282329) @@ -57,6 +57,9 @@ soelim_fopen(const char *name) char path[MAXPATHLEN]; size_t i; + if (strcmp(name, "-") == 0) + return (stdin); + if ((f = fopen(name, "r")) != NULL) return (f); From owner-svn-src-head@FreeBSD.ORG Fri May 1 22:48:52 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA990D9F; Fri, 1 May 2015 22:48:52 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7FAA31750; Fri, 1 May 2015 22:48:52 +0000 (UTC) Received: by wgyo15 with SMTP id o15so102040968wgy.2; Fri, 01 May 2015 15:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=i7S+6GJ8FUtyai+AlrpctU3yhHwJ2Tpdr9lh6nfuTPE=; b=UiC+fQEUonbfpTkQwIWljfW+zS2n595Sz2YcXamo3+LguA69D1EftLsH18B6R1ghyc hpHUqGhDftWo1IHKz3w/dlfVoq7VSn8hwh5HE1njT1VSbhHd2qirb7AaYWLSpxZpRtFi AA3iLzbAdJ99Un9xkFUSmYnDn0iHc9mv+PXwo860lipGOWXrQSXiQ2tN/FeNw/izlO9q aePTDl+zy+Wm0YQSTeyujBr60gSZvcT//oNfN5WHWfW9tyvAV9RtEHPUvxW86fJcw/kt EB5nH82n0+z/UT6fOtUYr0wTaL+UAxjDc8CQ+hjrmwi/BE+L2hHE5gnPUrnzomlS4PH0 gvOg== X-Received: by 10.180.98.230 with SMTP id el6mr555164wib.16.1430520531094; Fri, 01 May 2015 15:48:51 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id e2sm8471449wix.15.2015.05.01.15.48.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 15:48:50 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 2 May 2015 00:48:48 +0200 From: Baptiste Daroussin To: Xin LI Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282329 - head/usr.bin/soelim Message-ID: <20150501224847.GZ13141@ivaldir.etoilebsd.net> References: <201505012243.t41MhQTJ029590@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dZHW955j1vPFHE0Q" Content-Disposition: inline In-Reply-To: <201505012243.t41MhQTJ029590@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 22:48:53 -0000 --dZHW955j1vPFHE0Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 01, 2015 at 10:43:26PM +0000, Xin LI wrote: > Author: delphij > Date: Fri May 1 22:43:26 2015 > New Revision: 282329 > URL: https://svnweb.freebsd.org/changeset/base/282329 >=20 > Log: > Correct - handling. > =20 > Reported by: pkg-fallout > X-MFC-with: r282318 >=20 > Modified: > head/usr.bin/soelim/soelim.c >=20 > Modified: head/usr.bin/soelim/soelim.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.bin/soelim/soelim.c Fri May 1 21:59:32 2015 (r282328) > +++ head/usr.bin/soelim/soelim.c Fri May 1 22:43:26 2015 (r282329) > @@ -57,6 +57,9 @@ soelim_fopen(const char *name) > char path[MAXPATHLEN]; > size_t i; > =20 > + if (strcmp(name, "-") =3D=3D 0) > + return (stdin); > + Thank you I thought I had committed that already but obviously I did not... Best regards, Bapt --dZHW955j1vPFHE0Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVEAs8ACgkQ8kTtMUmk6Ew2ogCglxklZxDLCkS4rB7dP3MKQBHf sYEAnjnAKr5AeoIYwmG2vSSQi79gFLmq =SqvQ -----END PGP SIGNATURE----- --dZHW955j1vPFHE0Q-- From owner-svn-src-head@FreeBSD.ORG Fri May 1 23:40:31 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7C3270E for ; Fri, 1 May 2015 23:40:31 +0000 (UTC) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 15FDB1C45 for ; Fri, 1 May 2015 23:40:30 +0000 (UTC) Received: (qmail 66333 invoked by uid 89); 1 May 2015 23:40:29 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@185.17.207.96) by mail.grem.de with ESMTPA; 1 May 2015 23:40:29 -0000 Date: Sat, 2 May 2015 01:40:27 +0200 From: Michael Gmelin To: Antoine Brodin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r281985 - in head: share/man/man4 sys/dev/smbus usr.sbin/smbmsg Message-ID: <20150502014027.32c0b21d@bsd64.grem.de> In-Reply-To: References: <201504251615.t3PGF2Z1096937@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd10.0) X-Face: $wrgCtfdVw_H9WAY?S&9+/F"!41z'L$uo*WzT8miX?kZ~W~Lr5W7v?j0Sde\mwB&/ypo^}> +a'4xMc^^KroE~+v^&^#[B">soBo1y6(TW6#UZiC]o>C6`ej+i Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWJBwe5BQDl LASZU0/LTEWEfHbyj0Txi32+sKrp1Mv944X8/fm1rS+cAAAACXBIWXMAAAsTAAAL EwEAmpwYAAAAB3RJTUUH3wESCxwC7OBhbgAAACFpVFh0Q29tbWVudAAAAAAAQ3Jl YXRlZCB3aXRoIFRoZSBHSU1QbbCXAAAAAghJREFUOMu11DFvEzEUAGCfEhBVFzuq AKkLd0O6VrIQsLXVSZXoWE5N1K3DobBBA9fQpRWc8OkWouaIjedWKiyREOKs+3PY fvalCNjgLVHeF7/3bMtBzV8C/VsQ8tecEgCcDgrzjekwKZ7TwsJZd/ywEKwwP+ZM 8P3drTsAwWn2mpWuDDuYiK1bFs6De0KUUFw0tWxm+D4AIhuuvZqtyWYeO7jQ4Aea 7jUqI+ixhQoHex4WshEvSXdood7stlv4oSuFOC4tqGcr0NjEqXgV4mMJO38nld4+ xKNxRDon7khyKVqY7YR4d+Cg0OMrkWXZOM7YDkEfKiilCn1qYv4mighZiynuHHOA Wq9QJq+BIES7lMFUtcikMnkDGHUoncA+uHgrP0ctIEqfwLHzeSo+eUA66AqzwN6n 2ZHJhw6Qh/PoyC/QENyEyC/AyNjq74Bs+3UH0xYwzDUC4B97HgLocg1QLYgDDO1v f3UX9Y307Ew4AHh67YAFFsxEpkXwpXY3eIgMhAAE3R19L919nNnuD2wlPcDE3UeT L2ytEICQib9BXgS2fU8PrD82ToYO1OEmMSnYTjSqSv9wdC0tPYC+rQRQD9ESnldF CyqfmiYW+tlALt8gH2xrMdC/youbjzPXEun+/ReXsMCDyve3dZc09fn2Oas8oXGc Jj6/fOeK5UmSMPmf/jL+GD8BEj0k/Fn6IO4AAAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 23:40:31 -0000 On Tue, 28 Apr 2015 13:28:49 +0000 Antoine Brodin wrote: > On Sat, Apr 25, 2015 at 4:15 PM, Michael Gmelin > wrote: > > Author: grembo (ports committer) > > Date: Sat Apr 25 16:15:01 2015 > > New Revision: 281985 > > URL: https://svnweb.freebsd.org/changeset/base/281985 > > > > Log: > > Expand SMBUS API to add smbus_trans() function. > > > > Differential Revision: https://reviews.freebsd.org/D1955 > > Reviewed by: adrian, jhb, wblock > > Approved by: adrian, jhb > > Hi, > > Some ports used the previous API, see error logs at: > http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/bsdhwmon-20120702.log > http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/consolehm-1.31_1.log > http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/gkrellm2-2.3.5_6.log > http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/healthd-0.7.9_2.log > http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/lmmon-0.65_1.log > http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p384806_s282042/logs/errors/xmbmon-205_14.log > > Normally you should request an exp-run before doing a change like > this. > > Cheers, > > Antoine (with hat: portmgr) Bumped __FreeBSD_version and fixed all affected ports I'm aware of (bsdhwmon and gkrellm2 were already done by others). Cheers, Michael -- Michael Gmelin From owner-svn-src-head@FreeBSD.ORG Fri May 1 23:54:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08CCBB3C; Fri, 1 May 2015 23:54:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D24301E17; Fri, 1 May 2015 23:54:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t41NsAKS064176; Fri, 1 May 2015 23:54:10 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t41NsA86064172; Fri, 1 May 2015 23:54:10 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505012354.t41NsA86064172@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 1 May 2015 23:54:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282330 - head/usr.bin/soelim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2015 23:54:11 -0000 Author: bapt Date: Fri May 1 23:54:09 2015 New Revision: 282330 URL: https://svnweb.freebsd.org/changeset/base/282330 Log: Improve compatibility groff's soelim While here implement -C from GNU groff Reported by: delphij Modified: head/usr.bin/soelim/soelim.1 head/usr.bin/soelim/soelim.c Modified: head/usr.bin/soelim/soelim.1 ============================================================================== --- head/usr.bin/soelim/soelim.1 Fri May 1 22:43:26 2015 (r282329) +++ head/usr.bin/soelim/soelim.1 Fri May 1 23:54:09 2015 (r282330) @@ -48,9 +48,9 @@ it replace the line by processing Otherwise the line is printed to stdout. .Bl -tag -width "-I dir" .It Fl C -Compatibility with GNU groff's -.Xr soelim 1 -(does nothing). +Recognise +.Em .so +when not followed by a space character. .It Fl r Compatibility with GNU groff's .Xr soelim 1 Modified: head/usr.bin/soelim/soelim.c ============================================================================== --- head/usr.bin/soelim/soelim.c Fri May 1 22:43:26 2015 (r282329) +++ head/usr.bin/soelim/soelim.c Fri May 1 23:54:09 2015 (r282330) @@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include +#define C_OPTION 0x1 + static StringList *includes; static void @@ -81,10 +83,10 @@ soelim_fopen(const char *name) } static int -soelim_file(FILE *f) +soelim_file(FILE *f, int flag) { char *line = NULL; - char *walk; + char *walk, *cp; size_t linecap = 0; ssize_t linelen; @@ -96,13 +98,27 @@ soelim_file(FILE *f) printf("%s", line); continue; } + walk = line + 3; + if (!isspace(*walk) && ((flag & C_OPTION) == 0)) { + printf("%s", line); + continue; + } + while (isspace(*walk)) walk++; - while (isspace(walk[strlen(walk) - 1])) - walk[strlen(walk) - 1] = '\0'; - if (soelim_file(soelim_fopen(walk)) == 1) { + cp = walk + strlen(walk) - 1; + while (cp > walk && isspace(*cp)) { + *cp = 0; + cp--; + } + + if (*walk == '\0') { + printf("%s", line); + continue; + } + if (soelim_file(soelim_fopen(walk), flag) == 1) { free(line); return (1); } @@ -119,6 +135,7 @@ main(int argc, char **argv) { int ch, i; int ret = 0; + int flags = 0; includes = sl_init(); if (includes == NULL) @@ -127,6 +144,8 @@ main(int argc, char **argv) while ((ch = getopt(argc, argv, "CrtvI:")) != -1) { switch (ch) { case 'C': + flags |= C_OPTION; + break; case 'r': case 'v': case 't': @@ -145,10 +164,10 @@ main(int argc, char **argv) argv += optind; if (argc == 0) - ret = soelim_file(stdin); + ret = soelim_file(stdin, flags); for (i = 0; i < argc; i++) - ret = soelim_file(soelim_fopen(argv[i])); + ret = soelim_file(soelim_fopen(argv[i]), flags); sl_free(includes, 0); From owner-svn-src-head@FreeBSD.ORG Sat May 2 00:26:39 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 996EE202; Sat, 2 May 2015 00:26:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E00C1194; Sat, 2 May 2015 00:26:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t420Qddt080617; Sat, 2 May 2015 00:26:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t420QdH1080616; Sat, 2 May 2015 00:26:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505020026.t420QdH1080616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 2 May 2015 00:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282331 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 00:26:39 -0000 Author: markj Date: Sat May 2 00:26:38 2015 New Revision: 282331 URL: https://svnweb.freebsd.org/changeset/base/282331 Log: Don't drop the idr lock before verifying that the newly-inserted element is present in the tree. Otherwise there exists a window during which the element could be removed by another thread, triggering an incorrect assertion failure. Reviewed by: jeff MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/include/linux/linux_idr.c Modified: head/sys/ofed/include/linux/linux_idr.c ============================================================================== --- head/sys/ofed/include/linux/linux_idr.c Fri May 1 23:54:09 2015 (r282330) +++ head/sys/ofed/include/linux/linux_idr.c Sat May 2 00:26:38 2015 (r282331) @@ -185,27 +185,37 @@ out: return (res); } -void * -idr_find(struct idr *idr, int id) +static inline void * +idr_find_locked(struct idr *idr, int id) { struct idr_layer *il; void *res; int layer; - res = NULL; + mtx_assert(&idr->lock, MA_OWNED); + id &= MAX_ID_MASK; - mtx_lock(&idr->lock); + res = NULL; il = idr->top; layer = idr->layers - 1; if (il == NULL || id > idr_max(idr)) - goto out; + return (NULL); while (layer && il) { il = il->ary[idr_pos(id, layer)]; layer--; } if (il != NULL) res = il->ary[id & IDR_MASK]; -out: + return (res); +} + +void * +idr_find(struct idr *idr, int id) +{ + void *res; + + mtx_lock(&idr->lock); + res = idr_find_locked(idr, id); mtx_unlock(&idr->lock); return (res); } @@ -331,13 +341,13 @@ idr_get_new(struct idr *idr, void *ptr, } error = 0; out: - mtx_unlock(&idr->lock); #ifdef INVARIANTS - if (error == 0 && idr_find(idr, id) != ptr) { + if (error == 0 && idr_find_locked(idr, id) != ptr) { panic("idr_get_new: Failed for idr %p, id %d, ptr %p\n", idr, id, ptr); } #endif + mtx_unlock(&idr->lock); return (error); } @@ -438,12 +448,12 @@ restart: } error = 0; out: - mtx_unlock(&idr->lock); #ifdef INVARIANTS - if (error == 0 && idr_find(idr, id) != ptr) { + if (error == 0 && idr_find_locked(idr, id) != ptr) { panic("idr_get_new_above: Failed for idr %p, id %d, ptr %p\n", idr, id, ptr); } #endif + mtx_unlock(&idr->lock); return (error); } From owner-svn-src-head@FreeBSD.ORG Sat May 2 00:27:59 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C5A9356; Sat, 2 May 2015 00:27:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B21D11A4; Sat, 2 May 2015 00:27:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t420RxcO080834; Sat, 2 May 2015 00:27:59 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t420RxkG080833; Sat, 2 May 2015 00:27:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505020027.t420RxkG080833@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 2 May 2015 00:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282332 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 00:27:59 -0000 Author: markj Date: Sat May 2 00:27:58 2015 New Revision: 282332 URL: https://svnweb.freebsd.org/changeset/base/282332 Log: Remove a stale reference to the stop_scheduler_on_panic tunable, which itself was removed in r243515. MFC after: 1 week Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Sat May 2 00:26:38 2015 (r282331) +++ head/sys/kern/kern_shutdown.c Sat May 2 00:27:58 2015 (r282332) @@ -700,10 +700,8 @@ vpanic(const char *fmt, va_list ap) } /* - * We set stop_scheduler here and not in the block above, - * because we want to ensure that if panic has been called and - * stop_scheduler_on_panic is true, then stop_scheduler will - * always be set. Even if panic has been entered from kdb. + * Ensure that the scheduler is stopped while panicking, even if panic + * has been entered from kdb. */ td->td_stopsched = 1; #endif From owner-svn-src-head@FreeBSD.ORG Sat May 2 00:29:28 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E0D14B8; Sat, 2 May 2015 00:29:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C20A11B9; Sat, 2 May 2015 00:29:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t420TS3r081094; Sat, 2 May 2015 00:29:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t420TSaH081093; Sat, 2 May 2015 00:29:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201505020029.t420TSaH081093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 2 May 2015 00:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282333 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 00:29:28 -0000 Author: markj Date: Sat May 2 00:29:27 2015 New Revision: 282333 URL: https://svnweb.freebsd.org/changeset/base/282333 Log: fork(2): Add a note to the effect that kqueue descriptors, unlike other descriptor types, are not inherited from the parent process. Reported by: kmacy MFC after: 1 week Modified: head/lib/libc/sys/fork.2 Modified: head/lib/libc/sys/fork.2 ============================================================================== --- head/lib/libc/sys/fork.2 Sat May 2 00:27:58 2015 (r282332) +++ head/lib/libc/sys/fork.2 Sat May 2 00:29:27 2015 (r282333) @@ -28,7 +28,7 @@ .\" @(#)fork.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 31, 2013 +.Dd May 1, 2015 .Dt FORK 2 .Os .Sh NAME @@ -53,7 +53,10 @@ The child process has a unique process I The child process has a different parent process ID (i.e., the process ID of the parent process). .It -The child process has its own copy of the parent's descriptors. +The child process has its own copy of the parent's descriptors, +except for descriptors returned by +.Xr kqueue 2 , +which are not inherited from the parent process. These descriptors reference the same underlying objects, so that, for instance, file pointers in file objects are shared between the child and the parent, so that an From owner-svn-src-head@FreeBSD.ORG Sat May 2 03:01:04 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65B7C6C7; Sat, 2 May 2015 03:01:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4D71060; Sat, 2 May 2015 03:01:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42314YC059965; Sat, 2 May 2015 03:01:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42314de059964; Sat, 2 May 2015 03:01:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201505020301.t42314de059964@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 2 May 2015 03:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282334 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 03:01:04 -0000 Author: imp Date: Sat May 2 03:01:03 2015 New Revision: 282334 URL: https://svnweb.freebsd.org/changeset/base/282334 Log: Remove support for being compiled under OABI. We don't support that any more, so this is just dead code. Differential Revision: https://reviews.freebsd.org/D2419 Modified: head/sys/arm/arm/elf_machdep.c Modified: head/sys/arm/arm/elf_machdep.c ============================================================================== --- head/sys/arm/arm/elf_machdep.c Sat May 2 00:29:27 2015 (r282333) +++ head/sys/arm/arm/elf_machdep.c Sat May 2 03:01:03 2015 (r282334) @@ -105,7 +105,6 @@ elf32_arm_abi_supported(struct image_par { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; -#ifdef __ARM_EABI__ /* * When configured for EABI, FreeBSD supports EABI vesions 4 and 5. */ @@ -115,17 +114,6 @@ elf32_arm_abi_supported(struct image_par EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); return (FALSE); } -#else - /* - * When configured for OABI, that's all we do, so reject EABI binaries. - */ - if (EF_ARM_EABI_VERSION(hdr->e_flags) != EF_ARM_EABI_VERSION_UNKNOWN) { - if (bootverbose) - uprintf("Attempting to execute EABI binary (rev %d) image %s", - EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); - return (FALSE); - } -#endif return (TRUE); } From owner-svn-src-head@FreeBSD.ORG Sat May 2 03:25:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72AEEA7B; Sat, 2 May 2015 03:25:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60CDD12D2; Sat, 2 May 2015 03:25:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t423PPAQ070276; Sat, 2 May 2015 03:25:25 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t423PPah070275; Sat, 2 May 2015 03:25:25 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505020325.t423PPah070275@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 2 May 2015 03:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282335 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 03:25:25 -0000 Author: neel Date: Sat May 2 03:25:24 2015 New Revision: 282335 URL: https://svnweb.freebsd.org/changeset/base/282335 Log: Advertise an additional memory BAR in the "dummy" device emulation. This is useful for testing the MOVS emulation when both the source and destination addresses are in the MMIO space. MFC after: 1 week Modified: head/usr.sbin/bhyve/pci_emul.c Modified: head/usr.sbin/bhyve/pci_emul.c ============================================================================== --- head/usr.sbin/bhyve/pci_emul.c Sat May 2 03:01:03 2015 (r282334) +++ head/usr.sbin/bhyve/pci_emul.c Sat May 2 03:25:24 2015 (r282335) @@ -1938,7 +1938,7 @@ INOUT_PORT(pci_cfgdata, CONF1_DATA_PORT+ #define DMEMSZ 4096 struct pci_emul_dsoftc { uint8_t ioregs[DIOSZ]; - uint8_t memregs[DMEMSZ]; + uint8_t memregs[2][DMEMSZ]; }; #define PCI_EMUL_MSI_MSGS 4 @@ -1967,6 +1967,9 @@ pci_emul_dinit(struct vmctx *ctx, struct error = pci_emul_alloc_bar(pi, 1, PCIBAR_MEM32, DMEMSZ); assert(error == 0); + error = pci_emul_alloc_bar(pi, 2, PCIBAR_MEM32, DMEMSZ); + assert(error == 0); + return (0); } @@ -2006,21 +2009,23 @@ pci_emul_diow(struct vmctx *ctx, int vcp } } - if (baridx == 1) { + if (baridx == 1 || baridx == 2) { if (offset + size > DMEMSZ) { printf("diow: memw too large, offset %ld size %d\n", offset, size); return; } + i = baridx - 1; /* 'memregs' index */ + if (size == 1) { - sc->memregs[offset] = value; + sc->memregs[i][offset] = value; } else if (size == 2) { - *(uint16_t *)&sc->memregs[offset] = value; + *(uint16_t *)&sc->memregs[i][offset] = value; } else if (size == 4) { - *(uint32_t *)&sc->memregs[offset] = value; + *(uint32_t *)&sc->memregs[i][offset] = value; } else if (size == 8) { - *(uint64_t *)&sc->memregs[offset] = value; + *(uint64_t *)&sc->memregs[i][offset] = value; } else { printf("diow: memw unknown size %d\n", size); } @@ -2030,7 +2035,7 @@ pci_emul_diow(struct vmctx *ctx, int vcp */ } - if (baridx > 1) { + if (baridx > 2) { printf("diow: unknown bar idx %d\n", baridx); } } @@ -2041,6 +2046,7 @@ pci_emul_dior(struct vmctx *ctx, int vcp { struct pci_emul_dsoftc *sc = pi->pi_arg; uint32_t value; + int i; if (baridx == 0) { if (offset + size > DIOSZ) { @@ -2059,29 +2065,31 @@ pci_emul_dior(struct vmctx *ctx, int vcp printf("dior: ior unknown size %d\n", size); } } - - if (baridx == 1) { + + if (baridx == 1 || baridx == 2) { if (offset + size > DMEMSZ) { printf("dior: memr too large, offset %ld size %d\n", offset, size); return (0); } - + + i = baridx - 1; /* 'memregs' index */ + if (size == 1) { - value = sc->memregs[offset]; + value = sc->memregs[i][offset]; } else if (size == 2) { - value = *(uint16_t *) &sc->memregs[offset]; + value = *(uint16_t *) &sc->memregs[i][offset]; } else if (size == 4) { - value = *(uint32_t *) &sc->memregs[offset]; + value = *(uint32_t *) &sc->memregs[i][offset]; } else if (size == 8) { - value = *(uint64_t *) &sc->memregs[offset]; + value = *(uint64_t *) &sc->memregs[i][offset]; } else { printf("dior: ior unknown size %d\n", size); } } - if (baridx > 1) { + if (baridx > 2) { printf("dior: unknown bar idx %d\n", baridx); return (0); } From owner-svn-src-head@FreeBSD.ORG Sat May 2 04:19:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D3CA23D; Sat, 2 May 2015 04:19:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E2161895; Sat, 2 May 2015 04:19:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t424JDUV095806; Sat, 2 May 2015 04:19:13 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t424JCb9095802; Sat, 2 May 2015 04:19:12 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505020419.t424JCb9095802@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 2 May 2015 04:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282336 - in head/sys/amd64/vmm: . amd intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 04:19:13 -0000 Author: neel Date: Sat May 2 04:19:11 2015 New Revision: 282336 URL: https://svnweb.freebsd.org/changeset/base/282336 Log: Emulate machine check related MSRs to allow guest OSes like Windows to boot. Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 2 weeks Modified: head/sys/amd64/vmm/amd/svm_msr.c head/sys/amd64/vmm/intel/vmx_msr.c head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/amd/svm_msr.c ============================================================================== --- head/sys/amd64/vmm/amd/svm_msr.c Sat May 2 03:25:24 2015 (r282335) +++ head/sys/amd64/vmm/amd/svm_msr.c Sat May 2 04:19:11 2015 (r282336) @@ -110,6 +110,10 @@ svm_rdmsr(struct svm_softc *sc, int vcpu int error = 0; switch (num) { + case MSR_MCG_CAP: + case MSR_MCG_STATUS: + *result = 0; + break; case MSR_MTRRcap: case MSR_MTRRdefType: case MSR_MTRR4kBase ... MSR_MTRR4kBase + 8: @@ -135,6 +139,9 @@ svm_wrmsr(struct svm_softc *sc, int vcpu int error = 0; switch (num) { + case MSR_MCG_CAP: + case MSR_MCG_STATUS: + break; /* ignore writes */ case MSR_MTRRcap: vm_inject_gp(sc->vm, vcpu); break; Modified: head/sys/amd64/vmm/intel/vmx_msr.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx_msr.c Sat May 2 03:25:24 2015 (r282335) +++ head/sys/amd64/vmm/intel/vmx_msr.c Sat May 2 04:19:11 2015 (r282336) @@ -395,6 +395,10 @@ vmx_rdmsr(struct vmx *vmx, int vcpuid, u error = 0; switch (num) { + case MSR_MCG_CAP: + case MSR_MCG_STATUS: + *val = 0; + break; case MSR_MTRRcap: case MSR_MTRRdefType: case MSR_MTRR4kBase ... MSR_MTRR4kBase + 8: @@ -433,6 +437,9 @@ vmx_wrmsr(struct vmx *vmx, int vcpuid, u error = 0; switch (num) { + case MSR_MCG_CAP: + case MSR_MCG_STATUS: + break; /* ignore writes */ case MSR_MTRRcap: vm_inject_gp(vmx->vm, vcpuid); break; Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Sat May 2 03:25:24 2015 (r282335) +++ head/sys/amd64/vmm/x86.c Sat May 2 04:19:11 2015 (r282336) @@ -285,17 +285,20 @@ x86_emulate_cpuid(struct vm *vm, int vcp * Hide thermal monitoring */ regs[3] &= ~(CPUID_ACPI | CPUID_TM); - + /* - * Machine check handling is done in the host. + * Hide the debug store capability. */ - regs[3] &= ~(CPUID_MCA | CPUID_MCE); - - /* - * Hide the debug store capability. - */ regs[3] &= ~CPUID_DS; + /* + * Advertise the Machine Check and MTRR capability. + * + * Some guest OSes (e.g. Windows) will not boot if + * these features are absent. + */ + regs[3] |= (CPUID_MCA | CPUID_MCE | CPUID_MTRR); + logical_cpus = threads_per_core * cores_per_package; regs[1] &= ~CPUID_HTT_CORES; regs[1] |= (logical_cpus & 0xff) << 16; From owner-svn-src-head@FreeBSD.ORG Sat May 2 08:31:17 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6049998A; Sat, 2 May 2015 08:31:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4EE971F28; Sat, 2 May 2015 08:31:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t428VHcQ019789; Sat, 2 May 2015 08:31:17 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t428VHGQ019788; Sat, 2 May 2015 08:31:17 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201505020831.t428VHGQ019788@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 2 May 2015 08:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282337 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 08:31:17 -0000 Author: bz Date: Sat May 2 08:31:16 2015 New Revision: 282337 URL: https://svnweb.freebsd.org/changeset/base/282337 Log: Fix an off-by-one bug in string/array handling which lead to memory overwrite and follow-up assertion errors on at least ARM after r282257, with nvp_magic being 0x6e7600: Assertion failed: ((nvp)->nvp_magic == 0x6e7670), function nvpair_name, file .../subr_nvpair.c, line 713. Sponsored by: DARPA/AFRL Modified: head/sys/kern/subr_nvpair.c Modified: head/sys/kern/subr_nvpair.c ============================================================================== --- head/sys/kern/subr_nvpair.c Sat May 2 04:19:11 2015 (r282336) +++ head/sys/kern/subr_nvpair.c Sat May 2 08:31:16 2015 (r282337) @@ -733,7 +733,7 @@ nvpair_allocv(const char *name, int type if (nvp != NULL) { nvp->nvp_name = (char *)(nvp + 1); memcpy(nvp->nvp_name, name, namelen); - nvp->nvp_name[namelen + 1] = '\0'; + nvp->nvp_name[namelen] = '\0'; nvp->nvp_type = type; nvp->nvp_data = data; nvp->nvp_datasize = datasize; From owner-svn-src-head@FreeBSD.ORG Sat May 2 11:10:01 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F1B1298; Sat, 2 May 2015 11:10:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FFF11D8D; Sat, 2 May 2015 11:10:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42BA166096008; Sat, 2 May 2015 11:10:01 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42B9xP3095945; Sat, 2 May 2015 11:09:59 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505021109.t42B9xP3095945@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 2 May 2015 11:09:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282338 - in head: etc/mtree usr.bin/soelim usr.bin/soelim/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 11:10:01 -0000 Author: bapt Date: Sat May 2 11:09:58 2015 New Revision: 282338 URL: https://svnweb.freebsd.org/changeset/base/282338 Log: Add regression tests for soelim(1) Added: head/usr.bin/soelim/tests/ head/usr.bin/soelim/tests/Makefile (contents, props changed) head/usr.bin/soelim/tests/basic (contents, props changed) head/usr.bin/soelim/tests/basic.in (contents, props changed) head/usr.bin/soelim/tests/basic.out (contents, props changed) head/usr.bin/soelim/tests/nonexisting.in (contents, props changed) head/usr.bin/soelim/tests/soelim.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/soelim/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sat May 2 08:31:16 2015 (r282337) +++ head/etc/mtree/BSD.tests.dist Sat May 2 11:09:58 2015 (r282338) @@ -546,6 +546,8 @@ regress.multitest.out .. .. + soelim + .. timeout .. tr Modified: head/usr.bin/soelim/Makefile ============================================================================== --- head/usr.bin/soelim/Makefile Sat May 2 08:31:16 2015 (r282337) +++ head/usr.bin/soelim/Makefile Sat May 2 11:09:58 2015 (r282338) @@ -1,5 +1,11 @@ # $FreeBSD$ +.include + PROG= soelim +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/usr.bin/soelim/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/soelim/tests/Makefile Sat May 2 11:09:58 2015 (r282338) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/soelim + +ATF_TESTS_SH= soelim + +FILES= nonexisting.in \ + basic.in \ + basic \ + basic.out +FILESDIR= ${TESTSDIR} + +.include Added: head/usr.bin/soelim/tests/basic ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/soelim/tests/basic Sat May 2 11:09:58 2015 (r282338) @@ -0,0 +1 @@ +basic has been included Added: head/usr.bin/soelim/tests/basic.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/soelim/tests/basic.in Sat May 2 11:09:58 2015 (r282338) @@ -0,0 +1,3 @@ +This is a test +.so basic +end Added: head/usr.bin/soelim/tests/basic.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/soelim/tests/basic.out Sat May 2 11:09:58 2015 (r282338) @@ -0,0 +1,3 @@ +This is a test +basic has been included +end Added: head/usr.bin/soelim/tests/nonexisting.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/soelim/tests/nonexisting.in Sat May 2 11:09:58 2015 (r282338) @@ -0,0 +1,3 @@ +This is a test +.so nonexistingfile +This is next Added: head/usr.bin/soelim/tests/soelim.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/soelim/tests/soelim.sh Sat May 2 11:09:58 2015 (r282338) @@ -0,0 +1,96 @@ +# $FreeBSD$ + +atf_test_case stdin +stdin_head() +{ + atf_set "descr" "stdin functionality" +} + +stdin_body() +{ + # no file after .so + atf_check \ + -o inline:".so\n" \ + -e empty \ + -s exit:0 \ + soelim <<-EOF +.so +EOF + + # only space after .so + atf_check \ + -o inline:".so \n" \ + -e empty \ + -s exit:0 \ + soelim <<-EOF +.so +EOF + + # explicit stdin + atf_check \ + -o inline:".so\n" \ + -e empty \ + -s exit:0 \ + soelim - <<-EOF +.so +EOF + + atf_check \ + -o empty \ + -e inline:"soelim: can't open 'afile': No such file or directory\n" \ + -s exit:1 \ + soelim <<-EOF +.so afile +EOF + + atf_check \ + -o inline:".soafile\n" \ + -e empty \ + -s exit:0 \ + soelim <<-EOF +.soafile +EOF + + atf_check \ + -o empty \ + -e inline:"soelim: can't open 'afile': No such file or directory\n" \ + -s exit:1 \ + soelim -C <<-EOF +.soafile +EOF +} + +atf_test_case files +files_head() +{ + atf_set "descr" "testing files" +} + +files_body() +{ + atf_check \ + -o inline:"This is a test\n" \ + -e inline:"soelim: can't open 'nonexistingfile': No such file or directory\n" \ + -s exit:1 \ + soelim $(atf_get_srcdir)/nonexisting.in + + cp $(atf_get_srcdir)/basic . + atf_check \ + -o file:$(atf_get_srcdir)/basic.out \ + -e empty \ + -s exit:0 \ + soelim $(atf_get_srcdir)/basic.in + + rm -f basic + atf_check \ + -o file:$(atf_get_srcdir)/basic.out \ + -e empty \ + -s exit:0 \ + soelim -I$(atf_get_srcdir) $(atf_get_srcdir)/basic.in +} + +atf_init_test_cases() +{ + atf_add_test_case stdin + atf_add_test_case files +} From owner-svn-src-head@FreeBSD.ORG Sat May 2 12:08:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 677C1917; Sat, 2 May 2015 12:08:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48703128E; Sat, 2 May 2015 12:08:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42C8UXw025575; Sat, 2 May 2015 12:08:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42C8S28025567; Sat, 2 May 2015 12:08:28 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505021208.t42C8S28025567@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 2 May 2015 12:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282339 - in head: etc/mtree usr.bin/col usr.bin/col/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 12:08:30 -0000 Author: bapt Date: Sat May 2 12:08:28 2015 New Revision: 282339 URL: https://svnweb.freebsd.org/changeset/base/282339 Log: Add regression test about reverse line feed to col(1) Added: head/usr.bin/col/tests/ head/usr.bin/col/tests/Makefile (contents, props changed) head/usr.bin/col/tests/col.sh (contents, props changed) head/usr.bin/col/tests/rlf.in (contents, props changed) head/usr.bin/col/tests/rlf2.in (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/col/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sat May 2 11:09:58 2015 (r282338) +++ head/etc/mtree/BSD.tests.dist Sat May 2 12:08:28 2015 (r282339) @@ -514,6 +514,8 @@ .. cmp .. + col + .. comm .. cut Modified: head/usr.bin/col/Makefile ============================================================================== --- head/usr.bin/col/Makefile Sat May 2 11:09:58 2015 (r282338) +++ head/usr.bin/col/Makefile Sat May 2 12:08:28 2015 (r282339) @@ -1,6 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= col +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/usr.bin/col/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/col/tests/Makefile Sat May 2 12:08:28 2015 (r282339) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/col + +ATF_TESTS_SH= col + +FILES= rlf.in \ + rlf2.in +FILESDIR= ${TESTSDIR} + +.include Added: head/usr.bin/col/tests/col.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/col/tests/col.sh Sat May 2 12:08:28 2015 (r282339) @@ -0,0 +1,39 @@ +# $FreeBSD$ + +atf_test_case rlf + +rlf_head() +{ + atf_set "descr" "testing reverse line feed" +} +rlf_body() +{ + atf_check \ + -o inline:"a b\n" \ + -e empty \ + -s exit:0 \ + col < $(atf_get_srcdir)/rlf.in + + atf_check \ + -o inline:"a b3\n" \ + -e empty \ + -s exit:0 \ + col < $(atf_get_srcdir)/rlf2.in + + atf_check \ + -o inline:"a b3\n" \ + -e empty \ + -s exit:0 \ + col -x < $(atf_get_srcdir)/rlf2.in + + atf_check \ + -o inline:"a b3\n" \ + -e empty \ + -s exit:0 \ + col -p < $(atf_get_srcdir)/rlf2.in +} + +atf_init_test_cases() +{ + atf_add_test_case rlf +} Added: head/usr.bin/col/tests/rlf.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/col/tests/rlf.in Sat May 2 12:08:28 2015 (r282339) @@ -0,0 +1,2 @@ +a + 7b Added: head/usr.bin/col/tests/rlf2.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/col/tests/rlf2.in Sat May 2 12:08:28 2015 (r282339) @@ -0,0 +1,2 @@ +a + 7b From owner-svn-src-head@FreeBSD.ORG Sat May 2 12:19:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54AE7DDE; Sat, 2 May 2015 12:19:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43311136C; Sat, 2 May 2015 12:19:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42CJPjC031110; Sat, 2 May 2015 12:19:25 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42CJPfp031109; Sat, 2 May 2015 12:19:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505021219.t42CJPfp031109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 2 May 2015 12:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282341 - head/usr.bin/col/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 12:19:25 -0000 Author: bapt Date: Sat May 2 12:19:24 2015 New Revision: 282341 URL: https://svnweb.freebsd.org/changeset/base/282341 Log: Actually push the right tests Modified: head/usr.bin/col/tests/col.sh Modified: head/usr.bin/col/tests/col.sh ============================================================================== --- head/usr.bin/col/tests/col.sh Sat May 2 12:18:28 2015 (r282340) +++ head/usr.bin/col/tests/col.sh Sat May 2 12:19:24 2015 (r282341) @@ -15,22 +15,16 @@ rlf_body() col < $(atf_get_srcdir)/rlf.in atf_check \ - -o inline:"a b3\n" \ + -o inline:"a b\n" \ -e empty \ -s exit:0 \ col < $(atf_get_srcdir)/rlf2.in atf_check \ - -o inline:"a b3\n" \ + -o inline:"a b\n" \ -e empty \ -s exit:0 \ col -x < $(atf_get_srcdir)/rlf2.in - - atf_check \ - -o inline:"a b3\n" \ - -e empty \ - -s exit:0 \ - col -p < $(atf_get_srcdir)/rlf2.in } atf_init_test_cases() From owner-svn-src-head@FreeBSD.ORG Sat May 2 12:22:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F053F58; Sat, 2 May 2015 12:22:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D691145B; Sat, 2 May 2015 12:22:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42CMPq4035152; Sat, 2 May 2015 12:22:25 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42CMP9e035151; Sat, 2 May 2015 12:22:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201505021222.t42CMP9e035151@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 2 May 2015 12:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282342 - head/usr.bin/col X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 12:22:25 -0000 Author: bapt Date: Sat May 2 12:22:24 2015 New Revision: 282342 URL: https://svnweb.freebsd.org/changeset/base/282342 Log: Capsicumize col(1) Modified: head/usr.bin/col/col.c Modified: head/usr.bin/col/col.c ============================================================================== --- head/usr.bin/col/col.c Sat May 2 12:19:24 2015 (r282341) +++ head/usr.bin/col/col.c Sat May 2 12:22:24 2015 (r282342) @@ -45,11 +45,15 @@ static char sccsid[] = "@(#)col.c 8.5 (B #include __FBSDID("$FreeBSD$"); +#include + #include +#include #include #include #include #include +#include #include #include #include @@ -129,9 +133,24 @@ main(int argc, char **argv) int this_line; /* line l points to */ int nflushd_lines; /* number of lines that were flushed */ int adjust, opt, warned, width; + cap_rights_t rights; + unsigned long cmd; (void)setlocale(LC_CTYPE, ""); + cap_rights_init(&rights, CAP_FSTAT, CAP_READ); + if (cap_rights_limit(STDIN_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdin"); + cap_rights_init(&rights, CAP_FSTAT, CAP_WRITE, CAP_IOCTL); + if (cap_rights_limit(STDOUT_FILENO, &rights) < 0 && errno != ENOSYS) + err(1, "unable to limit rights for stdout"); + cmd = TIOCGETA; /* required by isatty(3) in printf(3) */ + if (cap_ioctls_limit(STDOUT_FILENO, &cmd, 1) < 0 && errno != ENOSYS) + err(1, "unable to limit ioctls for stdout"); + + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "unable to enter capability mode"); + max_bufd_lines = 128; compress_spaces = 1; /* compress spaces into tabs */ while ((opt = getopt(argc, argv, "bfhl:px")) != -1) From owner-svn-src-head@FreeBSD.ORG Sat May 2 14:43:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3CEAF18; Sat, 2 May 2015 14:43:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91D2C107B; Sat, 2 May 2015 14:43:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42EhctV004778; Sat, 2 May 2015 14:43:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42EhcOx004777; Sat, 2 May 2015 14:43:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505021443.t42EhcOx004777@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 2 May 2015 14:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282344 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 14:43:38 -0000 Author: mav Date: Sat May 2 14:43:37 2015 New Revision: 282344 URL: https://svnweb.freebsd.org/changeset/base/282344 Log: Handle ATA_SEND_FPDMA_QUEUED as NCQ in ahci_port_stop(). MFC after: 1 week Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Sat May 2 12:58:04 2015 (r282343) +++ head/usr.sbin/bhyve/pci_ahci.c Sat May 2 14:43:37 2015 (r282344) @@ -418,7 +418,8 @@ ahci_port_stop(struct ahci_port *p) slot = aior->slot; cfis = aior->cfis; if (cfis[2] == ATA_WRITE_FPDMA_QUEUED || - cfis[2] == ATA_READ_FPDMA_QUEUED) + cfis[2] == ATA_READ_FPDMA_QUEUED || + cfis[2] == ATA_SEND_FPDMA_QUEUED) ncq = 1; if (ncq) From owner-svn-src-head@FreeBSD.ORG Sat May 2 16:11:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46268D22; Sat, 2 May 2015 16:11:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34BE818C9; Sat, 2 May 2015 16:11:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42GBUKA046389; Sat, 2 May 2015 16:11:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42GBU5x046378; Sat, 2 May 2015 16:11:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201505021611.t42GBU5x046378@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 2 May 2015 16:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282345 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 16:11:30 -0000 Author: mav Date: Sat May 2 16:11:29 2015 New Revision: 282345 URL: https://svnweb.freebsd.org/changeset/base/282345 Log: Initialize PxCMD on reset and make its read-only bits such. MFC after: 2 weeks Modified: head/usr.sbin/bhyve/pci_ahci.c Modified: head/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- head/usr.sbin/bhyve/pci_ahci.c Sat May 2 14:43:37 2015 (r282344) +++ head/usr.sbin/bhyve/pci_ahci.c Sat May 2 16:11:29 2015 (r282345) @@ -490,6 +490,9 @@ ahci_reset(struct pci_ahci_softc *sc) for (i = 0; i < sc->ports; i++) { sc->port[i].ie = 0; sc->port[i].is = 0; + sc->port[i].cmd = (AHCI_P_CMD_SUD | AHCI_P_CMD_POD); + if (sc->port[i].bctx) + sc->port[i].cmd |= AHCI_P_CMD_CPS; sc->port[i].sctl = 0; ahci_port_reset(&sc->port[i]); } @@ -1941,8 +1944,15 @@ pci_ahci_port_write(struct pci_ahci_soft break; case AHCI_P_CMD: { - p->cmd = value; - + p->cmd &= ~(AHCI_P_CMD_ST | AHCI_P_CMD_SUD | AHCI_P_CMD_POD | + AHCI_P_CMD_CLO | AHCI_P_CMD_FRE | AHCI_P_CMD_APSTE | + AHCI_P_CMD_ATAPI | AHCI_P_CMD_DLAE | AHCI_P_CMD_ALPE | + AHCI_P_CMD_ASP | AHCI_P_CMD_ICC_MASK); + p->cmd |= (AHCI_P_CMD_ST | AHCI_P_CMD_SUD | AHCI_P_CMD_POD | + AHCI_P_CMD_CLO | AHCI_P_CMD_FRE | AHCI_P_CMD_APSTE | + AHCI_P_CMD_ATAPI | AHCI_P_CMD_DLAE | AHCI_P_CMD_ALPE | + AHCI_P_CMD_ASP | AHCI_P_CMD_ICC_MASK) & value; + if (!(value & AHCI_P_CMD_ST)) { ahci_port_stop(p); } else { @@ -1970,6 +1980,10 @@ pci_ahci_port_write(struct pci_ahci_soft p->cmd &= ~AHCI_P_CMD_CLO; } + if (value & AHCI_P_CMD_ICC_MASK) { + p->cmd &= ~AHCI_P_CMD_ICC_MASK; + } + ahci_handle_port(p); break; } From owner-svn-src-head@FreeBSD.ORG Sat May 2 17:45:58 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FECF1DD; Sat, 2 May 2015 17:45:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BC3E110D; Sat, 2 May 2015 17:45:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42HjwJs095767; Sat, 2 May 2015 17:45:58 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42HjqhI095736; Sat, 2 May 2015 17:45:52 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505021745.t42HjqhI095736@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 2 May 2015 17:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282346 - in head: lib/libcapsicum lib/libcasper lib/libnv lib/libnv/tests sbin/casperd sys/dev/pci sys/kern sys/sys usr.sbin/iovctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 17:45:58 -0000 Author: oshogbo Date: Sat May 2 17:45:52 2015 New Revision: 282346 URL: https://svnweb.freebsd.org/changeset/base/282346 Log: Approved, oprócz użycie RESTORE_ERRNO() do ustawiania errno. Change the nvlist_recv() function to take additional argument that specifies flags expected on the received nvlist. Receiving a nvlist with different set of flags than the ones we expect might lead to undefined behaviour, which might be potentially dangerous. Update consumers of this and related functions and update the tests. Approved by: pjd (mentor) Update man page for nvlist_unpack, nvlist_recv, nvlist_xfer, cap_recv_nvlist and cap_xfer_nvlist. Reviewed by: AllanJude Approved by: pjd (mentor) Modified: head/lib/libcapsicum/libcapsicum.3 head/lib/libcapsicum/libcapsicum.c head/lib/libcapsicum/libcapsicum.h head/lib/libcapsicum/libcapsicum_dns.c head/lib/libcapsicum/libcapsicum_grp.c head/lib/libcapsicum/libcapsicum_pwd.c head/lib/libcapsicum/libcapsicum_random.c head/lib/libcapsicum/libcapsicum_service.c head/lib/libcapsicum/libcapsicum_sysctl.c head/lib/libcasper/libcasper.c head/lib/libnv/nv.3 head/lib/libnv/tests/nv_tests.cc head/lib/libnv/tests/nvlist_send_recv_test.c head/sbin/casperd/casperd.c head/sbin/casperd/zygote.c head/sys/dev/pci/pci_iov.c head/sys/kern/subr_nvlist.c head/sys/sys/nv.h head/usr.sbin/iovctl/iovctl.c Modified: head/lib/libcapsicum/libcapsicum.3 ============================================================================== --- head/lib/libcapsicum/libcapsicum.3 Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcapsicum/libcapsicum.3 Sat May 2 17:45:52 2015 (r282346) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 14, 2014 +.Dd May 2, 2015 .Dt LIBCAPSICUM 3 .Os .Sh NAME @@ -68,9 +68,9 @@ .Ft "int" .Fn cap_send_nvlist "const cap_channel_t *chan" "const nvlist_t *nvl" .Ft "nvlist_t *" -.Fn cap_recv_nvlist "const cap_channel_t *chan" +.Fn cap_recv_nvlist "const cap_channel_t *chan" "int flags" .Ft "nvlist_t *" -.Fn cap_xfer_nvlist "const cap_channel_t *chan" "nvlist_t *nvl" +.Fn cap_xfer_nvlist "const cap_channel_t *chan" "nvlist_t *nvl" "int flags" .In libcapsicum_service.h .Ft "cap_channel_t *" .Fn cap_service_open "const cap_channel_t *chan" "const char *name" @@ -171,11 +171,23 @@ Most services should provide higher leve The .Fn cap_recv_nvlist function receives the given nvlist over the given capability. +The +.Fa flags +argument defines what type the top nvlist is expected to be. +If the nvlist flags do not match the flags passed to +.Fn cap_recv_nvlist , +the nvlist will not be returned. .Pp The .Fn cap_xfer_nvlist function sends the given nvlist, destroys it and receives new nvlist in response over the given capability. +The +.Fa flags +argument defines what type the top nvlist is expected to be. +If the nvlist flags do not match the flags passed to +.Fn cap_xfer_nvlist , +the nvlist will not be returned. It does not matter if the function succeeds or fails, the nvlist given for sending will always be destroyed once the function returns. .Pp Modified: head/lib/libcapsicum/libcapsicum.c ============================================================================== --- head/lib/libcapsicum/libcapsicum.c Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcapsicum/libcapsicum.c Sat May 2 17:45:52 2015 (r282346) @@ -142,7 +142,7 @@ cap_clone(const cap_channel_t *chan) nvl = nvlist_create(0); nvlist_add_string(nvl, "cmd", "clone"); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) return (NULL); if (nvlist_get_number(nvl, "error") != 0) { @@ -195,7 +195,7 @@ cap_limit_set(const cap_channel_t *chan, nvlmsg = nvlist_create(0); nvlist_add_string(nvlmsg, "cmd", "limit_set"); nvlist_add_nvlist(nvlmsg, "limits", limits); - nvlmsg = cap_xfer_nvlist(chan, nvlmsg); + nvlmsg = cap_xfer_nvlist(chan, nvlmsg, 0); if (nvlmsg == NULL) { nvlist_destroy(limits); return (-1); @@ -218,7 +218,7 @@ cap_limit_get(const cap_channel_t *chan, nvlmsg = nvlist_create(0); nvlist_add_string(nvlmsg, "cmd", "limit_get"); - nvlmsg = cap_xfer_nvlist(chan, nvlmsg); + nvlmsg = cap_xfer_nvlist(chan, nvlmsg, 0); if (nvlmsg == NULL) return (-1); error = (int)nvlist_get_number(nvlmsg, "error"); @@ -246,21 +246,21 @@ cap_send_nvlist(const cap_channel_t *cha } nvlist_t * -cap_recv_nvlist(const cap_channel_t *chan) +cap_recv_nvlist(const cap_channel_t *chan, int flags) { assert(chan != NULL); assert(chan->cch_magic == CAP_CHANNEL_MAGIC); - return (nvlist_recv(chan->cch_sock)); + return (nvlist_recv(chan->cch_sock, flags)); } nvlist_t * -cap_xfer_nvlist(const cap_channel_t *chan, nvlist_t *nvl) +cap_xfer_nvlist(const cap_channel_t *chan, nvlist_t *nvl, int flags) { assert(chan != NULL); assert(chan->cch_magic == CAP_CHANNEL_MAGIC); - return (nvlist_xfer(chan->cch_sock, nvl)); + return (nvlist_xfer(chan->cch_sock, nvl, flags)); } Modified: head/lib/libcapsicum/libcapsicum.h ============================================================================== --- head/lib/libcapsicum/libcapsicum.h Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcapsicum/libcapsicum.h Sat May 2 17:45:52 2015 (r282346) @@ -105,11 +105,11 @@ int cap_send_nvlist(const cap_channel_t /* * Function receives nvlist over the given capability. */ -nvlist_t *cap_recv_nvlist(const cap_channel_t *chan); +nvlist_t *cap_recv_nvlist(const cap_channel_t *chan, int flags); /* * Function sends the given nvlist, destroys it and receives new nvlist in * response over the given capability. */ -nvlist_t *cap_xfer_nvlist(const cap_channel_t *chan, nvlist_t *nvl); +nvlist_t *cap_xfer_nvlist(const cap_channel_t *chan, nvlist_t *nvl, int flags); #endif /* !_LIBCAPSICUM_H_ */ Modified: head/lib/libcapsicum/libcapsicum_dns.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_dns.c Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcapsicum/libcapsicum_dns.c Sat May 2 17:45:52 2015 (r282346) @@ -132,7 +132,7 @@ cap_gethostbyname2(cap_channel_t *chan, nvlist_add_string(nvl, "cmd", "gethostbyname"); nvlist_add_number(nvl, "family", (uint64_t)type); nvlist_add_string(nvl, "name", name); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) { h_errno = NO_RECOVERY; return (NULL); @@ -159,7 +159,7 @@ cap_gethostbyaddr(cap_channel_t *chan, c nvlist_add_string(nvl, "cmd", "gethostbyaddr"); nvlist_add_binary(nvl, "addr", addr, (size_t)len); nvlist_add_number(nvl, "family", (uint64_t)type); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) { h_errno = NO_RECOVERY; return (NULL); @@ -233,7 +233,7 @@ cap_getaddrinfo(cap_channel_t *chan, con nvlist_add_number(nvl, "hints.ai_protocol", (uint64_t)hints->ai_protocol); } - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) return (EAI_MEMORY); if (nvlist_get_number(nvl, "error") != 0) { @@ -283,7 +283,7 @@ cap_getnameinfo(cap_channel_t *chan, con nvlist_add_number(nvl, "servlen", (uint64_t)servlen); nvlist_add_binary(nvl, "sa", sa, (size_t)salen); nvlist_add_number(nvl, "flags", (uint64_t)flags); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) return (EAI_MEMORY); if (nvlist_get_number(nvl, "error") != 0) { Modified: head/lib/libcapsicum/libcapsicum_grp.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_grp.c Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcapsicum/libcapsicum_grp.c Sat May 2 17:45:52 2015 (r282346) @@ -195,7 +195,7 @@ cap_getgrcommon_r(cap_channel_t *chan, c } else { abort(); } - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) { assert(errno != 0); *result = NULL; @@ -319,7 +319,7 @@ cap_setgroupent(cap_channel_t *chan, int nvl = nvlist_create(0); nvlist_add_string(nvl, "cmd", "setgroupent"); nvlist_add_bool(nvl, "stayopen", stayopen != 0); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) return (0); if (nvlist_get_number(nvl, "error") != 0) { @@ -339,7 +339,7 @@ cap_setgrent(cap_channel_t *chan) nvl = nvlist_create(0); nvlist_add_string(nvl, "cmd", "setgrent"); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) return (0); if (nvlist_get_number(nvl, "error") != 0) { @@ -360,7 +360,7 @@ cap_endgrent(cap_channel_t *chan) nvl = nvlist_create(0); nvlist_add_string(nvl, "cmd", "endgrent"); /* Ignore any errors, we have no way to report them. */ - nvlist_destroy(cap_xfer_nvlist(chan, nvl)); + nvlist_destroy(cap_xfer_nvlist(chan, nvl, 0)); } int Modified: head/lib/libcapsicum/libcapsicum_pwd.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_pwd.c Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcapsicum/libcapsicum_pwd.c Sat May 2 17:45:52 2015 (r282346) @@ -154,7 +154,7 @@ cap_getpwcommon_r(cap_channel_t *chan, c } else { abort(); } - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) { assert(errno != 0); *result = NULL; @@ -278,7 +278,7 @@ cap_setpassent(cap_channel_t *chan, int nvl = nvlist_create(0); nvlist_add_string(nvl, "cmd", "setpassent"); nvlist_add_bool(nvl, "stayopen", stayopen != 0); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) return (0); if (nvlist_get_number(nvl, "error") != 0) { @@ -299,7 +299,7 @@ cap_set_end_pwent(cap_channel_t *chan, c nvl = nvlist_create(0); nvlist_add_string(nvl, "cmd", cmd); /* Ignore any errors, we have no way to report them. */ - nvlist_destroy(cap_xfer_nvlist(chan, nvl)); + nvlist_destroy(cap_xfer_nvlist(chan, nvl, 0)); } void Modified: head/lib/libcapsicum/libcapsicum_random.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_random.c Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcapsicum/libcapsicum_random.c Sat May 2 17:45:52 2015 (r282346) @@ -57,7 +57,7 @@ cap_random_buf(cap_channel_t *chan, void nvlist_add_string(nvl, "cmd", "generate"); nvlist_add_number(nvl, "size", (uint64_t)(left > MAXSIZE ? MAXSIZE : left)); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) return (-1); if (nvlist_get_number(nvl, "error") != 0) { Modified: head/lib/libcapsicum/libcapsicum_service.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_service.c Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcapsicum/libcapsicum_service.c Sat May 2 17:45:52 2015 (r282346) @@ -56,7 +56,7 @@ cap_service_open(const cap_channel_t *ch nvlist_add_string(nvl, "service", name); if (fd_is_valid(STDERR_FILENO)) nvlist_add_descriptor(nvl, "stderrfd", STDERR_FILENO); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) return (NULL); error = (int)nvlist_get_number(nvl, "error"); Modified: head/lib/libcapsicum/libcapsicum_sysctl.c ============================================================================== --- head/lib/libcapsicum/libcapsicum_sysctl.c Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcapsicum/libcapsicum_sysctl.c Sat May 2 17:45:52 2015 (r282346) @@ -63,7 +63,7 @@ cap_sysctlbyname(cap_channel_t *chan, co nvlist_add_number(nvl, "oldlen", (uint64_t)*oldlenp); if (newp != NULL) nvlist_add_binary(nvl, "newp", newp, newlen); - nvl = cap_xfer_nvlist(chan, nvl); + nvl = cap_xfer_nvlist(chan, nvl, 0); if (nvl == NULL) return (-1); if (nvlist_get_number(nvl, "error") != 0) { Modified: head/lib/libcasper/libcasper.c ============================================================================== --- head/lib/libcasper/libcasper.c Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libcasper/libcasper.c Sat May 2 17:45:52 2015 (r282346) @@ -279,7 +279,7 @@ casper_message(const cap_channel_t *capc const char *cmd; nvlist_t *nvl; - nvl = cap_recv_nvlist(capcas); + nvl = cap_recv_nvlist(capcas, 0); if (nvl == NULL) pjdlog_exit(1, "Unable to receive message from Casper"); cmd = nvlist_get_string(nvl, "cmd"); @@ -297,7 +297,7 @@ service_message(struct service *service, const char *cmd; int error; - nvlin = cap_recv_nvlist(service_connection_get_chan(sconn)); + nvlin = cap_recv_nvlist(service_connection_get_chan(sconn), 0); if (nvlin == NULL) { if (errno == ENOTCONN) { pjdlog_debug(1, "Connection closed by the client."); Modified: head/lib/libnv/nv.3 ============================================================================== --- head/lib/libnv/nv.3 Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libnv/nv.3 Sat May 2 17:45:52 2015 (r282346) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 1, 2015 +.Dd May 2, 2015 .Dt NV 3 .Os .Sh NAME @@ -85,14 +85,14 @@ .Ft "void *" .Fn nvlist_pack "const nvlist_t *nvl" "size_t *sizep" .Ft "nvlist_t *" -.Fn nvlist_unpack "const void *buf" "size_t size" +.Fn nvlist_unpack "const void *buf" "size_t size" "int flags" .\" .Ft int .Fn nvlist_send "int sock" "const nvlist_t *nvl" .Ft "nvlist_t *" -.Fn nvlist_recv "int sock" +.Fn nvlist_recv "int sock" "int flags" .Ft "nvlist_t *" -.Fn nvlist_xfer "int sock" "nvlist_t *nvl" +.Fn nvlist_xfer "int sock" "nvlist_t *nvl" "int flags" .\" .Ft "const char *" .Fn nvlist_next "const nvlist_t *nvl" "int *typep" "void **cookiep" @@ -325,6 +325,18 @@ The nvlist must not be in error state. The .Fn nvlist_unpack function converts the given buffer to the nvlist. +The +.Fa flags +argument defines what type of the top level nvlist is expected to be. +Flags are set up using the +.Fn nvlist_create +function. +If the nvlist flags do not match the flags passed to +.Fn nvlist_unpack , +the nvlist will not be returned. +Every nested nvlist list should be checked using +.Fn nvlist_flags +function. The function returns .Dv NULL in case of an error. @@ -343,12 +355,36 @@ The function receives nvlist over the socket given by the .Fa sock argument. +The +.Fa flags +argument defines what type of the top level nvlist is expected to be. +Flags are set up using the +.Fn nvlist_create +function. +If the nvlist flags do not match the flags passed to +.Fn nvlist_recv , +the nvlist will not be returned. +Every nested nvlist list should be checked using +.Fn nvlist_flags +function. .Pp The .Fn nvlist_xfer function sends the given nvlist over the socket given by the .Fa sock argument and receives nvlist over the same socket. +The +.Fa flags +argument defines what type of the top level nvlist is expected to be. +Flags are set up using the +.Fn nvlist_create +function. +If the nvlist flags do not match the flags passed to +.Fn nvlist_xfer , +the nvlist will not be returned. +Every nested nvlist list should be checked using +.Fn nvlist_flags +function. The given nvlist is always destroyed. .Pp The @@ -559,7 +595,7 @@ const char *command; char *filename; int fd; -nvl = nvlist_recv(sock); +nvl = nvlist_recv(sock, 0); if (nvl == NULL) err(1, "nvlist_recv() failed"); @@ -588,7 +624,7 @@ const char *name; void *cookie; int type; -nvl = nvlist_recv(sock); +nvl = nvlist_recv(sock, 0); if (nvl == NULL) err(1, "nvlist_recv() failed"); @@ -617,7 +653,7 @@ const char *name; void *cookie; int type; -nvl = nvlist_recv(sock); +nvl = nvlist_recv(sock, 0); if (nvl == NULL) err(1, "nvlist_recv() failed"); Modified: head/lib/libnv/tests/nv_tests.cc ============================================================================== --- head/lib/libnv/tests/nv_tests.cc Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libnv/tests/nv_tests.cc Sat May 2 17:45:52 2015 (r282346) @@ -440,7 +440,7 @@ ATF_TEST_CASE_BODY(nvlist_pack__empty_nv packed = nvlist_pack(nvl, &packed_size); ATF_REQUIRE(packed != NULL); - unpacked = nvlist_unpack(packed, packed_size); + unpacked = nvlist_unpack(packed, packed_size, 0); ATF_REQUIRE(unpacked != NULL); ATF_REQUIRE(unpacked != nvl); ATF_REQUIRE(nvlist_empty(unpacked)); @@ -534,7 +534,7 @@ ATF_TEST_CASE_BODY(nvlist_pack__multiple packed = nvlist_pack(nvl, &packed_size); ATF_REQUIRE(packed != NULL); - unpacked = nvlist_unpack(packed, packed_size); + unpacked = nvlist_unpack(packed, packed_size, 0); ATF_REQUIRE(unpacked != 0); it = NULL; @@ -614,7 +614,7 @@ ATF_TEST_CASE_BODY(nvlist_unpack__duplic ATF_REQUIRE(keypos != NULL); memcpy(keypos, key2, keylen); - unpacked = nvlist_unpack(packed, size); + unpacked = nvlist_unpack(packed, size, 0); ATF_REQUIRE(nvlist_error(unpacked) != 0); free(packed); Modified: head/lib/libnv/tests/nvlist_send_recv_test.c ============================================================================== --- head/lib/libnv/tests/nvlist_send_recv_test.c Sat May 2 16:11:29 2015 (r282345) +++ head/lib/libnv/tests/nvlist_send_recv_test.c Sat May 2 17:45:52 2015 (r282346) @@ -95,7 +95,7 @@ parent(int sock) int type, ctype; size_t size; - nvl = nvlist_recv(sock); + nvl = nvlist_recv(sock, 0); CHECK(nvlist_error(nvl) == 0); if (nvlist_error(nvl) != 0) err(1, "nvlist_recv() failed"); Modified: head/sbin/casperd/casperd.c ============================================================================== --- head/sbin/casperd/casperd.c Sat May 2 16:11:29 2015 (r282345) +++ head/sbin/casperd/casperd.c Sat May 2 17:45:52 2015 (r282346) @@ -357,7 +357,7 @@ service_external_execute(int chanfd) int stderrfd, execfd, procfd; nvlist_t *nvl; - nvl = nvlist_recv(chanfd); + nvl = nvlist_recv(chanfd, 0); if (nvl == NULL) pjdlog_exit(1, "Unable to receive nvlist"); service = nvlist_take_string(nvl, "service"); Modified: head/sbin/casperd/zygote.c ============================================================================== --- head/sbin/casperd/zygote.c Sat May 2 16:11:29 2015 (r282345) +++ head/sbin/casperd/zygote.c Sat May 2 17:45:52 2015 (r282346) @@ -91,7 +91,7 @@ zygote_clone(zygote_func_t *func, int fl nvl = nvlist_create(0); nvlist_add_number(nvl, "func", (uint64_t)(uintptr_t)func); nvlist_add_number(nvl, "flags", (uint64_t)flags); - nvl = nvlist_xfer(zygote_sock, nvl); + nvl = nvlist_xfer(zygote_sock, nvl, 0); if (nvl == NULL) return (-1); if (nvlist_exists_number(nvl, "error")) { @@ -134,7 +134,7 @@ zygote_main(int sock) closefrom(sock + 1); for (;;) { - nvlin = nvlist_recv(sock); + nvlin = nvlist_recv(sock, 0); if (nvlin == NULL) { if (errno == ENOTCONN) { /* Casperd exited. */ Modified: head/sys/dev/pci/pci_iov.c ============================================================================== --- head/sys/dev/pci/pci_iov.c Sat May 2 16:11:29 2015 (r282345) +++ head/sys/dev/pci/pci_iov.c Sat May 2 17:45:52 2015 (r282346) @@ -386,7 +386,7 @@ pci_iov_parse_config(struct pcicfg_iov * if (error != 0) goto out; - config = nvlist_unpack(packed_config, arg->len); + config = nvlist_unpack(packed_config, arg->len, NV_FLAG_IGNORE_CASE); if (config == NULL) { error = EINVAL; goto out; Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Sat May 2 16:11:29 2015 (r282345) +++ head/sys/kern/subr_nvlist.c Sat May 2 17:45:52 2015 (r282346) @@ -774,7 +774,8 @@ failed: } static nvlist_t * -nvlist_xunpack(const void *buf, size_t size, const int *fds, size_t nfds) +nvlist_xunpack(const void *buf, size_t size, const int *fds, size_t nfds, + int flags) { const unsigned char *ptr; nvlist_t *nvl, *retnvl, *tmpnvl; @@ -782,6 +783,8 @@ nvlist_xunpack(const void *buf, size_t s size_t left; bool isbe; + PJDLOG_ASSERT((flags & ~(NV_FLAG_PUBLIC_MASK)) == 0); + left = size; ptr = buf; @@ -793,6 +796,10 @@ nvlist_xunpack(const void *buf, size_t s ptr = nvlist_unpack_header(nvl, ptr, nfds, &isbe, &left); if (ptr == NULL) goto failed; + if (nvl->nvl_flags != flags) { + ERRNO_SET(EILSEQ); + goto failed; + } while (left > 0) { ptr = nvpair_unpack(isbe, ptr, &left, &nvp); @@ -849,10 +856,10 @@ failed: } nvlist_t * -nvlist_unpack(const void *buf, size_t size) +nvlist_unpack(const void *buf, size_t size, int flags) { - return (nvlist_xunpack(buf, size, NULL, 0)); + return (nvlist_xunpack(buf, size, NULL, 0, flags)); } #ifndef _KERNEL @@ -900,7 +907,7 @@ out: } nvlist_t * -nvlist_recv(int sock) +nvlist_recv(int sock, int flags) { struct nvlist_header nvlhdr; nvlist_t *nvl, *ret; @@ -937,7 +944,7 @@ nvlist_recv(int sock) goto out; } - nvl = nvlist_xunpack(buf, size, fds, nfds); + nvl = nvlist_xunpack(buf, size, fds, nfds, flags); if (nvl == NULL) { ERRNO_SAVE(); for (i = 0; i < nfds; i++) @@ -957,7 +964,7 @@ out: } nvlist_t * -nvlist_xfer(int sock, nvlist_t *nvl) +nvlist_xfer(int sock, nvlist_t *nvl, int flags) { if (nvlist_send(sock, nvl) < 0) { @@ -965,7 +972,7 @@ nvlist_xfer(int sock, nvlist_t *nvl) return (NULL); } nvlist_destroy(nvl); - return (nvlist_recv(sock)); + return (nvlist_recv(sock, flags)); } #endif Modified: head/sys/sys/nv.h ============================================================================== --- head/sys/sys/nv.h Sat May 2 16:11:29 2015 (r282345) +++ head/sys/sys/nv.h Sat May 2 17:45:52 2015 (r282346) @@ -87,11 +87,11 @@ void nvlist_fdump(const nvlist_t *nvl, F size_t nvlist_size(const nvlist_t *nvl); void *nvlist_pack(const nvlist_t *nvl, size_t *sizep); -nvlist_t *nvlist_unpack(const void *buf, size_t size); +nvlist_t *nvlist_unpack(const void *buf, size_t size, int flags); int nvlist_send(int sock, const nvlist_t *nvl); -nvlist_t *nvlist_recv(int sock); -nvlist_t *nvlist_xfer(int sock, nvlist_t *nvl); +nvlist_t *nvlist_recv(int sock, int flags); +nvlist_t *nvlist_xfer(int sock, nvlist_t *nvl, int flags); const char *nvlist_next(const nvlist_t *nvl, int *typep, void **cookiep); Modified: head/usr.sbin/iovctl/iovctl.c ============================================================================== --- head/usr.sbin/iovctl/iovctl.c Sat May 2 16:11:29 2015 (r282345) +++ head/usr.sbin/iovctl/iovctl.c Sat May 2 17:45:52 2015 (r282346) @@ -80,7 +80,7 @@ get_schema(int fd) err(1, "Could not fetch config schema"); } - schema = nvlist_unpack(arg.schema, arg.len); + schema = nvlist_unpack(arg.schema, arg.len, NV_FLAG_IGNORE_CASE); if (schema == NULL) err(1, "Could not unpack schema"); From owner-svn-src-head@FreeBSD.ORG Sat May 2 18:03:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2B24691; Sat, 2 May 2015 18:03:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0B2D12B9; Sat, 2 May 2015 18:03:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42I3m6a005939; Sat, 2 May 2015 18:03:48 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42I3lcD005934; Sat, 2 May 2015 18:03:47 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505021803.t42I3lcD005934@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 2 May 2015 18:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282347 - in head: lib/libnv sys/kern 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 18:03:49 -0000 Author: oshogbo Date: Sat May 2 18:03:47 2015 New Revision: 282347 URL: https://svnweb.freebsd.org/changeset/base/282347 Log: Introduce the NV_FLAG_NO_UNIQUE flag. When set, it allows to store multiple values using the same key in a nvlist. Approved by: pjd (mentor) Obtained from: WHEEL Systems (http://www.wheelsystems.com) Update man page. Reviewed by: AllanJude Approved by: pjd (mentor) Modified: head/lib/libnv/nv.3 head/sys/kern/subr_nvlist.c head/sys/kern/subr_nvpair.c head/sys/sys/nv.h Modified: head/lib/libnv/nv.3 ============================================================================== --- head/lib/libnv/nv.3 Sat May 2 17:45:52 2015 (r282346) +++ head/lib/libnv/nv.3 Sat May 2 18:03:47 2015 (r282347) @@ -232,6 +232,8 @@ The following flag can be provided: .Bl -tag -width "NV_FLAG_IGNORE_CASE" -compact -offset indent .It Dv NV_FLAG_IGNORE_CASE Perform case-insensitive lookups of provided names. +.It Dv NV_FLAG_NO_UNIQUE +Names in the nvlist do not have to be unique. .El .Pp The Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Sat May 2 17:45:52 2015 (r282346) +++ head/sys/kern/subr_nvlist.c Sat May 2 18:03:47 2015 (r282347) @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$"); #endif #define NV_FLAG_PRIVATE_MASK (NV_FLAG_BIG_ENDIAN) -#define NV_FLAG_PUBLIC_MASK (NV_FLAG_IGNORE_CASE) +#define NV_FLAG_PUBLIC_MASK (NV_FLAG_IGNORE_CASE | NV_FLAG_NO_UNIQUE) #define NV_FLAG_ALL_MASK (NV_FLAG_PRIVATE_MASK | NV_FLAG_PUBLIC_MASK) #define NVLIST_MAGIC 0x6e766c /* "nvl" */ @@ -1074,10 +1074,12 @@ nvlist_add_nvpair(nvlist_t *nvl, const n ERRNO_SET(nvlist_error(nvl)); return; } - if (nvlist_exists(nvl, nvpair_name(nvp))) { - nvl->nvl_error = EEXIST; - ERRNO_SET(nvlist_error(nvl)); - return; + if ((nvl->nvl_flags & NV_FLAG_NO_UNIQUE) == 0) { + if (nvlist_exists(nvl, nvpair_name(nvp))) { + nvl->nvl_error = EEXIST; + ERRNO_SET(nvlist_error(nvl)); + return; + } } newnvp = nvpair_clone(nvp); @@ -1266,11 +1268,13 @@ nvlist_move_nvpair(nvlist_t *nvl, nvpair ERRNO_SET(nvlist_error(nvl)); return; } - if (nvlist_exists(nvl, nvpair_name(nvp))) { - nvpair_free(nvp); - nvl->nvl_error = EEXIST; - ERRNO_SET(nvl->nvl_error); - return; + if ((nvl->nvl_flags & NV_FLAG_NO_UNIQUE) == 0) { + if (nvlist_exists(nvl, nvpair_name(nvp))) { + nvpair_free(nvp); + nvl->nvl_error = EEXIST; + ERRNO_SET(nvl->nvl_error); + return; + } } nvpair_insert(&nvl->nvl_head, nvp, nvl); Modified: head/sys/kern/subr_nvpair.c ============================================================================== --- head/sys/kern/subr_nvpair.c Sat May 2 17:45:52 2015 (r282346) +++ head/sys/kern/subr_nvpair.c Sat May 2 18:03:47 2015 (r282347) @@ -143,7 +143,8 @@ nvpair_insert(struct nvl_head *head, nvp NVPAIR_ASSERT(nvp); PJDLOG_ASSERT(nvp->nvp_list == NULL); - PJDLOG_ASSERT(!nvlist_exists(nvl, nvpair_name(nvp))); + PJDLOG_ASSERT((nvlist_flags(nvl) & NV_FLAG_NO_UNIQUE) != 0 || + !nvlist_exists(nvl, nvpair_name(nvp))); TAILQ_INSERT_TAIL(head, nvp, nvp_next); nvp->nvp_list = nvl; Modified: head/sys/sys/nv.h ============================================================================== --- head/sys/sys/nv.h Sat May 2 17:45:52 2015 (r282346) +++ head/sys/sys/nv.h Sat May 2 18:03:47 2015 (r282347) @@ -64,6 +64,10 @@ typedef struct nvlist nvlist_t; * Perform case-insensitive lookups of provided names. */ #define NV_FLAG_IGNORE_CASE 0x01 +/* + * Names don't have to be unique. + */ +#define NV_FLAG_NO_UNIQUE 0x02 #if defined(_KERNEL) && defined(MALLOC_DECLARE) MALLOC_DECLARE(M_NVLIST); From owner-svn-src-head@FreeBSD.ORG Sat May 2 18:07:48 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E10707F1; Sat, 2 May 2015 18:07:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B587612D0; Sat, 2 May 2015 18:07:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42I7mZD006533; Sat, 2 May 2015 18:07:48 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42I7m5o006532; Sat, 2 May 2015 18:07:48 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505021807.t42I7m5o006532@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 2 May 2015 18:07:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282348 - head/lib/libnv/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 18:07:49 -0000 Author: oshogbo Date: Sat May 2 18:07:47 2015 New Revision: 282348 URL: https://svnweb.freebsd.org/changeset/base/282348 Log: Add test case for unpack with diffrent flags. Approved by: pjd (mentor) Modified: head/lib/libnv/tests/nv_tests.cc Modified: head/lib/libnv/tests/nv_tests.cc ============================================================================== --- head/lib/libnv/tests/nv_tests.cc Sat May 2 18:03:47 2015 (r282347) +++ head/lib/libnv/tests/nv_tests.cc Sat May 2 18:07:47 2015 (r282348) @@ -450,6 +450,40 @@ ATF_TEST_CASE_BODY(nvlist_pack__empty_nv free(packed); } +ATF_TEST_CASE_WITHOUT_HEAD(nvlist_unpack__flags_nvlist); +ATF_TEST_CASE_BODY(nvlist_unpack__flags_nvlist) +{ + nvlist_t *nvl, *unpacked; + void *packed; + size_t packed_size; + + nvl = nvlist_create(NV_FLAG_NO_UNIQUE); + ATF_REQUIRE(nvl != NULL); + + nvlist_add_bool(nvl, "name", true); + ATF_REQUIRE(!nvlist_empty(nvl)); + ATF_REQUIRE(nvlist_exists_bool(nvl, "name")); + + packed = nvlist_pack(nvl, &packed_size); + ATF_REQUIRE(packed != NULL); + + unpacked = nvlist_unpack(packed, packed_size, 0); + ATF_REQUIRE(unpacked == NULL); + + unpacked = nvlist_unpack(packed, packed_size, NV_FLAG_IGNORE_CASE); + ATF_REQUIRE(unpacked == NULL); + + unpacked = nvlist_unpack(packed, packed_size, NV_FLAG_NO_UNIQUE); + ATF_REQUIRE(unpacked != NULL); + ATF_REQUIRE(unpacked != nvl); + ATF_REQUIRE(!nvlist_empty(unpacked)); + ATF_REQUIRE(nvlist_exists_bool(unpacked, "name")); + + nvlist_destroy(unpacked); + nvlist_destroy(nvl); + free(packed); +} + static void verify_null(const nvlist_t *nvl, int type) { @@ -1206,6 +1240,7 @@ ATF_INIT_TEST_CASES(tp) ATF_ADD_TEST_CASE(tp, nvlist_pack__multiple_values); ATF_ADD_TEST_CASE(tp, nvlist_pack__error_nvlist); ATF_ADD_TEST_CASE(tp, nvlist_unpack__duplicate_key); + ATF_ADD_TEST_CASE(tp, nvlist_unpack__flags_nvlist); ATF_ADD_TEST_CASE(tp, nvlist_move_string__single_insert); ATF_ADD_TEST_CASE(tp, nvlist_move_nvlist__single_insert); From owner-svn-src-head@FreeBSD.ORG Sat May 2 18:10:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 047A5959; Sat, 2 May 2015 18:10:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E71261378; Sat, 2 May 2015 18:10:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42IAjgJ007020; Sat, 2 May 2015 18:10:45 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42IAjxl007019; Sat, 2 May 2015 18:10:45 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505021810.t42IAjxl007019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 2 May 2015 18:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282349 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 18:10:46 -0000 Author: oshogbo Date: Sat May 2 18:10:45 2015 New Revision: 282349 URL: https://svnweb.freebsd.org/changeset/base/282349 Log: Remove duplicated code using macro template for the nvlist_add_.* functions. Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Sat May 2 18:07:47 2015 (r282348) +++ head/sys/kern/subr_nvlist.c Sat May 2 18:10:45 2015 (r282349) @@ -1142,45 +1142,8 @@ nvlist_add_null(nvlist_t *nvl, const cha } void -nvlist_add_bool(nvlist_t *nvl, const char *name, bool value) -{ - nvpair_t *nvp; - - if (nvlist_error(nvl) != 0) { - ERRNO_SET(nvlist_error(nvl)); - return; - } - - nvp = nvpair_create_bool(name, value); - if (nvp == NULL) { - nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - ERRNO_SET(nvl->nvl_error); - } else { - nvlist_move_nvpair(nvl, nvp); - } -} - -void -nvlist_add_number(nvlist_t *nvl, const char *name, uint64_t value) -{ - nvpair_t *nvp; - - if (nvlist_error(nvl) != 0) { - ERRNO_SET(nvlist_error(nvl)); - return; - } - - nvp = nvpair_create_number(name, value); - if (nvp == NULL) { - nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - ERRNO_SET(nvl->nvl_error); - } else { - nvlist_move_nvpair(nvl, nvp); - } -} - -void -nvlist_add_string(nvlist_t *nvl, const char *name, const char *value) +nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value, + size_t size) { nvpair_t *nvp; @@ -1189,7 +1152,7 @@ nvlist_add_string(nvlist_t *nvl, const c return; } - nvp = nvpair_create_string(name, value); + nvp = nvpair_create_binary(name, value, size); if (nvp == NULL) { nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); ERRNO_SET(nvl->nvl_error); @@ -1198,63 +1161,36 @@ nvlist_add_string(nvlist_t *nvl, const c } } -void -nvlist_add_nvlist(nvlist_t *nvl, const char *name, const nvlist_t *value) -{ - nvpair_t *nvp; - - if (nvlist_error(nvl) != 0) { - ERRNO_SET(nvlist_error(nvl)); - return; - } - nvp = nvpair_create_nvlist(name, value); - if (nvp == NULL) { - nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - ERRNO_SET(nvl->nvl_error); - } else { - nvlist_move_nvpair(nvl, nvp); - } +#define NVLIST_ADD(vtype, type) \ +void \ +nvlist_add_##type(nvlist_t *nvl, const char *name, vtype value) \ +{ \ + nvpair_t *nvp; \ + \ + if (nvlist_error(nvl) != 0) { \ + ERRNO_SET(nvlist_error(nvl)); \ + return; \ + } \ + \ + nvp = nvpair_create_##type(name, value); \ + if (nvp == NULL) { \ + nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); \ + ERRNO_SET(nvl->nvl_error); \ + } else { \ + nvlist_move_nvpair(nvl, nvp); \ + } \ } +NVLIST_ADD(bool, bool) +NVLIST_ADD(uint64_t, number) +NVLIST_ADD(const char *, string) +NVLIST_ADD(const nvlist_t *, nvlist) #ifndef _KERNEL -void -nvlist_add_descriptor(nvlist_t *nvl, const char *name, int value) -{ - nvpair_t *nvp; - - if (nvlist_error(nvl) != 0) { - errno = nvlist_error(nvl); - return; - } - - nvp = nvpair_create_descriptor(name, value); - if (nvp == NULL) - nvl->nvl_error = errno = (errno != 0 ? errno : ENOMEM); - else - nvlist_move_nvpair(nvl, nvp); -} +NVLIST_ADD(int, descriptor); #endif -void -nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value, - size_t size) -{ - nvpair_t *nvp; - - if (nvlist_error(nvl) != 0) { - ERRNO_SET(nvlist_error(nvl)); - return; - } - - nvp = nvpair_create_binary(name, value, size); - if (nvp == NULL) { - nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM); - ERRNO_SET(nvl->nvl_error); - } else { - nvlist_move_nvpair(nvl, nvp); - } -} +#undef NVLIST_ADD void nvlist_move_nvpair(nvlist_t *nvl, nvpair_t *nvp) From owner-svn-src-head@FreeBSD.ORG Sat May 2 18:12:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3D09AF6; Sat, 2 May 2015 18:12:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2343139D; Sat, 2 May 2015 18:12:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42ICYP8010883; Sat, 2 May 2015 18:12:34 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42ICYaU010882; Sat, 2 May 2015 18:12:34 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201505021812.t42ICYaU010882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 2 May 2015 18:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282350 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 18:12:34 -0000 Author: oshogbo Date: Sat May 2 18:12:34 2015 New Revision: 282350 URL: https://svnweb.freebsd.org/changeset/base/282350 Log: nv_malloc can fail in userland. Add check to prevent a NULL pointer dereference. Pointed out by: mjg Approved by: pjd (mentor) Modified: head/sys/kern/subr_nvlist.c Modified: head/sys/kern/subr_nvlist.c ============================================================================== --- head/sys/kern/subr_nvlist.c Sat May 2 18:10:45 2015 (r282349) +++ head/sys/kern/subr_nvlist.c Sat May 2 18:12:34 2015 (r282350) @@ -129,6 +129,8 @@ nvlist_create(int flags) PJDLOG_ASSERT((flags & ~(NV_FLAG_PUBLIC_MASK)) == 0); nvl = nv_malloc(sizeof(*nvl)); + if (nvl == NULL) + return (NULL); nvl->nvl_error = 0; nvl->nvl_flags = flags; nvl->nvl_parent = NULL; From owner-svn-src-head@FreeBSD.ORG Sat May 2 19:07:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59A697E8; Sat, 2 May 2015 19:07:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47C59188C; Sat, 2 May 2015 19:07:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42J7oww036751; Sat, 2 May 2015 19:07:50 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42J7oN6036750; Sat, 2 May 2015 19:07:50 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201505021907.t42J7oN6036750@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 2 May 2015 19:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282351 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 19:07:50 -0000 Author: neel Date: Sat May 2 19:07:49 2015 New Revision: 282351 URL: https://svnweb.freebsd.org/changeset/base/282351 Log: Don't advertise the Intel SMX capability to the guest. Reported by: Leon Dang (ldang@nahannisys.com) MFC after: 1 week Modified: head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Sat May 2 18:12:34 2015 (r282350) +++ head/sys/amd64/vmm/x86.c Sat May 2 19:07:49 2015 (r282351) @@ -230,10 +230,11 @@ x86_emulate_cpuid(struct vm *vm, int vcp regs[1] |= (vcpu_id << CPUID_0000_0001_APICID_SHIFT); /* - * Don't expose VMX, SpeedStep or TME capability. + * Don't expose VMX, SpeedStep, TME or SMX capability. * Advertise x2APIC capability and Hypervisor guest. */ regs[2] &= ~(CPUID2_VMX | CPUID2_EST | CPUID2_TM2); + regs[2] &= ~(CPUID2_SMX); regs[2] |= CPUID2_HV; From owner-svn-src-head@FreeBSD.ORG Sat May 2 19:10:10 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F8CAA8D; Sat, 2 May 2015 19:10:10 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D3545195A; Sat, 2 May 2015 19:10:09 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t42JA0VY033978 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 2 May 2015 22:10:00 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t42JA0mx033977; Sat, 2 May 2015 22:10:00 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 2 May 2015 22:10:00 +0300 From: Gleb Smirnoff To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282280 - in head/sys/dev: e1000 ixgbe ixl Message-ID: <20150502191000.GE546@FreeBSD.org> References: <201504301823.t3UINd74073186@svn.freebsd.org> <1998053.shmPH6saZj@ralph.baldwin.cx> <20150501135134.GC546@FreeBSD.org> <2197979.EUYqekgM4M@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2197979.EUYqekgM4M@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 19:10:10 -0000 On Fri, May 01, 2015 at 10:47:43AM -0400, John Baldwin wrote: J> > J> > While you are here, let me remind you about this plan: J> > J> > J> > J> > https://lists.freebsd.org/pipermail/svn-src-head/2014-October/063575.html J> > J> > J> > J> > We can prototype the API to userland now, write down a utility that uses J> > J> > it, or add the functionality to an existing utility. And start with Intel J> > J> > drivers, that seem to be most interested in extra stats. J> > J> J> > J> So the importaing thing here is that if_get_counter() is still doing J> > J> per-ifnet stats. The stat you underlined above is per-queue instead. J> > J> We well need more explicitly knowledge of queues outside of drivers J> > J> and in the stack itself to support a generic framework for per-queue J> > J> stats. J> > J> > This depends on how generic we want the API to be. Of course, we can add J> > an extra argument to if_get_counter(). J> > J> > However, if we don't expect the number of queues to exceed a reasonable J> > number of 255 :), we can fit the functionality into existing API. J> > We can keep the queue number in the highest 8 bits of the ift_counter J> > parameter. J> > J> > #define IFCOUNTER_MASK 0x00ffffff J> > #define IFCOUNTER_QUEUE(c) ((c) >> 24) J> J> I'd prefer that expose queues more directly and figure out how to handle J> per-queue stats then (e.g. do we have some sort of driver-independent J> structure that each ifnet has 1 or more of that maps to a queue and has J> driver provided methods, etc. If so you could have a driver method for J> queue stats). Note that I did use if_get_counter to report the J> per-interface stats instead of adding a new sysctl. What do you prefer: an extra argument to the if_get_counter() or a extra ifop? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Sat May 2 20:14:44 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1290B8D; Sat, 2 May 2015 20:14:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F3E1108A; Sat, 2 May 2015 20:14:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42KEiLt072537; Sat, 2 May 2015 20:14:44 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42KEi24072536; Sat, 2 May 2015 20:14:44 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505022014.t42KEi24072536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 2 May 2015 20:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282352 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 20:14:44 -0000 Author: loos Date: Sat May 2 20:14:43 2015 New Revision: 282352 URL: https://svnweb.freebsd.org/changeset/base/282352 Log: Remove an unused variable. Modified: head/sys/arm/arm/machdep.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sat May 2 19:07:49 2015 (r282351) +++ head/sys/arm/arm/machdep.c Sat May 2 20:14:43 2015 (r282352) @@ -1055,7 +1055,6 @@ kenv_next(char *cp) static void print_kenv(void) { - int len; char *cp; debugf("loader passed (static) kenv:\n"); @@ -1065,7 +1064,6 @@ print_kenv(void) } debugf(" kern_envp = 0x%08x\n", (uint32_t)kern_envp); - len = 0; for (cp = kern_envp; cp != NULL; cp = kenv_next(cp)) debugf(" %x %s\n", (uint32_t)cp, cp); } From owner-svn-src-head@FreeBSD.ORG Sat May 2 20:27:38 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DFA7F9A; Sat, 2 May 2015 20:27:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BD3D1190; Sat, 2 May 2015 20:27:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42KRclA077996; Sat, 2 May 2015 20:27:38 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42KRcMT077995; Sat, 2 May 2015 20:27:38 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201505022027.t42KRcMT077995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sat, 2 May 2015 20:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282353 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 20:27:38 -0000 Author: glebius Date: Sat May 2 20:27:37 2015 New Revision: 282353 URL: https://svnweb.freebsd.org/changeset/base/282353 Log: Instead of reading, validating and adjusting value of the vm.swap_async_max in the main swapper work cycle, do it in the sysctl handler. This removes extra mutex acquisition from the main cycle and makes the sysctl knob return error on an invalid value, instead of accepting and fixing it. Reviewed by: kib Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sat May 2 20:14:43 2015 (r282352) +++ head/sys/vm/swap_pager.c Sat May 2 20:27:37 2015 (r282353) @@ -328,17 +328,16 @@ static int nsw_wcount_async; /* limit wr static int nsw_wcount_async_max;/* assigned maximum */ static int nsw_cluster_max; /* maximum VOP I/O allowed */ +static int sysctl_swap_async_max(SYSCTL_HANDLER_ARGS); +SYSCTL_PROC(_vm, OID_AUTO, swap_async_max, CTLTYPE_INT | CTLFLAG_RW, + NULL, 0, sysctl_swap_async_max, "I", "Maximum running async swap ops"); + static struct swblock **swhash; static int swhash_mask; static struct mtx swhash_mtx; -static int swap_async_max = 4; /* maximum in-progress async I/O's */ static struct sx sw_alloc_sx; - -SYSCTL_INT(_vm, OID_AUTO, swap_async_max, - CTLFLAG_RW, &swap_async_max, 0, "Maximum running async swap ops"); - /* * "named" and "unnamed" anon region objects. Try to reduce the overhead * of searching a named list by hashing it just a little. @@ -1350,39 +1349,6 @@ swap_pager_putpages(vm_object_t object, /* * Step 2 * - * Update nsw parameters from swap_async_max sysctl values. - * Do not let the sysop crash the machine with bogus numbers. - */ - mtx_lock(&pbuf_mtx); - if (swap_async_max != nsw_wcount_async_max) { - int n; - - /* - * limit range - */ - if ((n = swap_async_max) > nswbuf / 2) - n = nswbuf / 2; - if (n < 1) - n = 1; - swap_async_max = n; - - /* - * Adjust difference ( if possible ). If the current async - * count is too low, we may not be able to make the adjustment - * at this time. - */ - n -= nsw_wcount_async_max; - if (nsw_wcount_async + n >= 0) { - nsw_wcount_async += n; - nsw_wcount_async_max += n; - wakeup(&nsw_wcount_async); - } - } - mtx_unlock(&pbuf_mtx); - - /* - * Step 3 - * * Assign swap blocks and issue I/O. We reallocate swap on the fly. * The page is left dirty until the pageout operation completes * successfully. @@ -2835,3 +2801,40 @@ swaponvp(struct thread *td, struct vnode NODEV, 0); return (0); } + +static int +sysctl_swap_async_max(SYSCTL_HANDLER_ARGS) +{ + int error, new, n; + + new = nsw_wcount_async_max; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + if (new > nswbuf / 2 || new < 1) + return (EINVAL); + + mtx_lock(&pbuf_mtx); + while (nsw_wcount_async_max != new) { + /* + * Adjust difference. If the current async count is too low, + * we will need to sqeeze our update slowly in. Sleep with a + * higher priority than getpbuf() to finish faster. + */ + n = new - nsw_wcount_async_max; + if (nsw_wcount_async + n >= 0) { + nsw_wcount_async += n; + nsw_wcount_async_max += n; + wakeup(&nsw_wcount_async); + } else { + nsw_wcount_async_max -= nsw_wcount_async; + nsw_wcount_async = 0; + msleep(&nsw_wcount_async, &pbuf_mtx, PSWP, + "swpsysctl", 0); + } + } + mtx_unlock(&pbuf_mtx); + + return (0); +} From owner-svn-src-head@FreeBSD.ORG Sat May 2 20:31:29 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E92A19A; Sat, 2 May 2015 20:31:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8816F124B; Sat, 2 May 2015 20:31:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42KVTRf079609; Sat, 2 May 2015 20:31:29 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42KVSRv079600; Sat, 2 May 2015 20:31:28 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201505022031.t42KVSRv079600@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sat, 2 May 2015 20:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282354 - in head: sys/netinet6 usr.sbin/rtsold X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 20:31:29 -0000 Author: glebius Date: Sat May 2 20:31:27 2015 New Revision: 282354 URL: https://svnweb.freebsd.org/changeset/base/282354 Log: Remove #ifdef IFT_FOO. Submitted by: Guy Yur Modified: head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/usr.sbin/rtsold/if.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sat May 2 20:27:37 2015 (r282353) +++ head/sys/netinet6/in6.c Sat May 2 20:31:27 2015 (r282354) @@ -1997,18 +1997,9 @@ in6_if2idlen(struct ifnet *ifp) { switch (ifp->if_type) { case IFT_ETHER: /* RFC2464 */ -#ifdef IFT_PROPVIRTUAL case IFT_PROPVIRTUAL: /* XXX: no RFC. treat it as ether */ -#endif -#ifdef IFT_L2VLAN case IFT_L2VLAN: /* ditto */ -#endif -#ifdef IFT_IEEE80211 case IFT_IEEE80211: /* ditto */ -#endif -#ifdef IFT_MIP - case IFT_MIP: /* ditto */ -#endif case IFT_INFINIBAND: return (64); case IFT_FDDI: /* RFC2467 */ Modified: head/sys/netinet6/in6_ifattach.c ============================================================================== --- head/sys/netinet6/in6_ifattach.c Sat May 2 20:27:37 2015 (r282353) +++ head/sys/netinet6/in6_ifattach.c Sat May 2 20:31:27 2015 (r282354) @@ -274,9 +274,7 @@ found: case IFT_ISO88025: case IFT_ATM: case IFT_IEEE1394: -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif /* IEEE802/EUI64 cases - what others? */ /* IEEE1394 uses 16byte length address starting with EUI64 */ if (addrlen > 8) @@ -338,9 +336,7 @@ found: break; case IFT_GIF: -#ifdef IFT_STF case IFT_STF: -#endif /* * RFC2893 says: "SHOULD use IPv4 address as ifid source". * however, IPv4 address is not very suitable as unique Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Sat May 2 20:27:37 2015 (r282353) +++ head/sys/netinet6/nd6.c Sat May 2 20:31:27 2015 (r282354) @@ -2145,12 +2145,8 @@ nd6_need_cache(struct ifnet *ifp) case IFT_ETHER: case IFT_FDDI: case IFT_IEEE1394: -#ifdef IFT_L2VLAN case IFT_L2VLAN: -#endif -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif case IFT_INFINIBAND: case IFT_BRIDGE: case IFT_PROPVIRTUAL: @@ -2235,12 +2231,8 @@ nd6_storelladdr(struct ifnet *ifp, struc switch (ifp->if_type) { case IFT_ETHER: case IFT_FDDI: -#ifdef IFT_L2VLAN case IFT_L2VLAN: -#endif -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif case IFT_BRIDGE: case IFT_ISO88025: ETHER_MAP_IPV6_MULTICAST(&SIN6(dst)->sin6_addr, Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Sat May 2 20:27:37 2015 (r282353) +++ head/sys/netinet6/nd6_nbr.c Sat May 2 20:31:27 2015 (r282354) @@ -1149,12 +1149,8 @@ nd6_ifptomac(struct ifnet *ifp) case IFT_ETHER: case IFT_FDDI: case IFT_IEEE1394: -#ifdef IFT_L2VLAN case IFT_L2VLAN: -#endif -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif case IFT_INFINIBAND: case IFT_BRIDGE: case IFT_ISO88025: @@ -1549,9 +1545,7 @@ nd6_dad_duplicated(struct ifaddr *ifa, s case IFT_FDDI: case IFT_ATM: case IFT_IEEE1394: -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif case IFT_INFINIBAND: in6 = ia->ia_addr.sin6_addr; if (in6_get_hw_ifid(ifp, &in6) == 0 && Modified: head/usr.sbin/rtsold/if.c ============================================================================== --- head/usr.sbin/rtsold/if.c Sat May 2 20:27:37 2015 (r282353) +++ head/usr.sbin/rtsold/if.c Sat May 2 20:31:27 2015 (r282354) @@ -247,9 +247,7 @@ lladdropt_length(struct sockaddr_dl *sdl { switch (sdl->sdl_type) { case IFT_ETHER: -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif return (ROUNDUP8(ETHER_ADDR_LEN + 2)); default: return (0); @@ -265,9 +263,7 @@ lladdropt_fill(struct sockaddr_dl *sdl, switch (sdl->sdl_type) { case IFT_ETHER: -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif ndopt->nd_opt_len = (ROUNDUP8(ETHER_ADDR_LEN + 2)) >> 3; addr = (char *)(ndopt + 1); memcpy(addr, LLADDR(sdl), ETHER_ADDR_LEN); From owner-svn-src-head@FreeBSD.ORG Sat May 2 20:37:41 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 082CB40E; Sat, 2 May 2015 20:37:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA66C127C; Sat, 2 May 2015 20:37:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42Kbe73083138; Sat, 2 May 2015 20:37:40 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42KbeZo083137; Sat, 2 May 2015 20:37:40 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201505022037.t42KbeZo083137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sat, 2 May 2015 20:37:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282355 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 20:37:41 -0000 Author: glebius Date: Sat May 2 20:37:40 2015 New Revision: 282355 URL: https://svnweb.freebsd.org/changeset/base/282355 Log: After r281643 an #ifdef IFT_FOO preprocessor directive returns false, since types became a enum C type. Some software uses such ifdefs to determine whether an operating systems supports certain interface type. Of course, such check is bogus. E.g. FreeBSD defines about 250 interface types, but supports only around 20. However, we need not upset such software so provide a set of defines. The current set was taken to suffice the dhcpd. Reported & tested by: Guy Yur Modified: head/sys/net/if_types.h Modified: head/sys/net/if_types.h ============================================================================== --- head/sys/net/if_types.h Sat May 2 20:31:27 2015 (r282354) +++ head/sys/net/if_types.h Sat May 2 20:37:40 2015 (r282355) @@ -254,4 +254,20 @@ typedef enum { IFT_PFLOG = 0xf6, /* PF packet filter logging */ IFT_PFSYNC = 0xf7, /* PF packet filter synchronization */ } ifType; + +/* + * Some (broken) software uses #ifdef IFT_TYPE to check whether + * an operating systems supports certain interface type. Lack of + * ifdef leads to a piece of functionality compiled out. + */ +#ifndef BURN_BRIDGES +#define IFT_BRIDGE IFT_BRIDGE +#define IFT_PPP IFT_PPP +#define IFT_PROPVIRTUAL IFT_PROPVIRTUAL +#define IFT_L2VLAN IFT_L2VLAN +#define IFT_L3IPVLAN IFT_L3IPVLAN +#define IFT_IEEE1394 IFT_IEEE1394 +#define IFT_INFINIBAND IFT_INFINIBAND +#endif + #endif /* !_NET_IF_TYPES_H_ */ From owner-svn-src-head@FreeBSD.ORG Sat May 2 20:41:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4635E594; Sat, 2 May 2015 20:41:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34D7B133A; Sat, 2 May 2015 20:41:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42KfoKI087267; Sat, 2 May 2015 20:41:50 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42KfoqU087266; Sat, 2 May 2015 20:41:50 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505022041.t42KfoqU087266@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 2 May 2015 20:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282356 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 20:41:50 -0000 Author: loos Date: Sat May 2 20:41:49 2015 New Revision: 282356 URL: https://svnweb.freebsd.org/changeset/base/282356 Log: Fix the kernel ident for RPI2. Modified: head/sys/arm/conf/RPI2 Modified: head/sys/arm/conf/RPI2 ============================================================================== --- head/sys/arm/conf/RPI2 Sat May 2 20:37:40 2015 (r282355) +++ head/sys/arm/conf/RPI2 Sat May 2 20:41:49 2015 (r282356) @@ -1,5 +1,5 @@ # -# RPI-B -- Custom configuration for the Raspberry Pi +# RPI2 -- Custom configuration for the Raspberry Pi 2 # # For more information on this file, please read the config(5) manual page, # and/or the handbook section on Kernel Configuration Files: @@ -18,7 +18,7 @@ # # $FreeBSD$ -ident RPI-B +ident RPI2 include "../broadcom/bcm2835/std.rpi" include "../broadcom/bcm2835/std.bcm2836" From owner-svn-src-head@FreeBSD.ORG Sat May 2 22:24:34 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE5208CF; Sat, 2 May 2015 22:24:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEE191E6B; Sat, 2 May 2015 22:24:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42MOYZm036946; Sat, 2 May 2015 22:24:34 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42MOYM8036944; Sat, 2 May 2015 22:24:34 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505022224.t42MOYM8036944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 2 May 2015 22:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282357 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 22:24:35 -0000 Author: loos Date: Sat May 2 22:24:33 2015 New Revision: 282357 URL: https://svnweb.freebsd.org/changeset/base/282357 Log: Add the routines to query and setup the framebuffer state using the BCM2835_MBOX_CHAN_PROP channel. The old channel (BCM2835_MBOX_CHAN_FB) seems deprecated on recent firmware versions and is causing a freeze on RPi 2. The actual changes in the framebuffer drivers will follow in subsequent commits. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat May 2 20:41:49 2015 (r282356) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat May 2 22:24:33 2015 (r282357) @@ -318,6 +318,47 @@ bcm2835_mbox_init_dma(device_t dev, size return (buf); } +static int +bcm2835_mbox_err(device_t dev, bus_addr_t msg_phys, uint32_t resp_phys, + struct bcm2835_mbox_hdr *msg, size_t len) +{ + int idx; + struct bcm2835_mbox_tag_hdr *tag; + uint8_t *last; + + if ((uint32_t)msg_phys != resp_phys) { + device_printf(dev, "response channel mismatch\n"); + return (EIO); + } + if (msg->code != BCM2835_MBOX_CODE_RESP_SUCCESS) { + device_printf(dev, "mbox response error\n"); + return (EIO); + } + + /* Loop until the end tag. */ + tag = (struct bcm2835_mbox_tag_hdr *)(msg + 1); + last = (uint8_t *)msg + len; + for (idx = 0; tag->tag != 0; idx++) { + if ((tag->val_len & BCM2835_MBOX_TAG_VAL_LEN_RESPONSE) == 0) { + device_printf(dev, "tag %d response error\n", idx); + return (EIO); + } + /* Clear the response bit. */ + tag->val_len &= ~BCM2835_MBOX_TAG_VAL_LEN_RESPONSE; + + /* Next tag. */ + tag = (struct bcm2835_mbox_tag_hdr *)((uint8_t *)tag + + sizeof(*tag) + tag->val_buf_size); + + if ((uint8_t *)tag > last) { + device_printf(dev, "mbox buffer size error\n"); + return (EIO); + } + } + + return (0); +} + int bcm2835_mbox_set_power_state(device_t dev, uint32_t device_id, boolean_t on) { @@ -413,3 +454,136 @@ bcm2835_mbox_get_clock_rate(device_t dev return (0); } + +int +bcm2835_mbox_fb_get_w_h(device_t dev, struct bcm2835_fb_config *fb) +{ + device_t mbox; + int err; + bus_dma_tag_t msg_tag; + bus_dmamap_t msg_map; + bus_addr_t msg_phys; + struct msg_fb_get_w_h *msg; + uint32_t reg; + + /* get mbox device */ + mbox = devclass_get_device(devclass_find("mbox"), 0); + if (mbox == NULL) { + device_printf(dev, "can't find mbox\n"); + return (ENXIO); + } + + /* Allocate memory for the message */ + msg = bcm2835_mbox_init_dma(dev, sizeof(*msg), &msg_tag, &msg_map, + &msg_phys); + if (msg == NULL) + return (ENOMEM); + + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + BCM2835_MBOX_INIT_TAG(&msg->physical_w_h, GET_PHYSICAL_W_H); + msg->physical_w_h.tag_hdr.val_len = 0; + BCM2835_MBOX_INIT_TAG(&msg->virtual_w_h, GET_VIRTUAL_W_H); + msg->virtual_w_h.tag_hdr.val_len = 0; + BCM2835_MBOX_INIT_TAG(&msg->offset, GET_VIRTUAL_OFFSET); + msg->offset.tag_hdr.val_len = 0; + msg->end_tag = 0; + + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREWRITE); + MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)msg_phys); + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTWRITE); + + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREREAD); + MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTREAD); + + err = bcm2835_mbox_err(dev, msg_phys, reg, &msg->hdr, sizeof(*msg)); + if (err == 0) { + fb->xres = msg->physical_w_h.body.resp.width; + fb->yres = msg->physical_w_h.body.resp.height; + fb->vxres = msg->virtual_w_h.body.resp.width; + fb->vyres = msg->virtual_w_h.body.resp.height; + fb->xoffset = msg->offset.body.resp.x; + fb->yoffset = msg->offset.body.resp.y; + } + + bus_dmamap_unload(msg_tag, msg_map); + bus_dmamem_free(msg_tag, msg, msg_map); + bus_dma_tag_destroy(msg_tag); + + return (err); +} + +int +bcm2835_mbox_fb_init(device_t dev, struct bcm2835_fb_config *fb) +{ + device_t mbox; + int err; + bus_dma_tag_t msg_tag; + bus_dmamap_t msg_map; + bus_addr_t msg_phys; + struct msg_fb_setup *msg; + uint32_t reg; + + /* get mbox device */ + mbox = devclass_get_device(devclass_find("mbox"), 0); + if (mbox == NULL) { + device_printf(dev, "can't find mbox\n"); + return (ENXIO); + } + + /* Allocate memory for the message */ + msg = bcm2835_mbox_init_dma(dev, sizeof(*msg), &msg_tag, &msg_map, + &msg_phys); + if (msg == NULL) + return (ENOMEM); + + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + BCM2835_MBOX_INIT_TAG(&msg->physical_w_h, SET_PHYSICAL_W_H); + msg->physical_w_h.body.req.width = fb->xres; + msg->physical_w_h.body.req.height = fb->yres; + BCM2835_MBOX_INIT_TAG(&msg->virtual_w_h, SET_VIRTUAL_W_H); + msg->virtual_w_h.body.req.width = fb->vxres; + msg->virtual_w_h.body.req.height = fb->vyres; + BCM2835_MBOX_INIT_TAG(&msg->offset, GET_VIRTUAL_OFFSET); + msg->offset.body.req.x = fb->xoffset; + msg->offset.body.req.y = fb->yoffset; + BCM2835_MBOX_INIT_TAG(&msg->depth, SET_DEPTH); + msg->depth.body.req.bpp = fb->bpp; + BCM2835_MBOX_INIT_TAG(&msg->alpha, SET_ALPHA_MODE); + msg->alpha.body.req.alpha = BCM2835_MBOX_ALPHA_MODE_IGNORED; + BCM2835_MBOX_INIT_TAG(&msg->buffer, ALLOCATE_BUFFER); + msg->buffer.body.req.alignment = PAGE_SIZE; + BCM2835_MBOX_INIT_TAG(&msg->pitch, GET_PITCH); + msg->end_tag = 0; + + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREWRITE); + MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)msg_phys); + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTWRITE); + + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_PREREAD); + MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, ®); + bus_dmamap_sync(msg_tag, msg_map, BUS_DMASYNC_POSTREAD); + + err = bcm2835_mbox_err(dev, msg_phys, reg, &msg->hdr, sizeof(*msg)); + if (err == 0) { + fb->xres = msg->physical_w_h.body.resp.width; + fb->yres = msg->physical_w_h.body.resp.height; + fb->vxres = msg->virtual_w_h.body.resp.width; + fb->vyres = msg->virtual_w_h.body.resp.height; + fb->xoffset = msg->offset.body.resp.x; + fb->yoffset = msg->offset.body.resp.y; + fb->pitch = msg->pitch.body.resp.pitch; + fb->base = msg->buffer.body.resp.fb_address; + fb->size = msg->buffer.body.resp.fb_size; + } + + bus_dmamap_unload(msg_tag, msg_map); + bus_dmamem_free(msg_tag, msg, msg_map); + bus_dma_tag_destroy(msg_tag); + + return (err); +} Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Sat May 2 20:41:49 2015 (r282356) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h Sat May 2 22:24:33 2015 (r282357) @@ -52,6 +52,12 @@ struct bcm2835_mbox_tag_hdr { uint32_t val_len; }; +#define BCM2835_MBOX_INIT_TAG(tag_, tagid_) do { \ + (tag_)->tag_hdr.tag = BCM2835_MBOX_TAG_##tagid_; \ + (tag_)->tag_hdr.val_buf_size = sizeof((tag_)->body); \ + (tag_)->tag_hdr.val_len = sizeof((tag_)->body.req); \ +} while (0) + #define BCM2835_MBOX_POWER_ID_EMMC 0x00000000 #define BCM2835_MBOX_POWER_ID_UART0 0x00000001 #define BCM2835_MBOX_POWER_ID_UART1 0x00000002 @@ -322,4 +328,151 @@ struct msg_get_max_temperature { uint32_t end_tag; }; +#define BCM2835_MBOX_TAG_GET_PHYSICAL_W_H 0x00040003 +#define BCM2835_MBOX_TAG_SET_PHYSICAL_W_H 0x00048003 +#define BCM2835_MBOX_TAG_GET_VIRTUAL_W_H 0x00040004 +#define BCM2835_MBOX_TAG_SET_VIRTUAL_W_H 0x00048004 + +struct bcm2835_mbox_tag_fb_w_h { + struct bcm2835_mbox_tag_hdr tag_hdr; + union { + struct { + uint32_t width; + uint32_t height; + } req; + struct { + uint32_t width; + uint32_t height; + } resp; + } body; +}; + +#define BCM2835_MBOX_TAG_GET_DEPTH 0x00040005 +#define BCM2835_MBOX_TAG_SET_DEPTH 0x00048005 + +struct bcm2835_mbox_tag_depth { + struct bcm2835_mbox_tag_hdr tag_hdr; + union { + struct { + uint32_t bpp; + } req; + struct { + uint32_t bpp; + } resp; + } body; +}; + +#define BCM2835_MBOX_TAG_GET_ALPHA_MODE 0x00040007 +#define BCM2835_MBOX_TAG_SET_ALPHA_MODE 0x00048007 + +#define BCM2835_MBOX_ALPHA_MODE_0_OPAQUE 0 +#define BCM2835_MBOX_ALPHA_MODE_0_TRANSPARENT 1 +#define BCM2835_MBOX_ALPHA_MODE_IGNORED 2 + +struct bcm2835_mbox_tag_alpha_mode { + struct bcm2835_mbox_tag_hdr tag_hdr; + union { + struct { + uint32_t alpha; + } req; + struct { + uint32_t alpha; + } resp; + } body; +}; + +#define BCM2835_MBOX_TAG_GET_VIRTUAL_OFFSET 0x00040009 +#define BCM2835_MBOX_TAG_SET_VIRTUAL_OFFSET 0x00048009 + +struct bcm2835_mbox_tag_virtual_offset { + struct bcm2835_mbox_tag_hdr tag_hdr; + union { + struct { + uint32_t x; + uint32_t y; + } req; + struct { + uint32_t x; + uint32_t y; + } resp; + } body; +}; + +#define BCM2835_MBOX_TAG_GET_PITCH 0x00040008 + +struct bcm2835_mbox_tag_pitch { + struct bcm2835_mbox_tag_hdr tag_hdr; + union { + struct { + } req; + struct { + uint32_t pitch; + } resp; + } body; +}; + +#define BCM2835_MBOX_TAG_ALLOCATE_BUFFER 0x00040001 + +struct bcm2835_mbox_tag_allocate_buffer { + struct bcm2835_mbox_tag_hdr tag_hdr; + union { + struct { + uint32_t alignment; + } req; + struct { + uint32_t fb_address; + uint32_t fb_size; + } resp; + } body; +}; + +#define BCM2835_MBOX_TAG_RELEASE_BUFFER 0x00048001 + +struct bcm2835_mbox_tag_release_buffer { + struct bcm2835_mbox_tag_hdr tag_hdr; + union { + struct { + } req; + struct { + } resp; + } body; +}; + +struct bcm2835_fb_config { + uint32_t xres; + uint32_t yres; + uint32_t vxres; + uint32_t vyres; + uint32_t xoffset; + uint32_t yoffset; + uint32_t bpp; + uint32_t pitch; + uint32_t base; + uint32_t size; +}; + +struct msg_fb_get_w_h { + struct bcm2835_mbox_hdr hdr; + struct bcm2835_mbox_tag_fb_w_h physical_w_h; + struct bcm2835_mbox_tag_fb_w_h virtual_w_h; + struct bcm2835_mbox_tag_virtual_offset offset; + uint32_t end_tag; +}; + +int bcm2835_mbox_fb_get_w_h(device_t, struct bcm2835_fb_config *); + +struct msg_fb_setup { + struct bcm2835_mbox_hdr hdr; + struct bcm2835_mbox_tag_fb_w_h physical_w_h; + struct bcm2835_mbox_tag_fb_w_h virtual_w_h; + struct bcm2835_mbox_tag_virtual_offset offset; + struct bcm2835_mbox_tag_depth depth; + struct bcm2835_mbox_tag_alpha_mode alpha; + struct bcm2835_mbox_tag_allocate_buffer buffer; + struct bcm2835_mbox_tag_pitch pitch; + uint32_t end_tag; +}; + +int bcm2835_mbox_fb_init(device_t, struct bcm2835_fb_config *); + #endif /* _BCM2835_MBOX_PROP_H_ */ From owner-svn-src-head@FreeBSD.ORG Sat May 2 22:40:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B153B26; Sat, 2 May 2015 22:40:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 187261023; Sat, 2 May 2015 22:40:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42Megbs042620; Sat, 2 May 2015 22:40:42 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42MegcH042619; Sat, 2 May 2015 22:40:42 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505022240.t42MegcH042619@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 2 May 2015 22:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282358 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 22:40:42 -0000 Author: loos Date: Sat May 2 22:40:41 2015 New Revision: 282358 URL: https://svnweb.freebsd.org/changeset/base/282358 Log: Fix the sc(4) framebuffer driver on RPi 2. Use the BCM2835_MBOX_CHAN_PROP mbox channel to setup the framebuffer, remove unused code and unnecessary includes. Adjust the color palette when bcm2708_fb.fbswap is set on /chosen/bootargs node of DTB. The firmware used on RPi 2 uses this mode. Tested on: RPi-B and RPi 2 with 16, 24 and 32bpp Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Sat May 2 22:24:33 2015 (r282357) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Sat May 2 22:40:41 2015 (r282358) @@ -29,46 +29,27 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include -#include +#include +#include +#include #include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include +#include +#include +#include #include #include #include - -#include #include -#include -#include +#include #include "mbox_if.h" -#define BCMFB_FONT_HEIGHT 16 - struct argb { uint8_t a; uint8_t r; @@ -101,40 +82,15 @@ static u_char mouse_pointer[16] = { 0x0c, 0x0c, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00 }; -#define FB_WIDTH 640 -#define FB_HEIGHT 480 -#define FB_DEPTH 24 - -struct bcm_fb_config { - uint32_t xres; - uint32_t yres; - uint32_t vxres; - uint32_t vyres; - uint32_t pitch; - uint32_t bpp; - uint32_t xoffset; - uint32_t yoffset; - /* Filled by videocore */ - uint32_t base; - uint32_t screen_size; -}; +#define BCMFB_FONT_HEIGHT 16 +#define BCMFB_FONT_WIDTH 8 +#define FB_WIDTH 640 +#define FB_HEIGHT 480 +#define FB_DEPTH 24 struct bcmsc_softc { - device_t dev; - struct cdev * cdev; - struct mtx mtx; - bus_dma_tag_t dma_tag; - bus_dmamap_t dma_map; - struct bcm_fb_config* fb_config; - bus_addr_t fb_config_phys; - struct intr_config_hook init_hook; - -}; - -struct video_adapter_softc { /* Videoadpater part */ video_adapter_t va; - int console; intptr_t fb_addr; intptr_t fb_paddr; @@ -149,199 +105,75 @@ struct video_adapter_softc { unsigned int ymargin; unsigned char *font; + int fbswap; int initialized; }; -static struct bcmsc_softc *bcmsc_softc; -static struct video_adapter_softc va_softc; - -#define bcm_fb_lock(_sc) mtx_lock(&(_sc)->mtx) -#define bcm_fb_unlock(_sc) mtx_unlock(&(_sc)->mtx) -#define bcm_fb_lock_assert(sc) mtx_assert(&(_sc)->mtx, MA_OWNED) +static struct bcmsc_softc bcmsc; static int bcm_fb_probe(device_t); static int bcm_fb_attach(device_t); -static void bcm_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err); static void bcmfb_update_margins(video_adapter_t *adp); static int bcmfb_configure(int); -static void -bcm_fb_init(void *arg) -{ - struct bcmsc_softc *sc = arg; - struct video_adapter_softc *va_sc = &va_softc; - int err; - volatile struct bcm_fb_config* fb_config = sc->fb_config; - phandle_t node; - pcell_t cell; - device_t mbox; - - node = ofw_bus_get_node(sc->dev); - - fb_config->xres = 0; - fb_config->yres = 0; - fb_config->bpp = 0; - - if ((OF_getprop(node, "broadcom,width", &cell, sizeof(cell))) > 0) - fb_config->xres = (int)fdt32_to_cpu(cell); - if (fb_config->xres == 0) - fb_config->xres = FB_WIDTH; - - if ((OF_getprop(node, "broadcom,height", &cell, sizeof(cell))) > 0) - fb_config->yres = (uint32_t)fdt32_to_cpu(cell); - if (fb_config->yres == 0) - fb_config->yres = FB_HEIGHT; - - if ((OF_getprop(node, "broadcom,depth", &cell, sizeof(cell))) > 0) - fb_config->bpp = (uint32_t)fdt32_to_cpu(cell); - if (fb_config->bpp == 0) - fb_config->bpp = FB_DEPTH; - - fb_config->vxres = 0; - fb_config->vyres = 0; - fb_config->xoffset = 0; - fb_config->yoffset = 0; - fb_config->base = 0; - fb_config->pitch = 0; - fb_config->screen_size = 0; - - bus_dmamap_sync(sc->dma_tag, sc->dma_map, - BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); - - mbox = devclass_get_device(devclass_find("mbox"), 0); - if (mbox) { - MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_FB, sc->fb_config_phys); - MBOX_READ(mbox, BCM2835_MBOX_CHAN_FB, &err); - } - bus_dmamap_sync(sc->dma_tag, sc->dma_map, - BUS_DMASYNC_POSTREAD); - - if (fb_config->base != 0) { - device_printf(sc->dev, "%dx%d(%dx%d@%d,%d) %dbpp\n", - fb_config->xres, fb_config->yres, - fb_config->vxres, fb_config->vyres, - fb_config->xoffset, fb_config->yoffset, - fb_config->bpp); - - - device_printf(sc->dev, "pitch %d, base 0x%08x, screen_size %d\n", - fb_config->pitch, fb_config->base, - fb_config->screen_size); - - va_sc->fb_addr = (intptr_t)pmap_mapdev(fb_config->base, fb_config->screen_size); - va_sc->fb_paddr = fb_config->base; - va_sc->fb_size = fb_config->screen_size; - va_sc->depth = fb_config->bpp; - va_sc->stride = fb_config->pitch; - - va_sc->width = fb_config->xres; - va_sc->height = fb_config->yres; - bcmfb_update_margins(&va_sc->va); - } - else { - device_printf(sc->dev, "Failed to set framebuffer info\n"); - } - - config_intrhook_disestablish(&sc->init_hook); -} - static int bcm_fb_probe(device_t dev) { - int error = 0; + int error; if (!ofw_bus_is_compatible(dev, "broadcom,bcm2835-fb")) return (ENXIO); - device_set_desc(dev, "BCM2835 framebuffer device"); - error = sc_probe_unit(device_get_unit(dev), device_get_flags(dev) | SC_AUTODETECT_KBD); if (error != 0) return (error); - return (BUS_PROBE_DEFAULT); } static int bcm_fb_attach(device_t dev) { - struct bcmsc_softc *sc = device_get_softc(dev); - int dma_size = sizeof(struct bcm_fb_config); - int err; - - if (bcmsc_softc) - return (ENXIO); + struct bcm2835_fb_config fb; + struct bcmsc_softc *sc; - bcmsc_softc = sc; + sc = (struct bcmsc_softc *)vid_get_adapter(vid_find_adapter( + "bcmfb", 0)); + if (sc != NULL) + device_set_softc(dev, sc); + else + sc = device_get_softc(dev); - sc->dev = dev; - mtx_init(&sc->mtx, "bcm2835fb", "fb", MTX_DEF); - - err = bus_dma_tag_create( - bus_get_dma_tag(sc->dev), - PAGE_SIZE, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - dma_size, 1, /* maxsize, nsegments */ - dma_size, 0, /* maxsegsize, flags */ - NULL, NULL, /* lockfunc, lockarg */ - &sc->dma_tag); - - err = bus_dmamem_alloc(sc->dma_tag, (void **)&sc->fb_config, - 0, &sc->dma_map); - if (err) { - device_printf(dev, "cannot allocate framebuffer\n"); - goto fail; - } - - err = bus_dmamap_load(sc->dma_tag, sc->dma_map, sc->fb_config, - dma_size, bcm_fb_dmamap_cb, &sc->fb_config_phys, BUS_DMA_NOWAIT); - - if (err) { - device_printf(dev, "cannot load DMA map\n"); - goto fail; - } + memset(&fb, 0, sizeof(fb)); + if (bcm2835_mbox_fb_get_w_h(dev, &fb) != 0) + return (ENXIO); + fb.bpp = FB_DEPTH; + if (bcm2835_mbox_fb_init(dev, &fb) != 0) + return (ENXIO); - err = (sc_attach_unit(device_get_unit(dev), - device_get_flags(dev) | SC_AUTODETECT_KBD)); + sc->fb_addr = (intptr_t)pmap_mapdev(fb.base, fb.size); + sc->fb_paddr = fb.base; + sc->fb_size = fb.size; + sc->depth = fb.bpp; + sc->stride = fb.pitch; + sc->width = fb.xres; + sc->height = fb.yres; + bcmfb_update_margins(&sc->va); - if (err) { + if (sc_attach_unit(device_get_unit(dev), + device_get_flags(dev) | SC_AUTODETECT_KBD) != 0) { device_printf(dev, "failed to attach syscons\n"); - goto fail; + return (ENXIO); } - /* - * We have to wait until interrupts are enabled. - * Mailbox relies on it to get data from VideoCore - */ - sc->init_hook.ich_func = bcm_fb_init; - sc->init_hook.ich_arg = sc; - - if (config_intrhook_establish(&sc->init_hook) != 0) { - device_printf(dev, "failed to establish intrhook\n"); - return (ENOMEM); - } + device_printf(dev, "%dx%d(%dx%d@%d,%d) %dbpp\n", fb.xres, fb.yres, + fb.vxres, fb.vyres, fb.xoffset, fb.yoffset, fb.bpp); + device_printf(dev, + "fbswap: %d, pitch %d, base 0x%08x, screen_size %d\n", + sc->fbswap, fb.pitch, fb.base, fb.size); return (0); - -fail: - return (ENXIO); -} - - -static void -bcm_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) -{ - bus_addr_t *addr; - - if (err) - return; - - addr = (bus_addr_t*)arg; - *addr = PHYS_TO_VCBUS(segs[0].ds_addr); } static device_method_t bcm_fb_methods[] = { @@ -504,13 +336,13 @@ bcmrend_set_cursor(scr_stat* scp, int ba static void bcmrend_draw_cursor(scr_stat* scp, int off, int blink, int on, int flip) { - video_adapter_t* adp = scp->sc->adp; - struct video_adapter_softc *sc; - int row, col; + int bytes, col, i, j, row; + struct bcmsc_softc *sc; uint8_t *addr; - int i, j, bytes; + video_adapter_t *adp; - sc = (struct video_adapter_softc *)adp; + adp = scp->sc->adp; + sc = (struct bcmsc_softc *)adp; if (scp->curs_attr.height <= 0) return; @@ -529,8 +361,7 @@ bcmrend_draw_cursor(scr_stat* scp, int o + (row + sc->ymargin)*(sc->stride) + (sc->depth/8) * (col + sc->xmargin); - bytes = sc->depth/8; - + bytes = sc->depth / 8; /* our cursor consists of simply inverting the char under it */ for (i = 0; i < adp->va_info.vi_cheight; i++) { for (j = 0; j < adp->va_info.vi_cwidth; j++) { @@ -577,56 +408,80 @@ extern u_char dflt_font_16[]; static void bcmfb_update_margins(video_adapter_t *adp) { - struct video_adapter_softc *sc; + struct bcmsc_softc *sc; video_info_t *vi; - sc = (struct video_adapter_softc *)adp; + sc = (struct bcmsc_softc *)adp; vi = &adp->va_info; sc->xmargin = (sc->width - (vi->vi_width * vi->vi_cwidth)) / 2; - sc->ymargin = (sc->height - (vi->vi_height * vi->vi_cheight))/2; + sc->ymargin = (sc->height - (vi->vi_height * vi->vi_cheight)) / 2; } static int bcmfb_configure(int flags) { - struct video_adapter_softc *va_sc; - - va_sc = &va_softc; - phandle_t display, root; + char bootargs[2048], *n, *p, *v; pcell_t cell; + phandle_t chosen, display, root; + struct bcmsc_softc *sc; - if (va_sc->initialized) + sc = &bcmsc; + if (sc->initialized) return (0); - va_sc->width = 0; - va_sc->height = 0; + sc->width = 0; + sc->height = 0; /* * It seems there is no way to let syscons framework know * that framebuffer resolution has changed. So just try - * to fetch data from FDT and go with defaults if failed + * to fetch data from FDT bootargs, FDT display data and + * finally go with defaults if everything else has failed. */ + chosen = OF_finddevice("/chosen"); + if (chosen != 0 && + OF_getprop(chosen, "bootargs", &bootargs, sizeof(bootargs)) > 0) { + p = bootargs; + while ((v = strsep(&p, " ")) != NULL) { + if (*v == '\0') + continue; + n = strsep(&v, "="); + if (strcmp(n, "bcm2708_fb.fbwidth") == 0 && v != NULL) + sc->width = (unsigned int)strtol(v, NULL, 0); + else if (strcmp(n, "bcm2708_fb.fbheight") == 0 && + v != NULL) + sc->height = (unsigned int)strtol(v, NULL, 0); + else if (strcmp(n, "bcm2708_fb.fbswap") == 0 && + v != NULL) + if (*v == '1') + sc->fbswap = 1; + } + } + root = OF_finddevice("/"); if ((root != 0) && (display = fdt_find_compatible(root, "broadcom,bcm2835-fb", 1))) { - if ((OF_getprop(display, "broadcom,width", - &cell, sizeof(cell))) > 0) - va_sc->width = (int)fdt32_to_cpu(cell); - - if ((OF_getprop(display, "broadcom,height", - &cell, sizeof(cell))) > 0) - va_sc->height = (int)fdt32_to_cpu(cell); - } + if (sc->width == 0) { + if ((OF_getprop(display, "broadcom,width", + &cell, sizeof(cell))) > 0) + sc->width = (int)fdt32_to_cpu(cell); + } - if (va_sc->width == 0) - va_sc->width = FB_WIDTH; - if (va_sc->height == 0) - va_sc->height = FB_HEIGHT; + if (sc->height == 0) { + if ((OF_getprop(display, "broadcom,height", + &cell, sizeof(cell))) > 0) + sc->height = (int)fdt32_to_cpu(cell); + } + } - bcmfb_init(0, &va_sc->va, 0); + if (sc->width == 0) + sc->width = FB_WIDTH; + if (sc->height == 0) + sc->height = FB_HEIGHT; - va_sc->initialized = 1; + bcmfb_init(0, &sc->va, 0); + sc->initialized = 1; return (0); } @@ -641,20 +496,19 @@ bcmfb_probe(int unit, video_adapter_t ** static int bcmfb_init(int unit, video_adapter_t *adp, int flags) { - struct video_adapter_softc *sc; + struct bcmsc_softc *sc; video_info_t *vi; - sc = (struct video_adapter_softc *)adp; + sc = (struct bcmsc_softc *)adp; vi = &adp->va_info; vid_init_struct(adp, "bcmfb", -1, unit); sc->font = dflt_font_16; vi->vi_cheight = BCMFB_FONT_HEIGHT; - vi->vi_cwidth = 8; - - vi->vi_width = sc->width/8; - vi->vi_height = sc->height/vi->vi_cheight; + vi->vi_cwidth = BCMFB_FONT_WIDTH; + vi->vi_width = sc->width / vi->vi_cwidth; + vi->vi_height = sc->height / vi->vi_cheight; /* * Clamp width/height to syscons maximums @@ -665,8 +519,7 @@ bcmfb_init(int unit, video_adapter_t *ad vi->vi_height = ROW; sc->xmargin = (sc->width - (vi->vi_width * vi->vi_cwidth)) / 2; - sc->ymargin = (sc->height - (vi->vi_height * vi->vi_cheight))/2; - + sc->ymargin = (sc->height - (vi->vi_height * vi->vi_cheight)) / 2; adp->va_window = (vm_offset_t) bcmfb_static_window; adp->va_flags |= V_ADP_FONT /* | V_ADP_COLOR | V_ADP_MODECHANGE */; @@ -706,8 +559,9 @@ static int bcmfb_load_font(video_adapter_t *adp, int page, int size, int width, u_char *data, int c, int count) { - struct video_adapter_softc *sc = (struct video_adapter_softc *)adp; + struct bcmsc_softc *sc; + sc = (struct bcmsc_softc *)adp; sc->font = data; return (0); @@ -780,9 +634,9 @@ static int bcmfb_blank_display(video_adapter_t *adp, int mode) { - struct video_adapter_softc *sc; + struct bcmsc_softc *sc; - sc = (struct video_adapter_softc *)adp; + sc = (struct bcmsc_softc *)adp; if (sc && sc->fb_addr) memset((void*)sc->fb_addr, 0, sc->fb_size); @@ -793,9 +647,9 @@ static int bcmfb_mmap(video_adapter_t *adp, vm_ooffset_t offset, vm_paddr_t *paddr, int prot, vm_memattr_t *memattr) { - struct video_adapter_softc *sc; + struct bcmsc_softc *sc; - sc = (struct video_adapter_softc *)adp; + sc = (struct bcmsc_softc *)adp; /* * This might be a legacy VGA mem request: if so, just point it at the @@ -812,10 +666,10 @@ bcmfb_mmap(video_adapter_t *adp, vm_ooff static int bcmfb_ioctl(video_adapter_t *adp, u_long cmd, caddr_t data) { - struct video_adapter_softc *sc; + struct bcmsc_softc *sc; struct fbtype *fb; - sc = (struct video_adapter_softc *)adp; + sc = (struct bcmsc_softc *)adp; switch (cmd) { case FBIOGTYPE: @@ -897,16 +751,13 @@ bcmfb_putp(video_adapter_t *adp, vm_offs static int bcmfb_putc(video_adapter_t *adp, vm_offset_t off, uint8_t c, uint8_t a) { - struct video_adapter_softc *sc; - int row; - int col; - int i, j, k; - uint8_t *addr; + int bytes, col, i, j, k, row; + struct bcmsc_softc *sc; u_char *p; - uint8_t fg, bg, color; + uint8_t *addr, fg, bg, color; uint16_t rgb; - sc = (struct video_adapter_softc *)adp; + sc = (struct bcmsc_softc *)adp; if (sc->fb_addr == 0) return (0); @@ -921,6 +772,7 @@ bcmfb_putc(video_adapter_t *adp, vm_offs fg = a & 0xf ; bg = (a >> 4) & 0xf; + bytes = sc->depth / 8; for (i = 0; i < BCMFB_FONT_HEIGHT; i++) { for (j = 0, k = 7; j < 8; j++, k--) { if ((p[i] & (1 << k)) == 0) @@ -930,22 +782,32 @@ bcmfb_putc(video_adapter_t *adp, vm_offs switch (sc->depth) { case 32: - addr[4*j+0] = bcmfb_palette[color].r; - addr[4*j+1] = bcmfb_palette[color].g; - addr[4*j+2] = bcmfb_palette[color].b; - addr[4*j+3] = bcmfb_palette[color].a; - break; case 24: - addr[3*j] = bcmfb_palette[color].r; - addr[3*j+1] = bcmfb_palette[color].g; - addr[3*j+2] = bcmfb_palette[color].b; + if (sc->fbswap) { + addr[bytes * j + 0] = + bcmfb_palette[color].b; + addr[bytes * j + 1] = + bcmfb_palette[color].g; + addr[bytes * j + 2] = + bcmfb_palette[color].r; + } else { + addr[bytes * j + 0] = + bcmfb_palette[color].r; + addr[bytes * j + 1] = + bcmfb_palette[color].g; + addr[bytes * j + 2] = + bcmfb_palette[color].b; + } + if (sc->depth == 32) + addr[bytes * j + 3] = + bcmfb_palette[color].a; break; case 16: rgb = (bcmfb_palette[color].r >> 3) << 11; rgb |= (bcmfb_palette[color].g >> 2) << 5; rgb |= (bcmfb_palette[color].b >> 3); - addr[2*j] = rgb & 0xff; - addr[2*j + 1] = (rgb >> 8) & 0xff; + addr[bytes * j] = rgb & 0xff; + addr[bytes * j + 1] = (rgb >> 8) & 0xff; default: /* Not supported yet */ break; From owner-svn-src-head@FreeBSD.ORG Sat May 2 22:48:56 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC2D8D07; Sat, 2 May 2015 22:48:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D952B105E; Sat, 2 May 2015 22:48:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t42MmuWN047313; Sat, 2 May 2015 22:48:56 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t42MmufO047311; Sat, 2 May 2015 22:48:56 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201505022248.t42MmufO047311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 2 May 2015 22:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282359 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 22:48:57 -0000 Author: loos Date: Sat May 2 22:48:56 2015 New Revision: 282359 URL: https://svnweb.freebsd.org/changeset/base/282359 Log: Fix the vt(4) framebuffer driver on RPi 2. Use the BCM2835_MBOX_CHAN_PROP mbox channel to setup the framebuffer, remove DMA code (its now done in bcm2835_mbox.c). Also adjust the color palette when bcm2708_fb.fbswap is set. The firmware used on RPi 2 uses this mode. Tested on: RPi-B and RPi 2 with 16, 24 and 32bpp Note: The 32bpp mode on RPi-B has the red and blue swapped, this is a know problem (not a driver problem). Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat May 2 22:40:41 2015 (r282358) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat May 2 22:48:56 2015 (r282359) @@ -35,170 +35,35 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include +#include #include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include - -#include #include #include -#include -#include -#include -#include -#include -#include - #include #include #include #include #include +#include -#include -#include +#include #include "fb_if.h" #include "mbox_if.h" -#define FB_WIDTH 640 -#define FB_HEIGHT 480 -#define FB_DEPTH 24 - -struct bcm_fb_config { - uint32_t xres; - uint32_t yres; - uint32_t vxres; - uint32_t vyres; - uint32_t pitch; - uint32_t bpp; - uint32_t xoffset; - uint32_t yoffset; - /* Filled by videocore */ - uint32_t base; - uint32_t screen_size; -}; +#define FB_DEPTH 24 struct bcmsc_softc { - device_t dev; struct fb_info *info; - bus_dma_tag_t dma_tag; - bus_dmamap_t dma_map; - struct bcm_fb_config* fb_config; - bus_addr_t fb_config_phys; - struct intr_config_hook init_hook; }; static int bcm_fb_probe(device_t); static int bcm_fb_attach(device_t); -static void bcm_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, - int err); - -static void -bcm_fb_init(void *arg) -{ - volatile struct bcm_fb_config *fb_config; - struct bcmsc_softc *sc; - struct fb_info *info; - phandle_t node; - pcell_t cell; - device_t mbox; - device_t fbd; - int err = 0; - - sc = arg; - fb_config = sc->fb_config; - node = ofw_bus_get_node(sc->dev); - - fb_config->xres = 0; - fb_config->yres = 0; - fb_config->bpp = 0; - fb_config->vxres = 0; - fb_config->vyres = 0; - fb_config->xoffset = 0; - fb_config->yoffset = 0; - fb_config->base = 0; - fb_config->pitch = 0; - fb_config->screen_size = 0; - - if ((OF_getprop(node, "broadcom,width", &cell, sizeof(cell))) > 0) - fb_config->xres = (int)fdt32_to_cpu(cell); - if (fb_config->xres == 0) - fb_config->xres = FB_WIDTH; - - if ((OF_getprop(node, "broadcom,height", &cell, sizeof(cell))) > 0) - fb_config->yres = (uint32_t)fdt32_to_cpu(cell); - if (fb_config->yres == 0) - fb_config->yres = FB_HEIGHT; - - if ((OF_getprop(node, "broadcom,depth", &cell, sizeof(cell))) > 0) - fb_config->bpp = (uint32_t)fdt32_to_cpu(cell); - if (fb_config->bpp == 0) - fb_config->bpp = FB_DEPTH; - - bus_dmamap_sync(sc->dma_tag, sc->dma_map, - BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); - - mbox = devclass_get_device(devclass_find("mbox"), 0); - if (mbox) { - MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_FB, sc->fb_config_phys); - MBOX_READ(mbox, BCM2835_MBOX_CHAN_FB, &err); - } - bus_dmamap_sync(sc->dma_tag, sc->dma_map, - BUS_DMASYNC_POSTREAD); - - if (fb_config->base != 0) { - device_printf(sc->dev, "%dx%d(%dx%d@%d,%d) %dbpp\n", - fb_config->xres, fb_config->yres, - fb_config->vxres, fb_config->vyres, - fb_config->xoffset, fb_config->yoffset, - fb_config->bpp); - - device_printf(sc->dev, "pitch %d, base 0x%08x, screen_size %d\n", - fb_config->pitch, fb_config->base, - fb_config->screen_size); - - info = malloc(sizeof(struct fb_info), M_DEVBUF, - M_WAITOK | M_ZERO); - info->fb_name = device_get_nameunit(sc->dev); - info->fb_vbase = (intptr_t)pmap_mapdev(fb_config->base, - fb_config->screen_size); - info->fb_pbase = fb_config->base; - info->fb_size = fb_config->screen_size; - info->fb_bpp = info->fb_depth = fb_config->bpp; - info->fb_stride = fb_config->pitch; - info->fb_width = fb_config->xres; - info->fb_height = fb_config->yres; - - sc->info = info; - - fbd = device_add_child(sc->dev, "fbd", - device_get_unit(sc->dev)); - if (fbd == NULL) - device_printf(sc->dev, "Failed to add fbd child\n"); - else if (device_probe_and_attach(fbd) != 0) - device_printf(sc->dev, "Failed to attach fbd device\n"); - } else { - device_printf(sc->dev, "Failed to set framebuffer info\n"); - } - - config_intrhook_disestablish(&sc->init_hook); -} static int bcm_fb_probe(device_t dev) @@ -214,66 +79,82 @@ bcm_fb_probe(device_t dev) static int bcm_fb_attach(device_t dev) { - struct bcmsc_softc *sc = device_get_softc(dev); - int dma_size = sizeof(struct bcm_fb_config); - int err; - - sc->dev = dev; - - err = bus_dma_tag_create( - bus_get_dma_tag(sc->dev), - PAGE_SIZE, 0, /* alignment, boundary */ - BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - dma_size, 1, /* maxsize, nsegments */ - dma_size, 0, /* maxsegsize, flags */ - NULL, NULL, /* lockfunc, lockarg */ - &sc->dma_tag); - - err = bus_dmamem_alloc(sc->dma_tag, (void **)&sc->fb_config, 0, - &sc->dma_map); - if (err) { - device_printf(dev, "cannot allocate framebuffer\n"); - goto fail; - } + char bootargs[2048], *n, *p, *v; + device_t fbd; + int fbswap; + phandle_t chosen; + struct bcm2835_fb_config fb; + struct bcmsc_softc *sc; + struct fb_info *info; - err = bus_dmamap_load(sc->dma_tag, sc->dma_map, sc->fb_config, - dma_size, bcm_fb_dmamap_cb, &sc->fb_config_phys, BUS_DMA_NOWAIT); + sc = device_get_softc(dev); + memset(&fb, 0, sizeof(fb)); + if (bcm2835_mbox_fb_get_w_h(dev, &fb) != 0) + return (ENXIO); + fb.bpp = FB_DEPTH; + if (bcm2835_mbox_fb_init(dev, &fb) != 0) + return (ENXIO); - if (err) { - device_printf(dev, "cannot load DMA map\n"); - goto fail; + info = malloc(sizeof(struct fb_info), M_DEVBUF, M_WAITOK | M_ZERO); + info->fb_name = device_get_nameunit(dev); + info->fb_vbase = (intptr_t)pmap_mapdev(fb.base, fb.size); + info->fb_pbase = fb.base; + info->fb_size = fb.size; + info->fb_bpp = info->fb_depth = fb.bpp; + info->fb_stride = fb.pitch; + info->fb_width = fb.xres; + info->fb_height = fb.yres; + sc->info = info; + + /* Newer firmware versions needs an inverted color palette. */ + fbswap = 0; + chosen = OF_finddevice("/chosen"); + if (chosen != 0 && + OF_getprop(chosen, "bootargs", &bootargs, sizeof(bootargs)) > 0) { + p = bootargs; + while ((v = strsep(&p, " ")) != NULL) { + if (*v == '\0') + continue; + n = strsep(&v, "="); + if (strcmp(n, "bcm2708_fb.fbswap") == 0 && v != NULL) + if (*v == '1') + fbswap = 1; + } + } + if (fbswap) { + switch (info->fb_bpp) { + case 24: + vt_generate_cons_palette(info->fb_cmap, + COLOR_FORMAT_RGB, 0xff, 0, 0xff, 8, 0xff, 16); + info->fb_cmsize = 16; + break; + case 32: + vt_generate_cons_palette(info->fb_cmap, + COLOR_FORMAT_RGB, 0xff, 16, 0xff, 8, 0xff, 0); + info->fb_cmsize = 16; + break; + } } - /* - * We have to wait until interrupts are enabled. - * Mailbox relies on it to get data from VideoCore - */ - sc->init_hook.ich_func = bcm_fb_init; - sc->init_hook.ich_arg = sc; - - if (config_intrhook_establish(&sc->init_hook) != 0) { - device_printf(dev, "failed to establish intrhook\n"); - return (ENOMEM); + fbd = device_add_child(dev, "fbd", device_get_unit(dev)); + if (fbd == NULL) { + device_printf(dev, "Failed to add fbd child\n"); + free(info, M_DEVBUF); + return (ENXIO); + } else if (device_probe_and_attach(fbd) != 0) { + device_printf(dev, "Failed to attach fbd device\n"); + device_delete_child(dev, fbd); + free(info, M_DEVBUF); + return (ENXIO); } - return (0); - -fail: - return (ENXIO); -} - -static void -bcm_fb_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int err) -{ - bus_addr_t *addr; - - if (err) - return; + device_printf(dev, "%dx%d(%dx%d@%d,%d) %dbpp\n", fb.xres, fb.yres, + fb.vxres, fb.vyres, fb.xoffset, fb.yoffset, fb.bpp); + device_printf(dev, + "fbswap: %d, pitch %d, base 0x%08x, screen_size %d\n", + fbswap, fb.pitch, fb.base, fb.size); - addr = (bus_addr_t*)arg; - *addr = PHYS_TO_VCBUS(segs[0].ds_addr); + return (0); } static struct fb_info *