From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:12: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 9D235A11; Sun, 4 Jan 2015 00:12: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 89808368F; Sun, 4 Jan 2015 00:12: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 t040CV9b060683; Sun, 4 Jan 2015 00:12:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040CVDf060682; Sun, 4 Jan 2015 00:12:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501040012.t040CVDf060682@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Jan 2015 00:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276645 - 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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 00:12:31 -0000 Author: ian Date: Sun Jan 4 00:12:30 2015 New Revision: 276645 URL: https://svnweb.freebsd.org/changeset/base/276645 Log: Don't allow clang to use fpu instructions or registers in kernel modules. Submitted by: Keith White Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sat Jan 3 23:57:03 2015 (r276644) +++ head/sys/conf/kmod.mk Sun Jan 4 00:12:30 2015 (r276645) @@ -119,8 +119,10 @@ CFLAGS+= -fno-omit-frame-pointer -mno-om .endif # Temporary workaround for PR 196407, which contains the fascinating details. +# Don't allow clang to use fpu instructions or registers in kernel modules. .if ${MACHINE_CPUARCH} == arm CFLAGS.clang+= -mllvm -arm-use-movt=0 +CFLAGS.clang+= -mfpu=none .endif .if ${MACHINE_CPUARCH} == powerpc From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00: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 06DD7C2E; Sun, 4 Jan 2015 00: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 E74333918; Sun, 4 Jan 2015 00:33: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 t040XgEV070081; Sun, 4 Jan 2015 00:33:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040XgoC070080; Sun, 4 Jan 2015 00:33:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501040033.t040XgoC070080@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 4 Jan 2015 00:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276646 - 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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 00:33:43 -0000 Author: kib Date: Sun Jan 4 00:33:41 2015 New Revision: 276646 URL: https://svnweb.freebsd.org/changeset/base/276646 Log: Do not erronously export 'openat' symbol from rtld. The symbol leaked after r276630 since lib/libc/sys/openat.c defines versions for openat using .symver (version script cannot assign two versions to one symbol), and rtld uses openat. Instead, directly use __sys_openat(). Reported and tested by: antoine 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 Sun Jan 4 00:12:30 2015 (r276645) +++ head/libexec/rtld-elf/rtld.c Sun Jan 4 00:33:41 2015 (r276646) @@ -166,6 +166,8 @@ static bool matched_symbol(SymLook *, co void r_debug_state(struct r_debug *, struct link_map *) __noinline; void _r_debug_postinit(struct link_map *) __noinline; +int __sys_openat(int, const char *, int, ...); + /* * Data declarations. */ @@ -2824,7 +2826,7 @@ search_library_pathfds(const char *name, dirfd = parse_libdir(fdstr); if (dirfd < 0) break; - fd = openat(dirfd, name, O_RDONLY | O_CLOEXEC); + fd = __sys_openat(dirfd, name, O_RDONLY | O_CLOEXEC); if (fd >= 0) { *fdp = fd; len = strlen(fdstr) + strlen(name) + 3; From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:44: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 402DDF78; Sun, 4 Jan 2015 00:44: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 2CBF73AD6; Sun, 4 Jan 2015 00:44: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 t040iQYL074836; Sun, 4 Jan 2015 00:44:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040iPHJ074834; Sun, 4 Jan 2015 00:44:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501040044.t040iPHJ074834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 4 Jan 2015 00:44:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276647 - head/contrib/binutils/gas/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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 00:44:26 -0000 Author: bapt Date: Sun Jan 4 00:44:24 2015 New Revision: 276647 URL: https://svnweb.freebsd.org/changeset/base/276647 Log: Fix generating documents with modern texinfo Modified: head/contrib/binutils/gas/doc/c-arm.texi head/contrib/binutils/gas/doc/c-mips.texi Modified: head/contrib/binutils/gas/doc/c-arm.texi ============================================================================== --- head/contrib/binutils/gas/doc/c-arm.texi Sun Jan 4 00:33:41 2015 (r276646) +++ head/contrib/binutils/gas/doc/c-arm.texi Sun Jan 4 00:44:24 2015 (r276647) @@ -317,13 +317,6 @@ Either @samp{#} or @samp{$} can be used @cindex register names, ARM *TODO* Explain about ARM register naming, and the predefined names. -@node ARM Floating Point -@section Floating Point - -@cindex floating point, ARM (@sc{ieee}) -@cindex ARM floating point (@sc{ieee}) -The ARM family uses @sc{ieee} floating-point numbers. - @node ARM-Relocations @subsection ARM relocation generation @@ -365,6 +358,13 @@ respectively. For example to load the 3 MOVT r0, #:upper16:foo @end smallexample +@node ARM Floating Point +@section Floating Point + +@cindex floating point, ARM (@sc{ieee}) +@cindex ARM floating point (@sc{ieee}) +The ARM family uses @sc{ieee} floating-point numbers. + @node ARM Directives @section ARM Machine Directives Modified: head/contrib/binutils/gas/doc/c-mips.texi ============================================================================== --- head/contrib/binutils/gas/doc/c-mips.texi Sun Jan 4 00:33:41 2015 (r276646) +++ head/contrib/binutils/gas/doc/c-mips.texi Sun Jan 4 00:44:24 2015 (r276647) @@ -196,7 +196,7 @@ the @samp{mad} and @samp{madu} instructi instructions around accesses to the @samp{HI} and @samp{LO} registers. @samp{-no-m4650} turns off this option. -@itemx -m3900 +@item -m3900 @itemx -no-m3900 @itemx -m4100 @itemx -no-m4100 From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:54: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 7697455C; Sun, 4 Jan 2015 00:54: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 62ECF3E51; Sun, 4 Jan 2015 00:54: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 t040sUD3079585; Sun, 4 Jan 2015 00:54:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040sUJ4079584; Sun, 4 Jan 2015 00:54:30 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501040054.t040sUJ4079584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 4 Jan 2015 00:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276650 - head/contrib/binutils/ld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 00:54:30 -0000 Author: bapt Date: Sun Jan 4 00:54:29 2015 New Revision: 276650 URL: https://svnweb.freebsd.org/changeset/base/276650 Log: Fix generating documentation with modern texinfo Modified: head/contrib/binutils/ld/ld.texinfo Modified: head/contrib/binutils/ld/ld.texinfo ============================================================================== --- head/contrib/binutils/ld/ld.texinfo Sun Jan 4 00:49:45 2015 (r276649) +++ head/contrib/binutils/ld/ld.texinfo Sun Jan 4 00:54:29 2015 (r276650) @@ -1725,7 +1725,7 @@ the linker script being used by the link @kindex --version-script=@var{version-scriptfile} @cindex version script, symbol versions -@itemx --version-script=@var{version-scriptfile} +@item --version-script=@var{version-scriptfile} Specify the name of a version script to the linker. This is typically used when creating shared libraries to specify additional information about the version hierarchy for the library being created. This option From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 00:58: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 3DA7D6AD; Sun, 4 Jan 2015 00:58: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 266033E9D; Sun, 4 Jan 2015 00:58: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 t040wW3C080117; Sun, 4 Jan 2015 00:58:32 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t040wViV080114; Sun, 4 Jan 2015 00:58:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501040058.t040wViV080114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 4 Jan 2015 00:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276651 - in head: contrib/binutils/bfd/doc contrib/binutils/gas/doc contrib/binutils/ld etc/mtree gnu/usr.bin/binutils gnu/usr.bin/binutils/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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 00:58:32 -0000 Author: bapt Date: Sun Jan 4 00:58:30 2015 New Revision: 276651 URL: https://svnweb.freebsd.org/changeset/base/276651 Log: Add pregenerated documentation for as(1) and ld(1) Added: head/contrib/binutils/bfd/doc/bfdver.texi head/contrib/binutils/gas/doc/as.txt (contents, props changed) head/contrib/binutils/gas/doc/asconfig.texi head/contrib/binutils/ld/configdoc.texi - copied unchanged from r276637, head/contrib/binutils/ld/gen-doc.texi head/contrib/binutils/ld/ld.txt (contents, props changed) head/gnu/usr.bin/binutils/doc/ head/gnu/usr.bin/binutils/doc/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.usr.dist head/gnu/usr.bin/binutils/Makefile Added: head/contrib/binutils/bfd/doc/bfdver.texi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/binutils/bfd/doc/bfdver.texi Sun Jan 4 00:58:30 2015 (r276651) @@ -0,0 +1 @@ +@set VERSION "2.17.50 [FreeBSD] 2007-07-03" Added: head/contrib/binutils/gas/doc/as.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/binutils/gas/doc/as.txt Sun Jan 4 00:58:30 2015 (r276651) @@ -0,0 +1,13924 @@ +START-INFO-DIR-ENTRY +* As: (as). The GNU assembler. +* Gas: (as). The GNU assembler. +END-INFO-DIR-ENTRY + +Using as +1 Overview + 1.1 Structure of this Manual + 1.2 The GNU Assembler + 1.3 Object File Formats + 1.4 Command Line + 1.5 Input Files + 1.6 Output (Object) File + 1.7 Error and Warning Messages +2 Command-Line Options + 2.1 Enable Listings: '-a[cdhlns]' + 2.2 '--alternate' + 2.3 '-D' + 2.4 Work Faster: '-f' + 2.5 '.include' Search Path: '-I' PATH + 2.6 Difference Tables: '-K' + 2.7 Include Local Symbols: '-L' + 2.8 Configuring listing output: '--listing' + 2.9 Assemble in MRI Compatibility Mode: '-M' + 2.10 Dependency Tracking: '--MD' + 2.11 Name the Object File: '-o' + 2.12 Join Data and Text Sections: '-R' + 2.13 Display Assembly Statistics: '--statistics' + 2.14 Compatible Output: '--traditional-format' + 2.15 Announce Version: '-v' + 2.16 Control Warnings: '-W', '--warn', '--no-warn', '--fatal-warnings' + 2.17 Generate Object File in Spite of Errors: '-Z' +3 Syntax + 3.1 Preprocessing + 3.2 Whitespace + 3.3 Comments + 3.4 Symbols + 3.5 Statements + 3.6 Constants + 3.6.1 Character Constants + 3.6.1.1 Strings + 3.6.1.2 Characters + 3.6.2 Number Constants + 3.6.2.1 Integers + 3.6.2.2 Bignums + 3.6.2.3 Flonums +4 Sections and Relocation + 4.1 Background + 4.2 Linker Sections + 4.3 Assembler Internal Sections + 4.4 Sub-Sections + 4.5 bss Section +5 Symbols + 5.1 Labels + 5.2 Giving Symbols Other Values + 5.3 Symbol Names + 5.4 The Special Dot Symbol + 5.5 Symbol Attributes + 5.5.1 Value + 5.5.2 Type +6 Expressions + 6.1 Empty Expressions + 6.2 Integer Expressions + 6.2.1 Arguments + 6.2.2 Operators + 6.2.3 Prefix Operator + 6.2.4 Infix Operators +7 Assembler Directives + 7.1 '.abort' + 7.2 '.align ABS-EXPR, ABS-EXPR, ABS-EXPR' + 7.3 '.ascii "STRING"'... + 7.4 '.asciz "STRING"'... + 7.5 '.balign[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR' + 7.6 '.byte EXPRESSIONS' + 7.7 '.comm SYMBOL , LENGTH ' + 7.8 '.cfi_startproc [simple]' + 7.9 '.cfi_endproc' + 7.10 '.cfi_personality ENCODING [, EXP]' + 7.11 '.cfi_lsda ENCODING [, EXP]' + 7.12 '.cfi_def_cfa REGISTER, OFFSET' + 7.13 '.cfi_def_cfa_register REGISTER' + 7.14 '.cfi_def_cfa_offset OFFSET' + 7.15 '.cfi_adjust_cfa_offset OFFSET' + 7.16 '.cfi_offset REGISTER, OFFSET' + 7.17 '.cfi_rel_offset REGISTER, OFFSET' + 7.18 '.cfi_register REGISTER1, REGISTER2' + 7.19 '.cfi_restore REGISTER' + 7.20 '.cfi_undefined REGISTER' + 7.21 '.cfi_same_value REGISTER' + 7.22 '.cfi_remember_state', + 7.23 '.cfi_return_column REGISTER' + 7.24 '.cfi_signal_frame' + 7.25 '.cfi_window_save' + 7.26 '.cfi_escape' EXPRESSION[, ...] + 7.27 '.file FILENO FILENAME' + 7.28 '.loc FILENO LINENO [COLUMN] [OPTIONS]' + 7.29 '.loc_mark_blocks ENABLE' + 7.30 '.data SUBSECTION' + 7.31 '.double FLONUMS' + 7.32 '.eject' + 7.33 '.else' + 7.34 '.elseif' + 7.35 '.end' + 7.36 '.endfunc' + 7.37 '.endif' + 7.38 '.equ SYMBOL, EXPRESSION' + 7.39 '.equiv SYMBOL, EXPRESSION' + 7.40 '.eqv SYMBOL, EXPRESSION' + 7.41 '.err' + 7.42 '.error "STRING"' + 7.43 '.exitm' + 7.44 '.extern' + 7.45 '.fail EXPRESSION' + 7.46 '.file STRING' + 7.47 '.fill REPEAT , SIZE , VALUE' + 7.48 '.float FLONUMS' + 7.49 '.func NAME[,LABEL]' + 7.50 '.global SYMBOL', '.globl SYMBOL' + 7.51 '.hidden NAMES' + 7.52 '.hword EXPRESSIONS' + 7.53 '.ident' + 7.54 '.if ABSOLUTE EXPRESSION' + 7.55 '.incbin "FILE"[,SKIP[,COUNT]]' + 7.56 '.include "FILE"' + 7.57 '.int EXPRESSIONS' + 7.58 '.internal NAMES' + 7.59 '.irp SYMBOL,VALUES'... + 7.60 '.irpc SYMBOL,VALUES'... + 7.61 '.lcomm SYMBOL , LENGTH' + 7.62 '.lflags' + 7.63 '.line LINE-NUMBER' + 7.64 '.linkonce [TYPE]' + 7.65 '.ln LINE-NUMBER' + 7.66 '.mri VAL' + 7.67 '.list' + 7.68 '.long EXPRESSIONS' + 7.69 '.macro' + 7.70 '.altmacro' + 7.71 '.noaltmacro' + 7.72 '.nolist' + 7.73 '.octa BIGNUMS' + 7.74 '.org NEW-LC , FILL' + 7.75 '.p2align[wl] ABS-EXPR, ABS-EXPR, ABS-EXPR' + 7.76 '.previous' + 7.77 '.popsection' + 7.78 '.print STRING' + 7.79 '.protected NAMES' + 7.80 '.psize LINES , COLUMNS' + 7.81 '.purgem NAME' + 7.82 '.pushsection NAME , SUBSECTION' + 7.83 '.quad BIGNUMS' + 7.84 '.reloc OFFSET, RELOC_NAME[, EXPRESSION]' + 7.85 '.rept COUNT' + 7.86 '.sbttl "SUBHEADING"' + 7.87 '.section NAME' + 7.88 '.set SYMBOL, EXPRESSION' + 7.89 '.short EXPRESSIONS' + 7.90 '.single FLONUMS' + 7.91 '.size' + 7.92 '.sleb128 EXPRESSIONS' + 7.93 '.skip SIZE , FILL' + 7.94 '.space SIZE , FILL' + 7.95 '.stabd, .stabn, .stabs' + 7.96 '.string' "STR" + 7.97 '.struct EXPRESSION' + 7.98 '.subsection NAME' + 7.99 '.symver' + 7.100 '.text SUBSECTION' + 7.101 '.title "HEADING"' + 7.102 '.type' + 7.103 '.uleb128 EXPRESSIONS' + 7.104 '.version "STRING"' + 7.105 '.vtable_entry TABLE, OFFSET' + 7.106 '.vtable_inherit CHILD, PARENT' + 7.107 '.warning "STRING"' + 7.108 '.weak NAMES' + 7.109 '.weakref ALIAS, TARGET' + 7.110 '.word EXPRESSIONS' + 7.111 Deprecated Directives +8 ARM Dependent Features + 8.1 Options + 8.2 Syntax + 8.2.1 Special Characters + 8.2.2 Register Names + 8.2.3 ARM relocation generation + 8.3 Floating Point + 8.4 ARM Machine Directives + 8.5 Opcodes + 8.6 Mapping Symbols +9 80386 Dependent Features + 9.1 Options + 9.2 AT&T Syntax versus Intel Syntax + 9.3 Instruction Naming + 9.4 Register Naming + 9.5 Instruction Prefixes + 9.6 Memory References + 9.7 Handling of Jump Instructions + 9.8 Floating Point + 9.9 Intel's MMX and AMD's 3DNow! SIMD Operations + 9.10 Writing 16-bit Code + 9.11 AT&T Syntax bugs + 9.12 Specifying CPU Architecture + 9.13 Notes +10 IA-64 Dependent Features + 10.1 Options + 10.2 Syntax + 10.2.1 Special Characters + 10.2.2 Register Names + 10.2.3 IA-64 Processor-Status-Register (PSR) Bit Names + 10.3 Opcodes +11 MIPS Dependent Features + 11.1 Assembler options + 11.2 MIPS ECOFF object code + 11.3 Directives for debugging information + 11.4 Directives to override the size of symbols + 11.5 Directives to override the ISA level + 11.6 Directives for extending MIPS 16 bit instructions + 11.7 Directive to mark data as an instruction + 11.8 Directives to save and restore options + 11.9 Directives to control generation of MIPS ASE instructions +12 PowerPC Dependent Features + 12.1 Options + 12.2 PowerPC Assembler Directives +13 SPARC Dependent Features + 13.1 Options + 13.2 Enforcing aligned data + 13.3 Floating Point + 13.4 Sparc Machine Directives +14 Reporting Bugs + 14.1 Have You Found a Bug? + 14.2 How to Report Bugs +15 Acknowledgements +Appendix A GNU Free Documentation License + ADDENDUM: How to use this License for your documents +AS Index +Using as +******** + +This file is a user guide to the GNU assembler 'as' version "2.17.50 +[FreeBSD] 2007-07-03". This version of the file describes 'as' +configured to generate code for machine specific architectures. + + This document is distributed under the terms of the GNU Free +Documentation License. A copy of the license is included in the section +entitled "GNU Free Documentation License". + +1 Overview +********** + +Here is a brief summary of how to invoke 'as'. For details, see *note +Command-Line Options: Invoking. + + as [-a[cdhlns][=FILE]] [-alternate] [-D] + [-defsym SYM=VAL] [-f] [-g] [-gstabs] + [-gstabs+] [-gdwarf-2] [-help] [-I DIR] [-J] + [-K] [-L] [-listing-lhs-width=NUM] + [-listing-lhs-width2=NUM] [-listing-rhs-width=NUM] + [-listing-cont-lines=NUM] [-keep-locals] [-o + OBJFILE] [-R] [-reduce-memory-overheads] [-statistics] + [-v] [-version] [-version] [-W] [-warn] + [-fatal-warnings] [-w] [-x] [-Z] [@FILE] + [-target-help] [TARGET-OPTIONS] + [-|FILES ...] + + _Target ARM options:_ + [-mcpu=PROCESSOR[+EXTENSION...]] + [-march=ARCHITECTURE[+EXTENSION...]] + [-mfpu=FLOATING-POINT-FORMAT] + [-mfloat-abi=ABI] + [-meabi=VER] + [-mthumb] + [-EB|-EL] + [-mapcs-32|-mapcs-26|-mapcs-float| + -mapcs-reentrant] + [-mthumb-interwork] [-k] + + _Target i386 options:_ + [-32|-64] [-n] + [-march=CPU] [-mtune=CPU] + + _Target IA-64 options:_ + [-mconstant-gp|-mauto-pic] + [-milp32|-milp64|-mlp64|-mp64] + [-mle|mbe] + [-mtune=itanium1|-mtune=itanium2] + [-munwind-check=warning|-munwind-check=error] + [-mhint.b=ok|-mhint.b=warning|-mhint.b=error] + [-x|-xexplicit] [-xauto] [-xdebug] + + _Target MIPS options:_ + [-nocpp] [-EL] [-EB] [-O[OPTIMIZATION LEVEL]] + [-g[DEBUG LEVEL]] [-G NUM] [-KPIC] [-call_shared] + [-non_shared] [-xgot [-mvxworks-pic] + [-mabi=ABI] [-32] [-n32] [-64] [-mfp32] [-mgp32] + [-march=CPU] [-mtune=CPU] [-mips1] [-mips2] + [-mips3] [-mips4] [-mips5] [-mips32] [-mips32r2] + [-mips64] [-mips64r2] + [-construct-floats] [-no-construct-floats] + [-trap] [-no-break] [-break] [-no-trap] + [-mfix7000] [-mno-fix7000] + [-mips16] [-no-mips16] + [-msmartmips] [-mno-smartmips] + [-mips3d] [-no-mips3d] + [-mdmx] [-no-mdmx] + [-mdsp] [-mno-dsp] + [-mdspr2] [-mno-dspr2] + [-mmt] [-mno-mt] + [-mdebug] [-no-mdebug] + [-mpdr] [-mno-pdr] + + _Target PowerPC options:_ + [-mpwrx|-mpwr2|-mpwr|-m601|-mppc|-mppc32|-m603|-m604| + -m403|-m405|-mppc64|-m620|-mppc64bridge|-mbooke| + -mbooke32|-mbooke64] + [-mcom|-many|-maltivec] [-memb] + [-mregnames|-mno-regnames] + [-mrelocatable|-mrelocatable-lib] + [-mlittle|-mlittle-endian|-mbig|-mbig-endian] + [-msolaris|-mno-solaris] + + _Target SPARC options:_ + [-Av6|-Av7|-Av8|-Asparclet|-Asparclite + -Av8plus|-Av8plusa|-Av9|-Av9a] + [-xarch=v8plus|-xarch=v8plusa] [-bump] + [-32|-64] + + + +'@FILE' + Read command-line options from FILE. The options read are inserted + in place of the original @FILE option. If FILE does not exist, or + cannot be read, then the option will be treated literally, and not + removed. + + Options in FILE are separated by whitespace. A whitespace + character may be included in an option by surrounding the entire + option in either single or double quotes. Any character (including + a backslash) may be included by prefixing the character to be + included with a backslash. The FILE may itself contain additional + @FILE options; any such options will be processed recursively. + +'-a[cdhlmns]' + Turn on listings, in any of a variety of ways: + + '-ac' + omit false conditionals + + '-ad' + omit debugging directives + + '-ah' + include high-level source + + '-al' + include assembly + + '-am' + include macro expansions + + '-an' + omit forms processing + + '-as' + include symbols + + '=file' + set the name of the listing file + + You may combine these options; for example, use '-aln' for assembly + listing without forms processing. The '=file' option, if used, + must be the last one. By itself, '-a' defaults to '-ahls'. + +'--alternate' + Begin in alternate macro mode. *Note '.altmacro': Altmacro. + +'-D' + Ignored. This option is accepted for script compatibility with + calls to other assemblers. + +'--defsym SYM=VALUE' + Define the symbol SYM to be VALUE before assembling the input file. + VALUE must be an integer constant. As in C, a leading '0x' + indicates a hexadecimal value, and a leading '0' indicates an octal + value. The value of the symbol can be overridden inside a source + file via the use of a '.set' pseudo-op. + +'-f' + "fast"--skip whitespace and comment preprocessing (assume source is + compiler output). + +'-g' +'--gen-debug' + Generate debugging information for each assembler source line using + whichever debug format is preferred by the target. This currently + means either STABS, ECOFF or DWARF2. + +'--gstabs' + Generate stabs debugging information for each assembler line. This + may help debugging assembler code, if the debugger can handle it. + +'--gstabs+' + Generate stabs debugging information for each assembler line, with + GNU extensions that probably only gdb can handle, and that could + make other debuggers crash or refuse to read your program. This + may help debugging assembler code. Currently the only GNU + extension is the location of the current working directory at + assembling time. + +'--gdwarf-2' + Generate DWARF2 debugging information for each assembler line. + This may help debugging assembler code, if the debugger can handle + it. Note--this option is only supported by some targets, not all + of them. + +'--help' + Print a summary of the command line options and exit. + +'--target-help' + Print a summary of all target specific options and exit. + +'-I DIR' + Add directory DIR to the search list for '.include' directives. + +'-J' + Don't warn about signed overflow. + +'-K' + This option is accepted but has no effect on the machine specific + family. + +'-L' +'--keep-locals' + Keep (in the symbol table) local symbols. These symbols start with + system-specific local label prefixes, typically '.L' for ELF + systems or 'L' for traditional a.out systems. *Note Symbol + Names::. + +'--listing-lhs-width=NUMBER' + Set the maximum width, in words, of the output data column for an + assembler listing to NUMBER. + +'--listing-lhs-width2=NUMBER' + Set the maximum width, in words, of the output data column for + continuation lines in an assembler listing to NUMBER. + +'--listing-rhs-width=NUMBER' + Set the maximum width of an input source line, as displayed in a + listing, to NUMBER bytes. + +'--listing-cont-lines=NUMBER' + Set the maximum number of lines printed in a listing for a single + line of input to NUMBER + 1. + +'-o OBJFILE' + Name the object-file output from 'as' OBJFILE. + +'-R' + Fold the data section into the text section. + + Set the default size of GAS's hash tables to a prime number close + to NUMBER. Increasing this value can reduce the length of time it + takes the assembler to perform its tasks, at the expense of + increasing the assembler's memory requirements. Similarly reducing + this value can reduce the memory requirements at the expense of + speed. + +'--reduce-memory-overheads' + This option reduces GAS's memory requirements, at the expense of + making the assembly processes slower. Currently this switch is a + synonym for '--hash-size=4051', but in the future it may have other + effects as well. + +'--statistics' + Print the maximum space (in bytes) and total time (in seconds) used + by assembly. + +'--strip-local-absolute' + Remove local absolute symbols from the outgoing symbol table. + +'-v' +'-version' + Print the 'as' version. + +'--version' + Print the 'as' version and exit. + +'-W' +'--no-warn' + Suppress warning messages. + +'--fatal-warnings' + Treat warnings as errors. + +'--warn' + Don't suppress warning messages or treat them as errors. + +'-w' + Ignored. + +'-x' + Ignored. + +'-Z' + Generate an object file even after errors. + +'-- | FILES ...' + Standard input, or source files to assemble. + + The following options are available when as is configured for the ARM +processor family. + +'-mcpu=PROCESSOR[+EXTENSION...]' + Specify which ARM processor variant is the target. +'-march=ARCHITECTURE[+EXTENSION...]' + Specify which ARM architecture variant is used by the target. +'-mfpu=FLOATING-POINT-FORMAT' + Select which Floating Point architecture is the target. +'-mfloat-abi=ABI' + Select which floating point ABI is in use. +'-mthumb' + Enable Thumb only instruction decoding. +'-mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant' + Select which procedure calling convention is in use. +'-EB | -EL' + Select either big-endian (-EB) or little-endian (-EL) output. +'-mthumb-interwork' + Specify that the code has been generated with interworking between + Thumb and ARM code in mind. +'-k' + Specify that PIC code has been generated. + + The following options are available when 'as' is configured for the +SPARC architecture: + +'-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite' +'-Av8plus | -Av8plusa | -Av9 | -Av9a' + Explicitly select a variant of the SPARC architecture. + + '-Av8plus' and '-Av8plusa' select a 32 bit environment. '-Av9' and + '-Av9a' select a 64 bit environment. + + '-Av8plusa' and '-Av9a' enable the SPARC V9 instruction set with + UltraSPARC extensions. + +'-xarch=v8plus | -xarch=v8plusa' + For compatibility with the Solaris v9 assembler. These options are + equivalent to -Av8plus and -Av8plusa, respectively. + +'-bump' + Warn when the assembler switches to another architecture. + + The following options are available when as is configured for a MIPS +processor. + +'-G NUM' + This option sets the largest size of an object that can be + referenced implicitly with the 'gp' register. It is only accepted + for targets that use ECOFF format, such as a DECstation running + Ultrix. The default value is 8. + +'-EB' + Generate "big endian" format output. + +'-EL' + Generate "little endian" format output. + +'-mips1' +'-mips2' +'-mips3' +'-mips4' +'-mips5' +'-mips32' +'-mips32r2' +'-mips64' +'-mips64r2' + Generate code for a particular MIPS Instruction Set Architecture + level. '-mips1' is an alias for '-march=r3000', '-mips2' is an + alias for '-march=r6000', '-mips3' is an alias for '-march=r4000' + and '-mips4' is an alias for '-march=r8000'. '-mips5', '-mips32', + '-mips32r2', '-mips64', and '-mips64r2' correspond to generic 'MIPS + V', 'MIPS32', 'MIPS32 Release 2', 'MIPS64', and 'MIPS64 Release 2' + ISA processors, respectively. + +'-march=CPU' + Generate code for a particular MIPS cpu. + +'-mtune=CPU' + Schedule and tune for a particular MIPS cpu. + +'-mfix7000' +'-mno-fix7000' + Cause nops to be inserted if the read of the destination register + of an mfhi or mflo instruction occurs in the following two + instructions. + +'-mdebug' +'-no-mdebug' + Cause stabs-style debugging output to go into an ECOFF-style + .mdebug section instead of the standard ELF .stabs sections. + +'-mpdr' +'-mno-pdr' + Control generation of '.pdr' sections. + +'-mgp32' +'-mfp32' + The register sizes are normally inferred from the ISA and ABI, but + these flags force a certain group of registers to be treated as 32 + bits wide at all times. '-mgp32' controls the size of + general-purpose registers and '-mfp32' controls the size of + floating-point registers. + +'-mips16' +'-no-mips16' + Generate code for the MIPS 16 processor. This is equivalent to + putting '.set mips16' at the start of the assembly file. + '-no-mips16' turns off this option. + +'-msmartmips' +'-mno-smartmips' + Enables the SmartMIPS extension to the MIPS32 instruction set. + This is equivalent to putting '.set smartmips' at the start of the + assembly file. '-mno-smartmips' turns off this option. + +'-mips3d' +'-no-mips3d' + Generate code for the MIPS-3D Application Specific Extension. This + tells the assembler to accept MIPS-3D instructions. '-no-mips3d' + turns off this option. + +'-mdmx' +'-no-mdmx' + Generate code for the MDMX Application Specific Extension. This + tells the assembler to accept MDMX instructions. '-no-mdmx' turns + off this option. + +'-mdsp' +'-mno-dsp' + Generate code for the DSP Release 1 Application Specific Extension. + This tells the assembler to accept DSP Release 1 instructions. + '-mno-dsp' turns off this option. + +'-mdspr2' +'-mno-dspr2' + Generate code for the DSP Release 2 Application Specific Extension. + This option implies -mdsp. This tells the assembler to accept DSP + Release 2 instructions. '-mno-dspr2' turns off this option. + +'-mmt' +'-mno-mt' + Generate code for the MT Application Specific Extension. This + tells the assembler to accept MT instructions. '-mno-mt' turns off + this option. + +'--construct-floats' +'--no-construct-floats' + The '--no-construct-floats' option disables the construction of + double width floating point constants by loading the two halves of + the value into the two single width floating point registers that + make up the double width register. By default '--construct-floats' + is selected, allowing construction of these floating point + constants. + +'--emulation=NAME' + This option causes 'as' to emulate 'as' configured for some other + target, in all respects, including output format (choosing between + ELF and ECOFF only), handling of pseudo-opcodes which may generate + debugging information or store symbol table information, and + default endianness. The available configuration names are: + 'mipsecoff', 'mipself', 'mipslecoff', 'mipsbecoff', 'mipslelf', + 'mipsbelf'. The first two do not alter the default endianness from + that of the primary target for which the assembler was configured; + the others change the default to little- or big-endian as indicated + by the 'b' or 'l' in the name. Using '-EB' or '-EL' will override + the endianness selection in any case. + + This option is currently supported only when the primary target + 'as' is configured for is a MIPS ELF or ECOFF target. Furthermore, + the primary target or others specified with '--enable-targets=...' + at configuration time must include support for the other format, if + both are to be available. For example, the Irix 5 configuration + includes support for both. + + Eventually, this option will support more configurations, with more + fine-grained control over the assembler's behavior, and will be + supported for more processors. + +'-nocpp' + 'as' ignores this option. It is accepted for compatibility with + the native tools. + +'--trap' +'--no-trap' +'--break' +'--no-break' + Control how to deal with multiplication overflow and division by + zero. '--trap' or '--no-break' (which are synonyms) take a trap + exception (and only work for Instruction Set Architecture level 2 + and higher); '--break' or '--no-trap' (also synonyms, and the + default) take a break exception. + +'-n' + When this option is used, 'as' will issue a warning every time it + generates a nop instruction from a macro. + +1.1 Structure of this Manual +============================ + +This manual is intended to describe what you need to know to use GNU +'as'. We cover the syntax expected in source files, including notation +for symbols, constants, and expressions; the directives that 'as' +understands; and of course how to invoke 'as'. + + We also cover special features in the machine specific configuration +of 'as', including assembler directives. + + On the other hand, this manual is _not_ intended as an introduction +to programming in assembly language--let alone programming in general! +In a similar vein, we make no attempt to introduce the machine +architecture; we do _not_ describe the instruction set, standard +mnemonics, registers or addressing modes that are standard to a +particular architecture. + +1.2 The GNU Assembler +===================== + +GNU 'as' is really a family of assemblers. This manual describes 'as', +a member of that family which is configured for the machine specific +architectures. If you use (or have used) the GNU assembler on one +architecture, you should find a fairly similar environment when you use +it on another architecture. Each version has much in common with the +others, including object file formats, most assembler directives (often +called "pseudo-ops") and assembler syntax. + + 'as' is primarily intended to assemble the output of the GNU C +compiler 'gcc' for use by the linker 'ld'. Nevertheless, we've tried to +make 'as' assemble correctly everything that other assemblers for the +same machine would assemble. + + Unlike older assemblers, 'as' is designed to assemble a source +program in one pass of the source file. This has a subtle impact on the +'.org' directive (*note '.org': Org.). + +1.3 Object File Formats +======================= + +The GNU assembler can be configured to produce several alternative +object file formats. For the most part, this does not affect how you +write assembly language programs; but directives for debugging symbols +are typically different in different file formats. *Note Symbol +Attributes: Symbol Attributes. For the machine specific target, 'as' is +configured to produce ELF format object files. + +1.4 Command Line +================ + +After the program name 'as', the command line may contain options and +file names. Options may appear in any order, and may be before, after, +or between file names. The order of file names is significant. + + '--' (two hyphens) by itself names the standard input file +explicitly, as one of the files for 'as' to assemble. + + Except for '--' any command line argument that begins with a hyphen +('-') is an option. Each option changes the behavior of 'as'. No +option changes the way another option works. An option is a '-' +followed by one or more letters; the case of the letter is important. +All options are optional. + + Some options expect exactly one file name to follow them. The file +name may either immediately follow the option's letter (compatible with +older assemblers) or it may be the next command argument (GNU standard). +These two command lines are equivalent: + + as -o my-object-file.o mumble.s + as -omy-object-file.o mumble.s + +1.5 Input Files +=============== + +We use the phrase "source program", abbreviated "source", to describe +the program input to one run of 'as'. The program may be in one or more +files; how the source is partitioned into files doesn't change the +meaning of the source. + + The source program is a concatenation of the text in all the files, +in the order specified. + + Each time you run 'as' it assembles exactly one source program. The +source program is made up of one or more files. (The standard input is +also a file.) + + You give 'as' a command line that has zero or more input file names. +The input files are read (from left file name to right). A command line +argument (in any position) that has no special meaning is taken to be an +input file name. + + If you give 'as' no file names it attempts to read one input file +from the 'as' standard input, which is normally your terminal. You may +have to type to tell 'as' there is no more program to assemble. + + Use '--' if you need to explicitly name the standard input file in +your command line. + + If the source is empty, 'as' produces a small, empty object file. + +Filenames and Line-numbers +-------------------------- + +There are two ways of locating a line in the input file (or files) and +either may be used in reporting error messages. One way refers to a +line number in a physical file; the other refers to a line number in a +"logical" file. *Note Error and Warning Messages: Errors. + + "Physical files" are those files named in the command line given to +'as'. + + "Logical files" are simply names declared explicitly by assembler +directives; they bear no relation to physical files. Logical file names +help error messages reflect the original source file, when 'as' source +is itself synthesized from other files. 'as' understands the '#' +directives emitted by the 'gcc' preprocessor. See also *note '.file': +File. + +1.6 Output (Object) File +======================== + +Every time you run 'as' it produces an output file, which is your +assembly language program translated into numbers. This file is the +object file. Its default name is 'a.out'. You can give it another name +by using the '-o' option. Conventionally, object file names end with +'.o'. The default name is used for historical reasons: older assemblers +were capable of assembling self-contained programs directly into a +runnable program. (For some formats, this isn't currently possible, but +it can be done for the 'a.out' format.) + + The object file is meant for input to the linker 'ld'. It contains +assembled program code, information to help 'ld' integrate the assembled +program into a runnable file, and (optionally) symbolic information for +the debugger. + +1.7 Error and Warning Messages +============================== + +'as' may write warnings and error messages to the standard error file +(usually your terminal). This should not happen when a compiler runs +'as' automatically. Warnings report an assumption made so that 'as' +could keep assembling a flawed program; errors report a grave problem +that stops the assembly. + + Warning messages have the format + + file_name:NNN:Warning Message Text + +(where NNN is a line number). If a logical file name has been given +(*note '.file': File.) it is used for the filename, otherwise the name +of the current input file is used. If a logical line number was given +then it is used to calculate the number printed, otherwise the actual +line in the current source file is printed. The message text is +intended to be self explanatory (in the grand Unix tradition). + + Error messages have the format + file_name:NNN:FATAL:Error Message Text + The file name and line number are derived as for warning messages. +The actual message text may be rather less explanatory because many of +them aren't supposed to happen. + +2 Command-Line Options +********************** + +This chapter describes command-line options available in _all_ versions +of the GNU assembler; see *note Machine Dependencies::, for options +specific to the machine specific target. + + If you are invoking 'as' via the GNU C compiler, you can use the +'-Wa' option to pass arguments through to the assembler. The assembler +arguments must be separated from each other (and the '-Wa') by commas. +For example: + + gcc -c -g -O -Wa,-alh,-L file.c + +This passes two options to the assembler: '-alh' (emit a listing to +standard output with high-level and assembly source) and '-L' (retain +local symbols in the symbol table). + + Usually you do not need to use this '-Wa' mechanism, since many +compiler command-line options are automatically passed to the assembler +by the compiler. (You can call the GNU compiler driver with the '-v' +option to see precisely what options it passes to each compilation pass, +including the assembler.) + +2.1 Enable Listings: '-a[cdhlns]' +================================= + +These options enable listing output from the assembler. By itself, '-a' +requests high-level, assembly, and symbols listing. You can use other +letters to select specific options for the list: '-ah' requests a +high-level language listing, '-al' requests an output-program assembly +listing, and '-as' requests a symbol table listing. High-level listings +require that a compiler debugging option like '-g' be used, and that +assembly listings ('-al') be requested also. + + Use the '-ac' option to omit false conditionals from a listing. Any +lines which are not assembled because of a false '.if' (or '.ifdef', or +any other conditional), or a true '.if' followed by an '.else', will be +omitted from the listing. + + Use the '-ad' option to omit debugging directives from the listing. + + Once you have specified one of these options, you can further control +listing output and its appearance using the directives '.list', +'.nolist', '.psize', '.eject', '.title', and '.sbttl'. The '-an' option +turns off all forms processing. If you do not request listing output +with one of the '-a' options, the listing-control directives have no +effect. + + The letters after '-a' may be combined into one option, _e.g._, +'-aln'. + + Note if the assembler source is coming from the standard input (e.g., +because it is being created by 'gcc' and the '-pipe' command line switch +is being used) then the listing will not contain any comments or +preprocessor directives. This is because the listing code buffers input +source lines from stdin only after they have been preprocessed by the +assembler. This reduces memory usage and makes the code more efficient. + +2.2 '--alternate' +================= + +Begin in alternate macro mode, see *note '.altmacro': Altmacro. + +2.3 '-D' +======== + +This option has no effect whatsoever, but it is accepted to make it more +likely that scripts written for other assemblers also work with 'as'. + +2.4 Work Faster: '-f' +===================== + +'-f' should only be used when assembling programs written by a (trusted) +compiler. '-f' stops the assembler from doing whitespace and comment +preprocessing on the input file(s) before assembling them. *Note +Preprocessing: Preprocessing. + + _Warning:_ if you use '-f' when the files actually need to be + preprocessed (if they contain comments, for example), 'as' does not + work correctly. + +2.5 '.include' Search Path: '-I' PATH +===================================== + +Use this option to add a PATH to the list of directories 'as' searches +for files specified in '.include' directives (*note '.include': +Include.). You may use '-I' as many times as necessary to include a +variety of paths. The current working directory is always searched +first; after that, 'as' searches any '-I' directories in the same order +as they were specified (left to right) on the command line. + +2.6 Difference Tables: '-K' +=========================== + +On the machine specific family, this option is allowed, but has no +effect. It is permitted for compatibility with the GNU assembler on +other platforms, where it can be used to warn when the assembler alters +the machine code generated for '.word' directives in difference tables. +The machine specific family does not have the addressing limitations +that sometimes lead to this alteration on other platforms. + +2.7 Include Local Symbols: '-L' +=============================== + +Symbols beginning with system-specific local label prefixes, typically +'.L' for ELF systems or 'L' for traditional a.out systems, are called +"local symbols". *Note Symbol Names::. Normally you do not see such +symbols when debugging, because they are intended for the use of +programs (like compilers) that compose assembler programs, not for your +notice. Normally both 'as' and 'ld' discard such symbols, so you do not +normally debug with them. + + This option tells 'as' to retain those local symbols in the object +file. Usually if you do this you also tell the linker 'ld' to preserve +those symbols. + +2.8 Configuring listing output: '--listing' +=========================================== + +The listing feature of the assembler can be enabled via the command line +switch '-a' (*note a::). This feature combines the input source file(s) +with a hex dump of the corresponding locations in the output object +file, and displays them as a listing file. The format of this listing +can be controlled by directives inside the assembler source (i.e., +'.list' (*note List::), '.title' (*note Title::), '.sbttl' (*note *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 01:45: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 84691B8C; Sun, 4 Jan 2015 01:45: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 709701542; Sun, 4 Jan 2015 01:45: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 t041jRTg002902; Sun, 4 Jan 2015 01:45:27 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t041jR6v002901; Sun, 4 Jan 2015 01:45:27 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501040145.t041jR6v002901@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 4 Jan 2015 01:45:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276652 - head/sys/powerpc/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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 01:45:27 -0000 Author: jhibbits Date: Sun Jan 4 01:45:26 2015 New Revision: 276652 URL: https://svnweb.freebsd.org/changeset/base/276652 Log: Truncate DB_SMALL_VALUE_MAX to a much lower value. Unlike the other architectures, the PowerPC kernel is loaded under the 2GB boundary. MFC after: 2 weeks Modified: head/sys/powerpc/include/db_machdep.h Modified: head/sys/powerpc/include/db_machdep.h ============================================================================== --- head/sys/powerpc/include/db_machdep.h Sun Jan 4 00:58:30 2015 (r276651) +++ head/sys/powerpc/include/db_machdep.h Sun Jan 4 01:45:26 2015 (r276652) @@ -87,7 +87,7 @@ typedef intptr_t db_expr_t; /* expressio #define inst_load(ins) 0 #define inst_store(ins) 0 -#define DB_SMALL_VALUE_MAX (0x7fffffff) +#define DB_SMALL_VALUE_MAX (KERNBASE-1) #define DB_SMALL_VALUE_MIN (-0x40001) #endif /* _POWERPC_DB_MACHDEP_H_ */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 08:41: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 32E49420; Sun, 4 Jan 2015 08:41:15 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id E7F0E2F6E; Sun, 4 Jan 2015 08:41:14 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id C6CA7422F57; Sun, 4 Jan 2015 19:22:49 +1100 (AEDT) Date: Sun, 4 Jan 2015 19:22:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Justin Hibbits Subject: Re: svn commit: r276652 - head/sys/powerpc/include In-Reply-To: <201501040145.t041jR6v002901@svn.freebsd.org> Message-ID: <20150104175630.N938@besplex.bde.org> References: <201501040145.t041jR6v002901@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Qdxf4Krv c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Y9atxNZRGnVNfphMyhYA:9 a=C8cKej9PWVs444H1:21 a=Ed0aNJ1LHaQMm8G0:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 08:41:15 -0000 On Sun, 4 Jan 2015, Justin Hibbits wrote: > Log: > Truncate DB_SMALL_VALUE_MAX to a much lower value. > > Unlike the other architectures, the PowerPC kernel is loaded under the 2GB > boundary. > > MFC after: 2 weeks > > Modified: > head/sys/powerpc/include/db_machdep.h > > Modified: head/sys/powerpc/include/db_machdep.h > ============================================================================== > --- head/sys/powerpc/include/db_machdep.h Sun Jan 4 00:58:30 2015 (r276651) > +++ head/sys/powerpc/include/db_machdep.h Sun Jan 4 01:45:26 2015 (r276652) > @@ -87,7 +87,7 @@ typedef intptr_t db_expr_t; /* expressio > #define inst_load(ins) 0 > #define inst_store(ins) 0 > > -#define DB_SMALL_VALUE_MAX (0x7fffffff) > +#define DB_SMALL_VALUE_MAX (KERNBASE-1) > #define DB_SMALL_VALUE_MIN (-0x40001) > > #endif /* _POWERPC_DB_MACHDEP_H_ */ DB_SMALL_VALUE was broken on all arches AFAIK. Hopefully it now sort of works for PowerPC, and you can fix it better for PowerPC and then other arches. It was first implemented in: X RCS file: /home/ncvs/src/sys/ddb/db_sym.c,v X Working file: db_sym.c X head: 1.35 X ... X ---------------------------- X revision 1.17 X date: 1997/01/16 11:27:10; author: bde; state: Exp; lines: +8 -2 X Fixed printing of small offsets. E.g., -4(%ebp) is now printed X as -0x4(%ebp) instead of as _APTD+0xffc(%ebp), and if GUPROF is X defined, 8(%ebp) is now printed as 0x8(%ebp) instead of as X GMON_PROF_HIRES+0x4(%ebp). X ---------------------------- This depends on magic symbols like _APTD. Someone broke this on i386 by removing these magic symbols without updating the definition of DB_SMALL_VALUE_MAX. Other arches are even more broken. They never had a suitable magic symbol and/or the i386 value was copied without changing it except to expand to 64 bits. The brokenness is especially large on 64-bit arches. It causes small negative offsets from the stack or frame pointer to be misclassified as large, so they are printed as huge cryptic unsigned values instead of as small signed values. E.g., -24(%ebp) is printed as 0xffffffe8(%ebp) on i386 and -24(%rbp) is printed as 0xffffffffffffffe8(%ebp) on amd64. I use the following quick fixes for i386: X Index: db_sym.c X =================================================================== X RCS file: /home/ncvs/src/sys/ddb/db_sym.c,v X retrieving revision 1.35 X diff -u -2 -r1.35 db_sym.c X --- db_sym.c 24 Feb 2004 22:51:42 -0000 1.35 X +++ db_sym.c 25 Feb 2004 10:11:09 -0000 X @@ -303,5 +303,9 @@ X if (name == 0) X value = off; X +#ifdef magic_large_symbols_unbroken X if (value >= DB_SMALL_VALUE_MIN && value <= DB_SMALL_VALUE_MAX) { X +#else X + if (off >= DB_SMALL_VALUE_MIN && off <= DB_SMALL_VALUE_MAX) { X +#endif X db_printf("%+#lr", (long)off); X return; X Index: db_machdep.h X =================================================================== X RCS file: /home/ncvs/src/sys/i386/include/db_machdep.h,v X retrieving revision 1.17 X diff -u -2 -r1.17 db_machdep.h X --- db_machdep.h 15 Sep 2001 11:06:07 -0000 1.17 X +++ db_machdep.h 9 Nov 2003 15:54:26 -0000 X @@ -87,7 +87,9 @@ X * _APTmap = 0xffc00000. Accepting this is OK (unless db_maxoff is X * set to >= 0x400000 - (max stack offset)). X + * XXX _APTD and _APTmap went away. Now there are SMP_prvspace = 0xffc00000 X + * and lapic = 0xfffff000. X */ X #define DB_SMALL_VALUE_MAX 0x7fffffff X -#define DB_SMALL_VALUE_MIN (-0x400001) X +#define DB_SMALL_VALUE_MIN (-0x3fffff) X X #endif /* !_MACHINE_DB_MACHDEP_H_ */ I forget why I changed the logic in db_sym.c. It is only a heuristic. DB_SMALL_VALUE_MAX should probably be related to KERNBASE on all arches, or just be much smaller. 0x7fffffff obviously doesn't work on i386 either if KERNBASE is smaller than that. Namespace problems prevent defining the DB* symbols in terms of KERNBASE and even more so for symbols like _APTD that were only defined in object files. 0x7fffffff allowed reduction of KERNBASE well below its default value at the time of the original implementation. It was only about 32MB or 256MB below the top. Now its default is 3GB and 2GB isn't much lower, but it is not very useful on i386 to change the split to much more for the kernel and much less for applications. DB_SMALL_VALUE_MIN is related to the memory layout. There may be symbols near the top of the address space no matter what KERNBASE is. This happens on i386 -- most kernel symbols are near KERNBASE (default 0xc0000000) but there are some magic symbols related mainly to page tables near the top. We want to print all of these symbols by name, or at least as large unsigned values (the latter happens too much for constant literals in ddb and gdb, and objdump is worse). So DB_SMALL_VALUE_MIN must be fairly small. Also, the address space should be laid out so as to not have any important symbols near the top, to leave space for DB_SMALL_VALUE_MIN not needing to be too small. To avoid the namespace bugs and to de-magic the limits, the definitions show be something like: /* Set in locore; currently only used in ldscript: */ extern char kernbase[]; /* If not already defined somwhere: */ extern char end[]; #define DB_SMALL_VALUE_MAX kernbase #define DB_SMALL_VALUE_MIN (-(intptr_t)end) /* does this work? */ Or with less magic: /* Set these in locore like kernbase: */ extern char db_smallest_ksym[]; extern char db_largest_ksym[]; #define DB_SMALL_VALUE_MAX db_smallest_ksym #define DB_SMALL_VALUE_MIN (-(intptr_t)db_largest_ksym) It is difficult to define the magic symbols with best values to work with the heuristic even when you control them. Addresses outside of the statically known address space may be generated by loading modules and malloc()ing data. These shouldn't be printed as signed. The above definitions give too wide a range of small values. So db_largest_ksym should be set to something more like its current value of a few MB below the top, perhaps to max(this value, end). I don't know how to write this expression in asm. It could be written in C: #define DB_SMALL_VALUE_MIN MAX(-3xfffff, -(intptr_t)db_largest_ksym) db_largest_ksym must also be larger than INTPTR_MAX for the sign magic to work. That probably won't happen automatically if all static kernel symbols are in the lower half of the address space. The i386 kernel address space now looks like: X 00400000 A kernload X bfc00000 A PTmap X bfeff000 A PTD X bfeffbfc A PTDpde X c0000000 A kernbase X c0453fd0 T btext X c0454039 t begin X ... X c092f494 A _end X c092f494 A end This hasn't changed for more than 10 years. Apparently the page table stuff was moved from the top of the address space to just below kernbase, so there are no symbols near the top. DB_SMALL_VALUE_MAX needs to be below kernbase. The low kernload symbol might be a problem. The amd64 address space now looks like: X w uart_sab82532_class X w uart_z8530_class No values? X 0000000000200000 A kernphys X ffff800000000000 A loc_PTmap X ffff804000000000 A loc_PDmap X ffff804020000000 A loc_PDPmap X ffff804020100000 A loc_PML4map X ffff804020100800 A loc_PML4pml4e X fffff80000000000 A dmapbase X fffffc0000000000 A dmapend X ffffffff80000000 A kernbase X ffffffff802baa50 T btext X ... X ffffffff8123be08 A _end Essentially the same. The smallest symbol of interest is much further below kernbase, and I think malloced memory is below kernbase too (there is only 2GB above). Bruce From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 10:34: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 33C09E15; Sun, 4 Jan 2015 10:34: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 13DCE2E8F; Sun, 4 Jan 2015 10:34: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 t04AY41C048619; Sun, 4 Jan 2015 10:34:04 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04AY3nc048613; Sun, 4 Jan 2015 10:34:03 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501041034.t04AY3nc048613@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 4 Jan 2015 10:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276654 - in head/sys: compat/freebsd32 compat/linux 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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 10:34:05 -0000 Author: dchagin Date: Sun Jan 4 10:34:02 2015 New Revision: 276654 URL: https://svnweb.freebsd.org/changeset/base/276654 Log: Indeed, instead of hiding the kern___getcwd() bug by bogus cast in r276564, change path type to char * (pathnames are always char *). And remove bogus casts of malloc(). kern___getcwd() internally doesn't actually use or support u_char * paths, except to copy them to a normal char * path. These changes are not visible to libc as libc/gen/getcwd.c misdeclares __getcwd() as taking a plain char * path. While here remove _SYS_SYSPROTO_H_ for __getcwd() syscall as we always have sysproto.h. Pointed out by: bde MFC after: 1 week Modified: head/sys/compat/freebsd32/syscalls.master head/sys/compat/linux/linux_getcwd.c head/sys/kern/syscalls.master head/sys/kern/vfs_cache.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/compat/freebsd32/syscalls.master Sun Jan 4 10:34:02 2015 (r276654) @@ -583,7 +583,7 @@ 323 AUE_NULL OBSOL thr_wakeup 324 AUE_MLOCKALL NOPROTO { int mlockall(int how); } 325 AUE_MUNLOCKALL NOPROTO { int munlockall(void); } -326 AUE_GETCWD NOPROTO { int __getcwd(u_char *buf, u_int buflen); } +326 AUE_GETCWD NOPROTO { int __getcwd(char *buf, u_int buflen); } 327 AUE_NULL NOPROTO { int sched_setparam (pid_t pid, \ const struct sched_param *param); } Modified: head/sys/compat/linux/linux_getcwd.c ============================================================================== --- head/sys/compat/linux/linux_getcwd.c Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/compat/linux/linux_getcwd.c Sun Jan 4 10:34:02 2015 (r276654) @@ -186,7 +186,7 @@ linux_getcwd_scandir(lvpp, uvpp, bpp, bu dirbuflen = DIRBLKSIZ; if (dirbuflen < va.va_blocksize) dirbuflen = va.va_blocksize; - dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK); + dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); #if 0 unionread: @@ -413,7 +413,7 @@ out: int linux_getcwd(struct thread *td, struct linux_getcwd_args *args) { - caddr_t bp, bend, path; + char *bp, *bend, *path; int error, len, lenused; #ifdef DEBUG @@ -428,9 +428,9 @@ linux_getcwd(struct thread *td, struct l else if (len < 2) return ERANGE; - path = (char *)malloc(len, M_TEMP, M_WAITOK); + path = malloc(len, M_TEMP, M_WAITOK); - error = kern___getcwd(td, (u_char *)path, UIO_SYSSPACE, len); + error = kern___getcwd(td, path, UIO_SYSSPACE, len); if (!error) { lenused = strlen(path) + 1; if (lenused <= args->bufsize) { Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/kern/syscalls.master Sun Jan 4 10:34:02 2015 (r276654) @@ -571,7 +571,7 @@ 323 AUE_NULL OBSOL thr_wakeup 324 AUE_MLOCKALL STD { int mlockall(int how); } 325 AUE_MUNLOCKALL STD { int munlockall(void); } -326 AUE_GETCWD STD { int __getcwd(u_char *buf, u_int buflen); } +326 AUE_GETCWD STD { int __getcwd(char *buf, u_int buflen); } 327 AUE_NULL STD { int sched_setparam (pid_t pid, \ const struct sched_param *param); } Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/kern/vfs_cache.c Sun Jan 4 10:34:02 2015 (r276654) @@ -1043,14 +1043,6 @@ vfs_cache_lookup(ap) return (error); } - -#ifndef _SYS_SYSPROTO_H_ -struct __getcwd_args { - u_char *buf; - u_int buflen; -}; -#endif - /* * XXX All of these sysctls would probably be more productive dead. */ @@ -1069,7 +1061,7 @@ sys___getcwd(td, uap) } int -kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, u_int buflen) +kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen) { char *bp, *tmpbuf; struct filedesc *fdp; Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Sun Jan 4 05:40:41 2015 (r276653) +++ head/sys/sys/syscallsubr.h Sun Jan 4 10:34:02 2015 (r276654) @@ -57,7 +57,7 @@ struct stat; struct thr_param; struct __wrusage; -int kern___getcwd(struct thread *td, u_char *buf, enum uio_seg bufseg, +int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen); int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 10:40: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 54DC623C; Sun, 4 Jan 2015 10:40: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 3537C2F00; Sun, 4 Jan 2015 10:40: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 t04AeRTN050068; Sun, 4 Jan 2015 10:40:27 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04AeO0h050051; Sun, 4 Jan 2015 10:40:24 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501041040.t04AeO0h050051@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 4 Jan 2015 10:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276655 - in head/sys: compat/freebsd32 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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 10:40:27 -0000 Author: dchagin Date: Sun Jan 4 10:40:23 2015 New Revision: 276655 URL: https://svnweb.freebsd.org/changeset/base/276655 Log: Regen for r276654 (__getcwd()). Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #define FREEBSD32_SYS_syscall 0 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ const char *freebsd32_syscallnames[] = { Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #include "opt_compat.h" Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 4 10:40:23 2015 (r276655) @@ -1615,7 +1615,7 @@ systrace_args(int sysnum, void *params, /* __getcwd */ case 326: { struct __getcwd_args *p = params; - uarg[0] = (intptr_t) p->buf; /* u_char * */ + uarg[0] = (intptr_t) p->buf; /* char * */ uarg[1] = p->buflen; /* u_int */ *n_args = 2; break; @@ -5859,7 +5859,7 @@ systrace_entry_setargdesc(int sysnum, in case 326: switch(ndx) { case 0: - p = "u_char *"; + p = "char *"; break; case 1: p = "u_int"; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/kern/init_sysent.c Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #include "opt_compat.h" Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/kern/syscalls.c Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ const char *syscallnames[] = { Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/kern/systrace_args.c Sun Jan 4 10:40:23 2015 (r276655) @@ -1712,7 +1712,7 @@ systrace_args(int sysnum, void *params, /* __getcwd */ case 326: { struct __getcwd_args *p = params; - uarg[0] = (intptr_t) p->buf; /* u_char * */ + uarg[0] = (intptr_t) p->buf; /* char * */ uarg[1] = p->buflen; /* u_int */ *n_args = 2; break; @@ -6108,7 +6108,7 @@ systrace_entry_setargdesc(int sysnum, in case 326: switch(ndx) { case 0: - p = "u_char *"; + p = "char *"; break; case 1: p = "u_int"; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/sys/syscall.h Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #define SYS_syscall 0 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/sys/syscall.mk Sun Jan 4 10:40:23 2015 (r276655) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin +# created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin MIASM = \ syscall.o \ exit.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Sun Jan 4 10:34:02 2015 (r276654) +++ head/sys/sys/sysproto.h Sun Jan 4 10:40:23 2015 (r276655) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 274462 2014-11-13 05:26:14Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin */ #ifndef _SYS_SYSPROTO_H_ @@ -905,7 +905,7 @@ struct munlockall_args { register_t dummy; }; struct __getcwd_args { - char buf_l_[PADL_(u_char *)]; u_char * buf; char buf_r_[PADR_(u_char *)]; + char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; char buflen_l_[PADL_(u_int)]; u_int buflen; char buflen_r_[PADR_(u_int)]; }; struct sched_setparam_args { From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:36: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 9F095A1E; Sun, 4 Jan 2015 12:36:14 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 5F6691150; Sun, 4 Jan 2015 12:36:13 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 11B4FD64629; Sun, 4 Jan 2015 23:36:04 +1100 (AEDT) Date: Sun, 4 Jan 2015 23:36:03 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hans Petter Selasky Subject: Re: svn commit: r276626 - head/sys/kern In-Reply-To: <54A87C28.2030304@selasky.org> Message-ID: <20150104211113.A1445@besplex.bde.org> References: <201501031721.t03HLKHp060964@svn.freebsd.org> <20150104045338.V2929@besplex.bde.org> <54A87C28.2030304@selasky.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R8o6R7hX c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=MvYiGNustJpYgA7wAtwA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 12:36:14 -0000 On Sun, 4 Jan 2015, Hans Petter Selasky wrote: > On 01/03/15 21:17, Bruce Evans wrote: >> On Sat, 3 Jan 2015, Hans Petter Selasky wrote: >> >>> Log: >>> Rework r276532 a bit. Always avoid recursing into the console drivers >>> clients, hence they might not handle it very well. This change allows >>> debugging mutex problems with kernel console drivers when >>> "debug.witness.skipspin=0" is set in the boot environment. >> >> This keeps getting worse. Console drivers are required to be reentrant >> so that console i/o works in any context, including reentering the >> console driver a couple of times. Please trim quotes. [quotes trimmed excessively since 2 copies of everything is too much already] >>> ... >>> + if (mtx_owned(&cnputs_mtx)) >>> + return; >> >> The largest obvious new bug here is losing all output from panic() >> (and possibly other critical output) for panics that occur while >> the mutex is held by the same CPU. The previous change made this >> case work (for reentrant console drivers) instead of deadlocking. > Thanks for your analysis. I can get the the full backtrace if you like, but > not right now. It is quite long! > > Quickly summarized, the problem is that printf recurses from inside a > mtx_lock_spin() because of a LOR, due to some testing I'm doing, which is > because witness calls directly to printf() again. In other words, we cannot > use printf() to debug problems in the console drivers, and actually printf() > should be disabled when we are inside certain code paths, simply. I now remember more of the problem. Broken console drivers use mutex locks. The most broken ones don't even declare these locks as MTX_NOWITNESS. Thus when a LOR is detected in one of these locks, it causes endless recursion into the console driver. Finally, LORs _should_ be detected for many uses of these locks, since the fundamantal brokenness of using mutex locks in console drivers includes there being no single correct order for them. printf() is required to work in any context. It shouldn't be disabled. Making it work for witnessing of itself is especially easy compared with making it work for ddb'ing itself. For witness, the recursion only occurs in certain contexts that can be limited. For ddb, it occurs on any instruction within the console driver (when all the instructions are stepped through). printf() is perhaps the must useful place to put a ddb breakpoint at. I often sprinkle debugging printf()s which are rarely excuted and put a breakpoint a printf() instead of in all the callers. Then when the printf() is reached, I sometimes step a fair way into it. The surprising thing is that the recursion/deadlock doesn't happen more often. This seems to be because: - most systems configure MTX_SKIPSPIN, so witness never detects LORs with spinlocks - most console drivers aren't so broken as to not use MTX_NOWITNESS You said that you force !MTX_SKIPSPIN. I suspect that you also use one of the broken console drivers. (Oops, you say later that you are using vt). vt and usb_serial are obviously broken, since they do unconditional mutex locking with a non-recursive witnessed mutex, without even the kdb_active hack to ignore the lock while in ddb. The above change helps a little for these drivers. The higher-level lock prevents interference from console calls from cnputs(). All other console calls, which include all output when PRINTF_BUFR_SIZE is configured and all ddb output, just deadlock as before. Note that when the less broken console drivers are called while kdb is active, the kdb_active hack results in the locking having no effect. Recursive cases just proceed (but without risk of recursing endless unless another lock is (mis)used), so the lock is useless in this case. This case must work without the lock, and once it does the lock is not needed in non-ddb cases either. The quick fix for recursion in witness is to use MTX_NOWITNESS for all console driver locks. This is undesireable since it breaks witnessing of these locks in other contexts, but sio always did it. MTX_RECURSE might also be needed, but is too dangerous, and it takes very large locking bugs or rare races (something like printf()s in trap handlers) for recursion to occur, once you have removed the recursion for witnessing a bug in yourself. The fundamental LOR problem with using mutex locking in console drivers is: - console drivers need to be callable from anywhere, so their locks need to be ordered after all others - however, to be useful on devices with the console shared with a normal device, the same lock needs to be used for the console part as for the main part. (Sharing the lock gives potential deadlock or just too long a delay before the console i/o is done, but normally the main part releases the lock soon enough.) In the main part, the lock is not special. It shouldn't be MTX_NOWITNESS, and other locks may be acquired while it is held. For no LOR for acquiring these other locks, the other locks need to be ordered after the console lock. This conflicts with the requirement that the console lock be ordered after all others. The locking table is ordered so that there is no LOR for the normal use. Thus there is almost always a LOR for console use. This LOR is normally harmless, but not always. It may indicate larger locking bugs in console drivers. To avoid seeing this LOR and getting endless recursion from it, MTX_NOWITNESS must be used. I tried reordering the locking table to put console locks last. This seemed to work at first, but that was only because MTX_SKIPSPIN was enabled. When spinlocks were properly witnessed, (false) LORs were detected in normal operation. I now use the following which gives only minor reording by pushing down console locks as far as possible. This was only done carefully for console and serial drivers that I used (sio, cy and syscons). X diff -c2 ./kern/subr_witness.c~ ./kern/subr_witness.c X *** ./kern/subr_witness.c~ Tue Apr 10 01:51:12 2012 X --- ./kern/subr_witness.c Tue Oct 21 19:14:20 2014 X *************** X *** 629,635 **** X #endif X { "rm.mutex_mtx", &lock_class_mtx_spin }, X { "sio", &lock_class_mtx_spin }, X { "scrlock", &lock_class_mtx_spin }, X - #ifdef __i386__ X { "cy", &lock_class_mtx_spin }, X #endif X --- 629,637 ---- X #endif X { "rm.mutex_mtx", &lock_class_mtx_spin }, X + #define MISORDERED X + #undef MISORDERED X + #ifdef MISORDERED X { "sio", &lock_class_mtx_spin }, X { "scrlock", &lock_class_mtx_spin }, X { "cy", &lock_class_mtx_spin }, X #endif cy is neither i386-specific or a console driver. X *************** X *** 639,643 **** X --- 641,647 ---- X #endif X { "scc_hwmtx", &lock_class_mtx_spin }, X + #ifdef MISORDERED X { "uart_hwmtx", &lock_class_mtx_spin }, X + #endif X { "fast_taskqueue", &lock_class_mtx_spin }, X { "intr table", &lock_class_mtx_spin }, X *************** X *** 650,662 **** X --- 654,679 ---- X { "rm_spinlock", &lock_class_mtx_spin }, X { "turnstile chain", &lock_class_mtx_spin }, X + #ifndef MISORDERED X + { "sio", &lock_class_mtx_spin }, X + { "cy", &lock_class_mtx_spin }, X + #endif X { "turnstile lock", &lock_class_mtx_spin }, X { "sched lock", &lock_class_mtx_spin }, X { "td_contested", &lock_class_mtx_spin }, When the interrupt handler calls the scheduler, its lock must be ordered before scheduler locks. X + #ifndef MISORDERED X + { "scrlock", &lock_class_mtx_spin }, X + #endif X { "callout", &lock_class_mtx_spin }, X { "entropy harvest mutex", &lock_class_mtx_spin }, X + #ifdef MISORDERED X { "syscons video lock", &lock_class_mtx_spin }, X + #endif X #ifdef SMP X { "smp rendezvous", &lock_class_mtx_spin }, X #endif X + #ifndef MISORDERED X + { "uart_hwmtx", &lock_class_mtx_spin }, X + { "syscons video lock", &lock_class_mtx_spin }, X + #endif I think uart can be pushed down this far. Its locked regions are too short, but I think it releases the lock before acquiring others, so it can be a leaf lock for all uses. This has barely been tested. X #ifdef __powerpc__ X { "tlb0", &lock_class_mtx_spin }, > Instead of a nice LOR printout, I immediately hit a panic, because other > mutexes marked as non-recursive suddenly got recursed inside the console > drivers, in this case "dev/vt". For now, printouts are not allowed if inside > "cnputc()". This at least got me on with the debugging. Previously > "cnputs_mtx" was marked non-recursive, and I think that is correct. So it was just new bug in vt. Try the quick fix for its console mutex. Or better, use syscons and use the quick fix for its mutexes. Its bugs are better understood and partly fixed in a one of my versions. vt is also missing the kdb_active hack. It also has some lower-level spin mutexes (mainly VTBUF_LOCK()?). This gives obvious deadlocks. E.g., one CPU may be doing normal outout and hold VTBUF_LOCK(). Then a debugger trap on another CPU will first stop the first CPU and then deadlock on VTBUF_LOCK(). If the kdb_active hack is used to avoid this deadlock, then the locking simply doesn't work. vt's locks don't seem to be in the static LOR table. The table is small, so there must be many other locks like that. I don't see how a default order can work. Non-recursive is mostly correct. The recursion indicates another bug. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:38: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 E42D7B5F; Sun, 4 Jan 2015 12:38: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 CE1351174; Sun, 4 Jan 2015 12:38: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 t04Cc4AC008305; Sun, 4 Jan 2015 12:38:04 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04Cc1Ui008283; Sun, 4 Jan 2015 12:38:01 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201501041238.t04Cc1Ui008283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sun, 4 Jan 2015 12:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276657 - head/lib/libpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 12:38:05 -0000 Author: joel (doc committer) Date: Sun Jan 4 12:38:00 2015 New Revision: 276657 URL: https://svnweb.freebsd.org/changeset/base/276657 Log: mdoc: sort SEE ALSO. Modified: head/lib/libpmc/pmc.corei7.3 head/lib/libpmc/pmc.corei7uc.3 head/lib/libpmc/pmc.haswell.3 head/lib/libpmc/pmc.ivybridge.3 head/lib/libpmc/pmc.ivybridgexeon.3 head/lib/libpmc/pmc.sandybridgexeon.3 head/lib/libpmc/pmc.soft.3 head/lib/libpmc/pmc.ucf.3 head/lib/libpmc/pmc.westmere.3 head/lib/libpmc/pmc.westmereuc.3 head/lib/libpmc/pmc.xscale.3 head/lib/libpmc/pmc_capabilities.3 Modified: head/lib/libpmc/pmc.corei7.3 ============================================================================== --- head/lib/libpmc/pmc.corei7.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.corei7.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -1549,18 +1549,18 @@ Counts number of segment register loads. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.corei7uc.3 ============================================================================== --- head/lib/libpmc/pmc.corei7uc.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.corei7uc.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -853,18 +853,18 @@ refreshed or needs to go into a power do .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.haswell.3 ============================================================================== --- head/lib/libpmc/pmc.haswell.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.haswell.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -936,25 +936,25 @@ Dirty L2 cache lines evicted by demand. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , +.Xr pmc.haswelluc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , +.Xr pmc.ivybridge 3 , +.Xr pmc.ivybridgexeon 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.haswelluc 3 , -.Xr pmc.ivybridge 3 , -.Xr pmc.ivybridgexeon 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- head/lib/libpmc/pmc.ivybridge.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.ivybridge.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -844,23 +844,23 @@ Dirty L2 cache lines evicted by the MLC .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , +.Xr pmc.ivybridgexeon 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.ivybridgexeon 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.ivybridgexeon.3 ============================================================================== --- head/lib/libpmc/pmc.ivybridgexeon.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.ivybridgexeon.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -874,23 +874,23 @@ Dirty L2 cache lines filling the L2. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , +.Xr pmc.ivybridge 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.ivybridge 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , .Xr pmc.sandybridgexeon 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.sandybridgexeon.3 ============================================================================== --- head/lib/libpmc/pmc.sandybridgexeon.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.sandybridgexeon.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -987,23 +987,24 @@ Split locks in SQ. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , +.Xr pmc.haswelluc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , +.Xr pmc.ivybridge 3 , +.Xr pmc.ivybridgexeon 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.ivybridge 3 , -.Xr pmc.ivybridgexeon 3 , .Xr pmc.sandybridge 3 , .Xr pmc.sandybridgeuc 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.soft.3 ============================================================================== --- head/lib/libpmc/pmc.soft.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.soft.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -76,17 +76,17 @@ Write page fault. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.ucf.3 ============================================================================== --- head/lib/libpmc/pmc.ucf.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.ucf.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -86,18 +86,18 @@ offset C0H under device number 0 and Fun .Xr pmc.atom 3 , .Xr pmc.core 3 , .Xr pmc.core2 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmere 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.westmere.3 ============================================================================== --- head/lib/libpmc/pmc.westmere.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.westmere.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -1371,18 +1371,18 @@ Counts number of SID integer 64 bit shif .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmereuc 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmereuc 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.westmereuc.3 ============================================================================== --- head/lib/libpmc/pmc.westmereuc.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.westmereuc.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -1056,18 +1056,18 @@ disabled. .Xr pmc 3 , .Xr pmc.atom 3 , .Xr pmc.core 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , .Xr pmc.iaf 3 , -.Xr pmc.ucf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , .Xr pmc.p4 3 , .Xr pmc.p5 3 , .Xr pmc.p6 3 , -.Xr pmc.corei7 3 , -.Xr pmc.corei7uc 3 , -.Xr pmc.westmere 3 , .Xr pmc.soft 3 , .Xr pmc.tsc 3 , +.Xr pmc.ucf 3 , +.Xr pmc.westmere 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , .Xr hwpmc 4 Modified: head/lib/libpmc/pmc.xscale.3 ============================================================================== --- head/lib/libpmc/pmc.xscale.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc.xscale.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -132,9 +132,9 @@ and the underlying hardware events used. .El .Sh SEE ALSO .Xr pmc 3 , +.Xr pmc.soft 3 , .Xr pmc_cpuinfo 3 , .Xr pmclog 3 , -.Xr pmc.soft 3 , .Xr hwpmc 4 .Sh HISTORY The Modified: head/lib/libpmc/pmc_capabilities.3 ============================================================================== --- head/lib/libpmc/pmc_capabilities.3 Sun Jan 4 12:05:43 2015 (r276656) +++ head/lib/libpmc/pmc_capabilities.3 Sun Jan 4 12:38:00 2015 (r276657) @@ -223,8 +223,8 @@ The argument to the function was invalid .Xr pmc_allocate 3 , .Xr pmc_get_driver_stats 3 , .Xr pmc_name_of_capability 3 , -.Xr pmc_name_of_cputype 3 , .Xr pmc_name_of_class 3 , +.Xr pmc_name_of_cputype 3 , .Xr pmc_name_of_event 3 , .Xr pmc_name_of_mode 3 , .Xr hwpmc 4 From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:42:09 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 35BB6D41; Sun, 4 Jan 2015 12:42:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21B33128C; Sun, 4 Jan 2015 12:42:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t04Cg9Hs012228; Sun, 4 Jan 2015 12:42:09 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04Cg8lS012227; Sun, 4 Jan 2015 12:42:08 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201501041242.t04Cg8lS012227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sun, 4 Jan 2015 12:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276658 - head/usr.bin/sort X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 12:42:09 -0000 Author: joel (doc committer) Date: Sun Jan 4 12:42:08 2015 New Revision: 276658 URL: https://svnweb.freebsd.org/changeset/base/276658 Log: mdoc: use An macro. Modified: head/usr.bin/sort/sort.1.in Modified: head/usr.bin/sort/sort.1.in ============================================================================== --- head/usr.bin/sort/sort.1.in Sun Jan 4 12:38:00 2015 (r276657) +++ head/usr.bin/sort/sort.1.in Sun Jan 4 12:42:08 2015 (r276658) @@ -610,9 +610,9 @@ A command first appeared in .At v3 . .Sh AUTHORS -Gabor Kovesdan , +.An Gabor Kovesdan Aq Mt gabor@FreeBSD.org , .Pp -Oleg Moskalenko +.An Oleg Moskalenko Aq Mt mom040267@gmail.com .Sh NOTES This implementation of .Nm From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 12:49: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 40D0DEEB; Sun, 4 Jan 2015 12:49: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 2C11C12EF; Sun, 4 Jan 2015 12:49: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 t04CnQkD013141; Sun, 4 Jan 2015 12:49:26 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04CnPZ7013137; Sun, 4 Jan 2015 12:49:25 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201501041249.t04CnPZ7013137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sun, 4 Jan 2015 12:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276659 - in head: lib/libc/iconv sbin/camcontrol sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 12:49:26 -0000 Author: joel (doc committer) Date: Sun Jan 4 12:49:24 2015 New Revision: 276659 URL: https://svnweb.freebsd.org/changeset/base/276659 Log: mdoc: paragraph improvements. Modified: head/lib/libc/iconv/iconv.3 head/sbin/camcontrol/camcontrol.8 head/sbin/hastd/hast.conf.5 Modified: head/lib/libc/iconv/iconv.3 ============================================================================== --- head/lib/libc/iconv/iconv.3 Sun Jan 4 12:42:08 2015 (r276658) +++ head/lib/libc/iconv/iconv.3 Sun Jan 4 12:49:24 2015 (r276659) @@ -176,8 +176,8 @@ may be .Dv NULL . In this case, the shift sequence for the destination switching to the initial state is discarded. -.Pp .El +.Pp The .Fn __iconv function works just like Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sun Jan 4 12:42:08 2015 (r276658) +++ head/sbin/camcontrol/camcontrol.8 Sun Jan 4 12:49:24 2015 (r276659) @@ -1364,8 +1364,8 @@ Defaults to Confirm yes to dangerous options such as .Fl e without prompting for confirmation. -.Pp .El +.Pp If the password specified for any action commands does not match the configured password for the specified user the command will fail. .Pp @@ -1434,8 +1434,8 @@ additional unlock calls until after a po Confirm yes to dangerous options such as .Fl e without prompting for confirmation -.Pp .El +.Pp The password for all HPA commands is limited to 32 characters, longer passwords will fail. .It Ic fwdownload @@ -1924,7 +1924,6 @@ power-on or hardware reset! .Pp .Em DO NOT use this on a device which has an active filesystem! -.Pp .Bd -literal -offset indent camcontrol persist da0 -v -i read_keys .Ed Modified: head/sbin/hastd/hast.conf.5 ============================================================================== --- head/sbin/hastd/hast.conf.5 Sun Jan 4 12:42:08 2015 (r276658) +++ head/sbin/hastd/hast.conf.5 Sun Jan 4 12:49:24 2015 (r276659) @@ -270,39 +270,33 @@ program is executed with: .It Ic " role " .Pp Executed on both primary and secondary nodes when resource role is changed. -.Pp .It Ic " connect " .Pp Executed on both primary and secondary nodes when connection for the given resource between the nodes is established. -.Pp .It Ic " disconnect " .Pp Executed on both primary and secondary nodes when connection for the given resource between the nodes is lost. -.Pp .It Ic " syncstart " .Pp Executed on primary node when synchronization process of secondary node is started. -.Pp .It Ic " syncdone " .Pp Executed on primary node when synchronization process of secondary node is completed successfully. -.Pp .It Ic " syncintr " .Pp Executed on primary node when synchronization process of secondary node is interrupted, most likely due to secondary node outage or connection failure between the nodes. -.Pp .It Ic " split-brain " .Pp Executed on both primary and secondary nodes when split-brain condition is detected. -.Pp .El +.Pp The .Aq path argument should contain full path to executable program. @@ -330,7 +324,6 @@ It can be one of: .Ar init , .Ar secondary , .Ar primary . -.Pp .It Ic metaflush on | off .Pp When set to @@ -349,7 +342,6 @@ will disable automatically. The default value is .Va on . -.Pp .It Ic name Aq name .Pp GEOM provider name that will appear as From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 15:26: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 C192B3AD; Sun, 4 Jan 2015 15:26: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 ADD9564AD4; Sun, 4 Jan 2015 15:26: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 t04FQ3bp088657; Sun, 4 Jan 2015 15:26:03 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04FQ3uX088656; Sun, 4 Jan 2015 15:26:03 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201501041526.t04FQ3uX088656@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sun, 4 Jan 2015 15:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276660 - 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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 15:26:03 -0000 Author: kevlo Date: Sun Jan 4 15:26:02 2015 New Revision: 276660 URL: https://svnweb.freebsd.org/changeset/base/276660 Log: Change the type of blksize_t from uint32_t to a POSIX compliant int32_t http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html Modified: head/sys/sys/_types.h Modified: head/sys/sys/_types.h ============================================================================== --- head/sys/sys/_types.h Sun Jan 4 12:49:24 2015 (r276659) +++ head/sys/sys/_types.h Sun Jan 4 15:26:02 2015 (r276660) @@ -35,7 +35,7 @@ /* * Standard type definitions. */ -typedef __uint32_t __blksize_t; /* file block size */ +typedef __int32_t __blksize_t; /* file block size */ typedef __int64_t __blkcnt_t; /* file block count */ typedef __int32_t __clockid_t; /* clock_gettime()... */ typedef __uint32_t __fflags_t; /* file flags */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 19:06: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 C37D4841; Sun, 4 Jan 2015 19:06:43 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 533EBD1E; Sun, 4 Jan 2015 19:06:43 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id ex7so2049421wid.12; Sun, 04 Jan 2015 11:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=YZCQj/4NPzrOXN3Fty4xeSmzn6w8NzUz1Q03uxxUOyk=; b=xEZyjS5+cqIkC+NC+NA26LZP6ZSnZCeE4KREx6FJBHh9mDHC+j+T48OBHHpVVXA22b 2FFki1rmKq0qOZjyQOOeVc3eyRK8QVD/RXpdP4iR52/C+XuO4vknD1YCcbjmMrcKF8iN am9meKdpk95R1KUHx9Nw6NtirelfGbWwNaF/t32+DUgq4Vp3enyUYnswP/8io5WDFsCr WrCZsbneSDZ78Vu2QjPxQjRDGnBR7D/xr2KT87twVOLExjWNpGNVT2GmWK+Qv1XfcSPF Adolucqx9MjH7GlhenMPm2VlwJrIjv+m4NAic426xFHtL3hC6MyoP4xllEG3Xvp6y9UV cWww== X-Received: by 10.180.75.42 with SMTP id z10mr18374627wiv.70.1420398401608; Sun, 04 Jan 2015 11:06:41 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id q10sm62715028wjx.34.2015.01.04.11.06.39 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 04 Jan 2015 11:06:40 -0800 (PST) Date: Sun, 4 Jan 2015 20:06:37 +0100 From: Mateusz Guzik To: "Bjoern A. Zeeb" Subject: Re: svn commit: r276424 - head/sys/kern Message-ID: <20150104190637.GA5807@dft-labs.eu> References: <201412302140.sBULek5f076019@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 19:06:43 -0000 On Tue, Dec 30, 2014 at 10:45:43PM +0000, Bjoern A. Zeeb wrote: > > > On 30 Dec 2014, at 21:40 , Mateusz Guzik wrote: > > > > Author: mjg > > Date: Tue Dec 30 21:40:45 2014 > > New Revision: 276424 > > URL: https://svnweb.freebsd.org/changeset/base/276424 > > > > Log: > > Convert vfs hash lock from a mutex to an rwlock. > > This is very obvious from the change. > > What is not and should be described as well is some of this: > > - Why? > - What are the benefits? > - What are the locking implications? > - Does it make a performance difference? If yes, was it measured? > - … (you got the idea) > Sorry for late reply. This is just one of many minor things which showed up in lock profiling during make -j 40 buildkernel. I don't expect the gain to be quite noticeable (at least not now since there way more serious bottlenecks), thus there are no claims stuff is way faster in the commit message. This change is entirely transparent to callers and callees. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 19:55: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 05F3110D; Sun, 4 Jan 2015 19:55: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 E46CB340D; Sun, 4 Jan 2015 19:55: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 t04JtjqJ017344; Sun, 4 Jan 2015 19:55:45 GMT (envelope-from gibbs@FreeBSD.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04JtjCM017342; Sun, 4 Jan 2015 19:55:45 GMT (envelope-from gibbs@FreeBSD.org) Message-Id: <201501041955.t04JtjCM017342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gibbs set sender to gibbs@FreeBSD.org using -f From: "Justin T. Gibbs" Date: Sun, 4 Jan 2015 19:55:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276665 - in head: share/man/man9 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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 19:55:46 -0000 Author: gibbs Date: Sun Jan 4 19:55:44 2015 New Revision: 276665 URL: https://svnweb.freebsd.org/changeset/base/276665 Log: Prevent live-lock and access of destroyed data in taskqueue_drain_all(). Phabric: https://reviews.freebsd.org/D1247 Reviewed by: jhb, avg Sponsored by: Spectra Logic Corporation sys/kern_subr_taskqueue.c: Modify taskqueue_drain_all() processing to use a temporary "barrier task", rather than rely on a user task that may be destroyed during taskqueue_drain_all()'s execution. The barrier task is queued behind all previously queued tasks and then has its priority elevated so that future tasks cannot pass it in the queue. Use a similar barrier scheme to drain threads processing current tasks. This requires taskqueue_run_locked() to insert and remove the taskqueue_busy object for the running thread for every task processed. share/man/man9/taskqueue.9: Remove warning about live-lock issues with taskqueue_drain_all() and indicate that it does not wait for tasks queued after it begins processing. Modified: head/share/man/man9/taskqueue.9 head/sys/kern/subr_taskqueue.c Modified: head/share/man/man9/taskqueue.9 ============================================================================== --- head/share/man/man9/taskqueue.9 Sun Jan 4 19:05:16 2015 (r276664) +++ head/share/man/man9/taskqueue.9 Sun Jan 4 19:55:44 2015 (r276665) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 24, 2014 +.Dd January 4, 2015 .Dt TASKQUEUE 9 .Os .Sh NAME @@ -285,10 +285,16 @@ The .Fn taskqueue_drain_all function is used to wait for all pending and running tasks that are enqueued on the taskqueue to finish. -The caller must arrange that the tasks are not re-enqueued. -Note that +Tasks posted to the taskqueue after .Fn taskqueue_drain_all -currently does not handle tasks with delayed enqueueing. +begins processing, +including pending enqueues scheduled by a previous call to +.Fn taskqueue_enqueue_timeout , +do not extend the wait time of +.Fn taskqueue_drain_all +and may complete after +.Fn taskqueue_drain_all +returns. .Pp The .Fn taskqueue_block Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Sun Jan 4 19:05:16 2015 (r276664) +++ head/sys/kern/subr_taskqueue.c Sun Jan 4 19:55:44 2015 (r276665) @@ -56,6 +56,8 @@ struct taskqueue_busy { TAILQ_ENTRY(taskqueue_busy) tb_link; }; +struct task * const TB_DRAIN_WAITER = (struct task *)0x1; + struct taskqueue { STAILQ_HEAD(, task) tq_queue; taskqueue_enqueue_fn tq_enqueue; @@ -241,6 +243,7 @@ taskqueue_enqueue_locked(struct taskqueu /* Return with lock released. */ return (0); } + int taskqueue_enqueue(struct taskqueue *queue, struct task *task) { @@ -302,12 +305,82 @@ taskqueue_enqueue_timeout(struct taskque } static void -taskqueue_drain_running(struct taskqueue *queue) +taskqueue_task_nop_fn(void *context, int pending) +{ +} + +/* + * Block until all currently queued tasks in this taskqueue + * have begun execution. Tasks queued during execution of + * this function are ignored. + */ +static void +taskqueue_drain_tq_queue(struct taskqueue *queue) { + struct task t_barrier; - while (!TAILQ_EMPTY(&queue->tq_active)) - TQ_SLEEP(queue, &queue->tq_active, &queue->tq_mutex, - PWAIT, "-", 0); + if (STAILQ_EMPTY(&queue->tq_queue)) + return; + + /* + * Enqueue our barrier with the lowest possible priority + * so we are inserted after all current tasks. + */ + TASK_INIT(&t_barrier, 0, taskqueue_task_nop_fn, &t_barrier); + taskqueue_enqueue_locked(queue, &t_barrier); + + /* + * Raise the barrier's priority so newly queued tasks cannot + * pass it. + */ + t_barrier.ta_priority = USHRT_MAX; + + /* + * Once the barrier has executed, all previously queued tasks + * have completed or are currently executing. + */ + while (t_barrier.ta_pending != 0) + TQ_SLEEP(queue, &t_barrier, &queue->tq_mutex, PWAIT, "-", 0); +} + +/* + * Block until all currently executing tasks for this taskqueue + * complete. Tasks that begin execution during the execution + * of this function are ignored. + */ +static void +taskqueue_drain_tq_active(struct taskqueue *queue) +{ + struct taskqueue_busy tb_marker, *tb_first; + + if (TAILQ_EMPTY(&queue->tq_active)) + return; + + /* Block taskq_terminate().*/ + queue->tq_callouts++; + + /* + * Wait for all currently executing taskqueue threads + * to go idle. + */ + tb_marker.tb_running = TB_DRAIN_WAITER; + TAILQ_INSERT_TAIL(&queue->tq_active, &tb_marker, tb_link); + while (TAILQ_FIRST(&queue->tq_active) != &tb_marker) + TQ_SLEEP(queue, &tb_marker, &queue->tq_mutex, PWAIT, "-", 0); + TAILQ_REMOVE(&queue->tq_active, &tb_marker, tb_link); + + /* + * Wakeup any other drain waiter that happened to queue up + * without any intervening active thread. + */ + tb_first = TAILQ_FIRST(&queue->tq_active); + if (tb_first != NULL && tb_first->tb_running == TB_DRAIN_WAITER) + wakeup(tb_first); + + /* Release taskqueue_terminate(). */ + queue->tq_callouts--; + if ((queue->tq_flags & TQ_FLAGS_ACTIVE) == 0) + wakeup_one(queue->tq_threads); } void @@ -334,14 +407,16 @@ static void taskqueue_run_locked(struct taskqueue *queue) { struct taskqueue_busy tb; + struct taskqueue_busy *tb_first; struct task *task; int pending; TQ_ASSERT_LOCKED(queue); tb.tb_running = NULL; - TAILQ_INSERT_TAIL(&queue->tq_active, &tb, tb_link); while (STAILQ_FIRST(&queue->tq_queue)) { + TAILQ_INSERT_TAIL(&queue->tq_active, &tb, tb_link); + /* * Carefully remove the first task from the queue and * zero its pending count. @@ -358,10 +433,13 @@ taskqueue_run_locked(struct taskqueue *q TQ_LOCK(queue); tb.tb_running = NULL; wakeup(task); + + TAILQ_REMOVE(&queue->tq_active, &tb, tb_link); + tb_first = TAILQ_FIRST(&queue->tq_active); + if (tb_first != NULL && + tb_first->tb_running == TB_DRAIN_WAITER) + wakeup(tb_first); } - TAILQ_REMOVE(&queue->tq_active, &tb, tb_link); - if (TAILQ_EMPTY(&queue->tq_active)) - wakeup(&queue->tq_active); } void @@ -448,19 +526,13 @@ taskqueue_drain(struct taskqueue *queue, void taskqueue_drain_all(struct taskqueue *queue) { - struct task *task; if (!queue->tq_spin) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, __func__); TQ_LOCK(queue); - task = STAILQ_LAST(&queue->tq_queue, task, ta_link); - if (task != NULL) - while (task->ta_pending != 0) - TQ_SLEEP(queue, task, &queue->tq_mutex, PWAIT, "-", 0); - taskqueue_drain_running(queue); - KASSERT(STAILQ_EMPTY(&queue->tq_queue), - ("taskqueue queue is not empty after draining")); + taskqueue_drain_tq_queue(queue); + taskqueue_drain_tq_active(queue); TQ_UNLOCK(queue); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 20:08: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 2FFB34A5; Sun, 4 Jan 2015 20:08: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 1B4B935C2; Sun, 4 Jan 2015 20:08: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 t04K8PU6022617; Sun, 4 Jan 2015 20:08:25 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04K8P6A022616; Sun, 4 Jan 2015 20:08:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501042008.t04K8P6A022616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 4 Jan 2015 20:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276666 - 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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 20:08:26 -0000 Author: ian Date: Sun Jan 4 20:08:24 2015 New Revision: 276666 URL: https://svnweb.freebsd.org/changeset/base/276666 Log: Eliminate uninitialized variable warnings in kernel and module builds when building with gcc 4.2 This has been requested several times over the past few months by several people (including me), because gcc 4.2 just gets it wrong too often. It's causing us to litter the code with lots of bogus initializers just to squelch the warnings. We still have clang and coverity telling us about uninitialized variables, and they do so more accurately. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sun Jan 4 19:55:44 2015 (r276665) +++ head/sys/conf/kern.mk Sun Jan 4 20:08:24 2015 (r276666) @@ -31,7 +31,8 @@ CWARNEXTRA?= -Wno-error-tautological-com -Wno-error-pointer-sign -Wno-error-format -Wno-error-parentheses .endif -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40300 +.if ${COMPILER_TYPE} == "gcc" +.if ${COMPILER_VERSION} >= 40300 # Catch-all for all the things that are in our tree, but for which we're # not yet ready for this compiler. Note: we likely only really "support" # building with gcc 4.8 and newer. Nothing older has been tested. @@ -40,6 +41,10 @@ CWARNEXTRA?= -Wno-error=inline -Wno-erro -Wno-error=array-bounds -Wno-error=address \ -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes \ -Wno-error=strict-overflow -Wno-error=overflow +.else +# For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. +CWARNEXTRA?= -Wno-uninitialized +.endif .endif # External compilers may not support our format extensions. Allow them From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 21:53: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 435A8C36; Sun, 4 Jan 2015 21:53:59 +0000 (UTC) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09B32283D; Sun, 4 Jan 2015 21:53:59 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id p10so26720638pdj.41; Sun, 04 Jan 2015 13:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=939G5Qz9ZBATjaPlEh85scHK+s1Qn0sN5I+2fwKKSZI=; b=0pzfsggO7SMBu8iSzMVhJnkTZ6s2zodkmhU2UqEHIJq8v18vu5aaaxAa7t+CUkNTCt sMqbyBjzTHLbIUnk0+GJt4D6sO5ZVQM4thYjK+xuehX6+XgRcXGgkg48rm04Ykhvl7ny X6HjH9ZwouR4+drmBFFOK1Hr2fbEy5sOM4CadhBTatGqGLJOi1fyzdXFwXzlHE7jtccB 1YClhaPmUjfkIJEicAw/hGS1tT4nCTFZtuaEaXUuw5fwnjMvzX6X/MXwfOWj721LXDdC iUWYikgLySAQxJgKplE7djmjDANOGpHFfnL+Zx8UjKxaMyG+0fm5x6eafZyFio0bxtTA SBNQ== X-Received: by 10.66.184.175 with SMTP id ev15mr108339358pac.78.1420408438595; Sun, 04 Jan 2015 13:53:58 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:d0fa:d4cd:367f:233d? ([2601:8:ab80:7d6:d0fa:d4cd:367f:233d]) by mx.google.com with ESMTPSA id ah1sm40239088pad.16.2015.01.04.13.53.57 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 04 Jan 2015 13:53:57 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_EA093892-D0C9-4847-A611-887012DA5B8A"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r276521 - head/contrib/netbsd-tests/lib/libm From: Garrett Cooper In-Reply-To: <20150102185046.K943@besplex.bde.org> Date: Sun, 4 Jan 2015 13:53:52 -0800 Message-Id: <9E7EDF01-88C2-4CB5-B26F-1F557E4441DF@gmail.com> References: <201501020057.t020vf4d063191@svn.freebsd.org> <20150102185046.K943@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 21:53:59 -0000 --Apple-Mail=_EA093892-D0C9-4847-A611-887012DA5B8A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jan 2, 2015, at 0:03, Bruce Evans wrote: > On Fri, 2 Jan 2015, Garrett Cooper wrote: >=20 >> Log: >> Reset errno in :scalbnf_val and :scalbnl_val before running the tests = so the >> tested errno isn't stale >=20 > It is a bug to even test errno. No function in libm accesses errno. I=92ll have to look again, but I=92m pretty sure NetBSD is using this to = test errors dealing with ranges and input, and it=92s probably = implementation dependent. It=92s still interesting that it was setting EINVAL (errno =3D=3D 2) = when running the tests and not others (and that potentially deserves = investigation). What=92s also curious is that this issue doesn=92t manifest itself on = 11-CURRENT as well, but I haven=92t taken the time to figure out why = that is, yet (apart from having merged some revisions from head which = didn=92t affect things), so the underlying issue is probably buried = somewhere in another library (libc, libthr, etc). >> This was needed in order for the test to pass on amd64 with stable/10 >>=20 >> MFC after: 3 days >>=20 >> Modified: >> head/contrib/netbsd-tests/lib/libm/t_scalbn.c >>=20 >> Modified: head/contrib/netbsd-tests/lib/libm/t_scalbn.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/contrib/netbsd-tests/lib/libm/t_scalbn.c Thu Jan 1 = 23:21:46 2015 (r276520) >> +++ head/contrib/netbsd-tests/lib/libm/t_scalbn.c Fri Jan 2 = 00:57:40 2015 (r276521) >> @@ -225,6 +225,9 @@ ATF_TC_BODY(scalbnf_val, tc) >> double rv; >>=20 >> for (i =3D 0; i < tcnt; i++) { >> +#ifdef __FreeBSD__ >> + errno =3D 0; >> +#endif >=20 > This is not FreeBSD-specific. A correct test might test > errno under the condition (math_errhandling & MATH_ERRNO), but that > would be a lot of work to test a fundamentally broken implementation. It definitely isn=92t. It=92s an item that I=92ll need to bring up with = the NetBSD folks/resolve differently in the future. >> rv =3D scalbnf(tests[i].inval, tests[i].exp); >> ATF_CHECK_EQ_MSG(errno, tests[i].error, >> "test %zu: errno %d instead of %d", i, errno, >=20 > The tests might set errno elsewhere, but scalbnf() obviously doesn't > in FreeBSD (and shouldn't unless MATH_ERRNO), so the = ATF_CHECK_EQ_MSG() > test can have no effect. It is surprising that it doesn't sometimes > fail if errno is always 0. If it always succeeds, then tests[i].error > must be dead data (always 0) and the ATF_CHECK_EQ_MSG() test dead code > (always pass). Hmmm=85 How is MATH_ERRNO supposed to work in FreeBSD. Based on = documentation I found =97 = http://en.cppreference.com/w/cpp/numeric/math/math_errhandling =97 it=92s = supposed to be used for reporting errors with errno since c++11, but = that doesn=92t seem to be implemented in libc++/libstdc++ (at least not = based on my limited grep)? FWIW it seems like this value should be 0, = not 1... Thanks! $ grep -r MATH_ERRNO contrib/binutils contrib/gcc* contrib/lib* = contrib/llvm/ include lib sys/sys/ lib/msun/src/math.h:#define MATH_ERRNO 1 contrib/libc++/include/cmath: MATH_ERRNO // C99 $ --Apple-Mail=_EA093892-D0C9-4847-A611-887012DA5B8A 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 iQEcBAEBCgAGBQJUqbZwAAoJEMZr5QU6S73eXBcH/1NQf+GIElihOz9QhypYVeMs diZH2sinafOeN0lTGk8HJemYU9Q/GaQbK4bYUj5xOxpnl9Fon5wsycs9F1HwXAqI lYFNzsIZFbPSPjY15BAYVdP5Y8QyNWOOnV4Fzh+/SQg1PLwhXNbuOnZS1v0bAfZj mIuUbSQ+3CtGcTfuUg2KirG0AVZ4TtEy2oDrPVX4j+KHySYpGhnicJblox1pQji6 o2T0TIvjrnXKlTq0dPRIZ8AlV28TjnTbRZ1jGXhkUJOSt8W5XZzZl0jqy+TEUqA+ +uZvIBysKfQGDrazVdwaazeMeos2xlAxbWw2+Pl7zy71G1U+nx6ky3Esqmrz4SI= =psvE -----END PGP SIGNATURE----- --Apple-Mail=_EA093892-D0C9-4847-A611-887012DA5B8A-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:08: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 7EDB4127; Sun, 4 Jan 2015 22:08:51 +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 095C629E0; Sun, 4 Jan 2015 22:08:50 +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 t04M8mdS076694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 5 Jan 2015 01:08:48 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t04M8mlX076693; Mon, 5 Jan 2015 01:08:48 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 5 Jan 2015 01:08:48 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r276626 - head/sys/kern Message-ID: <20150104220848.GU15484@FreeBSD.org> References: <201501031721.t03HLKHp060964@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501031721.t03HLKHp060964@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, avg@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 22:08:51 -0000 Hi! On Sat, Jan 03, 2015 at 05:21:20PM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Sat Jan 3 17:21:19 2015 H> New Revision: 276626 H> URL: https://svnweb.freebsd.org/changeset/base/276626 H> H> Log: H> Rework r276532 a bit. Always avoid recursing into the console drivers H> clients, hence they might not handle it very well. This change allows H> debugging mutex problems with kernel console drivers when H> "debug.witness.skipspin=0" is set in the boot environment. H> H> MFC after: 1 week I'd ask Andriy avg@ to review r276532 and this change. AFAIR, he attacked this problem in 2011/2012 and it appeared much more complex than just adding MTX_RECURSE flag. H> Modified: H> head/sys/kern/kern_cons.c H> H> Modified: head/sys/kern/kern_cons.c H> ============================================================================== H> --- head/sys/kern/kern_cons.c Sat Jan 3 16:48:08 2015 (r276625) H> +++ head/sys/kern/kern_cons.c Sat Jan 3 17:21:19 2015 (r276626) H> @@ -512,6 +512,13 @@ cnputs(char *p) H> int unlock_reqd = 0; H> H> if (use_cnputs_mtx) { H> + /* H> + * NOTE: Debug prints and/or witness printouts in H> + * console driver clients can cause the "cnputs_mtx" H> + * mutex to recurse. Simply return if that happens. H> + */ H> + if (mtx_owned(&cnputs_mtx)) H> + return; H> mtx_lock_spin(&cnputs_mtx); H> unlock_reqd = 1; H> } H> @@ -601,13 +608,7 @@ static void H> cn_drvinit(void *unused) H> { H> H> - /* H> - * NOTE: Debug prints and/or witness printouts in console H> - * driver clients can cause the "cnputs_mtx" mutex to H> - * recurse. Make sure the "MTX_RECURSE" flags is set! H> - */ H> - mtx_init(&cnputs_mtx, "cnputs_mtx", NULL, MTX_SPIN | H> - MTX_NOWITNESS | MTX_RECURSE); H> + mtx_init(&cnputs_mtx, "cnputs_mtx", NULL, MTX_SPIN | MTX_NOWITNESS); H> use_cnputs_mtx = 1; H> } H> H> -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:25: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 8A99C688; Sun, 4 Jan 2015 22:25: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 5C5422CA0; Sun, 4 Jan 2015 22:25: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 t04MPIwe092681; Sun, 4 Jan 2015 22:25:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04MPH9s092663; Sun, 4 Jan 2015 22:25:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501042225.t04MPH9s092663@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 4 Jan 2015 22:25:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276668 - in head: . etc/mtree sbin/ifconfig sbin/ifconfig/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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 22:25:18 -0000 Author: ngie Date: Sun Jan 4 22:25:16 2015 New Revision: 276668 URL: https://svnweb.freebsd.org/changeset/base/276668 Log: Integrate sbin/ifconfig/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division Added: head/sbin/ifconfig/tests/Makefile (contents, props changed) Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.tests.dist head/sbin/ifconfig/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jan 4 21:16:53 2015 (r276667) +++ head/ObsoleteFiles.inc Sun Jan 4 22:25:16 2015 (r276668) @@ -308,7 +308,6 @@ OLD_DIRS+=usr/include/clang/3.4 OLD_FILES+=usr/share/mk/src.opts.mk # 20140505: Reject PR kern/187551 OLD_DIRS+=usr/tests/sbin/ifconfig -OLD_FILES+=usr/tests/sbin/ifconfig/Kyuafile OLD_FILES+=usr/tests/sbin/ifconfig/fibs_test # 20140502: Removal of lindev(4) OLD_FILES+=usr/share/man/man4/lindev.4.gz Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Jan 4 21:16:53 2015 (r276667) +++ head/etc/mtree/BSD.tests.dist Sun Jan 4 22:25:16 2015 (r276668) @@ -160,6 +160,8 @@ .. growfs .. + ifconfig + .. mdconfig .. .. Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Sun Jan 4 21:16:53 2015 (r276667) +++ head/sbin/ifconfig/Makefile Sun Jan 4 22:25:16 2015 (r276668) @@ -65,4 +65,8 @@ MAN= ifconfig.8 CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs WARNS?= 2 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/sbin/ifconfig/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/ifconfig/tests/Makefile Sun Jan 4 22:25:16 2015 (r276668) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR}/../../.. +SRCTOP= ${.CURDIR}/../../.. +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/sbin/ifconfig + +TESTSDIR= ${TESTSBASE}/sbin/ifconfig + +NETBSD_ATF_TESTS_SH= nonexistent_test + +.include + +.include From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 22:37: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 C5E79A0E; Sun, 4 Jan 2015 22: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 B18BE2E38; Sun, 4 Jan 2015 22: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 t04MbkO3097840; Sun, 4 Jan 2015 22:37:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04MbkEp097835; Sun, 4 Jan 2015 22:37:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501042237.t04MbkEp097835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 4 Jan 2015 22:37:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276669 - in head: bin/cat bin/cat/tests etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 22:37:46 -0000 Author: ngie Date: Sun Jan 4 22:37:44 2015 New Revision: 276669 URL: https://svnweb.freebsd.org/changeset/base/276669 Log: Integrate bin/cat/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division Added: head/bin/cat/tests/ head/bin/cat/tests/Makefile (contents, props changed) Modified: head/bin/cat/Makefile head/etc/mtree/BSD.tests.dist Modified: head/bin/cat/Makefile ============================================================================== --- head/bin/cat/Makefile Sun Jan 4 22:25:16 2015 (r276668) +++ head/bin/cat/Makefile Sun Jan 4 22:37:44 2015 (r276669) @@ -1,6 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PROG= cat +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/bin/cat/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/cat/tests/Makefile Sun Jan 4 22:37:44 2015 (r276669) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR}/../../.. +SRCTOP= ${.CURDIR}/../../.. +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/cat + +TESTSDIR= ${TESTSBASE}/bin/cat + +NETBSD_ATF_TESTS_SH= cat_test + +.include + +.include Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Jan 4 22:25:16 2015 (r276668) +++ head/etc/mtree/BSD.tests.dist Sun Jan 4 22:37:44 2015 (r276669) @@ -6,6 +6,8 @@ /set type=dir uname=root gname=wheel mode=0755 . bin + cat + .. chown .. date From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 23:14: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 ABC33FF1; Sun, 4 Jan 2015 23:14: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 97DD71354; Sun, 4 Jan 2015 23:14: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 t04NE5qm016431; Sun, 4 Jan 2015 23:14:05 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04NE5CD016429; Sun, 4 Jan 2015 23:14:05 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501042314.t04NE5CD016429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 4 Jan 2015 23:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276670 - in head/sys/dev: altera/pio beri/virtio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 04 Jan 2015 23:14:05 -0000 Author: br Date: Sun Jan 4 23:14:04 2015 New Revision: 276670 URL: https://svnweb.freebsd.org/changeset/base/276670 Log: Do not configure Altera PIO device on ARM startup. PIO is a device implemented in soft-core and becomes available after flashing FPGA only. Modified: head/sys/dev/altera/pio/pio.c head/sys/dev/beri/virtio/virtio.c Modified: head/sys/dev/altera/pio/pio.c ============================================================================== --- head/sys/dev/altera/pio/pio.c Sun Jan 4 22:37:44 2015 (r276669) +++ head/sys/dev/altera/pio/pio.c Sun Jan 4 23:14:04 2015 (r276670) @@ -178,8 +178,6 @@ pio_attach(device_t dev) sc->bst = rman_get_bustag(sc->res[0]); sc->bsh = rman_get_bushandle(sc->res[0]); - WRITE4(sc, PIO_DATA, 0); - if ((node = ofw_bus_get_node(sc->dev)) == -1) return (ENXIO); Modified: head/sys/dev/beri/virtio/virtio.c ============================================================================== --- head/sys/dev/beri/virtio/virtio.c Sun Jan 4 22:37:44 2015 (r276669) +++ head/sys/dev/beri/virtio/virtio.c Sun Jan 4 23:14:04 2015 (r276670) @@ -211,8 +211,6 @@ setup_pio(device_t dev, char *name, devi SLIST_FOREACH(ic, &fdt_ic_list_head, fdt_ics) { if (ic->iph == pio_node) { *pio_dev = ic->dev; - PIO_CONFIGURE(*pio_dev, PIO_OUT_ALL, - PIO_UNMASK_ALL); return (0); } } From owner-svn-src-head@FreeBSD.ORG Sun Jan 4 23:41: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 D66D2412; Sun, 4 Jan 2015 23:41: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 C2B2F17EE; Sun, 4 Jan 2015 23:41: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 t04NfIdM028158; Sun, 4 Jan 2015 23:41:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t04NfI2G028157; Sun, 4 Jan 2015 23:41:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501042341.t04NfI2G028157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 4 Jan 2015 23:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276671 - head/contrib/netbsd-tests/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.18-1 Precedence: list List-Id: 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, 04 Jan 2015 23:41:19 -0000 Author: ngie Date: Sun Jan 4 23:41:17 2015 New Revision: 276671 URL: https://svnweb.freebsd.org/changeset/base/276671 Log: Expect :arithmetic_ops_body to fail with syntax errors on FreeBSD MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/bin/expr/t_expr.sh Modified: head/contrib/netbsd-tests/bin/expr/t_expr.sh ============================================================================== --- head/contrib/netbsd-tests/bin/expr/t_expr.sh Sun Jan 4 23:14:04 2015 (r276670) +++ head/contrib/netbsd-tests/bin/expr/t_expr.sh Sun Jan 4 23:41:17 2015 (r276671) @@ -105,6 +105,9 @@ arithmetic_ops_head() { atf_set "descr" "Dangling arithemtic operator" } arithmetic_ops_body() { + # Begin FreeBSD + atf_expect_fail "the following testcases fail with syntax errors on FreeBSD" + # End FreeBSD test_expr '.java_wrapper : /' '0' test_expr '4 : \*' '0' test_expr '4 : +' '0' From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 00:03: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 40383926; Mon, 5 Jan 2015 00:03: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 2CAAF29F5; Mon, 5 Jan 2015 00:03: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 t0503hgc040527; Mon, 5 Jan 2015 00:03:43 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0503h0I040526; Mon, 5 Jan 2015 00:03:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501050003.t0503h0I040526@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 5 Jan 2015 00:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276673 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 00:03:43 -0000 Author: ngie Date: Mon Jan 5 00:03:42 2015 New Revision: 276673 URL: https://svnweb.freebsd.org/changeset/base/276673 Log: Bump .Dd again for the change done in r276483 Pointyhat to: me Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Mon Jan 5 00:02:11 2015 (r276672) +++ head/share/man/man7/build.7 Mon Jan 5 00:03:42 2015 (r276673) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2014 +.Dd December 31, 2014 .Dt BUILD 7 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 00:50: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 95D9B65C; Mon, 5 Jan 2015 00:50: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 771D13154; Mon, 5 Jan 2015 00:50: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 t050oIH1064806; Mon, 5 Jan 2015 00:50:18 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t050oHCU064802; Mon, 5 Jan 2015 00:50:17 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501050050.t050oHCU064802@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 5 Jan 2015 00:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276679 - in head/sys: dev/vt/hw/fb powerpc/ps3 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 00:50:18 -0000 Author: nwhitehorn Date: Mon Jan 5 00:50:16 2015 New Revision: 276679 URL: https://svnweb.freebsd.org/changeset/base/276679 Log: Make PS3 work with the userspace kboot loader. loader.ps3 will disappear from the tree in the near future. Done at: Hackathon Modified: head/sys/dev/vt/hw/fb/vt_fb.c head/sys/powerpc/ps3/ps3_syscons.c head/sys/sys/fbio.h Modified: head/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- head/sys/dev/vt/hw/fb/vt_fb.c Mon Jan 5 00:15:27 2015 (r276678) +++ head/sys/dev/vt/hw/fb/vt_fb.c Mon Jan 5 00:50:16 2015 (r276679) @@ -154,6 +154,9 @@ vt_fb_setpixel(struct vt_device *vd, int c = info->fb_cmap[color]; o = info->fb_stride * y + x * FBTYPE_GET_BYTESPP(info); + if (info->fb_flags & FB_FLAG_NOWRITE) + return; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); switch (FBTYPE_GET_BYTESPP(info)) { @@ -205,6 +208,9 @@ vt_fb_blank(struct vt_device *vd, term_c info = vd->vd_softc; c = info->fb_cmap[color]; + if (info->fb_flags & FB_FLAG_NOWRITE) + return; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); switch (FBTYPE_GET_BYTESPP(info)) { @@ -260,6 +266,9 @@ vt_fb_bitblt_bitmap(struct vt_device *vd b = m = 0; bpl = (width + 7) >> 3; /* 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); Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Mon Jan 5 00:15:27 2015 (r276678) +++ head/sys/powerpc/ps3/ps3_syscons.c Mon Jan 5 00:50:16 2015 (r276679) @@ -155,7 +155,8 @@ ps3fb_remap(void) sc->fb_info.fb_pbase = fb_paddr; for (va = 0; va < PS3FB_SIZE; va += PAGE_SIZE) pmap_kenter_attr(0x10000000 + va, fb_paddr + va, - VM_MEMATTR_WRITE_COMBINING); + VM_MEMATTR_WRITE_COMBINING); + sc->fb_info.fb_flags &= ~FB_FLAG_NOWRITE; } static int @@ -175,10 +176,12 @@ ps3fb_init(struct vt_device *vd) sc->fb_info.fb_bpp = sc->fb_info.fb_stride / sc->fb_info.fb_width * 8; /* - * The loader puts the FB at 0x10000000, so use that for now. + * Arbitrarily choose address for the framebuffer */ sc->fb_info.fb_vbase = 0x10000000; + sc->fb_info.fb_flags |= FB_FLAG_NOWRITE; /* Not available yet */ + sc->fb_info.fb_cmsize = 16; /* 32-bit VGA palette */ vt_generate_cons_palette(sc->fb_info.fb_cmap, COLOR_FORMAT_RGB, Modified: head/sys/sys/fbio.h ============================================================================== --- head/sys/sys/fbio.h Mon Jan 5 00:15:27 2015 (r276678) +++ head/sys/sys/fbio.h Mon Jan 5 00:50:16 2015 (r276679) @@ -135,9 +135,10 @@ struct fb_info { void *fb_priv; /* First argument for read/write. */ const char *fb_name; uint32_t fb_flags; +#define FB_FLAG_NOMMAP 1 /* mmap unsupported. */ +#define FB_FLAG_NOWRITE 2 /* disable writes for the time being */ int fb_stride; int fb_bpp; /* bits per pixel */ -#define FB_FLAG_NOMMAP 1 /* mmap unsupported. */ uint32_t fb_cmap[16]; }; From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 01:05: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 F2F679B3; Mon, 5 Jan 2015 01:05: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 C54C133C3; Mon, 5 Jan 2015 01:05: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 t0515aBH071877; Mon, 5 Jan 2015 01:05:36 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0515abb071875; Mon, 5 Jan 2015 01:05:36 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501050105.t0515abb071875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 5 Jan 2015 01:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276680 - head/sys/powerpc/ps3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 01:05:37 -0000 Author: nwhitehorn Date: Mon Jan 5 01:05:35 2015 New Revision: 276680 URL: https://svnweb.freebsd.org/changeset/base/276680 Log: Use FDT properties to identify a PS3 if present. Modified: head/sys/powerpc/ps3/platform_ps3.c head/sys/powerpc/ps3/ps3_syscons.c Modified: head/sys/powerpc/ps3/platform_ps3.c ============================================================================== --- head/sys/powerpc/ps3/platform_ps3.c Mon Jan 5 00:50:16 2015 (r276679) +++ head/sys/powerpc/ps3/platform_ps3.c Mon Jan 5 01:05:35 2015 (r276680) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "platform_if.h" #include "ps3-hvcall.h" @@ -103,8 +105,17 @@ PLATFORM_DEF(ps3_platform); static int ps3_probe(platform_t plat) { + phandle_t root; + char compatible[64]; + + root = OF_finddevice("/"); + if (OF_getprop(root, "compatible", compatible, sizeof(compatible)) <= 0) + return (BUS_PROBE_NOWILDCARD); + + if (strncmp(compatible, "sony,ps3", sizeof(compatible)) != 0) + return (BUS_PROBE_NOWILDCARD); - return (BUS_PROBE_NOWILDCARD); + return (BUS_PROBE_SPECIFIC); } static int Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Mon Jan 5 00:50:16 2015 (r276679) +++ head/sys/powerpc/ps3/ps3_syscons.c Mon Jan 5 01:05:35 2015 (r276680) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -95,9 +96,7 @@ ps3fb_probe(struct vt_device *vd) struct ps3fb_softc *sc; int disable; char compatible[64]; -#if 0 phandle_t root; -#endif disable = 0; TUNABLE_INT_FETCH("hw.syscons.disable", &disable); @@ -106,18 +105,16 @@ ps3fb_probe(struct vt_device *vd) sc = &ps3fb_softc; -#if 0 + TUNABLE_STR_FETCH("hw.platform", compatible, sizeof(compatible)); + if (strcmp(compatible, "ps3") == 0) + return (CN_INTERNAL); + root = OF_finddevice("/"); if (OF_getprop(root, "compatible", compatible, sizeof(compatible)) <= 0) - return (0); + return (CN_DEAD); if (strncmp(compatible, "sony,ps3", sizeof(compatible)) != 0) - return (0); -#else - TUNABLE_STR_FETCH("hw.platform", compatible, sizeof(compatible)); - if (strcmp(compatible, "ps3") != 0) return (CN_DEAD); -#endif return (CN_INTERNAL); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 01:06: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 654A9AFA; Mon, 5 Jan 2015 01:06: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 51ED933F6; Mon, 5 Jan 2015 01:06: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 t0516uRj072116; Mon, 5 Jan 2015 01:06:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0516tEM072111; Mon, 5 Jan 2015 01:06:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501050106.t0516tEM072111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 5 Jan 2015 01:06:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276681 - in head/lib: libc/include libc/sys libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 01:06:56 -0000 Author: kib Date: Mon Jan 5 01:06:54 2015 New Revision: 276681 URL: https://svnweb.freebsd.org/changeset/base/276681 Log: Avoid calling internal libc function through PLT or accessing data though GOT, by staticizing and hiding. Add setter for __error_selector to hide it as well. Suggested and reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/include/libc_private.h head/lib/libc/sys/Symbol.map head/lib/libc/sys/__error.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_syscalls.c Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libc/include/libc_private.h Mon Jan 5 01:06:54 2015 (r276681) @@ -173,13 +173,13 @@ typedef pthread_func_t pthread_func_entr extern pthread_func_entry_t __thr_jtable[]; -extern int *(*__error_selector)(void); +void __set_error_selector(int *(*arg)(void)); int _pthread_mutex_init_calloc_cb_stub(pthread_mutex_t *mutex, void *(calloc_cb)(__size_t, __size_t)); typedef int (*interpos_func_t)(void); interpos_func_t *__libc_interposing_slot(int interposno); -extern interpos_func_t __libc_interposing[]; +extern interpos_func_t __libc_interposing[] __hidden; enum { INTERPOS_accept, Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libc/sys/Symbol.map Mon Jan 5 01:06:54 2015 (r276681) @@ -1045,8 +1045,7 @@ FBSDprivate_1.0 { __sys_write; _writev; __sys_writev; - __error_unthreaded; - __error_selector; + __set_error_selector; nlm_syscall; gssd_syscall; __libc_interposing_slot; Modified: head/lib/libc/sys/__error.c ============================================================================== --- head/lib/libc/sys/__error.c Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libc/sys/__error.c Mon Jan 5 01:06:54 2015 (r276681) @@ -32,13 +32,21 @@ __FBSDID("$FreeBSD$"); extern int errno; -int * +static int * __error_unthreaded(void) { - return(&errno); + + return (&errno); } -int *(*__error_selector)(void) = __error_unthreaded; +static int *(*__error_selector)(void) = __error_unthreaded; + +void +__set_error_selector(int *(*arg)(void)) +{ + + __error_selector = arg; +} int * __error(void) Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libthr/thread/thr_private.h Mon Jan 5 01:06:54 2015 (r276681) @@ -914,7 +914,7 @@ void _thr_tsd_unload(struct dl_phdr_info void _thr_sigact_unload(struct dl_phdr_info *phdr_info) __hidden; void _thr_stack_fix_protection(struct pthread *thrd); -int *__error_threaded(void); +int *__error_threaded(void) __hidden; void __thr_interpose_libc(void) __hidden; pid_t __thr_fork(void); int __thr_pause(void) __hidden; Modified: head/lib/libthr/thread/thr_syscalls.c ============================================================================== --- head/lib/libthr/thread/thr_syscalls.c Mon Jan 5 01:05:35 2015 (r276680) +++ head/lib/libthr/thread/thr_syscalls.c Mon Jan 5 01:06:54 2015 (r276681) @@ -692,7 +692,7 @@ void __thr_interpose_libc(void) { - __error_selector = __error_threaded; + __set_error_selector(__error_threaded); #define SLOT(name) \ *(__libc_interposing_slot(INTERPOS_##name)) = \ (interpos_func_t)__thr_##name; From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 01:44: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 6E369344; Mon, 5 Jan 2015 01:44: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 4FB9B64A39; Mon, 5 Jan 2015 01:44: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 t051iOYO090236; Mon, 5 Jan 2015 01:44:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t051iOXp090235; Mon, 5 Jan 2015 01:44:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050144.t051iOXp090235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 01:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276682 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 01:44:24 -0000 Author: adrian Date: Mon Jan 5 01:44:23 2015 New Revision: 276682 URL: https://svnweb.freebsd.org/changeset/base/276682 Log: Add QCA955x series register definitions. There's likely a bunch of register offsets that I have to add the register window base to before I use them. Done at: Hackathon Obtained from: Linux OpenWRT Added: head/sys/mips/atheros/qca955xreg.h (contents, props changed) Added: head/sys/mips/atheros/qca955xreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/qca955xreg.h Mon Jan 5 01:44:23 2015 (r276682) @@ -0,0 +1,183 @@ +/*- + * Copyright (c) 2013 Adrian Chadd + * 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 __QCA955XREG_H__ +#define __QCA955XREG_H__ + +#define BIT(x) (1 << (x)) + +/* Revision ID information */ +#define REV_ID_MAJOR_QCA9556 0x0130 +#define REV_ID_MAJOR_QCA9558 0x1130 +#define QCA955X_REV_ID_REVISION_MASK 0xf + +#define QCA955X_PCI_MEM_BASE0 0x10000000 +#define QCA955X_PCI_MEM_BASE1 0x12000000 +#define QCA955X_PCI_MEM_SIZE 0x02000000 +#define QCA955X_PCI_CFG_BASE0 0x14000000 +#define QCA955X_PCI_CFG_BASE1 0x16000000 +#define QCA955X_PCI_CFG_SIZE 0x1000 +#define QCA955X_PCI_CRP_BASE0 (AR71XX_APB_BASE + 0x000c0000) +#define QCA955X_PCI_CRP_BASE1 (AR71XX_APB_BASE + 0x00250000) +#define QCA955X_PCI_CRP_SIZE 0x1000 +#define QCA955X_PCI_CTRL_BASE0 (AR71XX_APB_BASE + 0x000f0000) +#define QCA955X_PCI_CTRL_BASE1 (AR71XX_APB_BASE + 0x00280000) +#define QCA955X_PCI_CTRL_SIZE 0x100 + +#define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000) +#define QCA955X_WMAC_SIZE 0x20000 +#define QCA955X_EHCI0_BASE 0x1b000000 +#define QCA955X_EHCI1_BASE 0x1b400000 +#define QCA955X_EHCI_SIZE 0x1000 + +/* PLL block */ + +#define QCA955X_PLL_CPU_CONFIG_REG (AR71XX_PLL_CPU_BASE + 0x00) +#define QCA955X_PLL_DDR_CONFIG_REG (AR71XX_PLL_CPU_BASE + 0x04) +#define QCA955X_PLL_CLK_CTRL_REG (AR71XX_PLL_CPU_BASE + 0x08) + +#define QCA955X_PLL_CPU_CONFIG_NFRAC_SHIFT 0 +#define QCA955X_PLL_CPU_CONFIG_NFRAC_MASK 0x3f +#define QCA955X_PLL_CPU_CONFIG_NINT_SHIFT 6 +#define QCA955X_PLL_CPU_CONFIG_NINT_MASK 0x3f +#define QCA955X_PLL_CPU_CONFIG_REFDIV_SHIFT 12 +#define QCA955X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f +#define QCA955X_PLL_CPU_CONFIG_OUTDIV_SHIFT 19 +#define QCA955X_PLL_CPU_CONFIG_OUTDIV_MASK 0x3 + +#define QCA955X_PLL_DDR_CONFIG_NFRAC_SHIFT 0 +#define QCA955X_PLL_DDR_CONFIG_NFRAC_MASK 0x3ff +#define QCA955X_PLL_DDR_CONFIG_NINT_SHIFT 10 +#define QCA955X_PLL_DDR_CONFIG_NINT_MASK 0x3f +#define QCA955X_PLL_DDR_CONFIG_REFDIV_SHIFT 16 +#define QCA955X_PLL_DDR_CONFIG_REFDIV_MASK 0x1f +#define QCA955X_PLL_DDR_CONFIG_OUTDIV_SHIFT 23 +#define QCA955X_PLL_DDR_CONFIG_OUTDIV_MASK 0x7 + +#define QCA955X_PLL_CLK_CTRL_CPU_PLL_BYPASS BIT(2) +#define QCA955X_PLL_CLK_CTRL_DDR_PLL_BYPASS BIT(3) +#define QCA955X_PLL_CLK_CTRL_AHB_PLL_BYPASS BIT(4) +#define QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_SHIFT 5 +#define QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_MASK 0x1f +#define QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_SHIFT 10 +#define QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_MASK 0x1f +#define QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_SHIFT 15 +#define QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_MASK 0x1f +#define QCA955X_PLL_CLK_CTRL_CPUCLK_FROM_CPUPLL BIT(20) +#define QCA955X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL BIT(21) +#define QCA955X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24) + +#define QCA955X_PLL_ETH_XMII_CONTROL_REG (AR71XX_PLL_CPU_BASE + 0x28) +#define QCA955X_PLL_ETH_SGMII_CONTROL_REG (AR71XX_PLL_CPU_BASE + 0x48) + +/* Reset block */ +#define QCA955X_RESET_REG_RESET_MODULE (AR71XX_RST_BLOCK_BASE + 0x1c) +#define QCA955X_RESET_REG_BOOTSTRAP (AR71XX_RST_BLOCK_BASE + 0xb0) +#define QCA955X_RESET_REG_EXT_INT_STATUS (AR71XX_RST_BLOCK_BASE + 0xac) + +#define QCA955X_BOOTSTRAP_REF_CLK_40 BIT(4) + +#define QCA955X_EXT_INT_WMAC_MISC BIT(0) +#define QCA955X_EXT_INT_WMAC_TX BIT(1) +#define QCA955X_EXT_INT_WMAC_RXLP BIT(2) +#define QCA955X_EXT_INT_WMAC_RXHP BIT(3) +#define QCA955X_EXT_INT_PCIE_RC1 BIT(4) +#define QCA955X_EXT_INT_PCIE_RC1_INT0 BIT(5) +#define QCA955X_EXT_INT_PCIE_RC1_INT1 BIT(6) +#define QCA955X_EXT_INT_PCIE_RC1_INT2 BIT(7) +#define QCA955X_EXT_INT_PCIE_RC1_INT3 BIT(8) +#define QCA955X_EXT_INT_PCIE_RC2 BIT(12) +#define QCA955X_EXT_INT_PCIE_RC2_INT0 BIT(13) +#define QCA955X_EXT_INT_PCIE_RC2_INT1 BIT(14) +#define QCA955X_EXT_INT_PCIE_RC2_INT2 BIT(15) +#define QCA955X_EXT_INT_PCIE_RC2_INT3 BIT(16) +#define QCA955X_EXT_INT_USB1 BIT(24) +#define QCA955X_EXT_INT_USB2 BIT(28) + +#define QCA955X_EXT_INT_WMAC_ALL \ + (QCA955X_EXT_INT_WMAC_MISC | QCA955X_EXT_INT_WMAC_TX | \ + QCA955X_EXT_INT_WMAC_RXLP | QCA955X_EXT_INT_WMAC_RXHP) + +#define QCA955X_EXT_INT_PCIE_RC1_ALL \ + (QCA955X_EXT_INT_PCIE_RC1 | QCA955X_EXT_INT_PCIE_RC1_INT0 | \ + QCA955X_EXT_INT_PCIE_RC1_INT1 | QCA955X_EXT_INT_PCIE_RC1_INT2 | \ + QCA955X_EXT_INT_PCIE_RC1_INT3) + +#define QCA955X_EXT_INT_PCIE_RC2_ALL \ + (QCA955X_EXT_INT_PCIE_RC2 | QCA955X_EXT_INT_PCIE_RC2_INT0 | \ + QCA955X_EXT_INT_PCIE_RC2_INT1 | QCA955X_EXT_INT_PCIE_RC2_INT2 | \ + QCA955X_EXT_INT_PCIE_RC2_INT3) + +#define QCA955X_RESET_HOST BIT(31) +#define QCA955X_RESET_SLIC BIT(30) +#define QCA955X_RESET_HDMA BIT(29) +#define QCA955X_RESET_EXTERNAL BIT(28) +#define QCA955X_RESET_RTC BIT(27) +#define QCA955X_RESET_PCIE_EP_INT BIT(26) +#define QCA955X_RESET_CHKSUM_ACC BIT(25) +#define QCA955X_RESET_FULL_CHIP BIT(24) +#define QCA955X_RESET_GE1_MDIO BIT(23) +#define QCA955X_RESET_GE0_MDIO BIT(22) +#define QCA955X_RESET_CPU_NMI BIT(21) +#define QCA955X_RESET_CPU_COLD BIT(20) +#define QCA955X_RESET_HOST_RESET_INT BIT(19) +#define QCA955X_RESET_PCIE_EP BIT(18) +#define QCA955X_RESET_UART1 BIT(17) +#define QCA955X_RESET_DDR BIT(16) +#define QCA955X_RESET_USB_PHY_PLL_PWD_EXT BIT(15) +#define QCA955X_RESET_NANDF BIT(14) +#define QCA955X_RESET_GE1_MAC BIT(13) +#define QCA955X_RESET_SGMII_ANALOG BIT(12) +#define QCA955X_RESET_USB_PHY_ANALOG BIT(11) +#define QCA955X_RESET_HOST_DMA_INT BIT(10) +#define QCA955X_RESET_GE0_MAC BIT(9) +#define QCA955X_RESET_SGMII BIT(8) +#define QCA955X_RESET_PCIE_PHY BIT(7) +#define QCA955X_RESET_PCIE BIT(6) +#define QCA955X_RESET_USB_HOST BIT(5) +#define QCA955X_RESET_USB_PHY BIT(4) +#define QCA955X_RESET_USBSUS_OVERRIDE BIT(3) +#define QCA955X_RESET_LUT BIT(2) +#define QCA955X_RESET_MBOX BIT(1) +#define QCA955X_RESET_I2S BIT(0) + +/* GPIO block */ +#define QCA955X_GPIO_COUNT 24 + +#define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000) +#define QCA955X_GMAC_SIZE 0x40 +#define QCA955X_NFC_BASE 0x1b800200 +#define QCA955X_NFC_SIZE 0xb8 + + +/* GMAC Interface */ +#define QCA955X_GMAC_REG_ETH_CFG 0x00 /* XXX register base? */ + +#define QCA955X_ETH_CFG_RGMII_EN BIT(0) +#define QCA955X_ETH_CFG_GE0_SGMII BIT(6) + +#endif /* __QCA955XREG_H__ */ From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 01:59: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 0811A67D; Mon, 5 Jan 2015 01:59: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 E8E5C64C5D; Mon, 5 Jan 2015 01: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 t051xj9g095439; Mon, 5 Jan 2015 01:59:45 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t051xjki095438; Mon, 5 Jan 2015 01:59:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050159.t051xjki095438@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 01:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276683 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 01:59:46 -0000 Author: adrian Date: Mon Jan 5 01:59:44 2015 New Revision: 276683 URL: https://svnweb.freebsd.org/changeset/base/276683 Log: add QCA955x SoC types. Modified: head/sys/mips/atheros/ar71xx_setup.h Modified: head/sys/mips/atheros/ar71xx_setup.h ============================================================================== --- head/sys/mips/atheros/ar71xx_setup.h Mon Jan 5 01:44:23 2015 (r276682) +++ head/sys/mips/atheros/ar71xx_setup.h Mon Jan 5 01:59:44 2015 (r276683) @@ -44,8 +44,10 @@ enum ar71xx_soc_type { AR71XX_SOC_AR9341, AR71XX_SOC_AR9342, AR71XX_SOC_AR9344, + AR71XX_SOC_QCA9556, + AR71XX_SOC_QCA9558, }; -extern enum ar71xx_soc_type ar71xx_soc; +extern enum ar71xx_soc_type ar71xx_soc; extern void ar71xx_detect_sys_type(void); extern const char *ar71xx_get_system_type(void); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 02:00: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 364867C2; Mon, 5 Jan 2015 02:00: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 239F664C70; Mon, 5 Jan 2015 02:00: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 t0520gRt096874; Mon, 5 Jan 2015 02:00:42 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0520gTN096873; Mon, 5 Jan 2015 02:00:42 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050200.t0520gTN096873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 02:00:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276684 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 02:00:42 -0000 Author: adrian Date: Mon Jan 5 02:00:41 2015 New Revision: 276684 URL: https://svnweb.freebsd.org/changeset/base/276684 Log: ACK interrupts on the new SoCs. Modified: head/sys/mips/atheros/apb.c Modified: head/sys/mips/atheros/apb.c ============================================================================== --- head/sys/mips/atheros/apb.c Mon Jan 5 01:59:44 2015 (r276683) +++ head/sys/mips/atheros/apb.c Mon Jan 5 02:00:41 2015 (r276684) @@ -364,6 +364,8 @@ apb_filter(void *arg) case AR71XX_SOC_AR9341: case AR71XX_SOC_AR9342: case AR71XX_SOC_AR9344: + case AR71XX_SOC_QCA9556: + case AR71XX_SOC_QCA9558: /* ACK/clear the given interrupt */ ATH_WRITE_REG(AR71XX_MISC_INTR_STATUS, (1 << irq)); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 02:06: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 E9D77B02; Mon, 5 Jan 2015 02: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 D5B3D64DCA; Mon, 5 Jan 2015 02: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 t0526Sra099933; Mon, 5 Jan 2015 02:06:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0526RLp099929; Mon, 5 Jan 2015 02:06:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050206.t0526RLp099929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 02:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276685 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 02:06:29 -0000 Author: adrian Date: Mon Jan 5 02:06:26 2015 New Revision: 276685 URL: https://svnweb.freebsd.org/changeset/base/276685 Log: Add initial Qualcomm Atheros QCA955x SoC support. This adds the initial frequency poking and configures up enough for it to boot and spit out data over the console. There's still a whole bunch of work to do in the reset path and devices to support this thing, but hey, it's alive! ath> go 0x80050100 ## Starting application at 0x80050100 ... CPU platform: Atheros AR9558 rev 0 CPU Frequency=720 MHz CPU DDR Frequency=600 MHz CPU AHB Frequency=200 MHz platform frequency: 720 MHz CPU reference clock: 0 MHz CPU MDIO clock: 40 MHz Done at: hackathon Obtained from: Linux OpenWRT, Qualcomm Atheros Added: head/sys/mips/atheros/qca955x_chip.c (contents, props changed) head/sys/mips/atheros/qca955x_chip.h (contents, props changed) Modified: head/sys/mips/atheros/ar71xx_setup.c head/sys/mips/atheros/files.ar71xx Modified: head/sys/mips/atheros/ar71xx_setup.c ============================================================================== --- head/sys/mips/atheros/ar71xx_setup.c Mon Jan 5 02:00:41 2015 (r276684) +++ head/sys/mips/atheros/ar71xx_setup.c Mon Jan 5 02:06:26 2015 (r276685) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -64,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #define AR71XX_SYS_TYPE_LEN 128 @@ -184,6 +186,22 @@ ar71xx_detect_sys_type(void) ar71xx_cpu_ops = &ar934x_chip_def; break; + case REV_ID_MAJOR_QCA9556: + minor = 0; + rev = (id & QCA955X_REV_ID_REVISION_MASK); + chip = "9556"; + ar71xx_soc = AR71XX_SOC_QCA9556; + ar71xx_cpu_ops = &qca955x_chip_def; + break; + + case REV_ID_MAJOR_QCA9558: + minor = 0; + rev = (id & QCA955X_REV_ID_REVISION_MASK); + chip = "9558"; + ar71xx_soc = AR71XX_SOC_QCA9558; + ar71xx_cpu_ops = &qca955x_chip_def; + break; + default: panic("ar71xx: unknown chip id:0x%08x\n", id); } Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Mon Jan 5 02:00:41 2015 (r276684) +++ head/sys/mips/atheros/files.ar71xx Mon Jan 5 02:06:26 2015 (r276685) @@ -26,6 +26,7 @@ mips/atheros/ar724x_chip.c standard mips/atheros/ar91xx_chip.c standard mips/atheros/ar933x_chip.c standard mips/atheros/ar934x_chip.c standard +mips/atheros/qca955x_chip.c standard mips/atheros/ar71xx_fixup.c optional ar71xx_ath_eeprom dev/hwpmc/hwpmc_mips24k.c optional hwpmc_mips24k Added: head/sys/mips/atheros/qca955x_chip.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 02:06:26 2015 (r276685) @@ -0,0 +1,449 @@ +/*- + * Copyright (c) 2015 Adrian Chadd + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_ddb.h" + +#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 + +static void +qca955x_chip_detect_mem_size(void) +{ +} + +static void +qca955x_chip_detect_sys_frequency(void) +{ + unsigned long ref_rate; + unsigned long cpu_rate; + unsigned long ddr_rate; + unsigned long ahb_rate; + uint32_t pll, out_div, ref_div, nint, frac, clk_ctrl, postdiv; + uint32_t cpu_pll, ddr_pll; + uint32_t bootstrap; + + bootstrap = ATH_READ_REG(QCA955X_RESET_REG_BOOTSTRAP); + if (bootstrap & QCA955X_BOOTSTRAP_REF_CLK_40) + ref_rate = 40 * 1000 * 1000; + else + ref_rate = 25 * 1000 * 1000; + + pll = ATH_READ_REG(QCA955X_PLL_CPU_CONFIG_REG); + out_div = (pll >> QCA955X_PLL_CPU_CONFIG_OUTDIV_SHIFT) & + QCA955X_PLL_CPU_CONFIG_OUTDIV_MASK; + ref_div = (pll >> QCA955X_PLL_CPU_CONFIG_REFDIV_SHIFT) & + QCA955X_PLL_CPU_CONFIG_REFDIV_MASK; + nint = (pll >> QCA955X_PLL_CPU_CONFIG_NINT_SHIFT) & + QCA955X_PLL_CPU_CONFIG_NINT_MASK; + frac = (pll >> QCA955X_PLL_CPU_CONFIG_NFRAC_SHIFT) & + QCA955X_PLL_CPU_CONFIG_NFRAC_MASK; + + cpu_pll = nint * ref_rate / ref_div; + cpu_pll += frac * ref_rate / (ref_div * (1 << 6)); + cpu_pll /= (1 << out_div); + + pll = ATH_READ_REG(QCA955X_PLL_DDR_CONFIG_REG); + out_div = (pll >> QCA955X_PLL_DDR_CONFIG_OUTDIV_SHIFT) & + QCA955X_PLL_DDR_CONFIG_OUTDIV_MASK; + ref_div = (pll >> QCA955X_PLL_DDR_CONFIG_REFDIV_SHIFT) & + QCA955X_PLL_DDR_CONFIG_REFDIV_MASK; + nint = (pll >> QCA955X_PLL_DDR_CONFIG_NINT_SHIFT) & + QCA955X_PLL_DDR_CONFIG_NINT_MASK; + frac = (pll >> QCA955X_PLL_DDR_CONFIG_NFRAC_SHIFT) & + QCA955X_PLL_DDR_CONFIG_NFRAC_MASK; + + ddr_pll = nint * ref_rate / ref_div; + ddr_pll += frac * ref_rate / (ref_div * (1 << 10)); + ddr_pll /= (1 << out_div); + + clk_ctrl = ATH_READ_REG(QCA955X_PLL_CLK_CTRL_REG); + + postdiv = (clk_ctrl >> QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_SHIFT) & + QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_MASK; + + if (clk_ctrl & QCA955X_PLL_CLK_CTRL_CPU_PLL_BYPASS) + cpu_rate = ref_rate; + else if (clk_ctrl & QCA955X_PLL_CLK_CTRL_CPUCLK_FROM_CPUPLL) + cpu_rate = ddr_pll / (postdiv + 1); + else + cpu_rate = cpu_pll / (postdiv + 1); + + postdiv = (clk_ctrl >> QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_SHIFT) & + QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_MASK; + + if (clk_ctrl & QCA955X_PLL_CLK_CTRL_DDR_PLL_BYPASS) + ddr_rate = ref_rate; + else if (clk_ctrl & QCA955X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL) + ddr_rate = cpu_pll / (postdiv + 1); + else + ddr_rate = ddr_pll / (postdiv + 1); + + postdiv = (clk_ctrl >> QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_SHIFT) & + QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_MASK; + + if (clk_ctrl & QCA955X_PLL_CLK_CTRL_AHB_PLL_BYPASS) + ahb_rate = ref_rate; + else if (clk_ctrl & QCA955X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL) + ahb_rate = ddr_pll / (postdiv + 1); + else + ahb_rate = cpu_pll / (postdiv + 1); + +#if 0 + ath79_add_sys_clkdev("ref", ref_rate); + ath79_add_sys_clkdev("cpu", cpu_rate); + ath79_add_sys_clkdev("ddr", ddr_rate); + ath79_add_sys_clkdev("ahb", ahb_rate); + + clk_add_alias("wdt", NULL, "ref", NULL); + clk_add_alias("uart", NULL, "ref", NULL); +#endif + + u_ar71xx_ddr_freq = ddr_rate; + u_ar71xx_cpu_freq = cpu_rate; + u_ar71xx_ahb_freq = ahb_rate; + + u_ar71xx_wdt_freq = ref_rate; + u_ar71xx_uart_freq = ref_rate; + u_ar71xx_mdio_freq = ref_rate; + + +} + +static void +qca955x_chip_device_stop(uint32_t mask) +{ + uint32_t reg; + + reg = ATH_READ_REG(QCA955X_RESET_REG_RESET_MODULE); + ATH_WRITE_REG(QCA955X_RESET_REG_RESET_MODULE, reg | mask); +} + +static void +qca955x_chip_device_start(uint32_t mask) +{ + uint32_t reg; + + reg = ATH_READ_REG(QCA955X_RESET_REG_RESET_MODULE); + ATH_WRITE_REG(QCA955X_RESET_REG_RESET_MODULE, reg & ~mask); +} + +static int +qca955x_chip_device_stopped(uint32_t mask) +{ + uint32_t reg; + + reg = ATH_READ_REG(QCA955X_RESET_REG_RESET_MODULE); + return ((reg & mask) == mask); +} + +static void +qca955x_chip_set_mii_speed(uint32_t unit, uint32_t speed) +{ + + /* XXX TODO */ + return; +} + +/* + * XXX TODO !! + */ +static void +qca955x_chip_set_pll_ge(int unit, int speed, uint32_t pll) +{ +#if 0 + switch (unit) { + case 0: + ATH_WRITE_REG(AR934X_PLL_ETH_XMII_CONTROL_REG, pll); + break; + case 1: + /* XXX nothing */ + break; + default: + printf("%s: invalid PLL set for arge unit: %d\n", + __func__, unit); + return; + } +#endif +} + +static void +qca955x_chip_ddr_flush_ge(int unit) +{ +#if 0 + switch (unit) { + case 0: + ar71xx_ddr_flush(AR934X_DDR_REG_FLUSH_GE0); + break; + case 1: + ar71xx_ddr_flush(AR934X_DDR_REG_FLUSH_GE1); + break; + default: + printf("%s: invalid DDR flush for arge unit: %d\n", + __func__, unit); + return; + } +#endif +} + +static void +qca955x_chip_ddr_flush_ip2(void) +{ +#if 0 + ar71xx_ddr_flush(AR934X_DDR_REG_FLUSH_WMAC); +#endif +} + +static uint32_t +qca955x_chip_get_eth_pll(unsigned int mac, int speed) +{ +#if 0 + uint32_t pll; + + switch (speed) { + case 10: + pll = AR934X_PLL_VAL_10; + break; + case 100: + pll = AR934X_PLL_VAL_100; + break; + case 1000: + pll = AR934X_PLL_VAL_1000; + break; + default: + printf("%s%d: invalid speed %d\n", __func__, mac, speed); + pll = 0; + } + return (pll); +#else + return (0); +#endif +} + +static void +qca955x_chip_reset_ethernet_switch(void) +{ +#if 0 + ar71xx_device_stop(AR934X_RESET_ETH_SWITCH); + DELAY(100); + ar71xx_device_start(AR934X_RESET_ETH_SWITCH); + DELAY(100); +#endif +} + +#if 0 +static void +qca955x_configure_gmac(uint32_t gmac_cfg) +{ + uint32_t reg; + + reg = ATH_READ_REG(AR934X_GMAC_REG_ETH_CFG); + printf("%s: ETH_CFG=0x%08x\n", __func__, reg); + + reg &= ~(AR934X_ETH_CFG_RGMII_GMAC0 | AR934X_ETH_CFG_MII_GMAC0 | + AR934X_ETH_CFG_MII_GMAC0 | AR934X_ETH_CFG_SW_ONLY_MODE | + AR934X_ETH_CFG_SW_PHY_SWAP); + + reg |= gmac_cfg; + + ATH_WRITE_REG(AR934X_GMAC_REG_ETH_CFG, reg); +} +#endif + +static void +qca955x_chip_init_usb_peripheral(void) +{ +#if 0 + uint32_t reg; + + reg = ATH_READ_REG(AR934X_RESET_REG_BOOTSTRAP); + if (reg & AR934X_BOOTSTRAP_USB_MODE_DEVICE) + return; + + ar71xx_device_stop(AR934X_RESET_USBSUS_OVERRIDE); + DELAY(100); + + ar71xx_device_start(AR934X_RESET_USB_PHY); + DELAY(100); + + ar71xx_device_start(AR934X_RESET_USB_PHY_ANALOG); + DELAY(100); + + ar71xx_device_start(AR934X_RESET_USB_HOST); + DELAY(100); +#endif +} + +static void +qca955x_chip_set_mii_if(uint32_t unit, uint32_t mii_mode) +{ + + /* + * XXX ! + * + * Nothing to see here; although gmac0 can have its + * MII configuration changed, the register values + * are slightly different. + */ +} + +/* + * XXX TODO: fetch default MII divider configuration + */ + +static void +qca955x_chip_reset_wmac(void) +{ + + /* XXX TODO */ +} + +static void +qca955x_chip_init_gmac(void) +{ +#if 0 + long gmac_cfg; + + if (resource_long_value("ar934x_gmac", 0, "gmac_cfg", + &gmac_cfg) == 0) { + printf("%s: gmac_cfg=0x%08lx\n", + __func__, + (long) gmac_cfg); + ar934x_configure_gmac((uint32_t) gmac_cfg); + } +#endif +} + +/* + * Reset the NAND Flash Controller. + * + * + active=1 means "make it active". + * + active=0 means "make it inactive". + */ +static void +qca955x_chip_reset_nfc(int active) +{ +#if 0 + if (active) { + ar71xx_device_start(AR934X_RESET_NANDF); + DELAY(100); + + ar71xx_device_start(AR934X_RESET_ETH_SWITCH_ANALOG); + DELAY(250); + } else { + ar71xx_device_stop(AR934X_RESET_ETH_SWITCH_ANALOG); + DELAY(250); + + ar71xx_device_stop(AR934X_RESET_NANDF); + DELAY(100); + } +#endif +} + +/* + * Configure the GPIO output mux setup. + * + * The AR934x introduced an output mux which allowed + * certain functions to be configured on any pin. + * Specifically, the switch PHY link LEDs and + * WMAC external RX LNA switches are not limited to + * a specific GPIO pin. + */ +static void +qca955x_chip_gpio_output_configure(int gpio, uint8_t func) +{ +#if 0 + uint32_t reg, s; + uint32_t t; + + if (gpio > QCA955X_GPIO_COUNT) + return; + + reg = AR934X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4); + s = 8 * (gpio % 4); + + /* read-modify-write */ + t = ATH_READ_REG(AR71XX_GPIO_BASE + reg); + t &= ~(0xff << s); + t |= func << s; + ATH_WRITE_REG(AR71XX_GPIO_BASE + reg, t); + + /* flush write */ + ATH_READ_REG(AR71XX_GPIO_BASE + reg); +#endif +} + +struct ar71xx_cpu_def qca955x_chip_def = { + &qca955x_chip_detect_mem_size, + &qca955x_chip_detect_sys_frequency, + &qca955x_chip_device_stop, + &qca955x_chip_device_start, + &qca955x_chip_device_stopped, + &qca955x_chip_set_pll_ge, + &qca955x_chip_set_mii_speed, + &qca955x_chip_set_mii_if, + &qca955x_chip_ddr_flush_ge, + &qca955x_chip_get_eth_pll, + &qca955x_chip_ddr_flush_ip2, + &qca955x_chip_init_usb_peripheral, + &qca955x_chip_reset_ethernet_switch, + &qca955x_chip_reset_wmac, + &qca955x_chip_init_gmac, + &qca955x_chip_reset_nfc, + &qca955x_chip_gpio_output_configure, +}; Added: head/sys/mips/atheros/qca955x_chip.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/atheros/qca955x_chip.h Mon Jan 5 02:06:26 2015 (r276685) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2015 Adrian Chadd + * 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 __QCA955X_CHIP_H__ +#define __QCA955X_CHIP_H__ + +extern struct ar71xx_cpu_def qca955x_chip_def; + +#endif From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 04:33: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 8FE47881; Mon, 5 Jan 2015 04:33: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 7B0311870; Mon, 5 Jan 2015 04:33: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 t054XeWj070344; Mon, 5 Jan 2015 04:33:40 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t054XeFG070343; Mon, 5 Jan 2015 04:33:40 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501050433.t054XeFG070343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 5 Jan 2015 04:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276688 - head/sys/boot/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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 04:33:40 -0000 Author: nwhitehorn Date: Mon Jan 5 04:33:39 2015 New Revision: 276688 URL: https://svnweb.freebsd.org/changeset/base/276688 Log: Add kexec-based Linux shim loader for use with the firmware petitboot loader on PS3 and POWER8 systems. This is reasonably portable to other architectures, especially FDT-based ones, if similar features are useful elsewhere. Netboot support is missing for now and will be added in a future commit, at which time loader.ps3 will be garbage collected. Done at: Hackathon Added: - copied from r276687, user/nwhitehorn/kboot/powerpc/kboot/ Directory Properties: head/sys/boot/powerpc/kboot/ (props changed) Modified: head/sys/boot/powerpc/Makefile Modified: head/sys/boot/powerpc/Makefile ============================================================================== --- head/sys/boot/powerpc/Makefile Mon Jan 5 04:30:21 2015 (r276687) +++ head/sys/boot/powerpc/Makefile Mon Jan 5 04:33:39 2015 (r276688) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= boot1.chrp ofw ps3 uboot +SUBDIR= boot1.chrp kboot ofw ps3 uboot .include From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 04:56: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 984F9D21; Mon, 5 Jan 2015 04:56: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 83E9A1B17; Mon, 5 Jan 2015 04:56: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 t054udq9079892; Mon, 5 Jan 2015 04:56:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t054udQO079891; Mon, 5 Jan 2015 04:56:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501050456.t054udQO079891@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 5 Jan 2015 04:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276689 - head/contrib/elftoolchain/addr2line X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 04:56:39 -0000 Author: emaste Date: Mon Jan 5 04:56:38 2015 New Revision: 276689 URL: https://svnweb.freebsd.org/changeset/base/276689 Log: addr2line: fflush output after each address lookup Certain tools spawn addr2line and pass addresses one at a time for resolution. PR: 195561 Reported by: antoine Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/addr2line/addr2line.c Modified: head/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- head/contrib/elftoolchain/addr2line/addr2line.c Mon Jan 5 04:33:39 2015 (r276688) +++ head/contrib/elftoolchain/addr2line/addr2line.c Mon Jan 5 04:56:38 2015 (r276689) @@ -399,8 +399,10 @@ main(int argc, char **argv) for (i = 0; i < argc; i++) translate(dbg, argv[i]); else - while (fgets(line, sizeof(line), stdin) != NULL) + while (fgets(line, sizeof(line), stdin) != NULL) { translate(dbg, line); + fflush(stdout); + } dwarf_finish(dbg, &de); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 05:26: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 468B290; Mon, 5 Jan 2015 05:26: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 318003FF4; Mon, 5 Jan 2015 05:26: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 t055Qw0F093804; Mon, 5 Jan 2015 05:26:58 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t055QwtD093803; Mon, 5 Jan 2015 05:26:58 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050526.t055QwtD093803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 05:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276690 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 05:26:58 -0000 Author: adrian Date: Mon Jan 5 05:26:57 2015 New Revision: 276690 URL: https://svnweb.freebsd.org/changeset/base/276690 Log: Oops - missed refclk. Tested: * AP135, QCA955x SoC Modified: head/sys/mips/atheros/qca955x_chip.c Modified: head/sys/mips/atheros/qca955x_chip.c ============================================================================== --- head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 04:56:38 2015 (r276689) +++ head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 05:26:57 2015 (r276690) @@ -161,8 +161,7 @@ qca955x_chip_detect_sys_frequency(void) u_ar71xx_wdt_freq = ref_rate; u_ar71xx_uart_freq = ref_rate; u_ar71xx_mdio_freq = ref_rate; - - + u_ar71xx_refclk = ref_rate; } static void From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 05:30: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 862041EF; Mon, 5 Jan 2015 05:30: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 7179D2040; Mon, 5 Jan 2015 05:30: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 t055U8GC094293; Mon, 5 Jan 2015 05:30:08 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t055U8f7094292; Mon, 5 Jan 2015 05:30:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501050530.t055U8f7094292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 5 Jan 2015 05:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276691 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 05:30:08 -0000 Author: adrian Date: Mon Jan 5 05:30:07 2015 New Revision: 276691 URL: https://svnweb.freebsd.org/changeset/base/276691 Log: Remove the remnants of the OpenWRT/Linux bits that this was based off of. Obtained from: Linux/OpenWRT Modified: head/sys/mips/atheros/qca955x_chip.c Modified: head/sys/mips/atheros/qca955x_chip.c ============================================================================== --- head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 05:26:57 2015 (r276690) +++ head/sys/mips/atheros/qca955x_chip.c Mon Jan 5 05:30:07 2015 (r276691) @@ -144,16 +144,6 @@ qca955x_chip_detect_sys_frequency(void) else ahb_rate = cpu_pll / (postdiv + 1); -#if 0 - ath79_add_sys_clkdev("ref", ref_rate); - ath79_add_sys_clkdev("cpu", cpu_rate); - ath79_add_sys_clkdev("ddr", ddr_rate); - ath79_add_sys_clkdev("ahb", ahb_rate); - - clk_add_alias("wdt", NULL, "ref", NULL); - clk_add_alias("uart", NULL, "ref", NULL); -#endif - u_ar71xx_ddr_freq = ddr_rate; u_ar71xx_cpu_freq = cpu_rate; u_ar71xx_ahb_freq = ahb_rate; From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 09:58: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 C0192138; Mon, 5 Jan 2015 09:58: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 AA0E46487D; Mon, 5 Jan 2015 09:58: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 t059wbpF018614; Mon, 5 Jan 2015 09:58:37 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t059wXCd018594; Mon, 5 Jan 2015 09:58:33 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501050958.t059wXCd018594@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Mon, 5 Jan 2015 09:58:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276692 - in head/sys: dev/en dev/fatm dev/iscsi_initiator dev/patm kern net80211 netinet netinet6 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 09:58:37 -0000 Author: rwatson Date: Mon Jan 5 09:58:32 2015 New Revision: 276692 URL: https://svnweb.freebsd.org/changeset/base/276692 Log: To ease changes to underlying mbuf structure and the mbuf allocator, reduce the knowledge of mbuf layout, and in particular constants such as M_EXT, MLEN, MHLEN, and so on, in mbuf consumers by unifying various alignment utility functions (M_ALIGN(), MH_ALIGN(), MEXT_ALIGN() in a single M_ALIGN() macro, implemented by a now-inlined m_align() function: - Move m_align() from uipc_mbuf.c to mbuf.h; mark as __inline. - Reimplement M_ALIGN(), MH_ALIGN(), and MEXT_ALIGN() using m_align(). - Update consumers around the tree to simply use M_ALIGN(). This change eliminates a number of cases where mbuf consumers must be aware of whether or not mbufs returned by the allocator use external storage, but also assumptions about the size of the returned mbuf. This will make it easier to introduce changes in how we use external storage, as well as features such as variable-size mbufs. Differential Revision: https://reviews.freebsd.org/D1436 Reviewed by: glebius, trasz, gnn, bz Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/en/midway.c head/sys/dev/fatm/if_fatm.c head/sys/dev/iscsi_initiator/isc_soc.c head/sys/dev/patm/if_patm_rx.c head/sys/kern/uipc_mbuf.c head/sys/net80211/ieee80211_freebsd.c head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/ip_carp.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/tcp_output.c head/sys/netinet6/ip6_output.c head/sys/netinet6/mld6.c head/sys/netinet6/nd6_nbr.c head/sys/sys/mbuf.h Modified: head/sys/dev/en/midway.c ============================================================================== --- head/sys/dev/en/midway.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/dev/en/midway.c Mon Jan 5 09:58:32 2015 (r276692) @@ -1935,7 +1935,7 @@ en_mget(struct en_softc *sc, u_int pktle m->m_pkthdr.rcvif = NULL; m->m_pkthdr.len = pktlen; m->m_len = EN_RX1BUF; - MH_ALIGN(m, EN_RX1BUF); + M_ALIGN(m, EN_RX1BUF); if (m->m_len >= totlen) { m->m_len = totlen; Modified: head/sys/dev/fatm/if_fatm.c ============================================================================== --- head/sys/dev/fatm/if_fatm.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/dev/fatm/if_fatm.c Mon Jan 5 09:58:32 2015 (r276692) @@ -1105,7 +1105,7 @@ fatm_supply_small_buffers(struct fatm_so LIST_INSERT_HEAD(&sc->rbuf_free, rb, link); break; } - MH_ALIGN(m, SMALL_BUFFER_LEN); + M_ALIGN(m, SMALL_BUFFER_LEN); error = bus_dmamap_load(sc->rbuf_tag, rb->map, m->m_data, SMALL_BUFFER_LEN, dmaload_helper, &phys, BUS_DMA_NOWAIT); Modified: head/sys/dev/iscsi_initiator/isc_soc.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_soc.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/dev/iscsi_initiator/isc_soc.c Mon Jan 5 09:58:32 2015 (r276692) @@ -110,7 +110,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *p | Add any AHS to the iSCSI hdr mbuf */ if((mh->m_len + pp->ahs_len) < MHLEN) { - MH_ALIGN(mh, mh->m_len + pp->ahs_len); + M_ALIGN(mh, mh->m_len + pp->ahs_len); bcopy(&pp->ipdu, mh->m_data, mh->m_len); bcopy(pp->ahs_addr, mh->m_data + mh->m_len, pp->ahs_len); mh->m_len += pp->ahs_len; @@ -119,7 +119,7 @@ isc_sendPDU(isc_session_t *sp, pduq_t *p panic("len AHS=%d too big, not impleneted yet", pp->ahs_len); } else { - MH_ALIGN(mh, mh->m_len); + M_ALIGN(mh, mh->m_len); bcopy(&pp->ipdu, mh->m_data, mh->m_len); } mh->m_pkthdr.len = mh->m_len; Modified: head/sys/dev/patm/if_patm_rx.c ============================================================================== --- head/sys/dev/patm/if_patm_rx.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/dev/patm/if_patm_rx.c Mon Jan 5 09:58:32 2015 (r276692) @@ -471,7 +471,7 @@ patm_rx_raw(struct patm_softc *sc, u_cha default: case PATM_RAW_CELL: m->m_len = m->m_pkthdr.len = 53; - MH_ALIGN(m, 53); + M_ALIGN(m, 53); dst = mtod(m, u_char *); *dst++ = *cell++; *dst++ = *cell++; @@ -483,7 +483,7 @@ patm_rx_raw(struct patm_softc *sc, u_cha case PATM_RAW_NOHEC: m->m_len = m->m_pkthdr.len = 52; - MH_ALIGN(m, 52); + M_ALIGN(m, 52); dst = mtod(m, u_char *); *dst++ = *cell++; *dst++ = *cell++; @@ -494,7 +494,7 @@ patm_rx_raw(struct patm_softc *sc, u_cha case PATM_RAW_CS: m->m_len = m->m_pkthdr.len = 64; - MH_ALIGN(m, 64); + M_ALIGN(m, 64); dst = mtod(m, u_char *); *dst++ = *cell++; *dst++ = *cell++; Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/kern/uipc_mbuf.c Mon Jan 5 09:58:32 2015 (r276692) @@ -574,13 +574,8 @@ m_prepend(struct mbuf *m, int len, int h m_move_pkthdr(mn, m); mn->m_next = m; m = mn; - if(m->m_flags & M_PKTHDR) { - if (len < MHLEN) - MH_ALIGN(m, len); - } else { - if (len < MLEN) - M_ALIGN(m, len); - } + if (len < M_SIZE(m)) + M_ALIGN(m, len); m->m_len = len; return (m); } @@ -1226,7 +1221,7 @@ m_split(struct mbuf *m0, int len0, int w goto extpacket; if (remain > MHLEN) { /* m can't be the lead packet */ - MH_ALIGN(n, 0); + M_ALIGN(n, 0); n->m_next = m_split(m, len, wait); if (n->m_next == NULL) { (void) m_free(n); @@ -1236,7 +1231,7 @@ m_split(struct mbuf *m0, int len0, int w return (n); } } else - MH_ALIGN(n, remain); + M_ALIGN(n, remain); } else if (remain == 0) { n = m->m_next; m->m_next = NULL; @@ -1888,33 +1883,6 @@ m_mbuftouio(struct uio *uio, struct mbuf } /* - * Set the m_data pointer of a newly-allocated mbuf - * to place an object of the specified size at the - * end of the mbuf, longword aligned. - */ -void -m_align(struct mbuf *m, int len) -{ -#ifdef INVARIANTS - const char *msg = "%s: not a virgin mbuf"; -#endif - int adjust; - - if (m->m_flags & M_EXT) { - KASSERT(m->m_data == m->m_ext.ext_buf, (msg, __func__)); - adjust = m->m_ext.ext_size - len; - } else if (m->m_flags & M_PKTHDR) { - KASSERT(m->m_data == m->m_pktdat, (msg, __func__)); - adjust = MHLEN - len; - } else { - KASSERT(m->m_data == m->m_dat, (msg, __func__)); - adjust = MLEN - len; - } - - m->m_data += adjust &~ (sizeof(long)-1); -} - -/* * Create a writable copy of the mbuf chain. While doing this * we compact the chain with a goal of producing a chain with * at most two mbufs. The second mbuf in this chain is likely Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/net80211/ieee80211_freebsd.c Mon Jan 5 09:58:32 2015 (r276692) @@ -420,7 +420,7 @@ ieee80211_getmgtframe(uint8_t **frm, int * frames which all fit in MHLEN. */ if (m != NULL) - MH_ALIGN(m, len); + M_ALIGN(m, len); } else { m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); if (m != NULL) Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/netinet/if_ether.c Mon Jan 5 09:58:32 2015 (r276692) @@ -261,7 +261,7 @@ arprequest(struct ifnet *ifp, const stru m->m_len = sizeof(*ah) + 2 * sizeof(struct in_addr) + 2 * ifp->if_addrlen; m->m_pkthdr.len = m->m_len; - MH_ALIGN(m, m->m_len); + M_ALIGN(m, m->m_len); ah = mtod(m, struct arphdr *); bzero((caddr_t)ah, m->m_len); #ifdef MAC Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/netinet/igmp.c Mon Jan 5 09:58:32 2015 (r276692) @@ -2212,7 +2212,7 @@ igmp_v1v2_queue_report(struct in_multi * m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) return (ENOMEM); - MH_ALIGN(m, sizeof(struct ip) + sizeof(struct igmp)); + M_ALIGN(m, sizeof(struct ip) + sizeof(struct igmp)); m->m_pkthdr.len = sizeof(struct ip) + sizeof(struct igmp); @@ -2793,7 +2793,7 @@ igmp_v3_enqueue_group_record(struct ifqu if (m == NULL) { m = m_gethdr(M_NOWAIT, MT_DATA); if (m) - MH_ALIGN(m, IGMP_LEADINGSPACE); + M_ALIGN(m, IGMP_LEADINGSPACE); } if (m == NULL) return (-ENOMEM); @@ -2917,7 +2917,7 @@ igmp_v3_enqueue_group_record(struct ifqu if (m == NULL) { m = m_gethdr(M_NOWAIT, MT_DATA); if (m) - MH_ALIGN(m, IGMP_LEADINGSPACE); + M_ALIGN(m, IGMP_LEADINGSPACE); } if (m == NULL) return (-ENOMEM); @@ -3073,7 +3073,7 @@ igmp_v3_enqueue_filter_change(struct ifq if (m == NULL) { m = m_gethdr(M_NOWAIT, MT_DATA); if (m) - MH_ALIGN(m, IGMP_LEADINGSPACE); + M_ALIGN(m, IGMP_LEADINGSPACE); } if (m == NULL) { CTR1(KTR_IGMPV3, Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/netinet/ip_carp.c Mon Jan 5 09:58:32 2015 (r276692) @@ -840,7 +840,7 @@ carp_send_ad_locked(struct carp_softc *s m->m_pkthdr.len = len; m->m_pkthdr.rcvif = NULL; m->m_len = len; - MH_ALIGN(m, m->m_len); + M_ALIGN(m, m->m_len); m->m_flags |= M_MCAST; ip = mtod(m, struct ip *); ip->ip_v = IPVERSION; @@ -892,7 +892,7 @@ carp_send_ad_locked(struct carp_softc *s m->m_pkthdr.len = len; m->m_pkthdr.rcvif = NULL; m->m_len = len; - MH_ALIGN(m, m->m_len); + M_ALIGN(m, m->m_len); m->m_flags |= M_MCAST; ip6 = mtod(m, struct ip6_hdr *); bzero(ip6, sizeof(*ip6)); Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/netinet/sctp_os_bsd.h Mon Jan 5 09:58:32 2015 (r276692) @@ -304,11 +304,7 @@ typedef struct callout sctp_os_timer_t; #define SCTP_BUF_RECVIF(m) (m->m_pkthdr.rcvif) #define SCTP_BUF_PREPEND M_PREPEND -#define SCTP_ALIGN_TO_END(m, len) if(m->m_flags & M_PKTHDR) { \ - MH_ALIGN(m, len); \ - } else if ((m->m_flags & M_EXT) == 0) { \ - M_ALIGN(m, len); \ - } +#define SCTP_ALIGN_TO_END(m, len) M_ALIGN(m, len) /* We make it so if you have up to 4 threads * writing based on the default size of Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/netinet/tcp_output.c Mon Jan 5 09:58:32 2015 (r276692) @@ -1007,7 +1007,7 @@ send: #ifdef INET6 if (isipv6 && (MHLEN < hdrlen + max_linkhdr) && MHLEN >= hdrlen) { - MH_ALIGN(m, hdrlen); + M_ALIGN(m, hdrlen); } else #endif m->m_data += max_linkhdr; Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/netinet6/ip6_output.c Mon Jan 5 09:58:32 2015 (r276692) @@ -2940,7 +2940,7 @@ ip6_splithdr(struct mbuf *m, struct ip6_ return ENOBUFS; } m_move_pkthdr(mh, m); - MH_ALIGN(mh, sizeof(*ip6)); + M_ALIGN(mh, sizeof(*ip6)); m->m_len -= sizeof(*ip6); m->m_data += sizeof(*ip6); mh->m_next = m; Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/netinet6/mld6.c Mon Jan 5 09:58:32 2015 (r276692) @@ -1818,7 +1818,7 @@ mld_v1_transmit_report(struct in6_multi * that ether_output() does not need to allocate another mbuf * for the header in the most common case. */ - MH_ALIGN(mh, sizeof(struct ip6_hdr)); + M_ALIGN(mh, sizeof(struct ip6_hdr)); mh->m_pkthdr.len = sizeof(struct ip6_hdr) + sizeof(struct mld_hdr); mh->m_len = sizeof(struct ip6_hdr); @@ -3179,7 +3179,7 @@ mld_v2_encap_report(struct ifnet *ifp, s m_freem(m); return (NULL); } - MH_ALIGN(mh, sizeof(struct ip6_hdr) + sizeof(struct mldv2_report)); + M_ALIGN(mh, sizeof(struct ip6_hdr) + sizeof(struct mldv2_report)); mldreclen = m_length(m, NULL); CTR2(KTR_MLD, "%s: mldreclen is %d", __func__, mldreclen); Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/netinet6/nd6_nbr.c Mon Jan 5 09:58:32 2015 (r276692) @@ -431,7 +431,7 @@ nd6_ns_output(struct ifnet *ifp, const s icmp6len = sizeof(*nd_ns); m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len; - m->m_data += max_linkhdr; /* or MH_ALIGN() equivalent? */ + m->m_data += max_linkhdr; /* or M_ALIGN() equivalent? */ /* fill neighbor solicitation packet */ ip6 = mtod(m, struct ip6_hdr *); @@ -1003,7 +1003,7 @@ nd6_na_output_fib(struct ifnet *ifp, con icmp6len = sizeof(*nd_na); m->m_pkthdr.len = m->m_len = sizeof(struct ip6_hdr) + icmp6len; - m->m_data += max_linkhdr; /* or MH_ALIGN() equivalent? */ + m->m_data += max_linkhdr; /* or M_ALIGN() equivalent? */ /* fill neighbor advertisement packet */ ip6 = mtod(m, struct ip6_hdr *); Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Mon Jan 5 05:30:07 2015 (r276691) +++ head/sys/sys/mbuf.h Mon Jan 5 09:58:32 2015 (r276692) @@ -810,42 +810,6 @@ m_last(struct mbuf *m) ("%s: attempted use of a free mbuf!", __func__)) /* - * Set the m_data pointer of a newly-allocated mbuf (m_get/MGET) to place an - * object of the specified size at the end of the mbuf, longword aligned. - */ -#define M_ALIGN(m, len) do { \ - KASSERT(!((m)->m_flags & (M_PKTHDR|M_EXT)), \ - ("%s: M_ALIGN not normal mbuf", __func__)); \ - KASSERT((m)->m_data == (m)->m_dat, \ - ("%s: M_ALIGN not a virgin mbuf", __func__)); \ - (m)->m_data += (MLEN - (len)) & ~(sizeof(long) - 1); \ -} while (0) - -/* - * As above, for mbufs allocated with m_gethdr/MGETHDR or initialized by - * M_DUP/MOVE_PKTHDR. - */ -#define MH_ALIGN(m, len) do { \ - KASSERT((m)->m_flags & M_PKTHDR && !((m)->m_flags & M_EXT), \ - ("%s: MH_ALIGN not PKTHDR mbuf", __func__)); \ - KASSERT((m)->m_data == (m)->m_pktdat, \ - ("%s: MH_ALIGN not a virgin mbuf", __func__)); \ - (m)->m_data += (MHLEN - (len)) & ~(sizeof(long) - 1); \ -} while (0) - -/* - * As above, for mbuf with external storage. - */ -#define MEXT_ALIGN(m, len) do { \ - KASSERT((m)->m_flags & M_EXT, \ - ("%s: MEXT_ALIGN not an M_EXT mbuf", __func__)); \ - KASSERT((m)->m_data == (m)->m_ext.ext_buf, \ - ("%s: MEXT_ALIGN not a virgin mbuf", __func__)); \ - (m)->m_data += ((m)->m_ext.ext_size - (len)) & \ - ~(sizeof(long) - 1); \ -} while (0) - -/* * Return the address of the start of the buffer associated with an mbuf, * handling external storage, packet-header mbufs, and regular data mbufs. */ @@ -864,6 +828,41 @@ m_last(struct mbuf *m) MLEN) /* + * Set the m_data pointer of a newly allocated mbuf to place an object of the + * specified size at the end of the mbuf, longword aligned. + * + * NB: Historically, we had M_ALIGN(), MH_ALIGN(), and MEXT_ALIGN() as + * separate macros, each asserting that it was called at the proper moment. + * This required callers to themselves test the storage type and call the + * right one. Rather than require callers to be aware of those layout + * decisions, we centralize here. + */ +static __inline void +m_align(struct mbuf *m, int len) +{ +#ifdef INVARIANTS + const char *msg = "%s: not a virgin mbuf"; +#endif + int adjust; + + KASSERT(m->m_data == M_START(m), (msg, __func__)); + + if (m->m_flags & M_EXT) { + adjust = m->m_ext.ext_size - len; + } else if (m->m_flags & M_PKTHDR) { + adjust = MHLEN - len; + } else { + adjust = MLEN - len; + } + + m->m_data += adjust &~ (sizeof(long)-1); +} + +#define M_ALIGN(m, len) m_align(m, len) +#define MH_ALIGN(m, len) m_align(m, len) +#define MEXT_ALIGN(m, len) m_align(m, len) + +/* * Compute the amount of space available before the current start of data in * an mbuf. * From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 10:06: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 00F89429; Mon, 5 Jan 2015 10:06:10 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id B344E1AB3; Mon, 5 Jan 2015 10:06:10 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 353511A3E3A; Mon, 5 Jan 2015 20:45:14 +1100 (AEDT) Date: Mon, 5 Jan 2015 20:45:13 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper Subject: Re: svn commit: r276521 - head/contrib/netbsd-tests/lib/libm In-Reply-To: <9E7EDF01-88C2-4CB5-B26F-1F557E4441DF@gmail.com> Message-ID: <20150105195630.B1113@besplex.bde.org> References: <201501020057.t020vf4d063191@svn.freebsd.org> <20150102185046.K943@besplex.bde.org> <9E7EDF01-88C2-4CB5-B26F-1F557E4441DF@gmail.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Qdxf4Krv c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=cz2ZRIgtxKwA:10 a=wJWlkF7cXJYA:10 a=c3-DdYJoA5YA:10 a=2QSLavsyAAAA:8 a=JbzxhqCth5tsWHQe8-MA:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Garrett Cooper , Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 10:06:11 -0000 On Sun, 4 Jan 2015, Garrett Cooper wrote: > On Jan 2, 2015, at 0:03, Bruce Evans wrote: >>> =09=09rv =3D scalbnf(tests[i].inval, tests[i].exp); >>> =09=09ATF_CHECK_EQ_MSG(errno, tests[i].error, >>> =09=09 "test %zu: errno %d instead of %d", i, errno, >> >> The tests might set errno elsewhere, but scalbnf() obviously doesn't >> in FreeBSD (and shouldn't unless MATH_ERRNO), so the ATF_CHECK_EQ_MSG() >> test can have no effect. It is surprising that it doesn't sometimes >> fail if errno is always 0. If it always succeeds, then tests[i].error >> must be dead data (always 0) and the ATF_CHECK_EQ_MSG() test dead code >> (always pass). > > Hmmm=85 How is MATH_ERRNO supposed to work in FreeBSD. Based on documenta= tion I found =97 http://en.cppreference.com/w/cpp/numeric/math/math_errhand= ling =97 it=92s supposed to be used for reporting errors with errno since c= ++11, but that doesn=92t seem to be implemented in libc++/libstdc++ (at lea= st not based on my limited grep)? FWIW it seems like this value should be 0= , not 1... It works by never being set in math_errhandling, since its form of error handling is an implementation option that is only supported by bad implementations. The implementations that need it are mainly ones whose hardware doesn't support Infs and NaNs. IEEE754 made such hardware uncommon, and FreeBSD never supported such hardware. fdlibm has some support for errno, but this was never attached to math_errhandling and was removed in FreeBSD in 2005. math_errhandling is a macro in FreeBSD, with value always MATH_ERREXCEPT. Not supporting MATH_ERRNO only requires a single Inf (to replace ERANGE) and a single NaN (to replace EDOM). MATH_ERREXCEPT requires much more of IEEE754 to be useful. Bruce From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 10:10: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 F1B1F59E; Mon, 5 Jan 2015 10: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 DE70E1AF6; Mon, 5 Jan 2015 10: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 t05AAaSQ024578; Mon, 5 Jan 2015 10:10:36 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05AAaTn024577; Mon, 5 Jan 2015 10:10:36 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201501051010.t05AAaTn024577@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Mon, 5 Jan 2015 10:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276693 - 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 10:10:37 -0000 Author: kevlo Date: Mon Jan 5 10:10:35 2015 New Revision: 276693 URL: https://svnweb.freebsd.org/changeset/base/276693 Log: Mention axge(4). Modified: head/share/man/man4/miibus.4 Modified: head/share/man/man4/miibus.4 ============================================================================== --- head/share/man/man4/miibus.4 Mon Jan 5 09:58:32 2015 (r276692) +++ head/share/man/man4/miibus.4 Mon Jan 5 10:10:35 2015 (r276693) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 26, 2014 +.Dd January 5, 2015 .Dt MIIBUS 4 .Os .Sh NAME @@ -57,6 +57,8 @@ Atheros AR8121/AR8113/AR8114 PCIe Ethern ADMtek USB Ethernet .It Xr axe 4 ASIX Electronics AX88172 USB Ethernet +.It Xr axge 4 +ASIX Electronics AX88178A/AX88179 USB Ethernet .It Xr bce 4 Broadcom NetXtreme II Gigabit Ethernet .It Xr bfe 4 @@ -143,6 +145,7 @@ but as a result are not well behaved new .Xr arp 4 , .Xr aue 4 , .Xr axe 4 , +.Xr axge 4 , .Xr bce 4 , .Xr bfe 4 , .Xr bge 4 , From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 11:22: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 7FFDA2CC; Mon, 5 Jan 2015 11: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 6CA87644FA; Mon, 5 Jan 2015 11: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 t05BMxNv060068; Mon, 5 Jan 2015 11:22:59 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05BMxNh060067; Mon, 5 Jan 2015 11:22:59 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201501051122.t05BMxNh060067@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 5 Jan 2015 11:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276694 - 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 11:22:59 -0000 Author: bz Date: Mon Jan 5 11:22:58 2015 New Revision: 276694 URL: https://svnweb.freebsd.org/changeset/base/276694 Log: With r276692 m_align() moved and became an inline function. Remove the (now) redundant function declaration. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Mon Jan 5 10:10:35 2015 (r276693) +++ head/sys/sys/mbuf.h Mon Jan 5 11:22:58 2015 (r276694) @@ -933,7 +933,6 @@ extern int nmbclusters; /* Maximum numb struct uio; void m_adj(struct mbuf *, int); -void m_align(struct mbuf *, int); int m_apply(struct mbuf *, int, int, int (*)(void *, void *, u_int), void *); int m_append(struct mbuf *, int, c_caddr_t); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 11:40: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 77A797E9; Mon, 5 Jan 2015 11:40: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 59F1F646FB; Mon, 5 Jan 2015 11:40: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 t05Be7ZW065623; Mon, 5 Jan 2015 11:40:07 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05Be6ht065620; Mon, 5 Jan 2015 11:40:06 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201501051140.t05Be6ht065620@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 5 Jan 2015 11:40:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276695 - 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 11:40:07 -0000 Author: brueffer Date: Mon Jan 5 11:40:05 2015 New Revision: 276695 URL: https://svnweb.freebsd.org/changeset/base/276695 Log: Add a very basic manpage for the Etherswitch framework. MFC after: 1 week Added: head/share/man/man4/etherswitch.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Jan 5 11:22:58 2015 (r276694) +++ head/share/man/man4/Makefile Mon Jan 5 11:40:05 2015 (r276695) @@ -129,6 +129,7 @@ MAN= aac.4 \ esp.4 \ est.4 \ et.4 \ + etherswitch.4 \ eventtimers.4 \ exca.4 \ fatm.4 \ Added: head/share/man/man4/etherswitch.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/etherswitch.4 Mon Jan 5 11:40:05 2015 (r276695) @@ -0,0 +1,65 @@ +.\" Copyright (c) 2015 Christian Brueffer +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 5, 2015 +.Dt ETHERSWITCH 4 +.Os +.Sh NAME +.Nm etherswitch +.Nd "Ethernet switch framework" +.Sh SYNOPSIS +To compile the framework into the kernel, +place the following lines in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device etherswitch" +.Cd "device miiproxy" +.Cd "device iicbus" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides a framework for Ethernet switch devices. +.Sh FILES +.Bl -tag -width ".Pa /dev/etherswitch?" -compact +.It Pa /dev/etherswitch? +.Nm +device nodes +.El +.Sh SEE ALSO +.Xr arswitch 4 , +.Xr iicbus 4 , +.Xr ip17x 4 , +.Xr rtl8366rb 4 , +.Xr ukswitch 4 , +.Xr etherswitchcfg 8 +.Sh HISTORY +The +.Nm +framework first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An Stefan Bethke From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 12:28: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 DFCF53AA; Mon, 5 Jan 2015 12:28: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 C0AB966CE3; Mon, 5 Jan 2015 12:28: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 t05CSOq8088878; Mon, 5 Jan 2015 12:28:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05CSN4Z088872; Mon, 5 Jan 2015 12:28:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501051228.t05CSN4Z088872@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 5 Jan 2015 12:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276696 - in head/sys: conf modules/bios/smapi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 12:28:25 -0000 Author: imp Date: Mon Jan 5 12:28:22 2015 New Revision: 276696 URL: https://svnweb.freebsd.org/changeset/base/276696 Log: Clang's 3.5 integrated assembler now handles these files correctly (it has support for the .codeXX directives). However, it is desirable, for a time, to allow kernels to be built with clang 3.4. Historically, it has been advantageous to allow stable X-1 to build kernels the old way (so long as the impact of doing so is small), and this restores that ability. Also, centralize the addition of ${ASM_CFLAGS.${.IMPSRC}}, place it in kern.mk rather than kern.pre.mk so that all modules can benefit, and give the same treatment to CFLAGS in kern.mk as well. Modified: head/sys/conf/Makefile.amd64 head/sys/conf/Makefile.i386 head/sys/conf/Makefile.pc98 head/sys/conf/kern.mk head/sys/conf/kern.pre.mk head/sys/modules/bios/smapi/Makefile Modified: head/sys/conf/Makefile.amd64 ============================================================================== --- head/sys/conf/Makefile.amd64 Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/Makefile.amd64 Mon Jan 5 12:28:22 2015 (r276696) @@ -37,6 +37,9 @@ INCLUDES+= -I$S/contrib/libfdt CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif +ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS34} +ASM_CFLAGS.mpboot.S= ${CLANG_NO_IAS34} + %BEFORE_DEPEND %OBJS Modified: head/sys/conf/Makefile.i386 ============================================================================== --- head/sys/conf/Makefile.i386 Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/Makefile.i386 Mon Jan 5 12:28:22 2015 (r276696) @@ -32,6 +32,9 @@ S= ../../.. INCLUDES+= -I$S/contrib/libfdt +ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS34} +ASM_CFLAGS.mpboot.s= ${CLANG_NO_IAS34} + %BEFORE_DEPEND %OBJS Modified: head/sys/conf/Makefile.pc98 ============================================================================== --- head/sys/conf/Makefile.pc98 Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/Makefile.pc98 Mon Jan 5 12:28:22 2015 (r276696) @@ -30,6 +30,8 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" +ASM_CFLAGS.mpboot.s= ${CLANG_NO_IAS34} + %BEFORE_DEPEND %OBJS Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/kern.mk Mon Jan 5 12:28:22 2015 (r276696) @@ -29,9 +29,16 @@ NO_WSOMETIMES_UNINITIALIZED= -Wno-error- CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \ -Wno-error-parentheses-equality -Wno-error-unused-function \ -Wno-error-pointer-sign -Wno-error-format -Wno-error-parentheses + +CLANG_NO_IAS= -no-integrated-as +.if ${COMPILER_VERSION} < 30500 +# XXX: clang < 3.5 integrated-as doesn't grok .codeNN directives +CLANG_NO_IAS34= -no-integrated-as +.endif .endif .if ${COMPILER_TYPE} == "gcc" +GCC_MS_EXTENSIONS= -fms-extensions .if ${COMPILER_VERSION} >= 40300 # Catch-all for all the things that are in our tree, but for which we're # not yet ready for this compiler. Note: we likely only really "support" @@ -168,9 +175,8 @@ CFLAGS+= -fstack-protector CFLAGS+= -gdwarf-2 .endif -CFLAGS+= ${CWARNEXTRA} - -CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} +CFLAGS+= ${CWARNEXTRA} ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}} +CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC}} # Tell bmake not to mistake standard targets for things to be searched for # or expect to ever be up-to-date. @@ -199,6 +205,3 @@ CFLAGS+= -std=iso9899:1999 .else # CSTD CFLAGS+= -std=${CSTD} .endif # CSTD - -# Pull in any CWARNFLAGS the modules have added. -CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/conf/kern.pre.mk Mon Jan 5 12:28:22 2015 (r276696) @@ -103,13 +103,7 @@ CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS} WERROR?= -Werror # XXX LOCORE means "don't declare C stuff" not "for locore.s". -ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} - -.if ${COMPILER_TYPE} == "clang" -CLANG_NO_IAS= -no-integrated-as -.else -GCC_MS_EXTENSIONS= -fms-extensions -.endif +ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC}} .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 CFLAGS+= -DGPROF Modified: head/sys/modules/bios/smapi/Makefile ============================================================================== --- head/sys/modules/bios/smapi/Makefile Mon Jan 5 11:40:05 2015 (r276695) +++ head/sys/modules/bios/smapi/Makefile Mon Jan 5 12:28:22 2015 (r276696) @@ -8,3 +8,5 @@ SRCS= smapi.c smapi_bios.S \ bus_if.h device_if.h .include + +CFLAGS.smapi_bios.S= ${CLANG_NO_IAS34} From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 13:46: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 9269E549; Mon, 5 Jan 2015 13:46: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 7DD4F644B7; Mon, 5 Jan 2015 13:46: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 t05DkcC2026804; Mon, 5 Jan 2015 13:46:38 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05DkcXW026803; Mon, 5 Jan 2015 13:46:38 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201501051346.t05DkcXW026803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 5 Jan 2015 13:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276697 - 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 13:46:38 -0000 Author: brueffer Date: Mon Jan 5 13:46:37 2015 New Revision: 276697 URL: https://svnweb.freebsd.org/changeset/base/276697 Log: Fix a few grammar issues. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jan 5 12:28:22 2015 (r276696) +++ head/UPDATING Mon Jan 5 13:46:37 2015 (r276697) @@ -114,7 +114,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 LOCAL_DIRS. 20141109: - faith(4) and faithd(8) has been removed from base system. It + faith(4) and faithd(8) have been removed from the base system. Faith has been obsolete for a very long time. 20141104: @@ -137,7 +137,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 20141102: pjdfstest has been integrated into kyua as an opt-in test suite. - Please see share/doc/pjdfstest/README for a more details on how to + Please see share/doc/pjdfstest/README for more details on how to execute it. 20141009: @@ -159,7 +159,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 20140729: The ofwfb driver, used to provide a graphics console on PowerPC when - using vt(4), no longer allows mmap() of all of physical memory. This + using vt(4), no longer allows mmap() of all physical memory. This will prevent Xorg on PowerPC with some ATI graphics cards from initializing properly unless x11-servers/xorg-server is updated to 1.12.4_8 or newer. From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 14:59: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 3BF1B956; Mon, 5 Jan 2015 14:59: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 254B966EF2; Mon, 5 Jan 2015 14:59: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 t05ExOS1059902; Mon, 5 Jan 2015 14:59:24 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05ExJmA059880; Mon, 5 Jan 2015 14:59:19 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501051459.t05ExJmA059880@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, 5 Jan 2015 14:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276699 - in head/contrib/unbound: . daemon doc services smallapp util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 14:59:24 -0000 Author: des Date: Mon Jan 5 14:59:18 2015 New Revision: 276699 URL: https://svnweb.freebsd.org/changeset/base/276699 Log: mfv (r276698): support for remote control over local sockets. Modified: head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure.ac head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/remote.h head/contrib/unbound/daemon/unbound.c head/contrib/unbound/doc/unbound.conf.5 head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/listen_dnsport.h head/contrib/unbound/smallapp/unbound-checkconf.c 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/net_help.c Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/config.h Mon Jan 5 14:59:18 2015 (r276699) @@ -381,6 +381,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_UIO_H 1 +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UN_H 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_WAIT_H 1 @@ -429,7 +432,8 @@ /* if lex has yylex_destroy */ #define LEX_HAS_YYLEX_DESTROY 1 -/* Define to the sub-directory where libtool stores uninstalled libraries. */ +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ #define LT_OBJDIR ".libs/" /* Define to the maximum message length to pass to syslog. */ Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/config.h.in Mon Jan 5 14:59:18 2015 (r276699) @@ -380,6 +380,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UIO_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UN_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H @@ -428,7 +431,8 @@ /* if lex has yylex_destroy */ #undef LEX_HAS_YYLEX_DESTROY -/* Define to the sub-directory where libtool stores uninstalled libraries. */ +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ #undef LT_OBJDIR /* Define to the maximum message length to pass to syslog. */ Modified: head/contrib/unbound/configure.ac ============================================================================== --- head/contrib/unbound/configure.ac Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/configure.ac Mon Jan 5 14:59:18 2015 (r276699) @@ -266,7 +266,7 @@ AC_CHECK_TOOL(STRIP, strip) ACX_LIBTOOL_C_ONLY # Checks for header files. -AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h],,, [AC_INCLUDES_DEFAULT]) +AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/un.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h endian.h],,, [AC_INCLUDES_DEFAULT]) # check for types. # Using own tests for int64* because autoconf builtin only give 32bit. Modified: head/contrib/unbound/daemon/remote.c ============================================================================== --- head/contrib/unbound/daemon/remote.c Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/daemon/remote.c Mon Jan 5 14:59:18 2015 (r276699) @@ -46,6 +46,10 @@ #ifdef HAVE_OPENSSL_ERR_H #include #endif +#ifndef HEADER_DH_H +#include +#endif + #include #include "daemon/remote.h" #include "daemon/worker.h" @@ -82,6 +86,9 @@ #ifdef HAVE_SYS_TYPES_H # include #endif +#ifdef HAVE_SYS_STAT_H +#include +#endif #ifdef HAVE_NETDB_H #include #endif @@ -131,6 +138,39 @@ timeval_divide(struct timeval* avg, cons #endif } +/* + * The following function was generated using the openssl utility, using + * the command : "openssl dhparam -dsaparam -C 512" + */ +DH *get_dh512() +{ + static unsigned char dh512_p[]={ + 0xC9,0xD7,0x05,0xDA,0x5F,0xAB,0x14,0xE8,0x11,0x56,0x77,0x85, + 0xB1,0x24,0x2C,0x95,0x60,0xEA,0xE2,0x10,0x6F,0x0F,0x84,0xEC, + 0xF4,0x45,0xE8,0x90,0x7A,0xA7,0x03,0xFF,0x5B,0x88,0x53,0xDE, + 0xC4,0xDE,0xBC,0x42,0x78,0x71,0x23,0x7E,0x24,0xA5,0x5E,0x4E, + 0xEF,0x6F,0xFF,0x5F,0xAF,0xBE,0x8A,0x77,0x62,0xB4,0x65,0x82, + 0x7E,0xC9,0xED,0x2F, + }; + static unsigned char dh512_g[]={ + 0x8D,0x3A,0x52,0xBC,0x8A,0x71,0x94,0x33,0x2F,0xE1,0xE8,0x4C, + 0x73,0x47,0x03,0x4E,0x7D,0x40,0xE5,0x84,0xA0,0xB5,0x6D,0x10, + 0x6F,0x90,0x43,0x05,0x1A,0xF9,0x0B,0x6A,0xD1,0x2A,0x9C,0x25, + 0x0A,0xB9,0xD1,0x14,0xDC,0x35,0x1C,0x48,0x7C,0xC6,0x0C,0x6D, + 0x32,0x1D,0xD3,0xC8,0x10,0xA8,0x82,0x14,0xA2,0x1C,0xF4,0x53, + 0x23,0x3B,0x1C,0xB9, + }; + DH *dh; + + if ((dh=DH_new()) == NULL) return(NULL); + dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL); + dh->g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL); + if ((dh->p == NULL) || (dh->g == NULL)) + { DH_free(dh); return(NULL); } + dh->length = 160; + return(dh); +} + struct daemon_remote* daemon_remote_create(struct config_file* cfg) { @@ -165,6 +205,24 @@ daemon_remote_create(struct config_file* daemon_remote_delete(rc); return NULL; } + + if (cfg->remote_control_use_cert == 0) { + /* No certificates are requested */ + if(!SSL_CTX_set_cipher_list(rc->ctx, "aNULL")) { + log_crypto_err("Failed to set aNULL cipher list"); + return NULL; + } + + /* Since we have no certificates and hence no source of + * DH params, let's generate and set them + */ + if(!SSL_CTX_set_tmp_dh(rc->ctx,get_dh512())) { + log_crypto_err("Wanted to set DH param, but failed"); + return NULL; + } + return rc; + } + rc->use_cert = 1; s_cert = fname_after_chroot(cfg->server_cert_file, cfg, 1); s_key = fname_after_chroot(cfg->server_key_file, cfg, 1); if(!s_cert || !s_key) { @@ -244,7 +302,8 @@ void daemon_remote_delete(struct daemon_ * @return false on failure. */ static int -add_open(const char* ip, int nr, struct listen_port** list, int noproto_is_err) +add_open(const char* ip, int nr, struct listen_port** list, int noproto_is_err, + struct config_file* cfg) { struct addrinfo hints; struct addrinfo* res; @@ -255,29 +314,46 @@ add_open(const char* ip, int nr, struct snprintf(port, sizeof(port), "%d", nr); port[sizeof(port)-1]=0; memset(&hints, 0, sizeof(hints)); - hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; - if((r = getaddrinfo(ip, port, &hints, &res)) != 0 || !res) { -#ifdef USE_WINSOCK - if(!noproto_is_err && r == EAI_NONAME) { - /* tried to lookup the address as name */ - return 1; /* return success, but do nothing */ + + if(ip[0] == '/') { + /* This looks like a local socket */ + fd = create_local_accept_sock(ip, &noproto); + /* + * Change socket ownership and permissions so users other + * than root can access it provided they are in the same + * group as the user we run as. + */ + if(fd != -1) { + if (cfg->username && cfg->username[0]) + chown(ip, cfg->uid, cfg->gid); + chmod(ip, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); } + } else { + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; + if((r = getaddrinfo(ip, port, &hints, &res)) != 0 || !res) { +#ifdef USE_WINSOCK + if(!noproto_is_err && r == EAI_NONAME) { + /* tried to lookup the address as name */ + return 1; /* return success, but do nothing */ + } #endif /* USE_WINSOCK */ - log_err("control interface %s:%s getaddrinfo: %s %s", - ip?ip:"default", port, gai_strerror(r), + log_err("control interface %s:%s getaddrinfo: %s %s", + ip?ip:"default", port, gai_strerror(r), #ifdef EAI_SYSTEM - r==EAI_SYSTEM?(char*)strerror(errno):"" + r==EAI_SYSTEM?(char*)strerror(errno):"" #else - "" + "" #endif ); - return 0; + return 0; + } + + /* open fd */ + fd = create_tcp_accept_sock(res, 1, &noproto, 0); + freeaddrinfo(res); } - /* open fd */ - fd = create_tcp_accept_sock(res, 1, &noproto, 0); - freeaddrinfo(res); if(fd == -1 && noproto) { if(!noproto_is_err) return 1; /* return success, but do nothing */ @@ -314,7 +390,7 @@ struct listen_port* daemon_remote_open_p if(cfg->control_ifs) { struct config_strlist* p; for(p = cfg->control_ifs; p; p = p->next) { - if(!add_open(p->str, cfg->control_port, &l, 1)) { + if(!add_open(p->str, cfg->control_port, &l, 1, cfg)) { listening_ports_free(l); return NULL; } @@ -322,12 +398,12 @@ struct listen_port* daemon_remote_open_p } else { /* defaults */ if(cfg->do_ip6 && - !add_open("::1", cfg->control_port, &l, 0)) { + !add_open("::1", cfg->control_port, &l, 0, cfg)) { listening_ports_free(l); return NULL; } if(cfg->do_ip4 && - !add_open("127.0.0.1", cfg->control_port, &l, 1)) { + !add_open("127.0.0.1", cfg->control_port, &l, 1, cfg)) { listening_ports_free(l); return NULL; } @@ -2434,7 +2510,9 @@ int remote_control_callback(struct comm_ s->shake_state = rc_none; /* once handshake has completed, check authentication */ - if(SSL_get_verify_result(s->ssl) == X509_V_OK) { + if (!rc->use_cert) { + verbose(VERB_ALGO, "unauthenticated remote control connection"); + } else if(SSL_get_verify_result(s->ssl) == X509_V_OK) { X509* x = SSL_get_peer_certificate(s->ssl); if(!x) { verbose(VERB_DETAIL, "remote control connection " Modified: head/contrib/unbound/daemon/remote.h ============================================================================== --- head/contrib/unbound/daemon/remote.h Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/daemon/remote.h Mon Jan 5 14:59:18 2015 (r276699) @@ -89,6 +89,8 @@ struct daemon_remote { struct worker* worker; /** commpoints for accepting remote control connections */ struct listen_list* accept_list; + /* if certificates are used */ + int use_cert; /** number of active commpoints that are handling remote control */ int active; /** max active commpoints */ Modified: head/contrib/unbound/daemon/unbound.c ============================================================================== --- head/contrib/unbound/daemon/unbound.c Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/daemon/unbound.c Mon Jan 5 14:59:18 2015 (r276699) @@ -441,20 +441,14 @@ static void perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode, const char** cfgfile) { + log_assert(cfg); + #ifdef HAVE_GETPWNAM struct passwd *pwd = NULL; - uid_t uid; - gid_t gid; - /* initialize, but not to 0 (root) */ - memset(&uid, 112, sizeof(uid)); - memset(&gid, 112, sizeof(gid)); - log_assert(cfg); if(cfg->username && cfg->username[0]) { if((pwd = getpwnam(cfg->username)) == NULL) fatal_exit("user '%s' does not exist.", cfg->username); - uid = pwd->pw_uid; - gid = pwd->pw_gid; /* endpwent below, in case we need pwd for setusercontext */ } #endif @@ -511,18 +505,11 @@ perform_setup(struct daemon* daemon, str #ifdef HAVE_KILL if(cfg->pidfile && cfg->pidfile[0]) { writepid(daemon->pidfile, getpid()); - if(!(cfg->chrootdir && cfg->chrootdir[0]) || - (cfg->chrootdir && cfg->chrootdir[0] && - strncmp(daemon->pidfile, cfg->chrootdir, - strlen(cfg->chrootdir))==0)) { - /* delete of pidfile could potentially work, - * chown to get permissions */ - if(cfg->username && cfg->username[0]) { - if(chown(daemon->pidfile, uid, gid) == -1) { + if(cfg->username && cfg->username[0]) { + if(chown(daemon->pidfile, cfg->uid, cfg->gid) == -1) { log_err("cannot chown %u.%u %s: %s", - (unsigned)uid, (unsigned)gid, + (unsigned)cfg->uid, (unsigned)cfg->gid, daemon->pidfile, strerror(errno)); - } } } } @@ -537,7 +524,7 @@ perform_setup(struct daemon* daemon, str /* 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, 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)); @@ -601,27 +588,27 @@ perform_setup(struct daemon* daemon, str #ifdef HAVE_GETPWNAM if(cfg->username && cfg->username[0]) { # ifdef HAVE_INITGROUPS - if(initgroups(cfg->username, 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(gid,gid,gid) != 0) + if(setresgid(cfg->gid,cfg->gid,cfg->gid) != 0) #elif defined(HAVE_SETREGID) && !defined(DARWIN_BROKEN_SETREUID) - if(setregid(gid,gid) != 0) + if(setregid(cfg->gid,cfg->gid) != 0) #else /* use setgid */ - if(setgid(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(uid,uid,uid) != 0) + if(setresuid(cfg->uid,cfg->uid,cfg->uid) != 0) #elif defined(HAVE_SETREUID) && !defined(DARWIN_BROKEN_SETREUID) - if(setreuid(uid,uid) != 0) + if(setreuid(cfg->uid,cfg->uid) != 0) #else /* use setuid */ - if(setuid(uid) != 0) + if(setuid(cfg->uid) != 0) #endif /* HAVE_SETRESUID */ fatal_exit("unable to set user id of %s: %s", cfg->username, strerror(errno)); Modified: head/contrib/unbound/doc/unbound.conf.5 ============================================================================== --- head/contrib/unbound/doc/unbound.conf.5 Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/doc/unbound.conf.5 Mon Jan 5 14:59:18 2015 (r276699) @@ -958,36 +958,47 @@ to setup SSLv3 / TLSv1 security for the section for options. To setup the correct self\-signed certificates use the \fIunbound\-control\-setup\fR(8) utility. .TP 5 -.B control\-enable: \fI +.B control\-enable: \fI The option is used to enable remote control, default is "no". If turned off, the server does not listen for control commands. .TP 5 -.B control\-interface: -Give IPv4 or IPv6 addresses to listen on for control commands. +.B control\-interface: \fI +Give IPv4 or IPv6 addresses or local socket path to listen on for +control commands. By default localhost (127.0.0.1 and ::1) is listened to. Use 0.0.0.0 and ::0 to listen to all interfaces. +If you change this and permissions have been dropped, you must restart +the server for the change to take effect. .TP 5 -.B control\-port: -The port number to listen on for control commands, default is 8953. -If you change this port number, and permissions have been dropped, -a reload is not sufficient to open the port again, you must then restart. +.B control\-port: \fI +The port number to listen on for IPv4 or IPv6 control interfaces, +default is 8953. +If you change this and permissions have been dropped, you must restart +the server for the change to take effect. +.TP 5 +.B control-use-cert: \fI +Whether to require certificate authentication of control connections. +The default is "yes". +This should not be changed unless there are other mechanisms in place +to prevent untrusted users from accessing the remote control +interface. .TP 5 -.B server\-key\-file: "" +.B server\-key\-file: \fI Path to the server private key, by default unbound_server.key. This file is generated by the \fIunbound\-control\-setup\fR utility. This file is used by the unbound server, but not by \fIunbound\-control\fR. .TP 5 -.B server\-cert\-file: "" +.B server\-cert\-file: \fI Path to the server self signed certificate, by default unbound_server.pem. This file is generated by the \fIunbound\-control\-setup\fR utility. This file is used by the unbound server, and also by \fIunbound\-control\fR. .TP 5 -.B control\-key\-file: "" +.B control\-key\-file: \fI Path to the control client private key, by default unbound_control.key. This file is generated by the \fIunbound\-control\-setup\fR utility. This file is used by \fIunbound\-control\fR. .TP 5 -.B control\-cert\-file: "" +.B control\-cert\-file: \fI Path to the control client certificate, by default unbound_control.pem. This certificate has to be signed with the server certificate. This file is generated by the \fIunbound\-control\-setup\fR utility. Modified: head/contrib/unbound/doc/unbound.conf.5.in ============================================================================== --- head/contrib/unbound/doc/unbound.conf.5.in Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/doc/unbound.conf.5.in Mon Jan 5 14:59:18 2015 (r276699) @@ -958,36 +958,47 @@ to setup SSLv3 / TLSv1 security for the section for options. To setup the correct self\-signed certificates use the \fIunbound\-control\-setup\fR(8) utility. .TP 5 -.B control\-enable: \fI +.B control\-enable: \fI The option is used to enable remote control, default is "no". If turned off, the server does not listen for control commands. .TP 5 -.B control\-interface: -Give IPv4 or IPv6 addresses to listen on for control commands. +.B control\-interface: \fI +Give IPv4 or IPv6 addresses or local socket path to listen on for +control commands. By default localhost (127.0.0.1 and ::1) is listened to. Use 0.0.0.0 and ::0 to listen to all interfaces. +If you change this and permissions have been dropped, you must restart +the server for the change to take effect. .TP 5 -.B control\-port: -The port number to listen on for control commands, default is 8953. -If you change this port number, and permissions have been dropped, -a reload is not sufficient to open the port again, you must then restart. +.B control\-port: \fI +The port number to listen on for IPv4 or IPv6 control interfaces, +default is 8953. +If you change this and permissions have been dropped, you must restart +the server for the change to take effect. +.TP 5 +.B control-use-cert: \fI +Whether to require certificate authentication of control connections. +The default is "yes". +This should not be changed unless there are other mechanisms in place +to prevent untrusted users from accessing the remote control +interface. .TP 5 -.B server\-key\-file: "" +.B server\-key\-file: \fI Path to the server private key, by default unbound_server.key. This file is generated by the \fIunbound\-control\-setup\fR utility. This file is used by the unbound server, but not by \fIunbound\-control\fR. .TP 5 -.B server\-cert\-file: "" +.B server\-cert\-file: \fI Path to the server self signed certificate, by default unbound_server.pem. This file is generated by the \fIunbound\-control\-setup\fR utility. This file is used by the unbound server, and also by \fIunbound\-control\fR. .TP 5 -.B control\-key\-file: "" +.B control\-key\-file: \fI Path to the control client private key, by default unbound_control.key. This file is generated by the \fIunbound\-control\-setup\fR utility. This file is used by \fIunbound\-control\fR. .TP 5 -.B control\-cert\-file: "" +.B control\-cert\-file: \fI Path to the control client certificate, by default unbound_control.pem. This certificate has to be signed with the server certificate. This file is generated by the \fIunbound\-control\-setup\fR utility. Modified: head/contrib/unbound/services/listen_dnsport.c ============================================================================== --- head/contrib/unbound/services/listen_dnsport.c Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/services/listen_dnsport.c Mon Jan 5 14:59:18 2015 (r276699) @@ -56,6 +56,10 @@ #endif #include +#ifdef HAVE_SYS_UN_H +#include +#endif + /** number of queued TCP connections for listen() */ #define TCP_BACKLOG 256 @@ -571,6 +575,56 @@ create_tcp_accept_sock(struct addrinfo * return s; } +int +create_local_accept_sock(char *path, int* noproto) +{ +#ifdef HAVE_SYS_UN_H + int s; + struct sockaddr_un sun; + + sun.sun_len = sizeof(sun); + sun.sun_family = AF_LOCAL; + strlcpy(sun.sun_path, path, 104); + + if ((s = socket(PF_LOCAL, SOCK_STREAM, 0)) == -1) { + log_err("Cannot create local socket %s (%s)", + path, strerror(errno)); + return -1; + } + + if (unlink(path) && errno != ENOENT) { + /* The socket already exists and cannot be removed */ + log_err("Cannot remove old local socket %s (%s)", + path, strerror(errno)); + return -1; + } + + if (bind(s, (struct sockaddr *)&sun, + sizeof(struct sockaddr_un)) == -1) { + log_err("Cannot bind local socket %s (%s)", + path, strerror(errno)); + return -1; + } + + if (!fd_set_nonblock(s)) { + log_err("Cannot set non-blocking mode"); + return -1; + } + + if (listen(s, TCP_BACKLOG) == -1) { + log_err("can't listen: %s", strerror(errno)); + return -1; + } + + return s; +#else + log_err("Local sockets are not supported"); + *noproto = 1; + return -1; +#endif +} + + /** * Create socket from getaddrinfo results */ Modified: head/contrib/unbound/services/listen_dnsport.h ============================================================================== --- head/contrib/unbound/services/listen_dnsport.h Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/services/listen_dnsport.h Mon Jan 5 14:59:18 2015 (r276699) @@ -207,4 +207,13 @@ int create_udp_sock(int family, int sock int create_tcp_accept_sock(struct addrinfo *addr, int v6only, int* noproto, int* reuseport); +/** + * Create and bind local listening socket + * @param path: path to the socket. + * @param noproto: on error, this is set true if cause is that local sockets + * are not supported. + * @return: the socket. -1 on error. + */ +int create_local_accept_sock(char* path, int* noproto); + #endif /* LISTEN_DNSPORT_H */ Modified: head/contrib/unbound/smallapp/unbound-checkconf.c ============================================================================== --- head/contrib/unbound/smallapp/unbound-checkconf.c Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/smallapp/unbound-checkconf.c Mon Jan 5 14:59:18 2015 (r276699) @@ -416,7 +416,7 @@ morechecks(struct config_file* cfg, cons endpwent(); } #endif - if(cfg->remote_control_enable) { + if(cfg->remote_control_enable && cfg->remote_control_use_cert) { check_chroot_string("server-key-file", &cfg->server_key_file, cfg->chrootdir, cfg); check_chroot_string("server-cert-file", &cfg->server_cert_file, Modified: head/contrib/unbound/smallapp/unbound-control.c ============================================================================== --- head/contrib/unbound/smallapp/unbound-control.c Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/smallapp/unbound-control.c Mon Jan 5 14:59:18 2015 (r276699) @@ -59,6 +59,10 @@ #include "util/locks.h" #include "util/net_help.h" +#ifdef HAVE_SYS_UN_H +#include +#endif + /** Give unbound-control usage, and exit (1). */ static void usage() @@ -139,29 +143,37 @@ setup_ctx(struct config_file* cfg) char* s_cert, *c_key, *c_cert; SSL_CTX* ctx; - s_cert = fname_after_chroot(cfg->server_cert_file, cfg, 1); - c_key = fname_after_chroot(cfg->control_key_file, cfg, 1); - c_cert = fname_after_chroot(cfg->control_cert_file, cfg, 1); - if(!s_cert || !c_key || !c_cert) - fatal_exit("out of memory"); + if(cfg->remote_control_use_cert) { + s_cert = fname_after_chroot(cfg->server_cert_file, cfg, 1); + c_key = fname_after_chroot(cfg->control_key_file, cfg, 1); + c_cert = fname_after_chroot(cfg->control_cert_file, cfg, 1); + if(!s_cert || !c_key || !c_cert) + fatal_exit("out of memory"); + } ctx = SSL_CTX_new(SSLv23_client_method()); if(!ctx) ssl_err("could not allocate SSL_CTX pointer"); if(!(SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2)) ssl_err("could not set SSL_OP_NO_SSLv2"); - if(!(SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)) - ssl_err("could not set SSL_OP_NO_SSLv3"); - if(!SSL_CTX_use_certificate_file(ctx,c_cert,SSL_FILETYPE_PEM) || - !SSL_CTX_use_PrivateKey_file(ctx,c_key,SSL_FILETYPE_PEM) - || !SSL_CTX_check_private_key(ctx)) - ssl_err("Error setting up SSL_CTX client key and cert"); - if (SSL_CTX_load_verify_locations(ctx, s_cert, NULL) != 1) - ssl_err("Error setting up SSL_CTX verify, server cert"); - SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); - - free(s_cert); - free(c_key); - free(c_cert); + if(cfg->remote_control_use_cert) { + if(!(SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)) + ssl_err("could not set SSL_OP_NO_SSLv3"); + if(!SSL_CTX_use_certificate_file(ctx,c_cert,SSL_FILETYPE_PEM) || + !SSL_CTX_use_PrivateKey_file(ctx,c_key,SSL_FILETYPE_PEM) + || !SSL_CTX_check_private_key(ctx)) + ssl_err("Error setting up SSL_CTX client key and cert"); + if (SSL_CTX_load_verify_locations(ctx, s_cert, NULL) != 1) + ssl_err("Error setting up SSL_CTX verify, server cert"); + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); + + free(s_cert); + free(c_key); + free(c_cert); + } else { + /* Use ciphers that don't require authentication */ + if(!SSL_CTX_set_cipher_list(ctx, "aNULL")) + ssl_err("Error setting NULL cipher!"); + } return ctx; } @@ -171,6 +183,7 @@ contact_server(const char* svr, struct c { struct sockaddr_storage addr; socklen_t addrlen; + int addrfamily = 0; int fd; /* use svr or the first config entry */ if(!svr) { @@ -189,12 +202,23 @@ contact_server(const char* svr, struct c if(strchr(svr, '@')) { if(!extstrtoaddr(svr, &addr, &addrlen)) fatal_exit("could not parse IP@port: %s", svr); +#ifdef HAVE_SYS_UN_H + } else if(svr[0] == '/') { + struct sockaddr_un* sun = (struct sockaddr_un *) &addr; + sun->sun_family = AF_LOCAL; + sun->sun_len = sizeof(sun); + strlcpy(sun->sun_path, svr, 104); + addrlen = sizeof(struct sockaddr_un); + addrfamily = AF_LOCAL; +#endif } else { if(!ipstrtoaddr(svr, cfg->control_port, &addr, &addrlen)) fatal_exit("could not parse IP: %s", svr); } - fd = socket(addr_is_ip6(&addr, addrlen)?AF_INET6:AF_INET, - SOCK_STREAM, 0); + + if(addrfamily == 0) + addrfamily = addr_is_ip6(&addr, addrlen)?AF_INET6:AF_INET; + fd = socket(addrfamily, SOCK_STREAM, 0); if(fd == -1) { #ifndef USE_WINSOCK fatal_exit("socket: %s", strerror(errno)); @@ -223,7 +247,7 @@ contact_server(const char* svr, struct c /** setup SSL on the connection */ static SSL* -setup_ssl(SSL_CTX* ctx, int fd) +setup_ssl(SSL_CTX* ctx, int fd, struct config_file* cfg) { SSL* ssl; X509* x; @@ -249,10 +273,13 @@ setup_ssl(SSL_CTX* ctx, int fd) /* check authenticity of server */ if(SSL_get_verify_result(ssl) != X509_V_OK) ssl_err("SSL verification failed"); - x = SSL_get_peer_certificate(ssl); - if(!x) - ssl_err("Server presented no peer certificate"); - X509_free(x); + if(cfg->remote_control_use_cert) { + x = SSL_get_peer_certificate(ssl); + if(!x) + ssl_err("Server presented no peer certificate"); + X509_free(x); + } + return ssl; } @@ -330,11 +357,11 @@ go(const char* cfgfile, char* svr, int q if(!cfg->remote_control_enable) log_warn("control-enable is 'no' in the config file."); ctx = setup_ctx(cfg); - + /* contact server */ fd = contact_server(svr, cfg, argc>0&&strcmp(argv[0],"status")==0); - ssl = setup_ssl(ctx, fd); - + ssl = setup_ssl(ctx, fd, cfg); + /* send command */ ret = go_cmd(ssl, quiet, argc, argv); Modified: head/contrib/unbound/util/config_file.c ============================================================================== --- head/contrib/unbound/util/config_file.c Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/util/config_file.c Mon Jan 5 14:59:18 2015 (r276699) @@ -60,6 +60,9 @@ #ifdef HAVE_GLOB_H # include #endif +#ifdef HAVE_PWD_H +#include +#endif /** global config during parsing */ struct config_parser_state* cfg_parser = 0; @@ -131,6 +134,8 @@ config_create(void) goto error_exit; init_outgoing_availports(cfg->outgoing_avail_ports, 65536); if(!(cfg->username = strdup(UB_USERNAME))) goto error_exit; + cfg->uid = (uid_t)-1; + cfg->gid = (gid_t)-1; #ifdef HAVE_CHROOT if(!(cfg->chrootdir = strdup(CHROOT_DIR))) goto error_exit; #endif @@ -799,6 +804,17 @@ config_read(struct config_file* cfg, con errno=EINVAL; return 0; } + +#ifdef HAVE_GETPWNAM + /* translate username into uid and gid */ + if(cfg->username && cfg->username[0]) { + struct passwd *pwd; + if((pwd = getpwnam(cfg->username)) == NULL) + log_err("user '%s' does not exist.", cfg->username); + cfg->uid = pwd->pw_uid; + cfg->gid = pwd->pw_gid; + } +#endif return 1; } Modified: head/contrib/unbound/util/config_file.h ============================================================================== --- head/contrib/unbound/util/config_file.h Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/util/config_file.h Mon Jan 5 14:59:18 2015 (r276699) @@ -192,6 +192,8 @@ struct config_file { char* chrootdir; /** username to change to, if not "". */ char* username; + uid_t uid; + gid_t gid; /** working directory */ char* directory; /** filename to log to. */ @@ -282,6 +284,8 @@ struct config_file { struct config_strlist* control_ifs; /** port number for the control port */ int control_port; + /** use certificates for remote control */ + int remote_control_use_cert; /** private key file for server */ char* server_key_file; /** certificate file for server */ Modified: head/contrib/unbound/util/configlexer.lex ============================================================================== --- head/contrib/unbound/util/configlexer.lex Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/util/configlexer.lex Mon Jan 5 14:59:18 2015 (r276699) @@ -317,6 +317,7 @@ remote-control{COLON} { YDVAR(0, VAR_RE control-enable{COLON} { YDVAR(1, VAR_CONTROL_ENABLE) } control-interface{COLON} { YDVAR(1, VAR_CONTROL_INTERFACE) } control-port{COLON} { YDVAR(1, VAR_CONTROL_PORT) } +control-use-cert{COLON} { YDVAR(1, VAR_CONTROL_USE_CERT) } server-key-file{COLON} { YDVAR(1, VAR_SERVER_KEY_FILE) } server-cert-file{COLON} { YDVAR(1, VAR_SERVER_CERT_FILE) } control-key-file{COLON} { YDVAR(1, VAR_CONTROL_KEY_FILE) } Modified: head/contrib/unbound/util/configparser.y ============================================================================== --- head/contrib/unbound/util/configparser.y Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/util/configparser.y Mon Jan 5 14:59:18 2015 (r276699) @@ -95,6 +95,7 @@ extern struct config_parser_state* cfg_p %token VAR_PRIVATE_DOMAIN VAR_REMOTE_CONTROL VAR_CONTROL_ENABLE %token VAR_CONTROL_INTERFACE VAR_CONTROL_PORT VAR_SERVER_KEY_FILE %token VAR_SERVER_CERT_FILE VAR_CONTROL_KEY_FILE VAR_CONTROL_CERT_FILE +%token VAR_CONTROL_USE_CERT %token VAR_EXTENDED_STATISTICS VAR_LOCAL_DATA_PTR VAR_JOSTLE_TIMEOUT %token VAR_STUB_PRIME VAR_UNWANTED_REPLY_THRESHOLD VAR_LOG_TIME_ASCII %token VAR_DOMAIN_INSECURE VAR_PYTHON VAR_PYTHON_SCRIPT VAR_VAL_SIG_SKEW_MIN @@ -1270,7 +1271,7 @@ contents_rc: contents_rc content_rc | ; content_rc: rc_control_enable | rc_control_interface | rc_control_port | rc_server_key_file | rc_server_cert_file | rc_control_key_file | - rc_control_cert_file + rc_control_cert_file | rc_control_use_cert ; rc_control_enable: VAR_CONTROL_ENABLE STRING_ARG { @@ -1298,6 +1299,16 @@ rc_control_interface: VAR_CONTROL_INTERF yyerror("out of memory"); } ; +rc_control_use_cert: VAR_CONTROL_USE_CERT STRING_ARG + { + OUTYY(("P(control_use_cert:%s)\n", $2)); + if(strcmp($2, "yes") != 0 && strcmp($2, "no") != 0) + yyerror("expected yes or no."); + else cfg_parser->cfg->remote_control_use_cert = + (strcmp($2, "yes")==0); + free($2); + } + ; rc_server_key_file: VAR_SERVER_KEY_FILE STRING_ARG { OUTYY(("P(rc_server_key_file:%s)\n", $2)); Modified: head/contrib/unbound/util/net_help.c ============================================================================== --- head/contrib/unbound/util/net_help.c Mon Jan 5 14:55:52 2015 (r276698) +++ head/contrib/unbound/util/net_help.c Mon Jan 5 14:59:18 2015 (r276699) @@ -156,7 +156,7 @@ log_addr(enum verbosity_value v, const c case AF_INET6: family="ip6"; sinaddr = &((struct sockaddr_in6*)addr)->sin6_addr; break; - case AF_UNIX: family="unix"; break; + case AF_LOCAL: family="local"; break; default: break; } if(inet_ntop(af, sinaddr, dest, (socklen_t)sizeof(dest)) == 0) { @@ -313,7 +313,7 @@ void log_name_addr(enum verbosity_value case AF_INET6: family=""; sinaddr = &((struct sockaddr_in6*)addr)->sin6_addr; break; - case AF_UNIX: family="unix_family "; break; + case AF_LOCAL: family="local "; break; default: break; } if(inet_ntop(af, sinaddr, dest, (socklen_t)sizeof(dest)) == 0) { From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 15:04: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 CAF4AC94; Mon, 5 Jan 2015 15:04: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 B2F8E6701E; Mon, 5 Jan 2015 15:04: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 t05F4YpD064230; Mon, 5 Jan 2015 15:04:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05F4Jp3064137; Mon, 5 Jan 2015 15:04:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501051504.t05F4Jp3064137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Jan 2015 15:04:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276701 - in head/sys/dev: sound/usb usb usb/controller usb/gadget usb/input usb/misc usb/net usb/serial usb/storage 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 15:04:35 -0000 Author: hselasky Date: Mon Jan 5 15:04:17 2015 New Revision: 276701 URL: https://svnweb.freebsd.org/changeset/base/276701 Log: Make a bunch of USB debug SYSCTLs tunable, so that their value(s) can be set before the USB device(s) are probed. Modified: head/sys/dev/sound/usb/uaudio.c head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/atmegadci.c head/sys/dev/usb/controller/avr32dci.c head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/controller/saf1761_otg.c head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/controller/uss820dci.c head/sys/dev/usb/gadget/g_audio.c head/sys/dev/usb/gadget/g_keyboard.c head/sys/dev/usb/gadget/g_modem.c head/sys/dev/usb/gadget/g_mouse.c head/sys/dev/usb/input/atp.c head/sys/dev/usb/input/uep.c head/sys/dev/usb/input/uhid.c head/sys/dev/usb/input/ums.c head/sys/dev/usb/input/wsp.c head/sys/dev/usb/misc/udbp.c head/sys/dev/usb/net/if_aue.c head/sys/dev/usb/net/if_axe.c head/sys/dev/usb/net/if_axge.c head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_cue.c head/sys/dev/usb/net/if_ipheth.c head/sys/dev/usb/net/if_kue.c head/sys/dev/usb/net/if_mos.c head/sys/dev/usb/net/if_rue.c head/sys/dev/usb/net/if_smsc.c head/sys/dev/usb/net/if_udav.c head/sys/dev/usb/net/if_urndis.c head/sys/dev/usb/net/if_usie.c head/sys/dev/usb/net/uhso.c head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/serial/ubsa.c head/sys/dev/usb/serial/ubser.c head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/serial/ulpt.c head/sys/dev/usb/serial/umcs.c head/sys/dev/usb/serial/umodem.c head/sys/dev/usb/serial/umoscom.c head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/uslcom.c head/sys/dev/usb/serial/uvisor.c head/sys/dev/usb/serial/uvscom.c head/sys/dev/usb/storage/urio.c head/sys/dev/usb/storage/ustorage_fs.c head/sys/dev/usb/usb_hub.c head/sys/dev/usb/usb_request.c head/sys/dev/usb/wlan/if_rsu.c head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/usb/wlan/if_ural.c head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/sound/usb/uaudio.c Mon Jan 5 15:04:17 2015 (r276701) @@ -101,7 +101,7 @@ static int uaudio_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uaudio, CTLFLAG_RW, 0, "USB uaudio"); -SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, debug, CTLFLAG_RWTUN, &uaudio_debug, 0, "uaudio debug level"); SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, default_rate, CTLFLAG_RWTUN, &uaudio_default_rate, 0, "uaudio default sample rate"); @@ -2593,7 +2593,7 @@ uaudio_mixer_register_sysctl(struct uaud SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(control_tree), - OID_AUTO, "val", CTLTYPE_INT | CTLFLAG_RW, sc, + OID_AUTO, "val", CTLTYPE_INT | CTLFLAG_RWTUN, sc, pmc->wValue[chan], uaudio_mixer_sysctl_handler, "I", "Current value"); Modified: head/sys/dev/usb/controller/at91dci.c ============================================================================== --- head/sys/dev/usb/controller/at91dci.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/controller/at91dci.c Mon Jan 5 15:04:17 2015 (r276701) @@ -98,7 +98,7 @@ static int at91dcidebug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, at91dci, CTLFLAG_RW, 0, "USB at91dci"); -SYSCTL_INT(_hw_usb_at91dci, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_at91dci, OID_AUTO, debug, CTLFLAG_RWTUN, &at91dcidebug, 0, "at91dci debug level"); #endif Modified: head/sys/dev/usb/controller/atmegadci.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/controller/atmegadci.c Mon Jan 5 15:04:17 2015 (r276701) @@ -88,7 +88,7 @@ static int atmegadci_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, atmegadci, CTLFLAG_RW, 0, "USB ATMEGA DCI"); -SYSCTL_INT(_hw_usb_atmegadci, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_atmegadci, OID_AUTO, debug, CTLFLAG_RWTUN, &atmegadci_debug, 0, "ATMEGA DCI debug level"); #endif Modified: head/sys/dev/usb/controller/avr32dci.c ============================================================================== --- head/sys/dev/usb/controller/avr32dci.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/controller/avr32dci.c Mon Jan 5 15:04:17 2015 (r276701) @@ -86,7 +86,7 @@ static int avr32dci_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, avr32dci, CTLFLAG_RW, 0, "USB AVR32 DCI"); -SYSCTL_INT(_hw_usb_avr32dci, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_avr32dci, OID_AUTO, debug, CTLFLAG_RWTUN, &avr32dci_debug, 0, "AVR32 DCI debug level"); #endif Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/controller/musb_otg.c Mon Jan 5 15:04:17 2015 (r276701) @@ -91,7 +91,7 @@ static int musbotgdebug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, musbotg, CTLFLAG_RW, 0, "USB musbotg"); -SYSCTL_INT(_hw_usb_musbotg, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_musbotg, OID_AUTO, debug, CTLFLAG_RWTUN, &musbotgdebug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/controller/saf1761_otg.c ============================================================================== --- head/sys/dev/usb/controller/saf1761_otg.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/controller/saf1761_otg.c Mon Jan 5 15:04:17 2015 (r276701) @@ -100,9 +100,9 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, saf1761_otg, CTLFLAG_RW, 0, "USB SAF1761 DCI"); -SYSCTL_INT(_hw_usb_saf1761_otg, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_saf1761_otg, OID_AUTO, debug, CTLFLAG_RWTUN, &saf1761_otg_debug, 0, "SAF1761 DCI debug level"); -SYSCTL_INT(_hw_usb_saf1761_otg, OID_AUTO, forcefs, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_saf1761_otg, OID_AUTO, forcefs, CTLFLAG_RWTUN, &saf1761_otg_forcefs, 0, "SAF1761 DCI force FULL speed"); #endif Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/controller/usb_controller.c Mon Jan 5 15:04:17 2015 (r276701) @@ -84,7 +84,7 @@ static void usb_attach_sub(device_t, str static int usb_ctrl_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ctrl, CTLFLAG_RW, 0, "USB controller"); -SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug, CTLFLAG_RW, &usb_ctrl_debug, 0, +SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug, CTLFLAG_RWTUN, &usb_ctrl_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/controller/uss820dci.c Mon Jan 5 15:04:17 2015 (r276701) @@ -89,7 +89,7 @@ static int uss820dcidebug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uss820dci, CTLFLAG_RW, 0, "USB uss820dci"); -SYSCTL_INT(_hw_usb_uss820dci, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uss820dci, OID_AUTO, debug, CTLFLAG_RWTUN, &uss820dcidebug, 0, "uss820dci debug level"); #endif Modified: head/sys/dev/usb/gadget/g_audio.c ============================================================================== --- head/sys/dev/usb/gadget/g_audio.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/gadget/g_audio.c Mon Jan 5 15:04:17 2015 (r276701) @@ -99,18 +99,18 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, g_ #ifdef USB_DEBUG static int g_audio_debug = 0; -SYSCTL_INT(_hw_usb_g_audio, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_audio, OID_AUTO, debug, CTLFLAG_RWTUN, &g_audio_debug, 0, "Debug level"); #endif static int g_audio_mode = 0; -SYSCTL_INT(_hw_usb_g_audio, OID_AUTO, mode, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_audio, OID_AUTO, mode, CTLFLAG_RWTUN, &g_audio_mode, 0, "Mode selection"); static int g_audio_pattern_interval = 1000; -SYSCTL_INT(_hw_usb_g_audio, OID_AUTO, pattern_interval, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_audio, OID_AUTO, pattern_interval, CTLFLAG_RWTUN, &g_audio_pattern_interval, 0, "Pattern interval in milliseconds"); static char g_audio_pattern_data[G_AUDIO_MAX_STRLEN]; Modified: head/sys/dev/usb/gadget/g_keyboard.c ============================================================================== --- head/sys/dev/usb/gadget/g_keyboard.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/gadget/g_keyboard.c Mon Jan 5 15:04:17 2015 (r276701) @@ -64,18 +64,18 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, g_ #ifdef USB_DEBUG static int g_keyboard_debug = 0; -SYSCTL_INT(_hw_usb_g_keyboard, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_keyboard, OID_AUTO, debug, CTLFLAG_RWTUN, &g_keyboard_debug, 0, "Debug level"); #endif static int g_keyboard_mode = 0; -SYSCTL_INT(_hw_usb_g_keyboard, OID_AUTO, mode, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_keyboard, OID_AUTO, mode, CTLFLAG_RWTUN, &g_keyboard_mode, 0, "Mode selection"); static int g_keyboard_key_press_interval = 1000; -SYSCTL_INT(_hw_usb_g_keyboard, OID_AUTO, key_press_interval, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_keyboard, OID_AUTO, key_press_interval, CTLFLAG_RWTUN, &g_keyboard_key_press_interval, 0, "Key Press Interval in milliseconds"); static char g_keyboard_key_press_pattern[G_KEYBOARD_MAX_STRLEN]; Modified: head/sys/dev/usb/gadget/g_modem.c ============================================================================== --- head/sys/dev/usb/gadget/g_modem.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/gadget/g_modem.c Mon Jan 5 15:04:17 2015 (r276701) @@ -95,18 +95,18 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, g_ #ifdef USB_DEBUG static int g_modem_debug = 0; -SYSCTL_INT(_hw_usb_g_modem, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_modem, OID_AUTO, debug, CTLFLAG_RWTUN, &g_modem_debug, 0, "Debug level"); #endif static int g_modem_mode = 0; -SYSCTL_INT(_hw_usb_g_modem, OID_AUTO, mode, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_modem, OID_AUTO, mode, CTLFLAG_RWTUN, &g_modem_mode, 0, "Mode selection"); static int g_modem_pattern_interval = 1000; -SYSCTL_INT(_hw_usb_g_modem, OID_AUTO, pattern_interval, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_modem, OID_AUTO, pattern_interval, CTLFLAG_RWTUN, &g_modem_pattern_interval, 0, "Pattern interval in milliseconds"); static char g_modem_pattern_data[G_MODEM_MAX_STRLEN]; Modified: head/sys/dev/usb/gadget/g_mouse.c ============================================================================== --- head/sys/dev/usb/gadget/g_mouse.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/gadget/g_mouse.c Mon Jan 5 15:04:17 2015 (r276701) @@ -64,28 +64,28 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, g_ #ifdef USB_DEBUG static int g_mouse_debug = 0; -SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, debug, CTLFLAG_RWTUN, &g_mouse_debug, 0, "Debug level"); #endif static int g_mouse_mode = 0; -SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, mode, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, mode, CTLFLAG_RWTUN, &g_mouse_mode, 0, "Mode selection"); static int g_mouse_button_press_interval = 0; -SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, button_press_interval, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, button_press_interval, CTLFLAG_RWTUN, &g_mouse_button_press_interval, 0, "Mouse button update interval in milliseconds"); static int g_mouse_cursor_update_interval = 1023; -SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, cursor_update_interval, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, cursor_update_interval, CTLFLAG_RWTUN, &g_mouse_cursor_update_interval, 0, "Mouse cursor update interval in milliseconds"); static int g_mouse_cursor_radius = 128; -SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, cursor_radius, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_g_mouse, OID_AUTO, cursor_radius, CTLFLAG_RWTUN, &g_mouse_cursor_radius, 0, "Mouse cursor radius in pixels"); struct g_mouse_data { Modified: head/sys/dev/usb/input/atp.c ============================================================================== --- head/sys/dev/usb/input/atp.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/input/atp.c Mon Jan 5 15:04:17 2015 (r276701) @@ -178,33 +178,33 @@ enum atp_log_level { ATP_LLEVEL_INFO, /* for diagnostics */ }; static int atp_debug = ATP_LLEVEL_ERROR; /* the default is to only log errors */ -SYSCTL_INT(_hw_usb_atp, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_atp, OID_AUTO, debug, CTLFLAG_RWTUN, &atp_debug, ATP_LLEVEL_ERROR, "ATP debug level"); #endif /* USB_DEBUG */ static u_int atp_touch_timeout = ATP_TOUCH_TIMEOUT; -SYSCTL_UINT(_hw_usb_atp, OID_AUTO, touch_timeout, CTLFLAG_RW, +SYSCTL_UINT(_hw_usb_atp, OID_AUTO, touch_timeout, CTLFLAG_RWTUN, &atp_touch_timeout, 125000, "age threshold in microseconds for a touch"); static u_int atp_double_tap_threshold = ATP_DOUBLE_TAP_N_DRAG_THRESHOLD; -SYSCTL_UINT(_hw_usb_atp, OID_AUTO, double_tap_threshold, CTLFLAG_RW, +SYSCTL_UINT(_hw_usb_atp, OID_AUTO, double_tap_threshold, CTLFLAG_RWTUN, &atp_double_tap_threshold, ATP_DOUBLE_TAP_N_DRAG_THRESHOLD, "maximum time in microseconds to allow association between a double-tap and " "drag gesture"); static u_int atp_mickeys_scale_factor = ATP_SCALE_FACTOR; static int atp_sysctl_scale_factor_handler(SYSCTL_HANDLER_ARGS); -SYSCTL_PROC(_hw_usb_atp, OID_AUTO, scale_factor, CTLTYPE_UINT | CTLFLAG_RW, +SYSCTL_PROC(_hw_usb_atp, OID_AUTO, scale_factor, CTLTYPE_UINT | CTLFLAG_RWTUN, &atp_mickeys_scale_factor, sizeof(atp_mickeys_scale_factor), atp_sysctl_scale_factor_handler, "IU", "movement scale factor"); static u_int atp_small_movement_threshold = ATP_SMALL_MOVEMENT_THRESHOLD; -SYSCTL_UINT(_hw_usb_atp, OID_AUTO, small_movement, CTLFLAG_RW, +SYSCTL_UINT(_hw_usb_atp, OID_AUTO, small_movement, CTLFLAG_RWTUN, &atp_small_movement_threshold, ATP_SMALL_MOVEMENT_THRESHOLD, "the small movement black-hole for filtering noise"); static u_int atp_tap_minimum = 1; -SYSCTL_UINT(_hw_usb_atp, OID_AUTO, tap_minimum, CTLFLAG_RW, +SYSCTL_UINT(_hw_usb_atp, OID_AUTO, tap_minimum, CTLFLAG_RWTUN, &atp_tap_minimum, 1, "Minimum number of taps before detection"); /* @@ -213,7 +213,7 @@ SYSCTL_UINT(_hw_usb_atp, OID_AUTO, tap_m * slides. Unit: mickeys. */ static u_int atp_slide_min_movement = 2 * ATP_SMALL_MOVEMENT_THRESHOLD; -SYSCTL_UINT(_hw_usb_atp, OID_AUTO, slide_min_movement, CTLFLAG_RW, +SYSCTL_UINT(_hw_usb_atp, OID_AUTO, slide_min_movement, CTLFLAG_RWTUN, &atp_slide_min_movement, 2 * ATP_SMALL_MOVEMENT_THRESHOLD, "strokes with at least this amt. of movement are considered slides"); @@ -222,7 +222,7 @@ SYSCTL_UINT(_hw_usb_atp, OID_AUTO, slide * helps filter movements (noise) from immature strokes. Units: interrupts. */ static u_int atp_stroke_maturity_threshold = 4; -SYSCTL_UINT(_hw_usb_atp, OID_AUTO, stroke_maturity_threshold, CTLFLAG_RW, +SYSCTL_UINT(_hw_usb_atp, OID_AUTO, stroke_maturity_threshold, CTLFLAG_RWTUN, &atp_stroke_maturity_threshold, 4, "the minimum age of a stroke for it to be considered mature"); Modified: head/sys/dev/usb/input/uep.c ============================================================================== --- head/sys/dev/usb/input/uep.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/input/uep.c Mon Jan 5 15:04:17 2015 (r276701) @@ -58,7 +58,7 @@ static int uep_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uep, CTLFLAG_RW, 0, "USB uep"); -SYSCTL_INT(_hw_usb_uep, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uep, OID_AUTO, debug, CTLFLAG_RWTUN, &uep_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/input/uhid.c ============================================================================== --- head/sys/dev/usb/input/uhid.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/input/uhid.c Mon Jan 5 15:04:17 2015 (r276701) @@ -79,7 +79,7 @@ __FBSDID("$FreeBSD$"); static int uhid_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uhid, CTLFLAG_RW, 0, "USB uhid"); -SYSCTL_INT(_hw_usb_uhid, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uhid, OID_AUTO, debug, CTLFLAG_RWTUN, &uhid_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/input/ums.c Mon Jan 5 15:04:17 2015 (r276701) @@ -77,7 +77,7 @@ __FBSDID("$FreeBSD$"); static int ums_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ums, CTLFLAG_RW, 0, "USB ums"); -SYSCTL_INT(_hw_usb_ums, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ums, OID_AUTO, debug, CTLFLAG_RWTUN, &ums_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/input/wsp.c ============================================================================== --- head/sys/dev/usb/input/wsp.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/input/wsp.c Mon Jan 5 15:04:17 2015 (r276701) @@ -76,7 +76,7 @@ enum wsp_log_level { }; static int wsp_debug = WSP_LLEVEL_ERROR;/* the default is to only log errors */ -SYSCTL_INT(_hw_usb_wsp, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_wsp, OID_AUTO, debug, CTLFLAG_RWTUN, &wsp_debug, WSP_LLEVEL_ERROR, "WSP debug level"); #endif /* USB_DEBUG */ @@ -109,17 +109,17 @@ wsp_runing_rangecheck(struct wsp_tuning WSP_CLAMP(ptun->scr_hor_threshold, 1, 255); } -SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RWTUN, &wsp_tuning.scale_factor, 0, "movement scale factor"); -SYSCTL_INT(_hw_usb_wsp, OID_AUTO, z_factor, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_wsp, OID_AUTO, z_factor, CTLFLAG_RWTUN, &wsp_tuning.z_factor, 0, "Z-axis scale factor"); -SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressure_touch_threshold, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressure_touch_threshold, CTLFLAG_RWTUN, &wsp_tuning.pressure_touch_threshold, 0, "touch pressure threshold"); -SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressure_untouch_threshold, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressure_untouch_threshold, CTLFLAG_RWTUN, &wsp_tuning.pressure_untouch_threshold, 0, "untouch pressure threshold"); -SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressure_tap_threshold, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressure_tap_threshold, CTLFLAG_RWTUN, &wsp_tuning.pressure_tap_threshold, 0, "tap pressure threshold"); -SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scr_hor_threshold, CTLFLAG_RWTUN, &wsp_tuning.scr_hor_threshold, 0, "horizontal scrolling threshold"); #define WSP_IFACE_INDEX 1 Modified: head/sys/dev/usb/misc/udbp.c ============================================================================== --- head/sys/dev/usb/misc/udbp.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/misc/udbp.c Mon Jan 5 15:04:17 2015 (r276701) @@ -97,7 +97,7 @@ __FBSDID("$FreeBSD$"); static int udbp_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, udbp, CTLFLAG_RW, 0, "USB udbp"); -SYSCTL_INT(_hw_usb_udbp, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_udbp, OID_AUTO, debug, CTLFLAG_RWTUN, &udbp_debug, 0, "udbp debug level"); #endif Modified: head/sys/dev/usb/net/if_aue.c ============================================================================== --- head/sys/dev/usb/net/if_aue.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_aue.c Mon Jan 5 15:04:17 2015 (r276701) @@ -107,7 +107,7 @@ __FBSDID("$FreeBSD$"); static int aue_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, aue, CTLFLAG_RW, 0, "USB aue"); -SYSCTL_INT(_hw_usb_aue, OID_AUTO, debug, CTLFLAG_RW, &aue_debug, 0, +SYSCTL_INT(_hw_usb_aue, OID_AUTO, debug, CTLFLAG_RWTUN, &aue_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_axe.c ============================================================================== --- head/sys/dev/usb/net/if_axe.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_axe.c Mon Jan 5 15:04:17 2015 (r276701) @@ -135,7 +135,7 @@ __FBSDID("$FreeBSD$"); static int axe_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, axe, CTLFLAG_RW, 0, "USB axe"); -SYSCTL_INT(_hw_usb_axe, OID_AUTO, debug, CTLFLAG_RW, &axe_debug, 0, +SYSCTL_INT(_hw_usb_axe, OID_AUTO, debug, CTLFLAG_RWTUN, &axe_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_axge.c ============================================================================== --- head/sys/dev/usb/net/if_axge.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_axge.c Mon Jan 5 15:04:17 2015 (r276701) @@ -134,7 +134,7 @@ static void axge_csum_cfg(struct usb_eth static int axge_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, axge, CTLFLAG_RW, 0, "USB axge"); -SYSCTL_INT(_hw_usb_axge, OID_AUTO, debug, CTLFLAG_RW, &axge_debug, 0, +SYSCTL_INT(_hw_usb_axge, OID_AUTO, debug, CTLFLAG_RWTUN, &axge_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_cdce.c Mon Jan 5 15:04:17 2015 (r276701) @@ -117,9 +117,9 @@ static int cdce_debug = 0; static int cdce_tx_interval = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, cdce, CTLFLAG_RW, 0, "USB CDC-Ethernet"); -SYSCTL_INT(_hw_usb_cdce, OID_AUTO, debug, CTLFLAG_RW, &cdce_debug, 0, +SYSCTL_INT(_hw_usb_cdce, OID_AUTO, debug, CTLFLAG_RWTUN, &cdce_debug, 0, "Debug level"); -SYSCTL_INT(_hw_usb_cdce, OID_AUTO, interval, CTLFLAG_RW, &cdce_tx_interval, 0, +SYSCTL_INT(_hw_usb_cdce, OID_AUTO, interval, CTLFLAG_RWTUN, &cdce_tx_interval, 0, "NCM transmit interval in ms"); #endif Modified: head/sys/dev/usb/net/if_cue.c ============================================================================== --- head/sys/dev/usb/net/if_cue.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_cue.c Mon Jan 5 15:04:17 2015 (r276701) @@ -129,7 +129,7 @@ static void cue_reset(struct cue_softc * static int cue_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, cue, CTLFLAG_RW, 0, "USB cue"); -SYSCTL_INT(_hw_usb_cue, OID_AUTO, debug, CTLFLAG_RW, &cue_debug, 0, +SYSCTL_INT(_hw_usb_cue, OID_AUTO, debug, CTLFLAG_RWTUN, &cue_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_ipheth.c ============================================================================== --- head/sys/dev/usb/net/if_ipheth.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_ipheth.c Mon Jan 5 15:04:17 2015 (r276701) @@ -86,7 +86,7 @@ static uether_fn_t ipheth_setpromisc; static int ipheth_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ipheth, CTLFLAG_RW, 0, "USB iPhone ethernet"); -SYSCTL_INT(_hw_usb_ipheth, OID_AUTO, debug, CTLFLAG_RW, &ipheth_debug, 0, "Debug level"); +SYSCTL_INT(_hw_usb_ipheth, OID_AUTO, debug, CTLFLAG_RWTUN, &ipheth_debug, 0, "Debug level"); #endif static const struct usb_config ipheth_config[IPHETH_N_TRANSFER] = { Modified: head/sys/dev/usb/net/if_kue.c ============================================================================== --- head/sys/dev/usb/net/if_kue.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_kue.c Mon Jan 5 15:04:17 2015 (r276701) @@ -170,7 +170,7 @@ static void kue_reset(struct kue_softc * static int kue_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, kue, CTLFLAG_RW, 0, "USB kue"); -SYSCTL_INT(_hw_usb_kue, OID_AUTO, debug, CTLFLAG_RW, &kue_debug, 0, +SYSCTL_INT(_hw_usb_kue, OID_AUTO, debug, CTLFLAG_RWTUN, &kue_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_mos.c ============================================================================== --- head/sys/dev/usb/net/if_mos.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_mos.c Mon Jan 5 15:04:17 2015 (r276701) @@ -137,7 +137,7 @@ __FBSDID("$FreeBSD$"); static int mos_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, mos, CTLFLAG_RW, 0, "USB mos"); -SYSCTL_INT(_hw_usb_mos, OID_AUTO, debug, CTLFLAG_RW, &mos_debug, 0, +SYSCTL_INT(_hw_usb_mos, OID_AUTO, debug, CTLFLAG_RWTUN, &mos_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_rue.c ============================================================================== --- head/sys/dev/usb/net/if_rue.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_rue.c Mon Jan 5 15:04:17 2015 (r276701) @@ -104,7 +104,7 @@ __FBSDID("$FreeBSD$"); static int rue_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, rue, CTLFLAG_RW, 0, "USB rue"); -SYSCTL_INT(_hw_usb_rue, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_rue, OID_AUTO, debug, CTLFLAG_RWTUN, &rue_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_smsc.c ============================================================================== --- head/sys/dev/usb/net/if_smsc.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_smsc.c Mon Jan 5 15:04:17 2015 (r276701) @@ -114,7 +114,7 @@ __FBSDID("$FreeBSD$"); static int smsc_debug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, smsc, CTLFLAG_RW, 0, "USB smsc"); -SYSCTL_INT(_hw_usb_smsc, OID_AUTO, debug, CTLFLAG_RW, &smsc_debug, 0, +SYSCTL_INT(_hw_usb_smsc, OID_AUTO, debug, CTLFLAG_RWTUN, &smsc_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_udav.c ============================================================================== --- head/sys/dev/usb/net/if_udav.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_udav.c Mon Jan 5 15:04:17 2015 (r276701) @@ -198,7 +198,7 @@ static const struct usb_ether_methods ud static int udav_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, udav, CTLFLAG_RW, 0, "USB udav"); -SYSCTL_INT(_hw_usb_udav, OID_AUTO, debug, CTLFLAG_RW, &udav_debug, 0, +SYSCTL_INT(_hw_usb_udav, OID_AUTO, debug, CTLFLAG_RWTUN, &udav_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_urndis.c ============================================================================== --- head/sys/dev/usb/net/if_urndis.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_urndis.c Mon Jan 5 15:04:17 2015 (r276701) @@ -88,7 +88,7 @@ static uint32_t urndis_ctrl_init(struct #ifdef USB_DEBUG static int urndis_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, urndis, CTLFLAG_RW, 0, "USB RNDIS-Ethernet"); -SYSCTL_INT(_hw_usb_urndis, OID_AUTO, debug, CTLFLAG_RW, &urndis_debug, 0, +SYSCTL_INT(_hw_usb_urndis, OID_AUTO, debug, CTLFLAG_RWTUN, &urndis_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/net/if_usie.c ============================================================================== --- head/sys/dev/usb/net/if_usie.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/if_usie.c Mon Jan 5 15:04:17 2015 (r276701) @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); static int usie_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, usie, CTLFLAG_RW, 0, "sierra USB modem"); -SYSCTL_INT(_hw_usb_usie, OID_AUTO, debug, CTLFLAG_RW, &usie_debug, 0, +SYSCTL_INT(_hw_usb_usie, OID_AUTO, debug, CTLFLAG_RWTUN, &usie_debug, 0, "usie debug level"); #endif Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/net/uhso.c Mon Jan 5 15:04:17 2015 (r276701) @@ -288,7 +288,7 @@ static const STRUCT_USB_HOST_ID uhso_dev static SYSCTL_NODE(_hw_usb, OID_AUTO, uhso, CTLFLAG_RW, 0, "USB uhso"); static int uhso_autoswitch = 1; -SYSCTL_INT(_hw_usb_uhso, OID_AUTO, auto_switch, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uhso, OID_AUTO, auto_switch, CTLFLAG_RWTUN, &uhso_autoswitch, 0, "Automatically switch to modem mode"); #ifdef USB_DEBUG @@ -298,7 +298,7 @@ static int uhso_debug = UHSO_DEBUG; static int uhso_debug = -1; #endif -SYSCTL_INT(_hw_usb_uhso, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uhso, OID_AUTO, debug, CTLFLAG_RWTUN, &uhso_debug, 0, "Debug level"); #define UHSO_DPRINTF(n, x, ...) {\ @@ -595,7 +595,7 @@ uhso_attach(device_t self) CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0, "Port available at this interface"); SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "radio", - CTLTYPE_INT | CTLFLAG_RW, sc, 0, uhso_radio_sysctl, "I", "Enable radio"); + CTLTYPE_INT | CTLFLAG_RWTUN, sc, 0, uhso_radio_sysctl, "I", "Enable radio"); /* * The default interface description on most Option devices isn't Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/u3g.c Mon Jan 5 15:04:17 2015 (r276701) @@ -68,7 +68,7 @@ static int u3g_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, u3g, CTLFLAG_RW, 0, "USB 3g"); -SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_u3g, OID_AUTO, debug, CTLFLAG_RWTUN, &u3g_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/ubsa.c ============================================================================== --- head/sys/dev/usb/serial/ubsa.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/ubsa.c Mon Jan 5 15:04:17 2015 (r276701) @@ -89,7 +89,7 @@ __FBSDID("$FreeBSD$"); static int ubsa_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ubsa, CTLFLAG_RW, 0, "USB ubsa"); -SYSCTL_INT(_hw_usb_ubsa, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ubsa, OID_AUTO, debug, CTLFLAG_RWTUN, &ubsa_debug, 0, "ubsa debug level"); #endif Modified: head/sys/dev/usb/serial/ubser.c ============================================================================== --- head/sys/dev/usb/serial/ubser.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/ubser.c Mon Jan 5 15:04:17 2015 (r276701) @@ -110,7 +110,7 @@ __FBSDID("$FreeBSD$"); static int ubser_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ubser, CTLFLAG_RW, 0, "USB ubser"); -SYSCTL_INT(_hw_usb_ubser, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ubser, OID_AUTO, debug, CTLFLAG_RWTUN, &ubser_debug, 0, "ubser debug level"); #endif Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/uchcom.c Mon Jan 5 15:04:17 2015 (r276701) @@ -97,7 +97,7 @@ __FBSDID("$FreeBSD$"); static int uchcom_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uchcom, CTLFLAG_RW, 0, "USB uchcom"); -SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RWTUN, &uchcom_debug, 0, "uchcom debug level"); #endif Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/uftdi.c Mon Jan 5 15:04:17 2015 (r276701) @@ -86,7 +86,7 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, uf #ifdef USB_DEBUG static int uftdi_debug = 0; -SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uftdi, OID_AUTO, debug, CTLFLAG_RWTUN, &uftdi_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/ulpt.c ============================================================================== --- head/sys/dev/usb/serial/ulpt.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/ulpt.c Mon Jan 5 15:04:17 2015 (r276701) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); static int ulpt_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ulpt, CTLFLAG_RW, 0, "USB ulpt"); -SYSCTL_INT(_hw_usb_ulpt, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ulpt, OID_AUTO, debug, CTLFLAG_RWTUN, &ulpt_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/umcs.c ============================================================================== --- head/sys/dev/usb/serial/umcs.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/umcs.c Mon Jan 5 15:04:17 2015 (r276701) @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); static int umcs_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, umcs, CTLFLAG_RW, 0, "USB umcs quadport serial adapter"); -SYSCTL_INT(_hw_usb_umcs, OID_AUTO, debug, CTLFLAG_RW, &umcs_debug, 0, "Debug level"); +SYSCTL_INT(_hw_usb_umcs, OID_AUTO, debug, CTLFLAG_RWTUN, &umcs_debug, 0, "Debug level"); #endif /* USB_DEBUG */ Modified: head/sys/dev/usb/serial/umodem.c ============================================================================== --- head/sys/dev/usb/serial/umodem.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/umodem.c Mon Jan 5 15:04:17 2015 (r276701) @@ -112,7 +112,7 @@ __FBSDID("$FreeBSD$"); static int umodem_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW, 0, "USB umodem"); -SYSCTL_INT(_hw_usb_umodem, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_umodem, OID_AUTO, debug, CTLFLAG_RWTUN, &umodem_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/umoscom.c ============================================================================== --- head/sys/dev/usb/serial/umoscom.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/umoscom.c Mon Jan 5 15:04:17 2015 (r276701) @@ -51,7 +51,7 @@ static int umoscom_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, umoscom, CTLFLAG_RW, 0, "USB umoscom"); -SYSCTL_INT(_hw_usb_umoscom, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_umoscom, OID_AUTO, debug, CTLFLAG_RWTUN, &umoscom_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/uplcom.c Mon Jan 5 15:04:17 2015 (r276701) @@ -112,7 +112,7 @@ __FBSDID("$FreeBSD$"); static int uplcom_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uplcom, CTLFLAG_RW, 0, "USB uplcom"); -SYSCTL_INT(_hw_usb_uplcom, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uplcom, OID_AUTO, debug, CTLFLAG_RWTUN, &uplcom_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/usb_serial.c ============================================================================== --- head/sys/dev/usb/serial/usb_serial.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/usb_serial.c Mon Jan 5 15:04:17 2015 (r276701) @@ -99,7 +99,7 @@ static SYSCTL_NODE(_hw_usb, OID_AUTO, uc #ifdef USB_DEBUG static int ucom_debug = 0; -SYSCTL_INT(_hw_usb_ucom, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ucom, OID_AUTO, debug, CTLFLAG_RWTUN, &ucom_debug, 0, "ucom debug level"); #endif Modified: head/sys/dev/usb/serial/uslcom.c ============================================================================== --- head/sys/dev/usb/serial/uslcom.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/uslcom.c Mon Jan 5 15:04:17 2015 (r276701) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); static int uslcom_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uslcom, CTLFLAG_RW, 0, "USB uslcom"); -SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, debug, CTLFLAG_RWTUN, &uslcom_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/uvisor.c ============================================================================== --- head/sys/dev/usb/serial/uvisor.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/uvisor.c Mon Jan 5 15:04:17 2015 (r276701) @@ -81,7 +81,7 @@ static int uvisor_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uvisor, CTLFLAG_RW, 0, "USB uvisor"); -SYSCTL_INT(_hw_usb_uvisor, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uvisor, OID_AUTO, debug, CTLFLAG_RWTUN, &uvisor_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/serial/uvscom.c ============================================================================== --- head/sys/dev/usb/serial/uvscom.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/serial/uvscom.c Mon Jan 5 15:04:17 2015 (r276701) @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); static int uvscom_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, uvscom, CTLFLAG_RW, 0, "USB uvscom"); -SYSCTL_INT(_hw_usb_uvscom, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_uvscom, OID_AUTO, debug, CTLFLAG_RWTUN, &uvscom_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/storage/urio.c ============================================================================== --- head/sys/dev/usb/storage/urio.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/storage/urio.c Mon Jan 5 15:04:17 2015 (r276701) @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); static int urio_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, urio, CTLFLAG_RW, 0, "USB urio"); -SYSCTL_INT(_hw_usb_urio, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_urio, OID_AUTO, debug, CTLFLAG_RWTUN, &urio_debug, 0, "urio debug level"); #endif Modified: head/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- head/sys/dev/usb/storage/ustorage_fs.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/storage/ustorage_fs.c Mon Jan 5 15:04:17 2015 (r276701) @@ -71,7 +71,7 @@ static int ustorage_fs_debug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, ustorage_fs, CTLFLAG_RW, 0, "USB ustorage_fs"); -SYSCTL_INT(_hw_usb_ustorage_fs, OID_AUTO, debug, CTLFLAG_RW, +SYSCTL_INT(_hw_usb_ustorage_fs, OID_AUTO, debug, CTLFLAG_RWTUN, &ustorage_fs_debug, 0, "ustorage_fs debug level"); #endif Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/usb_hub.c Mon Jan 5 15:04:17 2015 (r276701) @@ -93,7 +93,7 @@ SYSCTL_INT(_hw_usb_uhub, OID_AUTO, debug #if USB_HAVE_POWERD static int usb_power_timeout = 30; /* seconds */ -SYSCTL_INT(_hw_usb, OID_AUTO, power_timeout, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, power_timeout, CTLFLAG_RWTUN, &usb_power_timeout, 0, "USB power timeout"); #endif Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/usb_request.c Mon Jan 5 15:04:17 2015 (r276701) @@ -72,12 +72,12 @@ static int usb_no_cs_fail; -SYSCTL_INT(_hw_usb, OID_AUTO, no_cs_fail, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, no_cs_fail, CTLFLAG_RWTUN, &usb_no_cs_fail, 0, "USB clear stall failures are ignored, if set"); static int usb_full_ddesc; -SYSCTL_INT(_hw_usb, OID_AUTO, full_ddesc, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, full_ddesc, CTLFLAG_RWTUN, &usb_full_ddesc, 0, "USB always read complete device descriptor, if set"); #ifdef USB_DEBUG @@ -111,21 +111,21 @@ static struct usb_ctrl_debug usb_ctrl_de .bRequest_value = -1, }; -SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_bus_fail, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_bus_fail, CTLFLAG_RWTUN, &usb_ctrl_debug.bus_index, 0, "USB controller index to fail"); -SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_dev_fail, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_dev_fail, CTLFLAG_RWTUN, &usb_ctrl_debug.dev_index, 0, "USB device address to fail"); -SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ds_fail, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ds_fail, CTLFLAG_RWTUN, &usb_ctrl_debug.ds_fail, 0, "USB fail data stage"); -SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ss_fail, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ss_fail, CTLFLAG_RWTUN, &usb_ctrl_debug.ss_fail, 0, "USB fail status stage"); -SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ds_delay, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ds_delay, CTLFLAG_RWTUN, &usb_ctrl_debug.ds_delay, 0, "USB data stage delay in ms"); -SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ss_delay, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_ss_delay, CTLFLAG_RWTUN, &usb_ctrl_debug.ss_delay, 0, "USB status stage delay in ms"); -SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_rt_fail, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_rt_fail, CTLFLAG_RWTUN, &usb_ctrl_debug.bmRequestType_value, 0, "USB bmRequestType to fail"); -SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_rv_fail, CTLFLAG_RW, +SYSCTL_INT(_hw_usb, OID_AUTO, ctrl_rv_fail, CTLFLAG_RWTUN, &usb_ctrl_debug.bRequest_value, 0, "USB bRequest to fail"); /*------------------------------------------------------------------------* Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/wlan/if_rsu.c Mon Jan 5 15:04:17 2015 (r276701) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int rsu_debug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, rsu, CTLFLAG_RW, 0, "USB rsu"); -SYSCTL_INT(_hw_usb_rsu, OID_AUTO, debug, CTLFLAG_RW, &rsu_debug, 0, +SYSCTL_INT(_hw_usb_rsu, OID_AUTO, debug, CTLFLAG_RWTUN, &rsu_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/wlan/if_rum.c Mon Jan 5 15:04:17 2015 (r276701) @@ -82,7 +82,7 @@ __FBSDID("$FreeBSD$"); static int rum_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, rum, CTLFLAG_RW, 0, "USB rum"); -SYSCTL_INT(_hw_usb_rum, OID_AUTO, debug, CTLFLAG_RW, &rum_debug, 0, +SYSCTL_INT(_hw_usb_rum, OID_AUTO, debug, CTLFLAG_RWTUN, &rum_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/wlan/if_run.c Mon Jan 5 15:04:17 2015 (r276701) @@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$"); #ifdef RUN_DEBUG int run_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, run, CTLFLAG_RW, 0, "USB run"); -SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, CTLFLAG_RW, &run_debug, 0, +SYSCTL_INT(_hw_usb_run, OID_AUTO, debug, CTLFLAG_RWTUN, &run_debug, 0, "run debug level"); #endif Modified: head/sys/dev/usb/wlan/if_ural.c ============================================================================== --- head/sys/dev/usb/wlan/if_ural.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/wlan/if_ural.c Mon Jan 5 15:04:17 2015 (r276701) @@ -83,7 +83,7 @@ __FBSDID("$FreeBSD$"); static int ural_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, ural, CTLFLAG_RW, 0, "USB ural"); -SYSCTL_INT(_hw_usb_ural, OID_AUTO, debug, CTLFLAG_RW, &ural_debug, 0, +SYSCTL_INT(_hw_usb_ural, OID_AUTO, debug, CTLFLAG_RWTUN, &ural_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/wlan/if_urtwn.c Mon Jan 5 15:04:17 2015 (r276701) @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); static int urtwn_debug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, urtwn, CTLFLAG_RW, 0, "USB urtwn"); -SYSCTL_INT(_hw_usb_urtwn, OID_AUTO, debug, CTLFLAG_RW, &urtwn_debug, 0, +SYSCTL_INT(_hw_usb_urtwn, OID_AUTO, debug, CTLFLAG_RWTUN, &urtwn_debug, 0, "Debug level"); #endif Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Mon Jan 5 15:00:03 2015 (r276700) +++ head/sys/dev/usb/wlan/if_zyd.c Mon Jan 5 15:04:17 2015 (r276701) @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); static int zyd_debug = 0; static SYSCTL_NODE(_hw_usb, OID_AUTO, zyd, CTLFLAG_RW, 0, "USB zyd"); -SYSCTL_INT(_hw_usb_zyd, OID_AUTO, debug, CTLFLAG_RW, &zyd_debug, 0, +SYSCTL_INT(_hw_usb_zyd, OID_AUTO, debug, CTLFLAG_RWTUN, &zyd_debug, 0, "zyd debug level"); enum { From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 15:09: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 087EFEBA; Mon, 5 Jan 2015 15:09: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 E757F6707B; Mon, 5 Jan 2015 15:09: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 t05F91rJ064802; Mon, 5 Jan 2015 15:09:01 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05F91xw064800; Mon, 5 Jan 2015 15:09:01 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501051509.t05F91xw064800@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, 5 Jan 2015 15:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276702 - in head: . usr.sbin/unbound/local-setup X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 15:09:02 -0000 Author: des Date: Mon Jan 5 15:09:00 2015 New Revision: 276702 URL: https://svnweb.freebsd.org/changeset/base/276702 Log: Enable remote control using a local socket in the default configuration. Modified: head/UPDATING head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jan 5 15:04:17 2015 (r276701) +++ head/UPDATING Mon Jan 5 15:09:00 2015 (r276702) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150105: + The default Unbound configuration now enables remote control + using a local socket. Users who have already enabled the + local_unbound service should regenerate their configuration + by running "service local_unbound setup" as root. + 20150102: The GNU texinfo and GNU info pages have been removed. To be able to view GNU info pages please install texinfo from ports. Modified: head/usr.sbin/unbound/local-setup/local-unbound-setup.sh ============================================================================== --- head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Mon Jan 5 15:04:17 2015 (r276701) +++ head/usr.sbin/unbound/local-setup/local-unbound-setup.sh Mon Jan 5 15:09:00 2015 (r276702) @@ -34,6 +34,8 @@ user="" unbound_conf="" forward_conf="" lanzones_conf="" +control_conf="" +control_socket="" workdir="" confdir="" chrootdir="" @@ -61,6 +63,8 @@ set_defaults() { : ${unbound_conf:=${workdir}/unbound.conf} : ${forward_conf:=${workdir}/forward.conf} : ${lanzones_conf:=${workdir}/lan-zones.conf} + : ${control_conf:=${workdir}/control.conf} + : ${control_socket:=/var/run/local_unbound.ctl} : ${anchor:=${workdir}/root.key} : ${pidfile:=/var/run/local_unbound.pid} : ${resolv_conf:=/etc/resolv.conf} @@ -76,7 +80,7 @@ set_defaults() { set_chrootdir() { chrootdir="${workdir}" for file in "${unbound_conf}" "${forward_conf}" \ - "${lanzones_conf}" "${anchor}" ; do + "${lanzones_conf}" "${control_conf}" "${anchor}" ; do if [ "${file#${workdir%/}/}" = "${file}" ] ; then echo "warning: ${file} is outside ${workdir}" >&2 chrootdir="" @@ -153,6 +157,14 @@ gen_resolv_conf() { } # +# Boilerplate +# +do_not_edit() { + echo "# This file was generated by $self." + echo "# Modifications will be overwritten." +} + +# # Generate resolvconf.conf so it updates forward.conf in addition to # resolv.conf. Note "in addition to" rather than "instead of", # because we still want it to update the domain name and search path @@ -160,7 +172,7 @@ gen_resolv_conf() { # the libc resolver will try unbound first. # gen_resolvconf_conf() { - echo "# Generated by $self" + do_not_edit echo "resolv_conf=\"/dev/null\" # prevent updating ${resolv_conf}" echo "unbound_conf=\"${forward_conf}\"" echo "unbound_pid=\"${pidfile}\"" @@ -173,8 +185,7 @@ gen_resolvconf_conf() { # Generate forward.conf # gen_forward_conf() { - echo "# Generated by $self" - echo "# Do not edit this file." + do_not_edit echo "forward-zone:" echo " name: ." for forwarder ; do @@ -190,8 +201,7 @@ gen_forward_conf() { # Generate lan-zones.conf # gen_lanzones_conf() { - echo "# Generated by $self" - echo "# Do not edit this file." + do_not_edit echo "server:" echo " # Unblock reverse lookups for LAN addresses" echo " unblock-lan-zones: yes" @@ -223,10 +233,21 @@ gen_lanzones_conf() { } # +# Generate control.conf +# +gen_control_conf() { + do_not_edit + echo "remote-control:" + echo " control-enable: yes" + echo " control-interface: ${control_socket}" + echo " control-use-cert: no" +} + +# # Generate unbound.conf # gen_unbound_conf() { - echo "# Generated by $self" + do_not_edit echo "server:" echo " username: ${user}" echo " directory: ${workdir}" @@ -240,6 +261,9 @@ gen_unbound_conf() { if [ -f "${lanzones_conf}" ] ; then echo "include: ${lanzones_conf}" fi + if [ -f "${control_conf}" ] ; then + echo "include: ${control_conf}" + fi if [ -d "${confdir}" ] ; then echo "include: ${confdir}/*.conf" fi @@ -278,6 +302,8 @@ usage() { echo " -C path full path to additional configuration directory" echo " -c path full path to unbound configuration file" echo " -f path full path to forwarding configuration" + echo " -O path full path to remote control socket" + echo " -o path full path to remote control configuration" echo " -p path full path to pid file" echo " -R path full path to resolvconf.conf" echo " -r path full path to resolv.conf" @@ -296,7 +322,7 @@ main() { # # Parse and validate command-line options # - while getopts "a:C:c:f:np:R:r:s:u:w:" option ; do + while getopts "a:C:c:f:no:p:R:r:s:u:w:" option ; do case $option in a) anchor="$OPTARG" @@ -313,6 +339,12 @@ main() { n) start_unbound="no" ;; + O) + control_socket="$OPTARG" + ;; + o) + control_conf="$OPTARG" + ;; p) pidfile="$OPTARG" ;; @@ -361,7 +393,7 @@ main() { fi else local tmp_forward_conf=$(mktemp -u "${forward_conf}.XXXXX") - gen_forward_conf ${forwarders} >"${tmp_forward_conf}" + gen_forward_conf ${forwarders} | unexpand >"${tmp_forward_conf}" replace "${forward_conf}" "${tmp_forward_conf}" fi @@ -369,15 +401,22 @@ main() { # Generate lan-zones.conf. # local tmp_lanzones_conf=$(mktemp -u "${lanzones_conf}.XXXXX") - gen_lanzones_conf >"${tmp_lanzones_conf}" + gen_lanzones_conf | unexpand >"${tmp_lanzones_conf}" replace "${lanzones_conf}" "${tmp_lanzones_conf}" # + # Generate control.conf. + # + local tmp_control_conf=$(mktemp -u "${control_conf}.XXXXX") + gen_control_conf | unexpand >"${tmp_control_conf}" + replace "${control_conf}" "${tmp_control_conf}" + + # # Generate unbound.conf. # local tmp_unbound_conf=$(mktemp -u "${unbound_conf}.XXXXX") set_chrootdir - gen_unbound_conf >"${tmp_unbound_conf}" + gen_unbound_conf | unexpand >"${tmp_unbound_conf}" replace "${unbound_conf}" "${tmp_unbound_conf}" # @@ -401,14 +440,14 @@ main() { # instead of resolv.conf. # local tmp_resolvconf_conf=$(mktemp -u "${resolvconf_conf}.XXXXX") - gen_resolvconf_conf >"${tmp_resolvconf_conf}" + gen_resolvconf_conf | unexpand >"${tmp_resolvconf_conf}" replace "${resolvconf_conf}" "${tmp_resolvconf_conf}" # # Finally, rewrite resolv.conf. # local tmp_resolv_conf=$(mktemp -u "${resolv_conf}.XXXXX") - gen_resolv_conf <"${resolv_conf}" >"${tmp_resolv_conf}" + gen_resolv_conf <"${resolv_conf}" | unexpand >"${tmp_resolv_conf}" replace "${resolv_conf}" "${tmp_resolv_conf}" } From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 15:29: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 9925973F; Mon, 5 Jan 2015 15:29: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 847DE6733A; Mon, 5 Jan 2015 15:29: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 t05FTT9k074128; Mon, 5 Jan 2015 15:29:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05FTTst074126; Mon, 5 Jan 2015 15:29:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501051529.t05FTTst074126@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 5 Jan 2015 15:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276703 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 15:29:29 -0000 Author: trasz Date: Mon Jan 5 15:29:28 2015 New Revision: 276703 URL: https://svnweb.freebsd.org/changeset/base/276703 Log: Remove leftovers. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/fstyp/cd9660.c head/usr.sbin/fstyp/ntfs.c Modified: head/usr.sbin/fstyp/cd9660.c ============================================================================== --- head/usr.sbin/fstyp/cd9660.c Mon Jan 5 15:09:00 2015 (r276702) +++ head/usr.sbin/fstyp/cd9660.c Mon Jan 5 15:29:28 2015 (r276703) @@ -37,8 +37,6 @@ __FBSDID("$FreeBSD$"); #include "fstyp.h" -#define G_LABEL_ISO9660_DIR "iso9660" - #define ISO9660_MAGIC "\x01" "CD001" "\x01\x00" #define ISO9660_OFFSET 0x8000 #define VOLUME_LEN 32 Modified: head/usr.sbin/fstyp/ntfs.c ============================================================================== --- head/usr.sbin/fstyp/ntfs.c Mon Jan 5 15:09:00 2015 (r276702) +++ head/usr.sbin/fstyp/ntfs.c Mon Jan 5 15:29:28 2015 (r276703) @@ -42,8 +42,6 @@ __FBSDID("$FreeBSD$"); #define NTFS_FILEMAGIC ((uint32_t)(0x454C4946)) #define NTFS_VOLUMEINO 3 -#define G_LABEL_NTFS_DIR "ntfs" - struct ntfs_attr { uint32_t a_type; uint32_t reclen; From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 15:34: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 824D5C68; Mon, 5 Jan 2015 15:34: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 6C9EB67439; Mon, 5 Jan 2015 15:34: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 t05FYPwe078252; Mon, 5 Jan 2015 15:34:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05FYPHW078250; Mon, 5 Jan 2015 15:34:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501051534.t05FYPHW078250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 5 Jan 2015 15:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276704 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 15:34:25 -0000 Author: trasz Date: Mon Jan 5 15:34:23 2015 New Revision: 276704 URL: https://svnweb.freebsd.org/changeset/base/276704 Log: Fix memory leaks. CID: 1258582, 1258583. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/fstyp/ext2fs.c head/usr.sbin/fstyp/ntfs.c Modified: head/usr.sbin/fstyp/ext2fs.c ============================================================================== --- head/usr.sbin/fstyp/ext2fs.c Mon Jan 5 15:29:28 2015 (r276703) +++ head/usr.sbin/fstyp/ext2fs.c Mon Jan 5 15:34:23 2015 (r276704) @@ -85,6 +85,7 @@ fstyp_ext2fs(FILE *fp, char *label, size } strlcpy(label, s_volume_name, size); + free(fs); return (0); } Modified: head/usr.sbin/fstyp/ntfs.c ============================================================================== --- head/usr.sbin/fstyp/ntfs.c Mon Jan 5 15:29:28 2015 (r276703) +++ head/usr.sbin/fstyp/ntfs.c Mon Jan 5 15:34:23 2015 (r276704) @@ -108,7 +108,7 @@ fstyp_ntfs(FILE *fp, char *label, size_t bf = (struct ntfs_bootfile *)read_buf(fp, 0, 512); if (bf == NULL || strncmp(bf->bf_sysid, "NTFS ", 8) != 0) - return (1); + goto fail; mftrecsz = bf->bf_mftrecsz; recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 16:05: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 EAFBE6F4; Mon, 5 Jan 2015 16:05: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 CA92D2727; Mon, 5 Jan 2015 16:05: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 t05G5GHO092555; Mon, 5 Jan 2015 16:05:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05G5G5g092554; Mon, 5 Jan 2015 16:05:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501051605.t05G5G5g092554@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 5 Jan 2015 16:05:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276705 - head/contrib/elftoolchain/readelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 16:05:17 -0000 Author: emaste Date: Mon Jan 5 16:05:15 2015 New Revision: 276705 URL: https://svnweb.freebsd.org/changeset/base/276705 Log: readelf: Handle note types from different operating systems Previously elftoolchain readelf(1) produced correct description text only for Linux note types. Upstream elftoolchain ticket #473 Differential Revision: https://reviews.freebsd.org/D1428 Reviewed by: kib Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Mon Jan 5 15:34:23 2015 (r276704) +++ head/contrib/elftoolchain/readelf/readelf.c Mon Jan 5 16:05:15 2015 (r276705) @@ -321,8 +321,15 @@ static const char *get_symbol_name(struc static uint64_t get_symbol_value(struct readelf *re, int symtab, int i); static void load_sections(struct readelf *re); static const char *mips_abi_fp(uint64_t fp); -static const char *note_type(unsigned int osabi, unsigned int et, +static const char *note_type(const char *note_name, unsigned int et, unsigned int nt); +static const char *note_type_freebsd(unsigned int nt); +static const char *note_type_freebsd_core(unsigned int nt); +static const char *note_type_linux_core(unsigned int nt); +static const char *note_type_gnu(unsigned int nt); +static const char *note_type_netbsd(unsigned int nt); +static const char *note_type_openbsd(unsigned int nt); +static const char *note_type_unknown(unsigned int nt); static const char *option_kind(uint8_t kind); static const char *phdr_type(unsigned int ptype); static const char *ppc_abi_fp(uint64_t fp); @@ -1480,65 +1487,112 @@ r_type(unsigned int mach, unsigned int t } static const char * -note_type(unsigned int osabi, unsigned int et, unsigned int nt) +note_type(const char *name, unsigned int et, unsigned int nt) { - static char s_nt[32]; + if (strcmp(name, "CORE") == 0 && et == ET_CORE) + return note_type_linux_core(nt); + else if (strcmp(name, "FreeBSD") == 0) + if (et == ET_CORE) + return note_type_freebsd_core(nt); + else + return note_type_freebsd(nt); + else if (strcmp(name, "GNU") == 0 && et != ET_CORE) + return note_type_gnu(nt); + else if (strcmp(name, "NetBSD") == 0 && et != ET_CORE) + return note_type_netbsd(nt); + else if (strcmp(name, "OpenBSD") == 0 && et != ET_CORE) + return note_type_openbsd(nt); + return note_type_unknown(nt); +} - if (et == ET_CORE) { - switch (nt) { - case NT_PRSTATUS: - return "NT_PRSTATUS (Process status)"; - case NT_FPREGSET: - return "NT_FPREGSET (Floating point information)"; - case NT_PRPSINFO: - return "NT_PRPSINFO (Process information)"; -#if 0 - case NT_AUXV: - return "NT_AUXV (Auxiliary vector)"; - case NT_PRXFPREG: - return "NT_PRXFPREG (Linux user_xfpregs structure)"; - case NT_PSTATUS: - return "NT_PSTATUS (Linux process status)"; - case NT_FPREGS: - return "NT_FPREGS (Linux floating point regset)"; - case NT_PSINFO: - return "NT_PSINFO (Linux process information)"; - case NT_LWPSTATUS: - return "NT_LWPSTATUS (Linux lwpstatus_t type)"; - case NT_LWPSINFO: - return "NT_LWPSINFO (Linux lwpinfo_t type)"; -#endif - default: - snprintf(s_nt, sizeof(s_nt), "", nt); - return (s_nt); - } - } else { - switch (nt) { -#if 0 - case NT_ABI_TAG: - switch (osabi) { - case ELFOSABI_FREEBSD: - return "NT_FREEBSD_ABI_TAG"; - case ELFOSABI_NETBSD: - return "NT_NETBSD_IDENT"; - case ELFOSABI_OPENBSD: - return "NT_OPENBSD_IDENT"; - default: - return "NT_GNU_ABI_TAG"; - } - case NT_GNU_HWCAP: - return "NT_GNU_HWCAP (Hardware capabilities)"; - case NT_GNU_BUILD_ID: - return "NT_GNU_BUILD_ID (Build id set by ld(1))"; - case NT_GNU_GOLD_VERSION: - return "NT_GNU_GOLD_VERSION (GNU gold version)"; -#endif - default: - snprintf(s_nt, sizeof(s_nt), "", nt); - return (s_nt); - } +static const char * +note_type_freebsd(unsigned int nt) +{ + switch (nt) { + case 1: return "NT_FREEBSD_ABI_TAG"; + case 2: return "NT_FREEBSD_NOINIT_TAG"; + case 3: return "NT_FREEBSD_ARCH_TAG"; + default: return (note_type_unknown(nt)); + } +} + +static const char * +note_type_freebsd_core(unsigned int nt) +{ + switch (nt) { + case 1: return "NT_PRSTATUS"; + case 2: return "NT_FPREGSET"; + case 3: return "NT_PRPSINFO"; + case 7: return "NT_THRMISC"; + case 8: return "NT_PROCSTAT_PROC"; + case 9: return "NT_PROCSTAT_FILES"; + case 10: return "NT_PROCSTAT_VMMAP"; + case 11: return "NT_PROCSTAT_GROUPS"; + case 12: return "NT_PROCSTAT_UMASK"; + case 13: return "NT_PROCSTAT_RLIMIT"; + case 14: return "NT_PROCSTAT_OSREL"; + case 15: return "NT_PROCSTAT_PSSTRINGS"; + case 16: return "NT_PROCSTAT_AUXV"; + case 0x202: return "NT_X86_XSTATE (x86 XSAVE extended state)"; + default: return (note_type_unknown(nt)); } - (void)osabi; +} + +static const char * +note_type_linux_core(unsigned int nt) +{ + switch (nt) { + case 1: return "NT_PRSTATUS (Process status)"; + case 2: return "NT_FPREGSET (Floating point information)"; + case 3: return "NT_PRPSINFO (Process information)"; + case 6: return "NT_AUXV (Auxiliary vector)"; + case 0x46E62B7FUL: return "NT_PRXFPREG (Linux user_xfpregs structure)"; + case 10: return "NT_PSTATUS (Linux process status)"; + case 12: return "NT_FPREGS (Linux floating point regset)"; + case 13: return "NT_PSINFO (Linux process information)"; + case 16: return "NT_LWPSTATUS (Linux lwpstatus_t type)"; + case 17: return "NT_LWPSINFO (Linux lwpinfo_t type)"; + default: return (note_type_unknown(nt)); + } +} + +static const char * +note_type_gnu(unsigned int nt) +{ + switch (nt) { + case 1: return "NT_GNU_ABI_TAG"; + case 2: return "NT_GNU_HWCAP (Hardware capabilities)"; + case 3: return "NT_GNU_BUILD_ID (Build id set by ld(1))"; + case 4: return "NT_GNU_GOLD_VERSION (GNU gold version)"; + default: return (note_type_unknown(nt)); + } +} + +static const char * +note_type_netbsd(unsigned int nt) +{ + switch (nt) { + case 1: return "NT_NETBSD_IDENT"; + default: return (note_type_unknown(nt)); + } +} + +static const char * +note_type_openbsd(unsigned int nt) +{ + switch (nt) { + case 1: return "NT_OPENBSD_IDENT"; + default: return (note_type_unknown(nt)); + } +} + +static const char * +note_type_unknown(unsigned int nt) +{ + static char s_nt[32]; + + snprintf(s_nt, sizeof(s_nt), "", nt); + return (s_nt); } static struct { @@ -3585,18 +3639,36 @@ static void dump_notes_content(struct readelf *re, const char *buf, size_t sz, off_t off) { Elf_Note *note; - const char *end; + const char *end, *name; printf("\nNotes at offset %#010jx with length %#010jx:\n", (uintmax_t) off, (uintmax_t) sz); printf(" %-13s %-15s %s\n", "Owner", "Data size", "Description"); end = buf + sz; while (buf < end) { + if (buf + sizeof(*note) > end) { + warnx("invalid note header"); + return; + } note = (Elf_Note *)(uintptr_t) buf; - printf(" %-13s %#010jx", (char *)(uintptr_t) (note + 1), - (uintmax_t) note->n_descsz); - printf(" %s\n", note_type(re->ehdr.e_ident[EI_OSABI], - re->ehdr.e_type, note->n_type)); + name = (char *)(uintptr_t)(note + 1); + /* + * The name field is required to be nul-terminated, and + * n_namesz includes the terminating nul in observed + * implementations (contrary to the ELF-64 spec). A special + * case is needed for cores generated by some older Linux + * versions, which write a note named "CORE" without a nul + * terminator and n_namesz = 4. + */ + if (note->n_namesz == 0) + name = ""; + else if (note->n_namesz == 4 && strncmp(name, "CORE", 4) == 0) + name = "CORE"; + else if (strnlen(name, note->n_namesz) >= note->n_namesz) + name = ""; + printf(" %-13s %#010jx", name, (uintmax_t) note->n_descsz); + printf(" %s\n", note_type(name, re->ehdr.e_type, + note->n_type)); buf += sizeof(Elf_Note) + roundup2(note->n_namesz, 4) + roundup2(note->n_descsz, 4); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 16:43: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 26A63AA; Mon, 5 Jan 2015 16:43: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 119B62DD5; Mon, 5 Jan 2015 16:43: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 t05GhNIY012295; Mon, 5 Jan 2015 16:43:23 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05GhNn7012291; Mon, 5 Jan 2015 16:43:23 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501051643.t05GhNn7012291@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 5 Jan 2015 16:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276710 - in head/sys/dev/beri/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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 16:43:24 -0000 Author: br Date: Mon Jan 5 16:43:22 2015 New Revision: 276710 URL: https://svnweb.freebsd.org/changeset/base/276710 Log: o Switch to use non-mergeable RX buffers to avoid mbuf adjustment needs o Operate with copy of iov as we expect later it was not modified Modified: head/sys/dev/beri/virtio/network/if_vtbe.c head/sys/dev/beri/virtio/virtio.c head/sys/dev/beri/virtio/virtio.h head/sys/dev/beri/virtio/virtio_block.c Modified: head/sys/dev/beri/virtio/network/if_vtbe.c ============================================================================== --- head/sys/dev/beri/virtio/network/if_vtbe.c Mon Jan 5 16:10:54 2015 (r276709) +++ head/sys/dev/beri/virtio/network/if_vtbe.c Mon Jan 5 16:43:22 2015 (r276710) @@ -138,17 +138,16 @@ static int pio_enable_irq(struct vtbe_so static void vtbe_txstart_locked(struct vtbe_softc *sc) { - struct virtio_net_hdr_mrg_rxbuf *vnh; struct iovec iov[DESC_COUNT]; + struct virtio_net_hdr *vnh; struct vqueue_info *vq; - struct iovec *riov; + struct iovec *tiov; struct ifnet *ifp; struct mbuf *m; struct uio uio; int enqueued; int iolen; int error; - int *addr; int reg; int len; int n; @@ -186,24 +185,16 @@ vtbe_txstart_locked(struct vtbe_softc *s n = vq_getchain(sc->beri_mem_offset, vq, iov, DESC_COUNT, NULL); + KASSERT(n == 2, + ("Unexpected amount of descriptors (%d)", n)); - KASSERT(n >= 1 && n <= DESC_COUNT, - ("wrong descriptors num %d", n)); - - addr = iov[0].iov_base; - len = iov[0].iov_len; - + tiov = getcopy(iov, n); vnh = iov[0].iov_base; memset(vnh, 0, sc->hdrsize); - vnh->num_buffers = htobe16(1); - - iov[0].iov_len -= sc->hdrsize; - iov[0].iov_base = (void *)((uintptr_t)iov[0].iov_base + - sc->hdrsize); - riov = &iov[0]; - uio.uio_resid = iov[0].iov_len; - uio.uio_iov = riov; + len = iov[1].iov_len; + uio.uio_resid = len; + uio.uio_iov = &tiov[1]; uio.uio_segflg = UIO_SYSSPACE; uio.uio_iovcnt = 1; uio.uio_offset = 0; @@ -213,9 +204,10 @@ vtbe_txstart_locked(struct vtbe_softc *s if (error) panic("m_mbuftouio failed\n"); - iolen = (len - iov[0].iov_len - sc->hdrsize); - vq_relchain(vq, iov, 0, iolen + sc->hdrsize); - paddr_unmap((void *)addr, len); + iolen = (len - uio.uio_resid + sc->hdrsize); + + free(tiov, M_DEVBUF); + vq_relchain(vq, iov, n, iolen); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); @@ -391,6 +383,7 @@ static void vtbe_proc_rx(struct vtbe_softc *sc, struct vqueue_info *vq) { struct iovec iov[DESC_COUNT]; + struct iovec *tiov; struct ifnet *ifp; struct uio uio; struct mbuf *m; @@ -406,13 +399,15 @@ vtbe_proc_rx(struct vtbe_softc *sc, stru KASSERT(n >= 1 && n <= DESC_COUNT, ("wrong n %d", n)); + tiov = getcopy(iov, n); + iolen = 0; for (i = 1; i < n; i++) { iolen += iov[i].iov_len; } uio.uio_resid = iolen; - uio.uio_iov = &iov[1]; + uio.uio_iov = &tiov[1]; uio.uio_segflg = UIO_SYSSPACE; uio.uio_iovcnt = (n - 1); uio.uio_rw = UIO_WRITE; @@ -434,6 +429,7 @@ vtbe_proc_rx(struct vtbe_softc *sc, stru CURVNET_RESTORE(); done: + free(tiov, M_DEVBUF); vq_relchain(vq, iov, n, iolen + sc->hdrsize); } @@ -569,7 +565,7 @@ vtbe_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - sc->hdrsize = sizeof(struct virtio_net_hdr_mrg_rxbuf); + sc->hdrsize = sizeof(struct virtio_net_hdr); if (bus_alloc_resources(dev, vtbe_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); @@ -602,7 +598,6 @@ vtbe_attach(device_t dev) /* Our features */ reg = htobe32(VIRTIO_NET_F_MAC | - VIRTIO_NET_F_MRG_RXBUF | VIRTIO_F_NOTIFY_ON_EMPTY); WRITE4(sc, VIRTIO_MMIO_HOST_FEATURES, reg); Modified: head/sys/dev/beri/virtio/virtio.c ============================================================================== --- head/sys/dev/beri/virtio/virtio.c Mon Jan 5 16:10:54 2015 (r276709) +++ head/sys/dev/beri/virtio/virtio.c Mon Jan 5 16:43:22 2015 (r276710) @@ -186,7 +186,7 @@ vq_relchain(struct vqueue_info *vq, stru vu->idx = htobe16(uidx); /* Clean up */ - for (i = 1; i < (n-1); i++) { + for (i = 0; i < n; i++) { paddr_unmap((void *)iov[i].iov_base, iov[i].iov_len); } } @@ -244,3 +244,17 @@ setup_offset(device_t dev, uint32_t *off return (0); } +struct iovec * +getcopy(struct iovec *iov, int n) +{ + struct iovec *tiov; + int i; + + tiov = malloc(n * sizeof(struct iovec), M_DEVBUF, M_NOWAIT); + for (i = 0; i < n; i++) { + tiov[i].iov_base = iov[i].iov_base; + tiov[i].iov_len = iov[i].iov_len; + } + + return (tiov); +} Modified: head/sys/dev/beri/virtio/virtio.h ============================================================================== --- head/sys/dev/beri/virtio/virtio.h Mon Jan 5 16:10:54 2015 (r276709) +++ head/sys/dev/beri/virtio/virtio.h Mon Jan 5 16:43:22 2015 (r276710) @@ -65,6 +65,7 @@ void paddr_unmap(void *phys, uint32_t si int vq_getchain(uint32_t beri_mem_offset, struct vqueue_info *vq, struct iovec *iov, int n_iov, uint16_t *flags); void vq_relchain(struct vqueue_info *vq, struct iovec *iov, int n, uint32_t iolen); +struct iovec * getcopy(struct iovec *iov, int n); int setup_pio(device_t dev, char *name, device_t *pio_dev); int setup_offset(device_t dev, uint32_t *offset); Modified: head/sys/dev/beri/virtio/virtio_block.c ============================================================================== --- head/sys/dev/beri/virtio/virtio_block.c Mon Jan 5 16:10:54 2015 (r276709) +++ head/sys/dev/beri/virtio/virtio_block.c Mon Jan 5 16:43:22 2015 (r276710) @@ -151,6 +151,7 @@ vtblk_proc(struct beri_vtblk_softc *sc, struct iovec iov[VTBLK_MAXSEGS + 2]; uint16_t flags[VTBLK_MAXSEGS + 2]; struct virtio_blk_outhdr *vbh; + struct iovec *tiov; uint8_t *status; off_t offset; int iolen; @@ -160,10 +161,10 @@ vtblk_proc(struct beri_vtblk_softc *sc, n = vq_getchain(sc->beri_mem_offset, vq, iov, VTBLK_MAXSEGS + 2, flags); - KASSERT(n >= 2 && n <= VTBLK_MAXSEGS + 2, ("wrong n value %d", n)); + tiov = getcopy(iov, n); vbh = iov[0].iov_base; status = iov[n-1].iov_base; @@ -181,7 +182,7 @@ vtblk_proc(struct beri_vtblk_softc *sc, switch (type) { case VIRTIO_BLK_T_OUT: case VIRTIO_BLK_T_IN: - err = vtblk_rdwr(sc, iov + 1, i - 1, + err = vtblk_rdwr(sc, tiov + 1, i - 1, offset, type, iolen); break; case VIRTIO_BLK_T_GET_ID: @@ -205,6 +206,7 @@ vtblk_proc(struct beri_vtblk_softc *sc, } else *status = VIRTIO_BLK_S_OK; + free(tiov, M_DEVBUF); vq_relchain(vq, iov, n, 1); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 16: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 69CD3363; Mon, 5 Jan 2015 16:52: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 552762F5E; Mon, 5 Jan 2015 16:52: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 t05GqQYY016874; Mon, 5 Jan 2015 16:52:26 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05GqQFa016873; Mon, 5 Jan 2015 16:52:26 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501051652.t05GqQFa016873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 5 Jan 2015 16:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276711 - head/sys/boot/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 16:52:26 -0000 Author: nwhitehorn Date: Mon Jan 5 16:52:25 2015 New Revision: 276711 URL: https://svnweb.freebsd.org/changeset/base/276711 Log: Missed change in r276688. Apologies for build breakage. Modified: head/sys/boot/fdt/Makefile Modified: head/sys/boot/fdt/Makefile ============================================================================== --- head/sys/boot/fdt/Makefile Mon Jan 5 16:43:22 2015 (r276710) +++ head/sys/boot/fdt/Makefile Mon Jan 5 16:52:25 2015 (r276711) @@ -6,7 +6,8 @@ LIB= fdt INTERNALLIB= # Vendor sources of libfdt. -SRCS+= fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c +SRCS+= fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c \ + fdt_empty_tree.c # Loader's fdt commands extension sources. SRCS+= fdt_loader_cmd.c From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 17:37: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 642FA900; Mon, 5 Jan 2015 17:37:10 +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 3CCE33652; Mon, 5 Jan 2015 17:37:10 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AF1A3B91E; Mon, 5 Jan 2015 12:37:08 -0500 (EST) Message-ID: <54AACBC4.5040802@FreeBSD.org> Date: Mon, 05 Jan 2015 12:37:08 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r276534 - head/sys/dev/vt References: <201501021335.t02DZBRm015072@svn.freebsd.org> In-Reply-To: <201501021335.t02DZBRm015072@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 05 Jan 2015 12:37:08 -0500 (EST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 17:37:10 -0000 On 1/2/15 8:35 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Jan 2 13:35:10 2015 > New Revision: 276534 > URL: https://svnweb.freebsd.org/changeset/base/276534 > > Log: > The "vt_suspend_flush_timer()" function is sometimes called locked > which prevents us from doing a "callout_drain()" call. The callout in > question has a lock associated with it and we are not freeing the > callout. That means we can use the "callout_stop()" function to > atomically stop the callback iff the "callout_stop()" function is > called locked. This patch applies proper locking to "callout_stop()" > and replaces a "callout_drain()" with a "callout_stop()". > > Modified: head/sys/dev/vt/vt_core.c > ============================================================================== > --- head/sys/dev/vt/vt_core.c Fri Jan 2 13:15:36 2015 (r276533) > +++ head/sys/dev/vt/vt_core.c Fri Jan 2 13:35:10 2015 (r276534) > @@ -114,6 +114,7 @@ const struct terminal_class vt_termclass > > #define VT_LOCK(vd) mtx_lock(&(vd)->vd_lock) > #define VT_UNLOCK(vd) mtx_unlock(&(vd)->vd_lock) > +#define VT_LOCK_ASSERT(vd, what) mtx_assert(&(vd)->vd_lock, what) > > #define VT_UNIT(vw) ((vw)->vw_device->vd_unit * VT_MAXWINDOWS + \ > (vw)->vw_number) > @@ -283,12 +284,18 @@ vt_resume_flush_timer(struct vt_device * > static void > vt_suspend_flush_timer(struct vt_device *vd) > { > + /* > + * As long as this function is called locked, callout_stop() > + * has the same effect like callout_drain() with regard to > + * preventing the callback function from executing. > + */ > + VT_LOCK_ASSERT(vd, MA_OWNED); Note that this assert is redundant. callout_stop() already asserts this for a callout initialized via callout_init_mtx(). > > if (!(vd->vd_flags & VDF_ASYNC) || > !atomic_cmpset_int(&vd->vd_timer_armed, 1, 0)) > return; > > - callout_drain(&vd->vd_timer); > + callout_stop(&vd->vd_timer); > } > > static void -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 17:47: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 82662A3C; Mon, 5 Jan 2015 17:47:40 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44D823847; Mon, 5 Jan 2015 17:47:40 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6B85A1FE022; Mon, 5 Jan 2015 18:47:38 +0100 (CET) Message-ID: <54AACE6A.7020702@selasky.org> Date: Mon, 05 Jan 2015 18:48:26 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r276534 - head/sys/dev/vt References: <201501021335.t02DZBRm015072@svn.freebsd.org> <54AACBC4.5040802@FreeBSD.org> In-Reply-To: <54AACBC4.5040802@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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 17:47:40 -0000 On 01/05/15 18:37, John Baldwin wrote: > On 1/2/15 8:35 AM, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Fri Jan 2 13:35:10 2015 >> New Revision: 276534 >> URL: https://svnweb.freebsd.org/changeset/base/276534 >> >> Log: >> The "vt_suspend_flush_timer()" function is sometimes called locked >> which prevents us from doing a "callout_drain()" call. The callout in >> question has a lock associated with it and we are not freeing the >> callout. That means we can use the "callout_stop()" function to >> atomically stop the callback iff the "callout_stop()" function is >> called locked. This patch applies proper locking to "callout_stop()" >> and replaces a "callout_drain()" with a "callout_stop()". >> >> Modified: head/sys/dev/vt/vt_core.c >> ============================================================================== >> --- head/sys/dev/vt/vt_core.c Fri Jan 2 13:15:36 2015 (r276533) >> +++ head/sys/dev/vt/vt_core.c Fri Jan 2 13:35:10 2015 (r276534) >> @@ -114,6 +114,7 @@ const struct terminal_class vt_termclass >> >> #define VT_LOCK(vd) mtx_lock(&(vd)->vd_lock) >> #define VT_UNLOCK(vd) mtx_unlock(&(vd)->vd_lock) >> +#define VT_LOCK_ASSERT(vd, what) mtx_assert(&(vd)->vd_lock, what) >> >> #define VT_UNIT(vw) ((vw)->vw_device->vd_unit * VT_MAXWINDOWS + \ >> (vw)->vw_number) >> @@ -283,12 +284,18 @@ vt_resume_flush_timer(struct vt_device * >> static void >> vt_suspend_flush_timer(struct vt_device *vd) >> { >> + /* >> + * As long as this function is called locked, callout_stop() >> + * has the same effect like callout_drain() with regard to >> + * preventing the callback function from executing. >> + */ >> + VT_LOCK_ASSERT(vd, MA_OWNED); > > Note that this assert is redundant. callout_stop() already asserts this > for a callout initialized via callout_init_mtx(). > Right, but there is an "if" there which not always makes the assert visible execept for static code analysis. --HPS From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 18:15: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 8F6169E5; Mon, 5 Jan 2015 18:15: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 7B87264EC2; Mon, 5 Jan 2015 18:15: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 t05IFH1f058794; Mon, 5 Jan 2015 18:15:17 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05IFHBT058793; Mon, 5 Jan 2015 18:15:17 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501051815.t05IFHBT058793@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 5 Jan 2015 18:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276713 - head/sys/powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 18:15:17 -0000 Author: nwhitehorn Date: Mon Jan 5 18:15:16 2015 New Revision: 276713 URL: https://svnweb.freebsd.org/changeset/base/276713 Log: Revert r272109 locally, which is not quite equivalent in how it deals with missing interrupt-parent properties. A better solution will come later, but this restores pseries in QEMU for the time being. Modified: head/sys/powerpc/pseries/vdevice.c Modified: head/sys/powerpc/pseries/vdevice.c ============================================================================== --- head/sys/powerpc/pseries/vdevice.c Mon Jan 5 17:23:02 2015 (r276712) +++ head/sys/powerpc/pseries/vdevice.c Mon Jan 5 18:15:16 2015 (r276713) @@ -128,6 +128,8 @@ vdevice_attach(device_t dev) { phandle_t root, child; device_t cdev; + int icells, i, nintr, *intr; + phandle_t iparent; struct vdevice_devinfo *dinfo; root = ofw_bus_get_node(dev); @@ -142,7 +144,25 @@ vdevice_attach(device_t dev) } resource_list_init(&dinfo->mdi_resources); - ofw_bus_intr_to_rl(dev, child, &dinfo->mdi_resources); + if (OF_searchprop(child, "#interrupt-cells", &icells, + sizeof(icells)) <= 0) + icells = 2; + if (OF_getprop(child, "interrupt-parent", &iparent, + sizeof(iparent)) <= 0) + iparent = -1; + nintr = OF_getprop_alloc(child, "interrupts", sizeof(*intr), + (void **)&intr); + if (nintr > 0) { + for (i = 0; i < nintr; i += icells) { + u_int irq = intr[i]; + if (iparent != -1) + irq = ofw_bus_map_intr(dev, iparent, + icells, &intr[i]); + + resource_list_add(&dinfo->mdi_resources, + SYS_RES_IRQ, i, irq, irq, i); + } + } cdev = device_add_child(dev, NULL, -1); if (cdev == NULL) { From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 19:15: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 53916D7F; Mon, 5 Jan 2015 19:15: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 405022CEA; Mon, 5 Jan 2015 19:15: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 t05JFatv089074; Mon, 5 Jan 2015 19:15:36 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05JFavD089073; Mon, 5 Jan 2015 19:15:36 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201501051915.t05JFavD089073@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Mon, 5 Jan 2015 19:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276714 - head/sys/i386/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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 19:15:36 -0000 Author: marius Date: Mon Jan 5 19:15:35 2015 New Revision: 276714 URL: https://svnweb.freebsd.org/changeset/base/276714 Log: Exclude drivers which build but don't actually work with PAE enabled, missed in r276377 Modified: head/sys/i386/conf/XEN Modified: head/sys/i386/conf/XEN ============================================================================== --- head/sys/i386/conf/XEN Mon Jan 5 18:15:16 2015 (r276713) +++ head/sys/i386/conf/XEN Mon Jan 5 19:15:35 2015 (r276714) @@ -8,9 +8,12 @@ ident XEN makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -# The following modules don't build with PAE and XEN enabled. +# The following drivers don't build with PAE or XEN enabled. makeoptions WITHOUT_MODULES="ctl dpt drm drm2 hptmv ida" +# The following drivers don't work with PAE enabled. +makeoptions WITHOUT_MODULES+="ncr pst" + options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 19:49:21 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 9B32BEFD; Mon, 5 Jan 2015 19:49: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 6F0EB3059; Mon, 5 Jan 2015 19:49: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 t05JnLX9004910; Mon, 5 Jan 2015 19:49:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05JnLVL004908; Mon, 5 Jan 2015 19:49:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501051949.t05JnLVL004908@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 5 Jan 2015 19:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276715 - head/sys/dev/tws X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 19:49:21 -0000 Author: jhb Date: Mon Jan 5 19:49:20 2015 New Revision: 276715 URL: https://svnweb.freebsd.org/changeset/base/276715 Log: Use struct thread * directly instead of d_thread_t. This driver is not likely to be merged back to stable/4. Reviewed by: delphij Modified: head/sys/dev/tws/tws.c head/sys/dev/tws/tws_user.c Modified: head/sys/dev/tws/tws.c ============================================================================== --- head/sys/dev/tws/tws.c Mon Jan 5 19:15:35 2015 (r276714) +++ head/sys/dev/tws/tws.c Mon Jan 5 19:49:20 2015 (r276715) @@ -113,7 +113,7 @@ static struct cdevsw tws_cdevsw = { */ int -tws_open(struct cdev *dev, int oflags, int devtype, d_thread_t *td) +tws_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { struct tws_softc *sc = dev->si_drv1; @@ -123,7 +123,7 @@ tws_open(struct cdev *dev, int oflags, i } int -tws_close(struct cdev *dev, int fflag, int devtype, d_thread_t *td) +tws_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { struct tws_softc *sc = dev->si_drv1; Modified: head/sys/dev/tws/tws_user.c ============================================================================== --- head/sys/dev/tws/tws_user.c Mon Jan 5 19:15:35 2015 (r276714) +++ head/sys/dev/tws/tws_user.c Mon Jan 5 19:49:20 2015 (r276715) @@ -41,7 +41,7 @@ int tws_ioctl(struct cdev *dev, long unsigned int cmd, caddr_t buf, int flags, - d_thread_t *proc); + struct thread *td); void tws_passthru_complete(struct tws_request *req); extern void tws_circular_aenq_insert(struct tws_softc *sc, struct tws_circular_q *cq, struct tws_event_packet *aen); @@ -60,7 +60,7 @@ extern void tws_timeout(void *arg); int tws_ioctl(struct cdev *dev, u_long cmd, caddr_t buf, int flags, - d_thread_t *proc) + struct thread *td) { struct tws_softc *sc = (struct tws_softc *)(dev->si_drv1); int error; From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:22: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 8508FA14; Mon, 5 Jan 2015 20:22: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 6C8563608; Mon, 5 Jan 2015 20:22: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 t05KMUTp023091; Mon, 5 Jan 2015 20:22:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05KMJfc023032; Mon, 5 Jan 2015 20:22:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501052022.t05KMJfc023032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 5 Jan 2015 20:22:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276717 - in head/sys: arm/allwinner arm/cavium/cns11xx arm/freescale/vybrid arm/lpc arm/samsung/exynos arm/ti/am335x arm/ti/usb arm/xilinx dev/usb dev/usb/controller mips/atheros mips/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 20:22:30 -0000 Author: hselasky Date: Mon Jan 5 20:22:18 2015 New Revision: 276717 URL: https://svnweb.freebsd.org/changeset/base/276717 Log: Add 64-bit DMA support in the XHCI controller driver. - Fix some comments and whitespace while at it. MFC after: 1 month Submitted by: marius@ Modified: head/sys/arm/allwinner/a10_ehci.c head/sys/arm/cavium/cns11xx/ehci_ebus.c head/sys/arm/cavium/cns11xx/ohci_ec.c head/sys/arm/freescale/vybrid/vf_ehci.c head/sys/arm/lpc/lpc_ohci.c head/sys/arm/samsung/exynos/exynos5_ehci.c head/sys/arm/ti/am335x/am335x_usbss.c head/sys/arm/ti/usb/omap_ehci.c head/sys/arm/xilinx/zy7_ehci.c head/sys/dev/usb/controller/at91dci_atmelarm.c head/sys/dev/usb/controller/at91dci_fdt.c head/sys/dev/usb/controller/atmegadci_atmelarm.c head/sys/dev/usb/controller/dwc_otg_fdt.c head/sys/dev/usb/controller/ehci_fsl.c head/sys/dev/usb/controller/ehci_imx.c head/sys/dev/usb/controller/ehci_ixp4xx.c head/sys/dev/usb/controller/ehci_mv.c head/sys/dev/usb/controller/ehci_pci.c head/sys/dev/usb/controller/musb_otg_atmelarm.c head/sys/dev/usb/controller/ohci_atmelarm.c head/sys/dev/usb/controller/ohci_fdt.c head/sys/dev/usb/controller/ohci_pci.c head/sys/dev/usb/controller/ohci_s3c24x0.c head/sys/dev/usb/controller/saf1761_otg_boot.c head/sys/dev/usb/controller/saf1761_otg_fdt.c head/sys/dev/usb/controller/uhci_pci.c head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/controller/uss820dci_atmelarm.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci_pci.c head/sys/dev/usb/usb_bus.h head/sys/dev/usb/usb_transfer.c head/sys/mips/atheros/ar71xx_ehci.c head/sys/mips/atheros/ar71xx_ohci.c head/sys/mips/cavium/usb/octusb_octeon.c head/sys/mips/rmi/xls_ehci.c head/sys/mips/rt305x/rt305x_dotg.c head/sys/powerpc/ps3/ehci_ps3.c head/sys/powerpc/ps3/ohci_ps3.c Modified: head/sys/arm/allwinner/a10_ehci.c ============================================================================== --- head/sys/arm/allwinner/a10_ehci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/arm/allwinner/a10_ehci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -119,6 +119,7 @@ a10_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/arm/cavium/cns11xx/ehci_ebus.c ============================================================================== --- head/sys/arm/cavium/cns11xx/ehci_ebus.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/arm/cavium/cns11xx/ehci_ebus.c Mon Jan 5 20:22:18 2015 (r276717) @@ -102,6 +102,7 @@ ehci_ebus_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/arm/cavium/cns11xx/ohci_ec.c ============================================================================== --- head/sys/arm/cavium/cns11xx/ohci_ec.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/arm/cavium/cns11xx/ohci_ec.c Mon Jan 5 20:22:18 2015 (r276717) @@ -91,6 +91,7 @@ ohci_ec_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: head/sys/arm/freescale/vybrid/vf_ehci.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_ehci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/arm/freescale/vybrid/vf_ehci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -259,6 +259,7 @@ vybrid_ehci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; if (bus_alloc_resources(dev, vybrid_ehci_spec, esc->res)) { device_printf(dev, "could not allocate resources\n"); Modified: head/sys/arm/lpc/lpc_ohci.c ============================================================================== --- head/sys/arm/lpc/lpc_ohci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/arm/lpc/lpc_ohci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -122,6 +122,7 @@ lpc_ohci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) Modified: head/sys/arm/samsung/exynos/exynos5_ehci.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_ehci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/arm/samsung/exynos/exynos5_ehci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -259,6 +259,7 @@ exynos_ehci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; if (bus_alloc_resources(dev, exynos_ehci_spec, esc->res)) { device_printf(dev, "could not allocate resources\n"); Modified: head/sys/arm/ti/am335x/am335x_usbss.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_usbss.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/arm/ti/am335x/am335x_usbss.c Mon Jan 5 20:22:18 2015 (r276717) @@ -335,6 +335,7 @@ musbotg_attach(device_t dev) sc->sc_otg[i].sc_bus.parent = dev; sc->sc_otg[i].sc_bus.devices = sc->sc_otg[i].sc_devices; sc->sc_otg[i].sc_bus.devices_max = MUSB2_MAX_DEVICES; + sc->sc_otg[i].sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg[i].sc_bus, Modified: head/sys/arm/ti/usb/omap_ehci.c ============================================================================== --- head/sys/arm/ti/usb/omap_ehci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/arm/ti/usb/omap_ehci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -780,7 +780,8 @@ omap_ehci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; - + sc->sc_bus.dma_bits = 32; + /* save the device */ isc->sc_dev = dev; Modified: head/sys/arm/xilinx/zy7_ehci.c ============================================================================== --- head/sys/arm/xilinx/zy7_ehci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/arm/xilinx/zy7_ehci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -216,6 +216,7 @@ zy7_ehci_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/at91dci_atmelarm.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/at91dci_atmelarm.c Mon Jan 5 20:22:18 2015 (r276717) @@ -156,6 +156,7 @@ at91_udp_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = AT91_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: head/sys/dev/usb/controller/at91dci_fdt.c ============================================================================== --- head/sys/dev/usb/controller/at91dci_fdt.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/at91dci_fdt.c Mon Jan 5 20:22:18 2015 (r276717) @@ -162,6 +162,7 @@ at91_udp_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = AT91_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: head/sys/dev/usb/controller/atmegadci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci_atmelarm.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/atmegadci_atmelarm.c Mon Jan 5 20:22:18 2015 (r276717) @@ -101,6 +101,7 @@ atmegadci_attach(device_t dev) sc->sc_otg.sc_bus.parent = dev; sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; sc->sc_otg.sc_bus.devices_max = ATMEGA_MAX_DEVICES; + sc->sc_otg.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, Modified: head/sys/dev/usb/controller/dwc_otg_fdt.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg_fdt.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/dwc_otg_fdt.c Mon Jan 5 20:22:18 2015 (r276717) @@ -99,6 +99,7 @@ dwc_otg_attach(device_t dev) sc->sc_otg.sc_bus.parent = dev; sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; sc->sc_otg.sc_bus.devices_max = DWC_OTG_MAX_DEVICES; + sc->sc_otg.sc_bus.dma_bits = 32; /* get USB mode, if any */ if (OF_getprop(ofw_bus_get_node(dev), "dr_mode", Modified: head/sys/dev/usb/controller/ehci_fsl.c ============================================================================== --- head/sys/dev/usb/controller/ehci_fsl.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/ehci_fsl.c Mon Jan 5 20:22:18 2015 (r276717) @@ -239,6 +239,7 @@ fsl_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) Modified: head/sys/dev/usb/controller/ehci_imx.c ============================================================================== --- head/sys/dev/usb/controller/ehci_imx.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/ehci_imx.c Mon Jan 5 20:22:18 2015 (r276717) @@ -237,7 +237,9 @@ imx_ehci_attach(device_t dev) esc->sc_bus.parent = dev; esc->sc_bus.devices = esc->sc_devices; esc->sc_bus.devices_max = EHCI_MAX_DEVICES; + esc->sc_bus.dma_bits = 32; + /* allocate all DMA memory */ if (usb_bus_mem_alloc_all(&esc->sc_bus, USB_GET_DMA_TAG(dev), &ehci_iterate_hw_softc) != 0) { device_printf(dev, "usb_bus_mem_alloc_all() failed\n"); Modified: head/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- head/sys/dev/usb/controller/ehci_ixp4xx.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/ehci_ixp4xx.c Mon Jan 5 20:22:18 2015 (r276717) @@ -107,6 +107,7 @@ ehci_ixp_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/dev/usb/controller/ehci_mv.c ============================================================================== --- head/sys/dev/usb/controller/ehci_mv.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/ehci_mv.c Mon Jan 5 20:22:18 2015 (r276717) @@ -126,6 +126,7 @@ mv_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/ehci_pci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -282,6 +282,7 @@ ehci_pci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/dev/usb/controller/musb_otg_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg_atmelarm.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/musb_otg_atmelarm.c Mon Jan 5 20:22:18 2015 (r276717) @@ -137,6 +137,7 @@ musbotg_attach(device_t dev) sc->sc_otg.sc_bus.parent = dev; sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; sc->sc_otg.sc_bus.devices_max = MUSB2_MAX_DEVICES; + sc->sc_otg.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, Modified: head/sys/dev/usb/controller/ohci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/ohci_atmelarm.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/ohci_atmelarm.c Mon Jan 5 20:22:18 2015 (r276717) @@ -93,6 +93,7 @@ ohci_atmelarm_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: head/sys/dev/usb/controller/ohci_fdt.c ============================================================================== --- head/sys/dev/usb/controller/ohci_fdt.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/ohci_fdt.c Mon Jan 5 20:22:18 2015 (r276717) @@ -99,6 +99,7 @@ ohci_at91_fdt_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: head/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ohci_pci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/ohci_pci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -213,6 +213,7 @@ ohci_pci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), Modified: head/sys/dev/usb/controller/ohci_s3c24x0.c ============================================================================== --- head/sys/dev/usb/controller/ohci_s3c24x0.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/ohci_s3c24x0.c Mon Jan 5 20:22:18 2015 (r276717) @@ -84,6 +84,7 @@ ohci_s3c24x0_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), Modified: head/sys/dev/usb/controller/saf1761_otg_boot.c ============================================================================== --- head/sys/dev/usb/controller/saf1761_otg_boot.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/saf1761_otg_boot.c Mon Jan 5 20:22:18 2015 (r276717) @@ -85,6 +85,7 @@ saf1761_otg_fdt_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = SOTG_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), NULL)) Modified: head/sys/dev/usb/controller/saf1761_otg_fdt.c ============================================================================== --- head/sys/dev/usb/controller/saf1761_otg_fdt.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/saf1761_otg_fdt.c Mon Jan 5 20:22:18 2015 (r276717) @@ -174,6 +174,7 @@ saf1761_otg_fdt_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = SOTG_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/uhci_pci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/uhci_pci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -261,6 +261,7 @@ uhci_pci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = UHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/usb_controller.c Mon Jan 5 20:22:18 2015 (r276717) @@ -915,7 +915,7 @@ usb_bus_mem_alloc_all(struct usb_bus *bu #if USB_HAVE_BUSDMA usb_dma_tag_setup(bus->dma_parent_tag, bus->dma_tags, - dmat, &bus->bus_mtx, NULL, 32, USB_BUS_DMA_TAG_MAX); + dmat, &bus->bus_mtx, NULL, bus->dma_bits, USB_BUS_DMA_TAG_MAX); #endif if ((bus->devices_max > USB_MAX_DEVICES) || (bus->devices_max < USB_MIN_DEVICES) || Modified: head/sys/dev/usb/controller/uss820dci_atmelarm.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci_atmelarm.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/uss820dci_atmelarm.c Mon Jan 5 20:22:18 2015 (r276717) @@ -107,6 +107,7 @@ uss820_atmelarm_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = USS820_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/xhci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -319,7 +319,7 @@ xhci_reset_command_queue_locked(struct x usbd_get_page(&sc->sc_hw.root_pc, 0, &buf_res); - /* setup command ring control base address */ + /* set up command ring control base address */ addr = buf_res.physaddr; phwr = buf_res.buffer; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_commands[0]; @@ -349,34 +349,11 @@ xhci_start_controller(struct xhci_softc DPRINTF("\n"); - sc->sc_capa_off = 0; - sc->sc_oper_off = XREAD1(sc, capa, XHCI_CAPLENGTH); - sc->sc_runt_off = XREAD4(sc, capa, XHCI_RTSOFF) & ~0x1F; - sc->sc_door_off = XREAD4(sc, capa, XHCI_DBOFF) & ~0x3; - - DPRINTF("CAPLENGTH=0x%x\n", sc->sc_oper_off); - DPRINTF("RUNTIMEOFFSET=0x%x\n", sc->sc_runt_off); - DPRINTF("DOOROFFSET=0x%x\n", sc->sc_door_off); - sc->sc_event_ccs = 1; sc->sc_event_idx = 0; sc->sc_command_ccs = 1; sc->sc_command_idx = 0; - DPRINTF("xHCI version = 0x%04x\n", XREAD2(sc, capa, XHCI_HCIVERSION)); - - temp = XREAD4(sc, capa, XHCI_HCSPARAMS0); - - DPRINTF("HCS0 = 0x%08x\n", temp); - - if (XHCI_HCS0_CSZ(temp)) { - sc->sc_ctx_is_64_byte = 1; - device_printf(sc->sc_bus.parent, "64 byte context size.\n"); - } else { - sc->sc_ctx_is_64_byte = 0; - device_printf(sc->sc_bus.parent, "32 byte context size.\n"); - } - /* Reset controller */ XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); @@ -416,7 +393,7 @@ xhci_start_controller(struct xhci_softc if (sc->sc_noslot > XHCI_MAX_DEVICES) sc->sc_noslot = XHCI_MAX_DEVICES; - /* setup number of device slots */ + /* set up number of device slots */ DPRINTF("CONFIG=0x%08x -> 0x%08x\n", XREAD4(sc, oper, XHCI_CONFIG), sc->sc_noslot); @@ -449,7 +426,7 @@ xhci_start_controller(struct xhci_softc /* disable all device notifications */ XWRITE4(sc, oper, XHCI_DNCTRL, 0); - /* setup device context base address */ + /* set up device context base address */ usbd_get_page(&sc->sc_hw.ctx_pc, 0, &buf_res); pdctxa = buf_res.buffer; memset(pdctxa, 0, sizeof(*pdctxa)); @@ -528,7 +505,7 @@ xhci_start_controller(struct xhci_softc temp |= XHCI_IMAN_INTR_ENA; XWRITE4(sc, runt, XHCI_IMAN(0), temp); - /* setup command ring control base address */ + /* set up command ring control base address */ addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_commands[0]; @@ -601,7 +578,11 @@ xhci_halt_controller(struct xhci_softc * usb_error_t xhci_init(struct xhci_softc *sc, device_t self) { - /* initialise some bus fields */ + uint32_t temp; + + DPRINTF("\n"); + + /* initialize some bus fields */ sc->sc_bus.parent = self; /* set the bus revision */ @@ -610,7 +591,7 @@ xhci_init(struct xhci_softc *sc, device_ /* set up the bus struct */ sc->sc_bus.methods = &xhci_bus_methods; - /* setup devices array */ + /* set up devices array */ sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = XHCI_MAX_DEVICES; @@ -618,9 +599,34 @@ xhci_init(struct xhci_softc *sc, device_ sc->sc_event_ccs = 1; sc->sc_command_ccs = 1; - /* setup command queue mutex and condition varible */ - cv_init(&sc->sc_cmd_cv, "CMDQ"); - sx_init(&sc->sc_cmd_sx, "CMDQ lock"); + /* set up bus space offsets */ + sc->sc_capa_off = 0; + sc->sc_oper_off = XREAD1(sc, capa, XHCI_CAPLENGTH); + sc->sc_runt_off = XREAD4(sc, capa, XHCI_RTSOFF) & ~0x1F; + sc->sc_door_off = XREAD4(sc, capa, XHCI_DBOFF) & ~0x3; + + DPRINTF("CAPLENGTH=0x%x\n", sc->sc_oper_off); + DPRINTF("RUNTIMEOFFSET=0x%x\n", sc->sc_runt_off); + DPRINTF("DOOROFFSET=0x%x\n", sc->sc_door_off); + + DPRINTF("xHCI version = 0x%04x\n", XREAD2(sc, capa, XHCI_HCIVERSION)); + + temp = XREAD4(sc, capa, XHCI_HCSPARAMS0); + + DPRINTF("HCS0 = 0x%08x\n", temp); + + /* set up context size */ + if (XHCI_HCS0_CSZ(temp)) { + sc->sc_ctx_is_64_byte = 1; + } else { + sc->sc_ctx_is_64_byte = 0; + } + + /* get DMA bits */ + sc->sc_bus.dma_bits = XHCI_HCS0_AC64(temp) ? 64 : 32; + + device_printf(self, "%d bytes context size, %d-bit DMA\n", + sc->sc_ctx_is_64_byte ? 64 : 32, (int)sc->sc_bus.dma_bits); /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, @@ -628,10 +634,14 @@ xhci_init(struct xhci_softc *sc, device_ return (ENOMEM); } - sc->sc_config_msg[0].hdr.pm_callback = &xhci_configure_msg; - sc->sc_config_msg[0].bus = &sc->sc_bus; - sc->sc_config_msg[1].hdr.pm_callback = &xhci_configure_msg; - sc->sc_config_msg[1].bus = &sc->sc_bus; + /* set up command queue mutex and condition varible */ + cv_init(&sc->sc_cmd_cv, "CMDQ"); + sx_init(&sc->sc_cmd_sx, "CMDQ lock"); + + sc->sc_config_msg[0].hdr.pm_callback = &xhci_configure_msg; + sc->sc_config_msg[0].bus = &sc->sc_bus; + sc->sc_config_msg[1].hdr.pm_callback = &xhci_configure_msg; + sc->sc_config_msg[1].bus = &sc->sc_bus; return (0); } @@ -1811,7 +1821,7 @@ restart: npkt_off += buf_res.length; } - /* setup npkt */ + /* set up npkt */ npkt = (len_old - npkt_off + temp->max_packet_size - 1) / temp->max_packet_size; @@ -1928,7 +1938,7 @@ restart: if (precompute) { precompute = 0; - /* setup alt next pointer, if any */ + /* set up alt next pointer, if any */ if (temp->last_frame) { td_alt_next = NULL; } else { @@ -2106,7 +2116,7 @@ xhci_setup_generic_chain(struct usb_xfer } if (x != xfer->nframes) { - /* setup page_cache pointer */ + /* set up page_cache pointer */ temp.pc = xfer->frbuffers + x; /* set endpoint direction */ temp.direction = UE_GET_DIR(xfer->endpointno); @@ -2697,7 +2707,7 @@ xhci_alloc_device_ext(struct usb_device goto error; } - /* initialise all endpoint LINK TRBs */ + /* initialize all endpoint LINK TRBs */ for (i = 0; i != XHCI_MAX_ENDPOINTS; i++) { @@ -3081,7 +3091,7 @@ xhci_device_generic_enter(struct usb_xfe { DPRINTF("\n"); - /* setup TD's and QH */ + /* set up TD's and QH */ xhci_setup_generic_chain(xfer); xhci_device_generic_multi_enter(xfer->endpoint, Modified: head/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- head/sys/dev/usb/controller/xhci_pci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/controller/xhci_pci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -181,26 +181,26 @@ xhci_pci_attach(device_t self) struct xhci_softc *sc = device_get_softc(self); int count, err, rid; - /* XXX check for 64-bit capability */ - - if (xhci_init(sc, self)) { - device_printf(self, "Could not initialize softc\n"); - goto error; - } - - pci_enable_busmaster(self); - rid = PCI_XHCI_CBMEM; sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (!sc->sc_io_res) { device_printf(self, "Could not map memory\n"); - goto error; + return (ENOMEM); } sc->sc_io_tag = rman_get_bustag(sc->sc_io_res); sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); sc->sc_io_size = rman_get_size(sc->sc_io_res); + if (xhci_init(sc, self)) { + device_printf(self, "Could not initialize softc\n"); + bus_release_resource(self, SYS_RES_MEMORY, PCI_XHCI_CBMEM, + sc->sc_io_res); + return (ENXIO); + } + + pci_enable_busmaster(self); + usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); rid = 0; @@ -299,10 +299,8 @@ xhci_pci_detach(device_t self) /* during module unload there are lots of children leftover */ device_delete_children(self); - if (sc->sc_io_res) { - usb_callout_drain(&sc->sc_callout); - xhci_halt_controller(sc); - } + usb_callout_drain(&sc->sc_callout); + xhci_halt_controller(sc); pci_disable_busmaster(self); Modified: head/sys/dev/usb/usb_bus.h ============================================================================== --- head/sys/dev/usb/usb_bus.h Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/usb_bus.h Mon Jan 5 20:22:18 2015 (r276717) @@ -115,6 +115,7 @@ struct usb_bus { uint8_t devices_max; /* maximum number of USB devices */ uint8_t do_probe; /* set if USB should be re-probed */ uint8_t no_explore; /* don't explore USB ports */ + uint8_t dma_bits; /* number of DMA address lines */ }; #endif /* _USB_BUS_H_ */ Modified: head/sys/dev/usb/usb_transfer.c ============================================================================== --- head/sys/dev/usb/usb_transfer.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/dev/usb/usb_transfer.c Mon Jan 5 20:22:18 2015 (r276717) @@ -960,7 +960,8 @@ usbd_transfer_setup(struct usb_device *u #if USB_HAVE_BUSDMA usb_dma_tag_setup(&info->dma_parent_tag, parm->dma_tag_p, udev->bus->dma_parent_tag[0].tag, - xfer_mtx, &usb_bdma_done_event, 32, parm->dma_tag_max); + xfer_mtx, &usb_bdma_done_event, udev->bus->dma_bits, + parm->dma_tag_max); #endif info->bus = udev->bus; Modified: head/sys/mips/atheros/ar71xx_ehci.c ============================================================================== --- head/sys/mips/atheros/ar71xx_ehci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/mips/atheros/ar71xx_ehci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -90,6 +90,7 @@ ar71xx_ehci_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/mips/atheros/ar71xx_ohci.c ============================================================================== --- head/sys/mips/atheros/ar71xx_ohci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/mips/atheros/ar71xx_ohci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -76,6 +76,7 @@ ar71xx_ohci_attach(device_t dev) sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_ohci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, Modified: head/sys/mips/cavium/usb/octusb_octeon.c ============================================================================== --- head/sys/mips/cavium/usb/octusb_octeon.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/mips/cavium/usb/octusb_octeon.c Mon Jan 5 20:22:18 2015 (r276717) @@ -103,6 +103,7 @@ octusb_octeon_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = OCTUSB_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: head/sys/mips/rmi/xls_ehci.c ============================================================================== --- head/sys/mips/rmi/xls_ehci.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/mips/rmi/xls_ehci.c Mon Jan 5 20:22:18 2015 (r276717) @@ -93,6 +93,7 @@ ehci_xls_attach(device_t self) sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, Modified: head/sys/mips/rt305x/rt305x_dotg.c ============================================================================== --- head/sys/mips/rt305x/rt305x_dotg.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/mips/rt305x/rt305x_dotg.c Mon Jan 5 20:22:18 2015 (r276717) @@ -92,6 +92,7 @@ dotg_obio_attach(device_t dev) sc->sc_dci.sc_bus.parent = dev; sc->sc_dci.sc_bus.devices = sc->sc_dci.sc_devices; sc->sc_dci.sc_bus.devices_max = DOTG_MAX_DEVICES; + sc->sc_dci.sc_bus.dma_bits = 32; /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_dci.sc_bus, Modified: head/sys/powerpc/ps3/ehci_ps3.c ============================================================================== --- head/sys/powerpc/ps3/ehci_ps3.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/powerpc/ps3/ehci_ps3.c Mon Jan 5 20:22:18 2015 (r276717) @@ -89,7 +89,9 @@ ehci_ps3_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = EHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), &ehci_iterate_hw_softc)) return (ENOMEM); Modified: head/sys/powerpc/ps3/ohci_ps3.c ============================================================================== --- head/sys/powerpc/ps3/ohci_ps3.c Mon Jan 5 19:54:40 2015 (r276716) +++ head/sys/powerpc/ps3/ohci_ps3.c Mon Jan 5 20:22:18 2015 (r276717) @@ -85,7 +85,9 @@ ohci_ps3_attach(device_t dev) sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; sc->sc_bus.devices_max = OHCI_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; + /* get all DMA memory */ if (usb_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) return (ENOMEM); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:38: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 EDE5669B; Mon, 5 Jan 2015 20:38: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 DA93B28D5; Mon, 5 Jan 2015 20:38: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 t05Kcmet028917; Mon, 5 Jan 2015 20:38:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05KcmGl028916; Mon, 5 Jan 2015 20:38:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501052038.t05KcmGl028916@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 5 Jan 2015 20:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276723 - head/bin/cat/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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 20:38:49 -0000 Author: ngie Date: Mon Jan 5 20:38:47 2015 New Revision: 276723 URL: https://svnweb.freebsd.org/changeset/base/276723 Log: Install d_align.{in,out} for the :align test X-MFC with: r276669 Pointyhat to: me Modified: head/bin/cat/tests/Makefile Modified: head/bin/cat/tests/Makefile ============================================================================== --- head/bin/cat/tests/Makefile Mon Jan 5 20:34:06 2015 (r276722) +++ head/bin/cat/tests/Makefile Mon Jan 5 20:38:47 2015 (r276723) @@ -8,6 +8,11 @@ TESTSDIR= ${TESTSBASE}/bin/cat NETBSD_ATF_TESTS_SH= cat_test +FILESDIR= ${TESTSDIR} + +FILES= d_align.in +FILES+= d_align.out + .include .include From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20: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 E4B95A7B; Mon, 5 Jan 2015 20:44: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 CFF392B69; Mon, 5 Jan 2015 20:44: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 t05Kilpg033462; Mon, 5 Jan 2015 20:44:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05KijiD033353; Mon, 5 Jan 2015 20:44:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501052044.t05KijiD033353@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 5 Jan 2015 20:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276724 - in head/sys: amd64/amd64 dev/acpica i386/i386 kern sys 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 20:44:48 -0000 Author: jhb Date: Mon Jan 5 20:44:44 2015 New Revision: 276724 URL: https://svnweb.freebsd.org/changeset/base/276724 Log: On some Intel CPUs with a P-state but not C-state invariant TSC the TSC may also halt in C2 and not just C3 (it seems that in some cases the BIOS advertises its C3 state as a C2 state in _CST). Just play it safe and disable both C2 and C3 states if a user forces the use of the TSC as the timecounter on such CPUs. PR: 192316 Differential Revision: https://reviews.freebsd.org/D1441 No objection from: jkim MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c head/sys/dev/acpica/acpi_cpu.c head/sys/i386/i386/machdep.c head/sys/kern/kern_clocksource.c head/sys/kern/kern_tc.c head/sys/sys/systm.h head/sys/sys/timetc.h head/sys/x86/x86/tsc.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Mon Jan 5 20:38:47 2015 (r276723) +++ head/sys/amd64/amd64/machdep.c Mon Jan 5 20:44:44 2015 (r276724) @@ -839,7 +839,7 @@ cpu_idle(int busy) } /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_deep_sleep) { + if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { msr = rdmsr(MSR_AMDK8_IPM); if (msr & AMDK8_CMPHALT) wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Mon Jan 5 20:38:47 2015 (r276723) +++ head/sys/dev/acpica/acpi_cpu.c Mon Jan 5 20:44:44 2015 (r276724) @@ -85,6 +85,7 @@ struct acpi_cpu_softc { int cpu_prev_sleep;/* Last idle sleep duration. */ int cpu_features; /* Child driver supported features. */ /* Runtime state. */ + int cpu_non_c2; /* Index of lowest non-C2 state. */ int cpu_non_c3; /* Index of lowest non-C3 state. */ u_int cpu_cx_stats[MAX_CX_STATES];/* Cx usage history. */ /* Values for sysctl. */ @@ -668,8 +669,10 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->type = ACPI_STATE_C1; cx_ptr->trans_lat = 0; cx_ptr++; + sc->cpu_non_c2 = sc->cpu_cx_count; sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; + cpu_deepest_sleep = 1; /* * The spec says P_BLK must be 6 bytes long. However, some systems @@ -695,6 +698,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr++; sc->cpu_non_c3 = sc->cpu_cx_count; sc->cpu_cx_count++; + cpu_deepest_sleep = 2; } } if (sc->cpu_p_blk_len < 6) @@ -711,7 +715,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cp cx_ptr->trans_lat = AcpiGbl_FADT.C3Latency; cx_ptr++; sc->cpu_cx_count++; - cpu_can_deep_sleep = 1; + cpu_deepest_sleep = 3; } } } @@ -757,6 +761,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s count = MAX_CX_STATES; } + sc->cpu_non_c2 = 0; sc->cpu_non_c3 = 0; sc->cpu_cx_count = 0; cx_ptr = sc->cpu_cx_states; @@ -768,6 +773,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s cx_ptr->type = ACPI_STATE_C0; cx_ptr++; sc->cpu_cx_count++; + cpu_deepest_sleep = 1; /* Set up all valid states. */ for (i = 0; i < count; i++) { @@ -788,6 +794,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s /* This is the first C1 state. Use the reserved slot. */ sc->cpu_cx_states[0] = *cx_ptr; } else { + sc->cpu_non_c2 = sc->cpu_cx_count; sc->cpu_non_c3 = sc->cpu_cx_count; cx_ptr++; sc->cpu_cx_count++; @@ -795,6 +802,8 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s continue; case ACPI_STATE_C2: sc->cpu_non_c3 = sc->cpu_cx_count; + if (cpu_deepest_sleep < 2) + cpu_deepest_sleep = 2; break; case ACPI_STATE_C3: default: @@ -804,7 +813,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *s device_get_unit(sc->cpu_dev), i)); continue; } else - cpu_can_deep_sleep = 1; + cpu_deepest_sleep = 3; break; } @@ -993,7 +1002,9 @@ acpi_cpu_idle(sbintime_t sbt) if (sbt >= 0 && us > (sbt >> 12)) us = (sbt >> 12); cx_next_idx = 0; - if (cpu_disable_deep_sleep) + if (cpu_disable_c2_sleep) + i = min(sc->cpu_cx_lowest, sc->cpu_non_c2); + else if (cpu_disable_c3_sleep) i = min(sc->cpu_cx_lowest, sc->cpu_non_c3); else i = sc->cpu_cx_lowest; Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Mon Jan 5 20:38:47 2015 (r276723) +++ head/sys/i386/i386/machdep.c Mon Jan 5 20:44:44 2015 (r276724) @@ -1480,7 +1480,7 @@ cpu_idle(int busy) #ifndef XEN /* Apply AMD APIC timer C1E workaround. */ - if (cpu_ident_amdc1e && cpu_disable_deep_sleep) { + if (cpu_ident_amdc1e && cpu_disable_c3_sleep) { msr = rdmsr(MSR_AMDK8_IPM); if (msr & AMDK8_CMPHALT) wrmsr(MSR_AMDK8_IPM, msr & ~AMDK8_CMPHALT); Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Mon Jan 5 20:38:47 2015 (r276723) +++ head/sys/kern/kern_clocksource.c Mon Jan 5 20:44:44 2015 (r276724) @@ -54,8 +54,9 @@ __FBSDID("$FreeBSD$"); #include #include -int cpu_can_deep_sleep = 0; /* C3 state is available. */ -int cpu_disable_deep_sleep = 0; /* Timer dies in C3. */ +int cpu_deepest_sleep = 0; /* Deepest Cx state available. */ +int cpu_disable_c2_sleep = 0; /* Timer dies in C2. */ +int cpu_disable_c3_sleep = 0; /* Timer dies in C3. */ static void setuptimer(void); static void loadtimer(sbintime_t now, int first); @@ -605,7 +606,7 @@ cpu_initclocks_bsp(void) else if (!periodic && (timer->et_flags & ET_FLAGS_ONESHOT) == 0) periodic = 1; if (timer->et_flags & ET_FLAGS_C3STOP) - cpu_disable_deep_sleep++; + cpu_disable_c3_sleep++; /* * We honor the requested 'hz' value. @@ -871,9 +872,9 @@ sysctl_kern_eventtimer_timer(SYSCTL_HAND configtimer(0); et_free(timer); if (et->et_flags & ET_FLAGS_C3STOP) - cpu_disable_deep_sleep++; + cpu_disable_c3_sleep++; if (timer->et_flags & ET_FLAGS_C3STOP) - cpu_disable_deep_sleep--; + cpu_disable_c3_sleep--; periodic = want_periodic; timer = et; et_init(timer, timercb, NULL, NULL); Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Mon Jan 5 20:38:47 2015 (r276723) +++ head/sys/kern/kern_tc.c Mon Jan 5 20:44:44 2015 (r276724) @@ -1330,10 +1330,10 @@ tc_windup(void) /* Now is a good time to change timecounters. */ if (th->th_counter != timecounter) { #ifndef __arm__ - if ((timecounter->tc_flags & TC_FLAGS_C3STOP) != 0) - cpu_disable_deep_sleep++; - if ((th->th_counter->tc_flags & TC_FLAGS_C3STOP) != 0) - cpu_disable_deep_sleep--; + if ((timecounter->tc_flags & TC_FLAGS_C2STOP) != 0) + cpu_disable_c2_sleep++; + if ((th->th_counter->tc_flags & TC_FLAGS_C2STOP) != 0) + cpu_disable_c2_sleep--; #endif th->th_counter = timecounter; th->th_offset_count = ncount; Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Mon Jan 5 20:38:47 2015 (r276723) +++ head/sys/sys/systm.h Mon Jan 5 20:44:44 2015 (r276724) @@ -296,8 +296,9 @@ sbintime_t cpu_idleclock(void); void cpu_activeclock(void); void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt); void cpu_et_frequency(struct eventtimer *et, uint64_t newfreq); -extern int cpu_can_deep_sleep; -extern int cpu_disable_deep_sleep; +extern int cpu_deepest_sleep; +extern int cpu_disable_c2_sleep; +extern int cpu_disable_c3_sleep; int cr_cansee(struct ucred *u1, struct ucred *u2); int cr_canseesocket(struct ucred *cred, struct socket *so); Modified: head/sys/sys/timetc.h ============================================================================== --- head/sys/sys/timetc.h Mon Jan 5 20:38:47 2015 (r276723) +++ head/sys/sys/timetc.h Mon Jan 5 20:44:44 2015 (r276724) @@ -58,7 +58,7 @@ struct timecounter { * means "only use at explicit request". */ u_int tc_flags; -#define TC_FLAGS_C3STOP 1 /* Timer dies in C3. */ +#define TC_FLAGS_C2STOP 1 /* Timer dies in C2+. */ #define TC_FLAGS_SUSPEND_SAFE 2 /* * Timer functional across * suspend/resume. Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Mon Jan 5 20:38:47 2015 (r276723) +++ head/sys/x86/x86/tsc.c Mon Jan 5 20:44:44 2015 (r276724) @@ -522,16 +522,16 @@ init_TSC_tc(void) } /* - * We cannot use the TSC if it stops incrementing in deep sleep. - * Currently only Intel CPUs are known for this problem unless - * the invariant TSC bit is set. + * We cannot use the TSC if it stops incrementing while idle. + * Intel CPUs without a C-state invariant TSC can stop the TSC + * in either C2 or C3. */ - if (cpu_can_deep_sleep && cpu_vendor_id == CPU_VENDOR_INTEL && + if (cpu_deepest_sleep >= 2 && cpu_vendor_id == CPU_VENDOR_INTEL && (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { tsc_timecounter.tc_quality = -1000; - tsc_timecounter.tc_flags |= TC_FLAGS_C3STOP; + tsc_timecounter.tc_flags |= TC_FLAGS_C2STOP; if (bootverbose) - printf("TSC timecounter disabled: C3 enabled.\n"); + printf("TSC timecounter disabled: C2/C3 may halt it.\n"); goto init; } From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:48: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 B24C8D9C; Mon, 5 Jan 2015 20:48:26 +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 8B2402BE8; Mon, 5 Jan 2015 20:48:26 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6C46FB913; Mon, 5 Jan 2015 15:48:25 -0500 (EST) Message-ID: <54AAF898.2000705@FreeBSD.org> Date: Mon, 05 Jan 2015 15:48:24 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r276724 - in head/sys: amd64/amd64 dev/acpica i386/i386 kern sys x86/x86 References: <201501052044.t05KijiD033353@svn.freebsd.org> In-Reply-To: <201501052044.t05KijiD033353@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 05 Jan 2015 15:48:25 -0500 (EST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 20:48:26 -0000 On 1/5/15 3:44 PM, John Baldwin wrote: > Author: jhb > Date: Mon Jan 5 20:44:44 2015 > New Revision: 276724 > URL: https://svnweb.freebsd.org/changeset/base/276724 > > Log: > On some Intel CPUs with a P-state but not C-state invariant TSC the TSC > may also halt in C2 and not just C3 (it seems that in some cases the BIOS > advertises its C3 state as a C2 state in _CST). Just play it safe and > disable both C2 and C3 states if a user forces the use of the TSC as the > timecounter on such CPUs. > > PR: 192316 > Differential Revision: https://reviews.freebsd.org/D1441 > No objection from: jkim > MFC after: 1 week Oops, forgot to credit the submitter who tested the patch (a few iterations in fact): Tested by: Jan Kokemüller -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 20:50: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 8DEE4EFD; Mon, 5 Jan 2015 20:50: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 7A2602C1D; Mon, 5 Jan 2015 20:50: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 t05Kojj1037208; Mon, 5 Jan 2015 20:50:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05KojV1037207; Mon, 5 Jan 2015 20:50:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501052050.t05KojV1037207@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 5 Jan 2015 20:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276725 - 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 20:50:45 -0000 Author: jhb Date: Mon Jan 5 20:50:44 2015 New Revision: 276725 URL: https://svnweb.freebsd.org/changeset/base/276725 Log: Trim trailing whitespace. Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Mon Jan 5 20:44:44 2015 (r276724) +++ head/sys/kern/subr_bus.c Mon Jan 5 20:50:44 2015 (r276725) @@ -1154,7 +1154,7 @@ devclass_add_driver(devclass_t dc, drive * well as busclass. Each layer will attempt to detach the driver * from any devices that are children of the bus's devclass. The function * will return an error if a device fails to detach. - * + * * We do a full search here of the devclass list at each iteration * level to save storing children-lists in the devclass structure. If * we ever move beyond a few dozen devices doing this, we may need to @@ -1370,7 +1370,7 @@ devclass_get_name(devclass_t dc) * * @param dc the devclass to search * @param unit the unit number to search for - * + * * @returns the device with the given unit number or @c * NULL if there is no such device */ @@ -1387,7 +1387,7 @@ devclass_get_device(devclass_t dc, int u * * @param dc the devclass to search * @param unit the unit number to search for - * + * * @returns the softc field of the device with the given * unit number or @c NULL if there is no such * device @@ -1825,14 +1825,14 @@ device_print_child(device_t dev, device_ * This creates a new device and adds it as a child of an existing * parent device. The new device will be added after the last existing * child with order zero. - * + * * @param dev the device which will be the parent of the * new child device * @param name devclass name for new device or @c NULL if not * specified * @param unit unit number for new device or @c -1 if not * specified - * + * * @returns the new device */ device_t @@ -1847,7 +1847,7 @@ device_add_child(device_t dev, const cha * This creates a new device and adds it as a child of an existing * parent device. The new device will be added after the last existing * child with the same order. - * + * * @param dev the device which will be the parent of the * new child device * @param order a value which is used to partially sort the @@ -1858,7 +1858,7 @@ device_add_child(device_t dev, const cha * specified * @param unit unit number for new device or @c -1 if not * specified - * + * * @returns the new device */ device_t @@ -1906,7 +1906,7 @@ device_add_child_ordered(device_t dev, u * This function deletes a device along with all of its children. If * the device currently has a driver attached to it, the device is * detached first using device_detach(). - * + * * @param dev the parent device * @param child the device to delete * @@ -1949,7 +1949,7 @@ device_delete_child(device_t dev, device * any, using the device_delete_child() function for each device it * finds. If a child device cannot be deleted, this function will * return an error code. - * + * * @param dev the parent device * * @retval 0 success @@ -2765,7 +2765,7 @@ device_probe(device_t dev) } return (-1); } - if ((error = device_probe_child(dev->parent, dev)) != 0) { + if ((error = device_probe_child(dev->parent, dev)) != 0) { if (bus_current_pass == BUS_PASS_DEFAULT && !(dev->flags & DF_DONENOMATCH)) { BUS_PROBE_NOMATCH(dev->parent, dev); @@ -3008,7 +3008,7 @@ resource_list_init(struct resource_list * This function frees the memory for all resource entries on the list * (if any). * - * @param rl the resource list to free + * @param rl the resource list to free */ void resource_list_free(struct resource_list *rl) @@ -3218,7 +3218,7 @@ resource_list_delete(struct resource_lis * @param flags any extra flags to control the resource * allocation - see @c RF_XXX flags in * for details - * + * * @returns the resource which was allocated or @c NULL if no * resource could be allocated */ @@ -3275,7 +3275,7 @@ resource_list_reserve(struct resource_li * @param flags any extra flags to control the resource * allocation - see @c RF_XXX flags in * for details - * + * * @returns the resource which was allocated or @c NULL if no * resource could be allocated */ @@ -3337,17 +3337,17 @@ resource_list_alloc(struct resource_list /** * @brief Helper function for implementing BUS_RELEASE_RESOURCE() - * + * * Implement BUS_RELEASE_RESOURCE() using a resource list. Normally * used with resource_list_alloc(). - * + * * @param rl the resource list which was allocated from * @param bus the parent device of @p child * @param child the device which is requesting a release * @param type the type of resource to release * @param rid the resource identifier * @param res the resource to release - * + * * @retval 0 success * @retval non-zero a standard unix error code indicating what * error condition prevented the operation @@ -3405,7 +3405,7 @@ resource_list_release(struct resource_li * @param bus the parent device of @p child * @param child the device whose active resources are being released * @param type the type of resources to release - * + * * @retval 0 success * @retval EBUSY at least one resource was active */ @@ -3447,7 +3447,7 @@ resource_list_release_active(struct reso * @param type the type of resource to release * @param rid the resource identifier * @param res the resource to release - * + * * @retval 0 success * @retval non-zero a standard unix error code indicating what * error condition prevented the operation @@ -3487,7 +3487,7 @@ resource_list_unreserve(struct resource_ * @param type type type of resource entry to print * @param format printf(9) format string to print resource * start and end values - * + * * @returns the number of characters printed */ int @@ -3522,7 +3522,7 @@ resource_list_print_type(struct resource * @brief Releases all the resources in a list. * * @param rl The resource list to purge. - * + * * @returns nothing */ void @@ -3798,7 +3798,7 @@ bus_generic_print_child(device_t dev, de /** * @brief Stub function for implementing BUS_READ_IVAR(). - * + * * @returns ENOENT */ int @@ -3810,7 +3810,7 @@ bus_generic_read_ivar(device_t dev, devi /** * @brief Stub function for implementing BUS_WRITE_IVAR(). - * + * * @returns ENOENT */ int @@ -3822,7 +3822,7 @@ bus_generic_write_ivar(device_t dev, dev /** * @brief Stub function for implementing BUS_GET_RESOURCE_LIST(). - * + * * @returns NULL */ struct resource_list * @@ -3889,7 +3889,7 @@ bus_generic_new_pass(device_t dev) */ int bus_generic_setup_intr(device_t dev, device_t child, struct resource *irq, - int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, + int flags, driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep) { /* Propagate up the bus hierarchy until someone handles it. */ @@ -4668,7 +4668,7 @@ DECLARE_MODULE(rootbus, root_bus_mod, SI * * This function begins the autoconfiguration process by calling * device_probe_and_attach() for each child of the @c root0 device. - */ + */ void root_bus_configure(void) { From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 21:36: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 A1632DB1; Mon, 5 Jan 2015 21:36:55 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 77BEF64438; Mon, 5 Jan 2015 21:36:55 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t05Lanwh023967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2015 13:36:49 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t05LanqF023966; Mon, 5 Jan 2015 13:36:49 -0800 (PST) (envelope-from jmg) Date: Mon, 5 Jan 2015 13:36:49 -0800 From: John-Mark Gurney To: Hans Petter Selasky Subject: Re: svn commit: r275732 - in head: etc/mtree share/man/man4 share/man/man7 share/man/man9 sys/conf sys/crypto/aesni sys/crypto/via sys/geom/eli sys/libkern sys/mips/rmi/dev/sec sys/modules/aesni sys/mo... Message-ID: <20150105213649.GJ1949@funkthat.com> References: <201412121956.sBCJucpj048475@svn.freebsd.org> <54A65C52.8090207@freebsd.org> <20150103083313.GB16816@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150103083313.GB16816@funkthat.com> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Mon, 05 Jan 2015 13:36:49 -0800 (PST) Cc: John-Mark Gurney , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 21:36:55 -0000 John-Mark Gurney wrote this message on Sat, Jan 03, 2015 at 00:33 -0800: > We really should look at turning of gcc's uninitialized var warning > now that it doesn't do a good job... We are now just poluting our code > base w/ bad initalizations that could turn into bugs in the future when > someone adds a new code path that doesn't initalize the variable and > gets the bogus initalization... As Ian has turned this off, I don't plan to fix this... Let me know if this is still an issue, and we can look at other methods of fixing this.. Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 21:37: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 7F1FFEFD; Mon, 5 Jan 2015 21:37:39 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 55C4064451; Mon, 5 Jan 2015 21:37:39 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t05LbdFC023994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2015 13:37:39 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t05LbdLG023993; Mon, 5 Jan 2015 13:37:39 -0800 (PST) (envelope-from jmg) Date: Mon, 5 Jan 2015 13:37:38 -0800 From: John-Mark Gurney To: Ian Lepore Subject: Re: svn commit: r276666 - head/sys/conf Message-ID: <20150105213737.GK1949@funkthat.com> References: <201501042008.t04K8P6A022616@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501042008.t04K8P6A022616@svn.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Mon, 05 Jan 2015 13:37:39 -0800 (PST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 21:37:39 -0000 Ian Lepore wrote this message on Sun, Jan 04, 2015 at 20:08 +0000: > Author: ian > Date: Sun Jan 4 20:08:24 2015 > New Revision: 276666 > URL: https://svnweb.freebsd.org/changeset/base/276666 > > Log: > Eliminate uninitialized variable warnings in kernel and module builds when > building with gcc 4.2 > > This has been requested several times over the past few months by several > people (including me), because gcc 4.2 just gets it wrong too often. It's > causing us to litter the code with lots of bogus initializers just to > squelch the warnings. We still have clang and coverity telling us about > uninitialized variables, and they do so more accurately. Thanks. Now we should go find all the places added the initalization for gcc, and remove them... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 21:39: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 75A4AF5; Mon, 5 Jan 2015 21:39: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 5652D64471; Mon, 5 Jan 2015 21:39: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 t05LdbFg058334; Mon, 5 Jan 2015 21:39:37 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05LdaFd058332; Mon, 5 Jan 2015 21:39:36 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501052139.t05LdaFd058332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 5 Jan 2015 21:39:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276726 - in head/sys: dev/ofw powerpc/pseries X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 05 Jan 2015 21:39:37 -0000 Author: nwhitehorn Date: Mon Jan 5 21:39:35 2015 New Revision: 276726 URL: https://svnweb.freebsd.org/changeset/base/276726 Log: Restore use of ofw_bus_intr_to_rl() in the pseries vdevice driver after fixing ofw_bus_intr_to_rl() to match the spec for unspecified interrupt-parent properties. Modified: head/sys/dev/ofw/ofw_bus_subr.c head/sys/powerpc/pseries/vdevice.c Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Mon Jan 5 20:50:44 2015 (r276725) +++ head/sys/dev/ofw/ofw_bus_subr.c Mon Jan 5 21:39:35 2015 (r276726) @@ -382,9 +382,17 @@ ofw_bus_intr_to_rl(device_t dev, phandle if (nintr > 0) { if (OF_searchencprop(node, "interrupt-parent", &iparent, sizeof(iparent)) == -1) { - device_printf(dev, "No interrupt-parent found, " - "assuming direct parent\n"); - iparent = OF_parent(node); + for (iparent = node; iparent != 0; + iparent = OF_parent(node)) { + if (OF_hasprop(iparent, "interrupt-controller")) + break; + } + if (iparent == 0) { + device_printf(dev, "No interrupt-parent found, " + "assuming direct parent\n"); + iparent = OF_parent(node); + } + iparent = OF_xref_from_node(iparent); } if (OF_searchencprop(OF_node_from_xref(iparent), "#interrupt-cells", &icells, sizeof(icells)) == -1) { @@ -430,3 +438,4 @@ ofw_bus_intr_to_rl(device_t dev, phandle free(intr, M_OFWPROP); return (err); } + Modified: head/sys/powerpc/pseries/vdevice.c ============================================================================== --- head/sys/powerpc/pseries/vdevice.c Mon Jan 5 20:50:44 2015 (r276725) +++ head/sys/powerpc/pseries/vdevice.c Mon Jan 5 21:39:35 2015 (r276726) @@ -128,12 +128,14 @@ vdevice_attach(device_t dev) { phandle_t root, child; device_t cdev; - int icells, i, nintr, *intr; - phandle_t iparent; struct vdevice_devinfo *dinfo; root = ofw_bus_get_node(dev); + /* The XICP (root PIC) will handle all our interrupts */ + powerpc_register_pic(root_pic, OF_xref_from_node(root), + 1 << 24 /* 24-bit XIRR field */, 1 /* Number of IPIs */, FALSE); + for (child = OF_child(root); child != 0; child = OF_peer(child)) { dinfo = malloc(sizeof(*dinfo), M_DEVBUF, M_WAITOK | M_ZERO); @@ -144,25 +146,7 @@ vdevice_attach(device_t dev) } resource_list_init(&dinfo->mdi_resources); - if (OF_searchprop(child, "#interrupt-cells", &icells, - sizeof(icells)) <= 0) - icells = 2; - if (OF_getprop(child, "interrupt-parent", &iparent, - sizeof(iparent)) <= 0) - iparent = -1; - nintr = OF_getprop_alloc(child, "interrupts", sizeof(*intr), - (void **)&intr); - if (nintr > 0) { - for (i = 0; i < nintr; i += icells) { - u_int irq = intr[i]; - if (iparent != -1) - irq = ofw_bus_map_intr(dev, iparent, - icells, &intr[i]); - - resource_list_add(&dinfo->mdi_resources, - SYS_RES_IRQ, i, irq, irq, i); - } - } + ofw_bus_intr_to_rl(dev, child, &dinfo->mdi_resources); cdev = device_add_child(dev, NULL, -1); if (cdev == NULL) { From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 23:07: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 D329F6D7; Mon, 5 Jan 2015 23:07: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 BF147640DA; Mon, 5 Jan 2015 23:07: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 t05N7N0h001100; Mon, 5 Jan 2015 23:07:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05N7Nfj001099; Mon, 5 Jan 2015 23:07:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501052307.t05N7Nfj001099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 5 Jan 2015 23:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276727 - 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 23:07:23 -0000 Author: markj Date: Mon Jan 5 23:07:22 2015 New Revision: 276727 URL: https://svnweb.freebsd.org/changeset/base/276727 Log: Use crcopysafe(9) to make a copy of a process' credential struct. crcopy(9) may perform a blocking memory allocation, which is unsafe when holding a mutex. Differential Revision: https://reviews.freebsd.org/D1443 Reviewed by: rwatson MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/sys_capability.c Modified: head/sys/kern/sys_capability.c ============================================================================== --- head/sys/kern/sys_capability.c Mon Jan 5 21:39:35 2015 (r276726) +++ head/sys/kern/sys_capability.c Mon Jan 5 23:07:22 2015 (r276727) @@ -102,8 +102,7 @@ sys_cap_enter(struct thread *td, struct newcred = crget(); p = td->td_proc; PROC_LOCK(p); - oldcred = p->p_ucred; - crcopy(newcred, oldcred); + oldcred = crcopysafe(p, newcred); newcred->cr_flags |= CRED_FLAG_CAPMODE; p->p_ucred = newcred; PROC_UNLOCK(p); From owner-svn-src-head@FreeBSD.ORG Mon Jan 5 23:43: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 B24B0175; Mon, 5 Jan 2015 23:43: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 9E91E646C5; Mon, 5 Jan 2015 23:43: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 t05NhPkt019608; Mon, 5 Jan 2015 23:43:25 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t05NhPFC019607; Mon, 5 Jan 2015 23:43:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501052343.t05NhPFC019607@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 5 Jan 2015 23:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276728 - 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.18-1 Precedence: list List-Id: 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, 05 Jan 2015 23:43:25 -0000 Author: np Date: Mon Jan 5 23:43:24 2015 New Revision: 276728 URL: https://svnweb.freebsd.org/changeset/base/276728 Log: cxgbe(4): fix the description of a strange bunch of counters. MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Jan 5 23:07:22 2015 (r276727) +++ head/sys/dev/cxgbe/t4_main.c Mon Jan 5 23:43:24 2015 (r276728) @@ -4699,7 +4699,7 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "ddp_stats", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, - sysctl_ddp_stats, "A", "DDP statistics"); + sysctl_ddp_stats, "A", "non-TCP DDP statistics"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "devlog", CTLTYPE_STRING | CTLFLAG_RD, sc, 0, From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 01:30: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 58060DB7; Tue, 6 Jan 2015 01:30: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 39D35644B5; Tue, 6 Jan 2015 01:30: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 t061UYDw070477; Tue, 6 Jan 2015 01:30:34 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t061UXCS070442; Tue, 6 Jan 2015 01:30:33 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501060130.t061UXCS070442@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 6 Jan 2015 01:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276729 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 01:30:34 -0000 Author: np Date: Tue Jan 6 01:30:32 2015 New Revision: 276729 URL: https://svnweb.freebsd.org/changeset/base/276729 Log: cxgbe/tom: use vmem(9) as the DDP page pod allocator. MFC after: 1 month Modified: head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Mon Jan 5 23:43:24 2015 (r276728) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Tue Jan 6 01:30:32 2015 (r276729) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #define PPOD_SZ(n) ((n) * sizeof(struct pagepod)) #define PPOD_SIZE (PPOD_SZ(1)) -/* XXX: must match A_ULP_RX_TDDP_PSZ */ +/* XXX: must match A_ULP_RX_TDDP_PSZ */ static int t4_ddp_pgsz[] = {4096, 4096 << 2, 4096 << 4, 4096 << 6}; #if 0 @@ -98,74 +98,24 @@ t4_dump_tcb(struct adapter *sc, int tid) #define MAX_DDP_BUFFER_SIZE (M_TCB_RX_DDP_BUF0_LEN) static int -alloc_ppods(struct tom_data *td, int n, struct ppod_region *pr) +alloc_ppods(struct tom_data *td, int n) { - int ppod; + vmem_addr_t ppod; - KASSERT(n > 0, ("%s: nonsense allocation (%d)", __func__, n)); + MPASS(n > 0); - mtx_lock(&td->ppod_lock); - if (n > td->nppods_free) { - mtx_unlock(&td->ppod_lock); + if (vmem_alloc(td->ppod_arena, n, M_NOWAIT | M_FIRSTFIT, &ppod) != 0) return (-1); - } - - if (td->nppods_free_head >= n) { - td->nppods_free_head -= n; - ppod = td->nppods_free_head; - TAILQ_INSERT_HEAD(&td->ppods, pr, link); - } else { - struct ppod_region *p; - - ppod = td->nppods_free_head; - TAILQ_FOREACH(p, &td->ppods, link) { - ppod += p->used + p->free; - if (n <= p->free) { - ppod -= n; - p->free -= n; - TAILQ_INSERT_AFTER(&td->ppods, p, pr, link); - goto allocated; - } - } - - if (__predict_false(ppod != td->nppods)) { - panic("%s: ppods TAILQ (%p) corrupt." - " At %d instead of %d at the end of the queue.", - __func__, &td->ppods, ppod, td->nppods); - } - - mtx_unlock(&td->ppod_lock); - return (-1); - } - -allocated: - pr->used = n; - pr->free = 0; - td->nppods_free -= n; - mtx_unlock(&td->ppod_lock); - - return (ppod); + return ((int)ppod); } static void -free_ppods(struct tom_data *td, struct ppod_region *pr) +free_ppods(struct tom_data *td, int ppod, int n) { - struct ppod_region *p; - KASSERT(pr->used > 0, ("%s: nonsense free (%d)", __func__, pr->used)); + MPASS(n > 0); - mtx_lock(&td->ppod_lock); - p = TAILQ_PREV(pr, ppod_head, link); - if (p != NULL) - p->free += pr->used + pr->free; - else - td->nppods_free_head += pr->used + pr->free; - td->nppods_free += pr->used; - KASSERT(td->nppods_free <= td->nppods, - ("%s: nppods_free (%d) > nppods (%d). %d freed this time.", - __func__, td->nppods_free, td->nppods, pr->used)); - TAILQ_REMOVE(&td->ppods, pr, link); - mtx_unlock(&td->ppod_lock); + vmem_free(td->ppod_arena, ppod, n); } static inline int @@ -187,7 +137,7 @@ free_ddp_buffer(struct tom_data *td, str free(db->pages, M_CXGBE); if (db->nppods > 0) - free_ppods(td, &db->ppod_region); + free_ppods(td, G_PPOD_TAG(db->tag), db->nppods); free(db, M_CXGBE); } @@ -710,7 +660,7 @@ have_pgsz: } nppods = pages_to_nppods(npages, t4_ddp_pgsz[idx]); - ppod = alloc_ppods(td, nppods, &db->ppod_region); + ppod = alloc_ppods(td, nppods); if (ppod < 0) { free(db, M_CXGBE); CTR4(KTR_CXGBE, "%s: no pods, nppods %d, resid %d, pgsz %d", @@ -989,11 +939,8 @@ t4_init_ddp(struct adapter *sc, struct t { int nppods = sc->vres.ddp.size / PPOD_SIZE; - td->nppods = nppods; - td->nppods_free = nppods; - td->nppods_free_head = nppods; - TAILQ_INIT(&td->ppods); - mtx_init(&td->ppod_lock, "page pods", NULL, MTX_DEF); + td->ppod_arena = vmem_create("DDP page pods", 0, nppods, 1, 32, + M_FIRSTFIT | M_NOWAIT); t4_register_cpl_handler(sc, CPL_RX_DATA_DDP, do_rx_data_ddp); t4_register_cpl_handler(sc, CPL_RX_DDP_COMPLETE, do_rx_ddp_complete); @@ -1003,12 +950,10 @@ void t4_uninit_ddp(struct adapter *sc __unused, struct tom_data *td) { - KASSERT(td->nppods == td->nppods_free, - ("%s: page pods still in use, nppods = %d, free = %d", - __func__, td->nppods, td->nppods_free)); - - if (mtx_initialized(&td->ppod_lock)) - mtx_destroy(&td->ppod_lock); + if (td->ppod_arena != NULL) { + vmem_destroy(td->ppod_arena); + td->ppod_arena = NULL; + } } #define VNET_SO_ASSERT(so) \ Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Mon Jan 5 23:43:24 2015 (r276728) +++ head/sys/dev/cxgbe/tom/t4_tom.h Tue Jan 6 01:30:32 2015 (r276729) @@ -30,6 +30,7 @@ #ifndef __T4_TOM_H__ #define __T4_TOM_H__ +#include #define LISTEN_HASH_SIZE 32 @@ -80,18 +81,11 @@ struct ofld_tx_sdesc { uint8_t tx_credits; /* firmware tx credits (unit is 16B) */ }; -struct ppod_region { - TAILQ_ENTRY(ppod_region) link; - int used; /* # of pods used by this region */ - int free; /* # of contiguous pods free right after this region */ -}; - struct ddp_buffer { uint32_t tag; /* includes color, page pod addr, and DDP page size */ int nppods; int offset; int len; - struct ppod_region ppod_region; int npages; vm_page_t *pages; }; @@ -179,8 +173,6 @@ struct listen_ctx { TAILQ_HEAD(, synq_entry) synq; }; -TAILQ_HEAD(ppod_head, ppod_region); - struct clip_entry { TAILQ_ENTRY(clip_entry) link; struct in6_addr lip; /* local IPv6 address */ @@ -200,11 +192,7 @@ struct tom_data { u_long listen_mask; int lctx_count; /* # of lctx in the hash table */ - struct mtx ppod_lock; - int nppods; - int nppods_free; /* # of available ppods */ - int nppods_free_head; /* # of available ppods at the begining */ - struct ppod_head ppods; + vmem_t *ppod_arena; struct mtx clip_table_lock; struct clip_head clip_table; From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 02:08: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 57C39557; Tue, 6 Jan 2015 02:08: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 4231864AEB; Tue, 6 Jan 2015 02:08: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 t0628lip086967; Tue, 6 Jan 2015 02:08:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0628kkh086961; Tue, 6 Jan 2015 02:08:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501060208.t0628kkh086961@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 6 Jan 2015 02:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276730 - in head/sys: conf modules/wlan net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 02:08:47 -0000 Author: adrian Date: Tue Jan 6 02:08:45 2015 New Revision: 276730 URL: https://svnweb.freebsd.org/changeset/base/276730 Log: Refactor and split out the net80211 software scan engine from the rest of the scan API. The eventual aim is to have 'ieee80211_scan.c' have the net80211 and driver facing scan API to start, finish and continue doing scanning while 'ieee80211_swscan.c' implements the software scanner that runs the scan task, handles probe request/reply bits, configures the VAP off-channel, changes channel and does the scanning bits. For NICs that do no scanning at all, the existing code is needed. ath(4) and most of the other NICs (dumb USB ones in particular) do little to no scan offload - it's all done in software. Some NICs may do single channel at a time scanning; I haven't really checked them out in detail. iwn(4), the upcoming 7260 driver stuff, the new Qualcomm Atheros 11ac chipsets and the Atheros mobile/USB full-offload chips all have complete scan engines in firmware. We don't have to drive any of it at all - the firmware just needs to be told what to scan, when to scan, how long to scan. It'll take care of going off channel, pausing TX/RX appropriately, sending sleep notification to the AP, sending probe requests and handling probe responses. It'll do passive/active scan itself. It's almost completely transparent to the network stack - all we see are scan notifications when it finishes scanning each channel and beacons/probe responses when it does its thing. Once it's done we get a final notification that the scan is complete, with some scan results in the message. The iwn(4) NICs handle doing active scanning too as an option and will handle waiting appropriately on 5GHz passive channels before active scanning. There's some more refactoring, tidying up and lock assertions to sprinkle around to tidy this whole thing up before I turn swscan.c into another set of ic methods to override by the driver or alternate scan module. So in theory this is all one big no-op commit. In theory. Tested: * iwn(4) 5200, STA mode * ath(4) 6205, STA mode * ath(4) - various NICs, AP mode Added: head/sys/net80211/ieee80211_scan_sw.c - copied, changed from r276517, head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_scan_sw.h (contents, props changed) Modified: head/sys/conf/files head/sys/modules/wlan/Makefile head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_scan.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 6 01:30:32 2015 (r276729) +++ head/sys/conf/files Tue Jan 6 02:08:45 2015 (r276730) @@ -3316,6 +3316,7 @@ net80211/ieee80211_scan_sta.c optional w net80211/ieee80211_sta.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_superg.c optional wlan ieee80211_support_superg +net80211/ieee80211_swscan.c optional wlan net80211/ieee80211_tdma.c optional wlan ieee80211_support_tdma net80211/ieee80211_wds.c optional wlan net80211/ieee80211_xauth.c optional wlan wlan_xauth Modified: head/sys/modules/wlan/Makefile ============================================================================== --- head/sys/modules/wlan/Makefile Tue Jan 6 01:30:32 2015 (r276729) +++ head/sys/modules/wlan/Makefile Tue Jan 6 02:08:45 2015 (r276730) @@ -7,7 +7,7 @@ SRCS= ieee80211.c ieee80211_action.c iee ieee80211_crypto.c ieee80211_crypto_none.c ieee80211_dfs.c \ ieee80211_freebsd.c ieee80211_input.c ieee80211_ioctl.c \ ieee80211_mesh.c ieee80211_node.c ieee80211_output.c ieee80211_phy.c \ - ieee80211_power.c ieee80211_proto.c ieee80211_scan.c \ + ieee80211_power.c ieee80211_proto.c ieee80211_scan.c ieee80211_scan_sw.c \ ieee80211_scan_sta.c ieee80211_radiotap.c ieee80211_ratectl.c \ ieee80211_ratectl_none.c ieee80211_regdomain.c \ ieee80211_ht.c ieee80211_hwmp.c ieee80211_adhoc.c ieee80211_hostap.c \ Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Tue Jan 6 01:30:32 2015 (r276729) +++ head/sys/net80211/ieee80211_scan.c Tue Jan 6 02:08:45 2015 (r276730) @@ -46,35 +46,10 @@ __FBSDID("$FreeBSD$"); #include -#include - -struct scan_state { - struct ieee80211_scan_state base; /* public state */ - - u_int ss_iflags; /* flags used internally */ -#define ISCAN_MINDWELL 0x0001 /* min dwell time reached */ -#define ISCAN_DISCARD 0x0002 /* discard rx'd frames */ -#define ISCAN_CANCEL 0x0004 /* cancel current scan */ -#define ISCAN_ABORT 0x0008 /* end the scan immediately */ - unsigned long ss_chanmindwell; /* min dwell on curchan */ - unsigned long ss_scanend; /* time scan must stop */ - u_int ss_duration; /* duration for next scan */ - struct task ss_scan_task; /* scan execution */ - struct cv ss_scan_cv; /* scan signal */ - struct callout ss_scan_timer; /* scan timer */ -}; -#define SCAN_PRIVATE(ss) ((struct scan_state *) ss) +/* XXX until it's implemented as attach ops */ +#include -/* - * Amount of time to go off-channel during a background - * scan. This value should be large enough to catch most - * ap's but short enough that we can return on-channel - * before our listen interval expires. - * - * XXX tunable - * XXX check against configured listen interval - */ -#define IEEE80211_SCAN_OFFCHANNEL msecs_to_ticks(150) +#include /* * Roaming-related defaults. RSSI thresholds are as returned by the @@ -93,55 +68,32 @@ struct scan_state { #define ROAM_RATE_QUARTER_DEFAULT 2*3 /* quarter-width 11a/g bss */ #define ROAM_MCS_11N_DEFAULT (1 | IEEE80211_RATE_MCS) /* 11n bss */ -static void scan_curchan(struct ieee80211_scan_state *, unsigned long); -static void scan_mindwell(struct ieee80211_scan_state *); -static void scan_signal(void *); -static void scan_task(void *, int); - -MALLOC_DEFINE(M_80211_SCAN, "80211scan", "802.11 scan state"); - void ieee80211_scan_attach(struct ieee80211com *ic) { - struct scan_state *ss; - - ss = (struct scan_state *) malloc(sizeof(struct scan_state), - M_80211_SCAN, M_NOWAIT | M_ZERO); - if (ss == NULL) { - ic->ic_scan = NULL; - return; - } - callout_init_mtx(&ss->ss_scan_timer, IEEE80211_LOCK_OBJ(ic), 0); - cv_init(&ss->ss_scan_cv, "scan"); - TASK_INIT(&ss->ss_scan_task, 0, scan_task, ss); - ic->ic_scan = &ss->base; - ss->base.ss_ic = ic; - ic->ic_scan_curchan = scan_curchan; - ic->ic_scan_mindwell = scan_mindwell; + /* + * For now, the swscan module does both the + * allocation (so it can pad it) and sets up the net80211 + * bits. + * + * I'll split this stuff later. + */ + ieee80211_swscan_attach(ic); } void ieee80211_scan_detach(struct ieee80211com *ic) { - struct ieee80211_scan_state *ss = ic->ic_scan; - if (ss != NULL) { - IEEE80211_LOCK(ic); - SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_ABORT; - scan_signal(ss); - IEEE80211_UNLOCK(ic); - ieee80211_draintask(ic, &SCAN_PRIVATE(ss)->ss_scan_task); - callout_drain(&SCAN_PRIVATE(ss)->ss_scan_timer); - KASSERT((ic->ic_flags & IEEE80211_F_SCAN) == 0, - ("scan still running")); - if (ss->ss_ops != NULL) { - ss->ss_ops->scan_detach(ss); - ss->ss_ops = NULL; - } - ic->ic_scan = NULL; - free(SCAN_PRIVATE(ss), M_80211_SCAN); - } + /* + * Ideally we'd do the ss_ops detach call here; + * but then ieee80211_swscan_detach would need + * to be split in two. + * + * I'll do that later. + */ + ieee80211_swscan_detach(ic); } static const struct ieee80211_roamparam defroam[IEEE80211_MODE_MAX] = { @@ -176,6 +128,8 @@ ieee80211_scan_vattach(struct ieee80211v vap->iv_roaming = IEEE80211_ROAMING_AUTO; memcpy(vap->iv_roamparms, defroam, sizeof(defroam)); + + ieee80211_swscan_vattach(vap); } void @@ -186,11 +140,10 @@ ieee80211_scan_vdetach(struct ieee80211v IEEE80211_LOCK(ic); ss = ic->ic_scan; + + ieee80211_swscan_vdetach(vap); + if (ss != NULL && ss->ss_vap == vap) { - if (ic->ic_flags & IEEE80211_F_SCAN) { - SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_ABORT; - scan_signal(ss); - } if (ss->ss_ops != NULL) { ss->ss_ops->scan_detach(ss); ss->ss_ops = NULL; @@ -261,8 +214,8 @@ ieee80211_scanner_unregister_all(const s * ensure later callbacks find ss_ops set to properly * reflect current operating mode. */ -static void -scan_update_locked(struct ieee80211vap *vap, +void +ieee80211_scan_update_locked(struct ieee80211vap *vap, const struct ieee80211_scanner *scan) { struct ieee80211com *ic = vap->iv_ic; @@ -307,6 +260,9 @@ scan_update_locked(struct ieee80211vap * } } +/* + * XXX TODO: should be a global method! + */ static char channel_type(const struct ieee80211_channel *c) { @@ -345,8 +301,8 @@ ieee80211_scan_dump_channels(const struc } #ifdef IEEE80211_DEBUG -static void -scan_dump(struct ieee80211_scan_state *ss) +void +ieee80211_scan_dump(struct ieee80211_scan_state *ss) { struct ieee80211vap *vap = ss->ss_vap; @@ -357,8 +313,8 @@ scan_dump(struct ieee80211_scan_state *s } #endif /* IEEE80211_DEBUG */ -static void -copy_ssid(struct ieee80211vap *vap, struct ieee80211_scan_state *ss, +void +ieee80211_scan_copy_ssid(struct ieee80211vap *vap, struct ieee80211_scan_state *ss, int nssid, const struct ieee80211_scan_ssid ssids[]) { if (nssid > IEEE80211_SCAN_MAX_SSID) { @@ -375,8 +331,8 @@ copy_ssid(struct ieee80211vap *vap, stru /* * Start a scan unless one is already going. */ -static int -start_scan_locked(const struct ieee80211_scanner *scan, +int +ieee80211_start_scan_locked(const struct ieee80211_scanner *scan, struct ieee80211vap *vap, int flags, u_int duration, u_int mindwell, u_int maxdwell, u_int nssid, const struct ieee80211_scan_ssid ssids[]) @@ -404,10 +360,10 @@ start_scan_locked(const struct ieee80211 , flags & IEEE80211_SCAN_ONCE ? ", once" : "" ); - scan_update_locked(vap, scan); + ieee80211_scan_update_locked(vap, scan); if (ss->ss_ops != NULL) { if ((flags & IEEE80211_SCAN_NOSSID) == 0) - copy_ssid(vap, ss, nssid, ssids); + ieee80211_scan_copy_ssid(vap, ss, nssid, ssids); /* NB: top 4 bits for internal use */ ss->ss_flags = flags & 0xfff; @@ -420,9 +376,9 @@ start_scan_locked(const struct ieee80211 if (flags & IEEE80211_SCAN_BGSCAN) ic->ic_flags_ext |= IEEE80211_FEXT_BGSCAN; - /* NB: flush frames rx'd before 1st channel change */ - SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD; - SCAN_PRIVATE(ss)->ss_duration = duration; + /* Set duration for this particular scan */ + ieee80211_swscan_set_scan_duration(vap, duration); + ss->ss_next = 0; ss->ss_mindwell = mindwell; ss->ss_maxdwell = maxdwell; @@ -430,10 +386,12 @@ start_scan_locked(const struct ieee80211 ss->ss_ops->scan_start(ss, vap); #ifdef IEEE80211_DEBUG if (ieee80211_msg_scan(vap)) - scan_dump(ss); + ieee80211_scan_dump(ss); #endif /* IEEE80211_DEBUG */ ic->ic_flags |= IEEE80211_F_SCAN; - ieee80211_runtask(ic, &SCAN_PRIVATE(ss)->ss_scan_task); + + /* Start scan task */ + ieee80211_swscan_run_scan_task(vap); } return 1; } else { @@ -452,9 +410,7 @@ ieee80211_start_scan(struct ieee80211vap u_int duration, u_int mindwell, u_int maxdwell, u_int nssid, const struct ieee80211_scan_ssid ssids[]) { - struct ieee80211com *ic = vap->iv_ic; const struct ieee80211_scanner *scan; - int result; scan = ieee80211_scanner_get(vap->iv_opmode); if (scan == NULL) { @@ -465,12 +421,9 @@ ieee80211_start_scan(struct ieee80211vap return 0; } - IEEE80211_LOCK(ic); - result = start_scan_locked(scan, vap, flags, duration, + /* XXX ops */ + return ieee80211_swscan_start_scan(scan, vap, flags, duration, mindwell, maxdwell, nssid, ssids); - IEEE80211_UNLOCK(ic); - - return result; } /* @@ -517,49 +470,19 @@ ieee80211_check_scan(struct ieee80211vap /* XXX re-use cache contents? e.g. adhoc<->sta */ flags |= IEEE80211_SCAN_FLUSH; } - scan_update_locked(vap, scan); - if (ss->ss_ops != NULL) { - /* XXX verify ss_ops matches vap->iv_opmode */ - if ((flags & IEEE80211_SCAN_NOSSID) == 0) { - /* - * Update the ssid list and mark flags so if - * we call start_scan it doesn't duplicate work. - */ - copy_ssid(vap, ss, nssid, ssids); - flags |= IEEE80211_SCAN_NOSSID; - } - if ((ic->ic_flags & IEEE80211_F_SCAN) == 0 && - (flags & IEEE80211_SCAN_FLUSH) == 0 && - time_before(ticks, ic->ic_lastscan + vap->iv_scanvalid)) { - /* - * We're not currently scanning and the cache is - * deemed hot enough to consult. Lock out others - * by marking IEEE80211_F_SCAN while we decide if - * something is already in the scan cache we can - * use. Also discard any frames that might come - * in while temporarily marked as scanning. - */ - SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD; - ic->ic_flags |= IEEE80211_F_SCAN; - /* NB: need to use supplied flags in check */ - ss->ss_flags = flags & 0xff; - result = ss->ss_ops->scan_end(ss, vap); - - ic->ic_flags &= ~IEEE80211_F_SCAN; - SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_DISCARD; - if (result) { - ieee80211_notify_scan_done(vap); - IEEE80211_UNLOCK(ic); - return 1; - } - } - } - result = start_scan_locked(scan, vap, flags, duration, + /* + * XXX TODO: separate things out a bit better. + * XXX TODO: ops + */ + ieee80211_scan_update_locked(vap, scan); + + result = ieee80211_swscan_check_scan(scan, vap, flags, duration, mindwell, maxdwell, nssid, ssids); + IEEE80211_UNLOCK(ic); - return result; + return (result); } /* @@ -582,10 +505,10 @@ ieee80211_check_scan_current(struct ieee int ieee80211_bg_scan(struct ieee80211vap *vap, int flags) { - struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_scan_state *ss = ic->ic_scan; const struct ieee80211_scanner *scan; + // IEEE80211_UNLOCK_ASSERT(sc); + scan = ieee80211_scanner_get(vap->iv_opmode); if (scan == NULL) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, @@ -595,84 +518,14 @@ ieee80211_bg_scan(struct ieee80211vap *v return 0; } - IEEE80211_LOCK(ic); - if ((ic->ic_flags & IEEE80211_F_SCAN) == 0) { - u_int duration; - /* - * Go off-channel for a fixed interval that is large - * enough to catch most ap's but short enough that - * we can return on-channel before our listen interval - * expires. - */ - duration = IEEE80211_SCAN_OFFCHANNEL; - - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: %s scan, ticks %u duration %lu\n", __func__, - ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive", - ticks, duration); - - scan_update_locked(vap, scan); - if (ss->ss_ops != NULL) { - ss->ss_vap = vap; - /* - * A background scan does not select a new sta; it - * just refreshes the scan cache. Also, indicate - * the scan logic should follow the beacon schedule: - * we go off-channel and scan for a while, then - * return to the bss channel to receive a beacon, - * then go off-channel again. All during this time - * we notify the ap we're in power save mode. When - * the scan is complete we leave power save mode. - * If any beacon indicates there are frames pending - * for us then we drop out of power save mode - * (and background scan) automatically by way of the - * usual sta power save logic. - */ - ss->ss_flags |= IEEE80211_SCAN_NOPICK - | IEEE80211_SCAN_BGSCAN - | flags - ; - /* if previous scan completed, restart */ - if (ss->ss_next >= ss->ss_last) { - if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) - vap->iv_stats.is_scan_active++; - else - vap->iv_stats.is_scan_passive++; - /* - * NB: beware of the scan cache being flushed; - * if the channel list is empty use the - * scan_start method to populate it. - */ - ss->ss_next = 0; - if (ss->ss_last != 0) - ss->ss_ops->scan_restart(ss, vap); - else { - ss->ss_ops->scan_start(ss, vap); -#ifdef IEEE80211_DEBUG - if (ieee80211_msg_scan(vap)) - scan_dump(ss); -#endif /* IEEE80211_DEBUG */ - } - } - /* NB: flush frames rx'd before 1st channel change */ - SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD; - SCAN_PRIVATE(ss)->ss_duration = duration; - ss->ss_maxdwell = duration; - ic->ic_flags |= IEEE80211_F_SCAN; - ic->ic_flags_ext |= IEEE80211_FEXT_BGSCAN; - ieee80211_runtask(ic, &SCAN_PRIVATE(ss)->ss_scan_task); - } else { - /* XXX msg+stat */ - } - } else { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: %s scan already in progress\n", __func__, - ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive"); - } - IEEE80211_UNLOCK(ic); - - /* NB: racey, does it matter? */ - return (ic->ic_flags & IEEE80211_F_SCAN); + /* + * XXX TODO: pull apart the bgscan logic into whatever + * belongs here and whatever belongs in the software + * scanner. + * + * XXX TODO: ops + */ + return (ieee80211_swscan_bg_scan(scan, vap, flags)); } /* @@ -681,32 +534,9 @@ ieee80211_bg_scan(struct ieee80211vap *v void ieee80211_cancel_scan(struct ieee80211vap *vap) { - struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_scan_state *ss = ic->ic_scan; - IEEE80211_LOCK(ic); - if ((ic->ic_flags & IEEE80211_F_SCAN) && - ss->ss_vap == vap && - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) == 0) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: cancel %s scan\n", __func__, - ss->ss_flags & IEEE80211_SCAN_ACTIVE ? - "active" : "passive"); - - /* clear bg scan NOPICK and mark cancel request */ - ss->ss_flags &= ~IEEE80211_SCAN_NOPICK; - SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_CANCEL; - /* wake up the scan task */ - scan_signal(ss); - } else { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: called; F_SCAN=%d, vap=%s, CANCEL=%d\n", - __func__, - !! (ic->ic_flags & IEEE80211_F_SCAN), - (ss->ss_vap == vap ? "match" : "nomatch"), - !! (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL)); - } - IEEE80211_UNLOCK(ic); + /* XXX TODO: ops */ + ieee80211_swscan_cancel_scan(vap); } /* @@ -715,31 +545,9 @@ ieee80211_cancel_scan(struct ieee80211va void ieee80211_cancel_anyscan(struct ieee80211vap *vap) { - struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_scan_state *ss = ic->ic_scan; - IEEE80211_LOCK(ic); - if ((ic->ic_flags & IEEE80211_F_SCAN) && - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) == 0) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: cancel %s scan\n", __func__, - ss->ss_flags & IEEE80211_SCAN_ACTIVE ? - "active" : "passive"); - - /* clear bg scan NOPICK and mark cancel request */ - ss->ss_flags &= ~IEEE80211_SCAN_NOPICK; - SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_CANCEL; - /* wake up the scan task */ - scan_signal(ss); - } else { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: called; F_SCAN=%d, vap=%s, CANCEL=%d\n", - __func__, - !! (ic->ic_flags & IEEE80211_F_SCAN), - (ss->ss_vap == vap ? "match" : "nomatch"), - !! (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL)); - } - IEEE80211_UNLOCK(ic); + /* XXX TODO: ops */ + ieee80211_swscan_cancel_anyscan(vap); } /* @@ -749,15 +557,9 @@ ieee80211_cancel_anyscan(struct ieee8021 void ieee80211_scan_next(struct ieee80211vap *vap) { - struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_scan_state *ss = ic->ic_scan; - - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: called\n", __func__); - /* wake up the scan task */ - IEEE80211_LOCK(ic); - scan_signal(ss); - IEEE80211_UNLOCK(ic); + /* XXX TODO: ops */ + ieee80211_swscan_scan_next(vap); } /* @@ -775,7 +577,10 @@ ieee80211_scan_done(struct ieee80211vap IEEE80211_LOCK(ic); ss = ic->ic_scan; ss->ss_next = ss->ss_last; /* all channels are complete */ - scan_signal(ss); + + /* XXX TODO: ops */ + ieee80211_swscan_scan_done(vap); + IEEE80211_UNLOCK(ic); } @@ -790,328 +595,14 @@ void ieee80211_probe_curchan(struct ieee80211vap *vap, int force) { struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_scan_state *ss = ic->ic_scan; - struct ifnet *ifp = vap->iv_ifp; - int i; if ((ic->ic_curchan->ic_flags & IEEE80211_CHAN_PASSIVE) && !force) { ic->ic_flags_ext |= IEEE80211_FEXT_PROBECHAN; return; } - /* - * Send directed probe requests followed by any - * broadcast probe request. - * XXX remove dependence on ic/vap->iv_bss - */ - for (i = 0; i < ss->ss_nssid; i++) - ieee80211_send_probereq(vap->iv_bss, - vap->iv_myaddr, ifp->if_broadcastaddr, - ifp->if_broadcastaddr, - ss->ss_ssid[i].ssid, ss->ss_ssid[i].len); - if ((ss->ss_flags & IEEE80211_SCAN_NOBCAST) == 0) - ieee80211_send_probereq(vap->iv_bss, - vap->iv_myaddr, ifp->if_broadcastaddr, - ifp->if_broadcastaddr, - "", 0); -} - -/* - * Scan curchan. If this is an active scan and the channel - * is not marked passive then send probe request frame(s). - * Arrange for the channel change after maxdwell ticks. - */ -static void -scan_curchan(struct ieee80211_scan_state *ss, unsigned long maxdwell) -{ - struct ieee80211vap *vap = ss->ss_vap; - - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: calling; maxdwell=%lu\n", - __func__, - maxdwell); - IEEE80211_LOCK(vap->iv_ic); - if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) - ieee80211_probe_curchan(vap, 0); - callout_reset(&SCAN_PRIVATE(ss)->ss_scan_timer, - maxdwell, scan_signal, ss); - IEEE80211_UNLOCK(vap->iv_ic); -} - -static void -scan_signal(void *arg) -{ - struct ieee80211_scan_state *ss = (struct ieee80211_scan_state *) arg; - - IEEE80211_LOCK_ASSERT(ss->ss_ic); - cv_signal(&SCAN_PRIVATE(ss)->ss_scan_cv); -} - -/* - * Handle mindwell requirements completed; initiate a channel - * change to the next channel asap. - */ -static void -scan_mindwell(struct ieee80211_scan_state *ss) -{ - struct ieee80211com *ic = ss->ss_ic; - - IEEE80211_DPRINTF(ss->ss_vap, IEEE80211_MSG_SCAN, "%s: called\n", __func__); - - IEEE80211_LOCK(ic); - scan_signal(ss); - IEEE80211_UNLOCK(ic); -} - -static void -scan_task(void *arg, int pending) -{ -#define ISCAN_REP (ISCAN_MINDWELL | ISCAN_DISCARD) - struct ieee80211_scan_state *ss = (struct ieee80211_scan_state *) arg; - struct ieee80211vap *vap = ss->ss_vap; - struct ieee80211com *ic = ss->ss_ic; - struct ieee80211_channel *chan; - unsigned long maxdwell, scanend; - int scandone = 0; - - IEEE80211_LOCK(ic); - if (vap == NULL || (ic->ic_flags & IEEE80211_F_SCAN) == 0 || - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT)) { - /* Cancelled before we started */ - goto done; - } - - if (ss->ss_next == ss->ss_last) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: no channels to scan\n", __func__); - scandone = 1; - goto done; - } - - if (vap->iv_opmode == IEEE80211_M_STA && - vap->iv_state == IEEE80211_S_RUN) { - if ((vap->iv_bss->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) { - /* Enable station power save mode */ - vap->iv_sta_ps(vap, 1); - /* - * Use an 1ms delay so the null data frame has a chance - * to go out. - * XXX Should use M_TXCB mechanism to eliminate this. - */ - cv_timedwait(&SCAN_PRIVATE(ss)->ss_scan_cv, - IEEE80211_LOCK_OBJ(ic), hz / 1000); - if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) - goto done; - } - } - - scanend = ticks + SCAN_PRIVATE(ss)->ss_duration; - - /* XXX scan state can change! Re-validate scan state! */ - - IEEE80211_UNLOCK(ic); - ic->ic_scan_start(ic); /* notify driver */ - IEEE80211_LOCK(ic); - - for (;;) { - - scandone = (ss->ss_next >= ss->ss_last) || - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0; - - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: loop start; scandone=%d\n", - __func__, - scandone); - - if (scandone || (ss->ss_flags & IEEE80211_SCAN_GOTPICK) || - (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) || - time_after(ticks + ss->ss_mindwell, scanend)) - break; - - chan = ss->ss_chans[ss->ss_next++]; - - /* - * Watch for truncation due to the scan end time. - */ - if (time_after(ticks + ss->ss_maxdwell, scanend)) - maxdwell = scanend - ticks; - else - maxdwell = ss->ss_maxdwell; - - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: chan %3d%c -> %3d%c [%s, dwell min %lums max %lums]\n", - __func__, - ieee80211_chan2ieee(ic, ic->ic_curchan), - channel_type(ic->ic_curchan), - ieee80211_chan2ieee(ic, chan), channel_type(chan), - (ss->ss_flags & IEEE80211_SCAN_ACTIVE) && - (chan->ic_flags & IEEE80211_CHAN_PASSIVE) == 0 ? - "active" : "passive", - ticks_to_msecs(ss->ss_mindwell), ticks_to_msecs(maxdwell)); - - /* - * Potentially change channel and phy mode. - */ - ic->ic_curchan = chan; - ic->ic_rt = ieee80211_get_ratetable(chan); - IEEE80211_UNLOCK(ic); - /* - * Perform the channel change and scan unlocked so the driver - * may sleep. Once set_channel returns the hardware has - * completed the channel change. - */ - ic->ic_set_channel(ic); - ieee80211_radiotap_chan_change(ic); - - /* - * Scan curchan. Drivers for "intelligent hardware" - * override ic_scan_curchan to tell the device to do - * the work. Otherwise we manage the work outselves; - * sending a probe request (as needed), and arming the - * timeout to switch channels after maxdwell ticks. - * - * scan_curchan should only pause for the time required to - * prepare/initiate the hardware for the scan (if at all), the - * below condvar is used to sleep for the channels dwell time - * and allows it to be signalled for abort. - */ - ic->ic_scan_curchan(ss, maxdwell); - IEEE80211_LOCK(ic); - - /* XXX scan state can change! Re-validate scan state! */ - - SCAN_PRIVATE(ss)->ss_chanmindwell = ticks + ss->ss_mindwell; - /* clear mindwell lock and initial channel change flush */ - SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_REP; - - if ((SCAN_PRIVATE(ss)->ss_iflags & (ISCAN_CANCEL|ISCAN_ABORT))) - continue; - - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: waiting\n", __func__); - /* Wait to be signalled to scan the next channel */ - cv_wait(&SCAN_PRIVATE(ss)->ss_scan_cv, IEEE80211_LOCK_OBJ(ic)); - } - - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, "%s: out\n", __func__); - - if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) - goto done; - - IEEE80211_UNLOCK(ic); - ic->ic_scan_end(ic); /* notify driver */ - IEEE80211_LOCK(ic); - /* XXX scan state can change! Re-validate scan state! */ - - /* - * Since a cancellation may have occured during one of the - * driver calls (whilst unlocked), update scandone. - */ - if (scandone == 0 && - ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0)) { - /* XXX printf? */ - if_printf(vap->iv_ifp, - "%s: OOPS! scan cancelled during driver call (1)!\n", - __func__); - scandone = 1; - } - - /* - * Record scan complete time. Note that we also do - * this when canceled so any background scan will - * not be restarted for a while. - */ - if (scandone) - ic->ic_lastscan = ticks; - /* return to the bss channel */ - if (ic->ic_bsschan != IEEE80211_CHAN_ANYC && - ic->ic_curchan != ic->ic_bsschan) { - ieee80211_setupcurchan(ic, ic->ic_bsschan); - IEEE80211_UNLOCK(ic); - ic->ic_set_channel(ic); - ieee80211_radiotap_chan_change(ic); - IEEE80211_LOCK(ic); - } - /* clear internal flags and any indication of a pick */ - SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_REP; - ss->ss_flags &= ~IEEE80211_SCAN_GOTPICK; - - /* - * If not canceled and scan completed, do post-processing. - * If the callback function returns 0, then it wants to - * continue/restart scanning. Unfortunately we needed to - * notify the driver to end the scan above to avoid having - * rx frames alter the scan candidate list. - */ - if ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) == 0 && - !ss->ss_ops->scan_end(ss, vap) && - (ss->ss_flags & IEEE80211_SCAN_ONCE) == 0 && - time_before(ticks + ss->ss_mindwell, scanend)) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: done, restart " - "[ticks %u, dwell min %lu scanend %lu]\n", - __func__, - ticks, ss->ss_mindwell, scanend); - ss->ss_next = 0; /* reset to begining */ - if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) - vap->iv_stats.is_scan_active++; - else - vap->iv_stats.is_scan_passive++; - - ss->ss_ops->scan_restart(ss, vap); /* XXX? */ - ieee80211_runtask(ic, &SCAN_PRIVATE(ss)->ss_scan_task); - IEEE80211_UNLOCK(ic); - return; - } - /* past here, scandone is ``true'' if not in bg mode */ - if ((ss->ss_flags & IEEE80211_SCAN_BGSCAN) == 0) - scandone = 1; - - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: %s, [ticks %u, dwell min %lu scanend %lu]\n", - __func__, scandone ? "done" : "stopped", - ticks, ss->ss_mindwell, scanend); - - /* - * Since a cancellation may have occured during one of the - * driver calls (whilst unlocked), update scandone. - */ - if (scandone == 0 && - ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_CANCEL) != 0)) { - /* XXX printf? */ - if_printf(vap->iv_ifp, - "%s: OOPS! scan cancelled during driver call (2)!\n", - __func__); - scandone = 1; - } - - /* - * Clear the SCAN bit first in case frames are - * pending on the station power save queue. If - * we defer this then the dispatch of the frames - * may generate a request to cancel scanning. - */ -done: - ic->ic_flags &= ~IEEE80211_F_SCAN; - /* - * Drop out of power save mode when a scan has - * completed. If this scan was prematurely terminated - * because it is a background scan then don't notify - * the ap; we'll either return to scanning after we - * receive the beacon frame or we'll drop out of power - * save mode because the beacon indicates we have frames - * waiting for us. - */ - if (scandone) { - vap->iv_sta_ps(vap, 0); - if (ss->ss_next >= ss->ss_last) { - ieee80211_notify_scan_done(vap); - ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN; - } - } - SCAN_PRIVATE(ss)->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT); - ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST); - IEEE80211_UNLOCK(ic); -#undef ISCAN_REP + /* XXX TODO: ops */ + ieee80211_swscan_probe_curchan(vap, force); } #ifdef IEEE80211_DEBUG @@ -1140,8 +631,8 @@ dump_country(const uint8_t *ie) printf("]"); } -static void -dump_probe_beacon(uint8_t subtype, int isnew, +void +ieee80211_scan_dump_probe_beacon(uint8_t subtype, int isnew, const uint8_t mac[IEEE80211_ADDR_LEN], const struct ieee80211_scanparams *sp, int rssi) { @@ -1172,45 +663,8 @@ ieee80211_add_scan(struct ieee80211vap * const struct ieee80211_frame *wh, int subtype, int rssi, int noise) { - struct ieee80211com *ic = vap->iv_ic; - struct ieee80211_scan_state *ss = ic->ic_scan; - /* XXX locking */ - /* - * Frames received during startup are discarded to avoid - * using scan state setup on the initial entry to the timer - * callback. This can occur because the device may enable - * rx prior to our doing the initial channel change in the - * timer routine. - */ - if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_DISCARD) - return; -#ifdef IEEE80211_DEBUG - if (ieee80211_msg_scan(vap) && (ic->ic_flags & IEEE80211_F_SCAN)) - dump_probe_beacon(subtype, 1, wh->i_addr2, sp, rssi); -#endif - if (ss->ss_ops != NULL && - ss->ss_ops->scan_add(ss, sp, wh, subtype, rssi, noise)) { - /* - * If we've reached the min dwell time terminate - * the timer so we'll switch to the next channel. - */ - if ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_MINDWELL) == 0 && - time_after_eq(ticks, SCAN_PRIVATE(ss)->ss_chanmindwell)) { - IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: chan %3d%c min dwell met (%u > %lu)\n", - __func__, - ieee80211_chan2ieee(ic, ic->ic_curchan), - channel_type(ic->ic_curchan), - ticks, SCAN_PRIVATE(ss)->ss_chanmindwell); - SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_MINDWELL; - /* - * NB: trigger at next clock tick or wait for the - * hardware. - */ - ic->ic_scan_mindwell(ss); - } - } + return (ieee80211_swscan_add_scan(vap, sp, wh, subtype, rssi, noise)); } /* Modified: head/sys/net80211/ieee80211_scan.h ============================================================================== --- head/sys/net80211/ieee80211_scan.h Tue Jan 6 01:30:32 2015 (r276729) +++ head/sys/net80211/ieee80211_scan.h Tue Jan 6 02:08:45 2015 (r276730) @@ -299,4 +299,18 @@ void ieee80211_scanner_unregister(enum i const struct ieee80211_scanner *); void ieee80211_scanner_unregister_all(const struct ieee80211_scanner *); const struct ieee80211_scanner *ieee80211_scanner_get(enum ieee80211_opmode); +void ieee80211_scan_update_locked(struct ieee80211vap *vap, + const struct ieee80211_scanner *scan); +void ieee80211_scan_copy_ssid(struct ieee80211vap *vap, + struct ieee80211_scan_state *ss, + int nssid, const struct ieee80211_scan_ssid ssids[]); +void ieee80211_scan_dump_probe_beacon(uint8_t subtype, int isnew, + const uint8_t mac[IEEE80211_ADDR_LEN], + const struct ieee80211_scanparams *sp, int rssi); +int ieee80211_start_scan_locked(const struct ieee80211_scanner *scan, + struct ieee80211vap *vap, int flags, u_int duration, + u_int mindwell, u_int maxdwell, + u_int nssid, const struct ieee80211_scan_ssid ssids[]); +void ieee80211_scan_dump(struct ieee80211_scan_state *ss); + #endif /* _NET80211_IEEE80211_SCAN_H_ */ Copied and modified: head/sys/net80211/ieee80211_scan_sw.c (from r276517, head/sys/net80211/ieee80211_scan.c) ============================================================================== --- head/sys/net80211/ieee80211_scan.c Thu Jan 1 22:49:17 2015 (r276517, copy source) +++ head/sys/net80211/ieee80211_scan_sw.c Tue Jan 6 02:08:45 2015 (r276730) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include +#include + #include struct scan_state { @@ -101,7 +103,7 @@ static void scan_task(void *, int); MALLOC_DEFINE(M_80211_SCAN, "80211scan", "802.11 scan state"); void -ieee80211_scan_attach(struct ieee80211com *ic) +ieee80211_swscan_attach(struct ieee80211com *ic) { struct scan_state *ss; @@ -114,15 +116,20 @@ ieee80211_scan_attach(struct ieee80211co callout_init_mtx(&ss->ss_scan_timer, IEEE80211_LOCK_OBJ(ic), 0); cv_init(&ss->ss_scan_cv, "scan"); TASK_INIT(&ss->ss_scan_task, 0, scan_task, ss); + ic->ic_scan = &ss->base; ss->base.ss_ic = ic; ic->ic_scan_curchan = scan_curchan; ic->ic_scan_mindwell = scan_mindwell; + + /* + * TODO: all of the non-vap scan calls should be methods! + */ } void -ieee80211_scan_detach(struct ieee80211com *ic) +ieee80211_swscan_detach(struct ieee80211com *ic) { struct ieee80211_scan_state *ss = ic->ic_scan; @@ -135,6 +142,14 @@ ieee80211_scan_detach(struct ieee80211co callout_drain(&SCAN_PRIVATE(ss)->ss_scan_timer); KASSERT((ic->ic_flags & IEEE80211_F_SCAN) == 0, ("scan still running")); + + /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 03:49: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 E80DA824; Tue, 6 Jan 2015 03:49: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 D441B25D7; Tue, 6 Jan 2015 03:49: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 t063nNHm034136; Tue, 6 Jan 2015 03:49:23 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t063nN5Y034135; Tue, 6 Jan 2015 03:49:23 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501060349.t063nN5Y034135@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 6 Jan 2015 03:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276733 - head/libexec/rtld-elf/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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 03:49:24 -0000 Author: jhibbits Date: Tue Jan 6 03:49:22 2015 New Revision: 276733 URL: https://svnweb.freebsd.org/changeset/base/276733 Log: Apply r246556 to powerpc: Avoid use of register variables, which some compilers (e.g. clang) don't like. It makes the code a little clearer as well. This allows a clang 3.5 built powerpc world to run (tested in a jail). MFC after: 1 week Modified: head/libexec/rtld-elf/powerpc/reloc.c Modified: head/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc/reloc.c Tue Jan 6 02:13:49 2015 (r276732) +++ head/libexec/rtld-elf/powerpc/reloc.c Tue Jan 6 03:49:22 2015 (r276733) @@ -622,8 +622,7 @@ init_pltgot(Obj_Entry *obj) void allocate_initial_tls(Obj_Entry *list) { - register Elf_Addr **tp __asm__("r2"); - Elf_Addr **_tp; + Elf_Addr **tp; /* * Fix the size of the static TLS block by using the maximum @@ -633,22 +632,23 @@ allocate_initial_tls(Obj_Entry *list) tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA; - _tp = (Elf_Addr **) ((char *) allocate_tls(list, NULL, TLS_TCB_SIZE, 8) + tp = (Elf_Addr **) ((char *) allocate_tls(list, NULL, TLS_TCB_SIZE, 8) + TLS_TP_OFFSET + TLS_TCB_SIZE); /* * XXX gcc seems to ignore 'tp = _tp;' */ - __asm __volatile("mr %0,%1" : "=r"(tp) : "r"(_tp)); + __asm __volatile("mr 2,%0" :: "r"(tp)); } void* __tls_get_addr(tls_index* ti) { - register Elf_Addr **tp __asm__("r2"); + register Elf_Addr **tp; char *p; + __asm __volatile("mr %0,2" : "=r"(tp)); p = tls_get_addr_common((Elf_Addr**)((Elf_Addr)tp - TLS_TP_OFFSET - TLS_TCB_SIZE), ti->ti_module, ti->ti_offset); From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 03:50: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 5A29996F; Tue, 6 Jan 2015 03:50: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 2C58B268A; Tue, 6 Jan 2015 03:50: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 t063ojpv034864; Tue, 6 Jan 2015 03:50:45 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t063oiZX034861; Tue, 6 Jan 2015 03:50:44 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501060350.t063oiZX034861@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 6 Jan 2015 03:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276734 - in head/lib: libc/powerpc/gen libc/powerpc64/gen libthr/arch/powerpc/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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 03:50:45 -0000 Author: jhibbits Date: Tue Jan 6 03:50:43 2015 New Revision: 276734 URL: https://svnweb.freebsd.org/changeset/base/276734 Log: Avoid use of register variables. Clang 3.5 treats this as undefined behavior, and bad things happen. MFC after: 1 week Modified: head/lib/libc/powerpc/gen/_set_tp.c head/lib/libc/powerpc64/gen/_set_tp.c head/lib/libthr/arch/powerpc/include/pthread_md.h Modified: head/lib/libc/powerpc/gen/_set_tp.c ============================================================================== --- head/lib/libc/powerpc/gen/_set_tp.c Tue Jan 6 03:49:22 2015 (r276733) +++ head/lib/libc/powerpc/gen/_set_tp.c Tue Jan 6 03:50:43 2015 (r276734) @@ -29,7 +29,6 @@ void _set_tp(void *tpval) { - register void *tp __asm__("r2"); - __asm __volatile("mr %0,%1" : "=r"(tp) : "r"((char*)tpval + 0x7008)); + __asm __volatile("mr 2,%0" :: "r"((char*)tpval + 0x7008)); } Modified: head/lib/libc/powerpc64/gen/_set_tp.c ============================================================================== --- head/lib/libc/powerpc64/gen/_set_tp.c Tue Jan 6 03:49:22 2015 (r276733) +++ head/lib/libc/powerpc64/gen/_set_tp.c Tue Jan 6 03:50:43 2015 (r276734) @@ -29,7 +29,6 @@ void _set_tp(void *tpval) { - register void *tp __asm__("r13"); - __asm __volatile("mr %0,%1" : "=r"(tp) : "r"((char*)tpval + 0x7010)); + __asm __volatile("mr 13,%0" :: "r"((char*)tpval + 0x7010)); } Modified: head/lib/libthr/arch/powerpc/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/powerpc/include/pthread_md.h Tue Jan 6 03:49:22 2015 (r276733) +++ head/lib/libthr/arch/powerpc/include/pthread_md.h Tue Jan 6 03:50:43 2015 (r276734) @@ -62,22 +62,22 @@ static __inline void _tcb_set(struct tcb *tcb) { #ifdef __powerpc64__ - register uint8_t *_tp __asm__("%r13"); + __asm __volatile("mr 13,%0" :: + "r"((uint8_t *)tcb + TP_OFFSET)); #else - register uint8_t *_tp __asm__("%r2"); -#endif - - __asm __volatile("mr %0,%1" : "=r"(_tp) : + __asm __volatile("mr 2,%0" :: "r"((uint8_t *)tcb + TP_OFFSET)); +#endif } static __inline struct tcb * _tcb_get(void) { + register uint8_t *_tp; #ifdef __powerpc64__ - register uint8_t *_tp __asm__("%r13"); + __asm __volatile("mr %0,13" : "=r"(_tp)); #else - register uint8_t *_tp __asm__("%r2"); + __asm __volatile("mr %0,2" : "=r"(_tp)); #endif return ((struct tcb *)(_tp - TP_OFFSET)); From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 05:28: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 776BB566; Tue, 6 Jan 2015 05:28: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 61E42217A; Tue, 6 Jan 2015 05:28: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 t065SecW079976; Tue, 6 Jan 2015 05:28:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t065ScDI079956; Tue, 6 Jan 2015 05:28:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501060528.t065ScDI079956@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 6 Jan 2015 05:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276737 - in head: sbin/fsck_ffs sbin/fsirand sbin/newfs sbin/newfs_msdos share/man/man4 sys/geom sys/geom/part 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 05:28:40 -0000 Author: imp Date: Tue Jan 6 05:28:37 2015 New Revision: 276737 URL: https://svnweb.freebsd.org/changeset/base/276737 Log: Remove old ioctl use and support, once and for all. Modified: head/sbin/fsck_ffs/setup.c head/sbin/fsirand/fsirand.c head/sbin/newfs/newfs.c head/sbin/newfs_msdos/newfs_msdos.c head/share/man/man4/cd.4 head/share/man/man4/mcd.4 head/sys/geom/geom_bsd.c head/sys/geom/part/g_part_bsd.c head/sys/sys/disklabel.h Modified: head/sbin/fsck_ffs/setup.c ============================================================================== --- head/sbin/fsck_ffs/setup.c Tue Jan 6 05:28:22 2015 (r276736) +++ head/sbin/fsck_ffs/setup.c Tue Jan 6 05:28:37 2015 (r276737) @@ -59,8 +59,6 @@ struct bufarea asblk; #define POWEROF2(num) (((num) & ((num) - 1)) == 0) static void badsb(int listerr, const char *s); -static int calcsb(char *dev, int devfd, struct fs *fs); -static struct disklabel *getdisklabel(char *s, int fd); /* * Read in a superblock finding an alternate if necessary. @@ -178,7 +176,7 @@ setup(char *dev) */ if (readsb(1) == 0) { skipclean = 0; - if (bflag || preen || calcsb(dev, fsreadfd, &proto) == 0) + if (bflag || preen) return(0); if (reply("LOOK FOR ALTERNATE SUPERBLOCKS") == 0) return (0); @@ -437,7 +435,6 @@ badsb(int listerr, const char *s) void sblock_init(void) { - struct disklabel *lp; fswritefd = -1; fsmodified = 0; @@ -448,89 +445,5 @@ sblock_init(void) asblk.b_un.b_buf = Malloc(SBLOCKSIZE); if (sblk.b_un.b_buf == NULL || asblk.b_un.b_buf == NULL) errx(EEXIT, "cannot allocate space for superblock"); - if ((lp = getdisklabel(NULL, fsreadfd))) - real_dev_bsize = dev_bsize = secsize = lp->d_secsize; - else - dev_bsize = secsize = DEV_BSIZE; -} - -/* - * Calculate a prototype superblock based on information in the disk label. - * When done the cgsblock macro can be calculated and the fs_ncg field - * can be used. Do NOT attempt to use other macros without verifying that - * their needed information is available! - */ -static int -calcsb(char *dev, int devfd, struct fs *fs) -{ - struct disklabel *lp; - struct partition *pp; - char *cp; - int i, nspf; - - cp = strchr(dev, '\0') - 1; - if (cp == (char *)-1 || ((*cp < 'a' || *cp > 'h') && !isdigit(*cp))) { - pfatal("%s: CANNOT FIGURE OUT FILE SYSTEM PARTITION\n", dev); - return (0); - } - lp = getdisklabel(dev, devfd); - if (isdigit(*cp)) - pp = &lp->d_partitions[0]; - else - pp = &lp->d_partitions[*cp - 'a']; - if (pp->p_fstype != FS_BSDFFS) { - pfatal("%s: NOT LABELED AS A BSD FILE SYSTEM (%s)\n", - dev, pp->p_fstype < FSMAXTYPES ? - fstypenames[pp->p_fstype] : "unknown"); - return (0); - } - if (pp->p_fsize == 0 || pp->p_frag == 0 || - pp->p_cpg == 0 || pp->p_size == 0) { - pfatal("%s: %s: type %s fsize %d, frag %d, cpg %d, size %d\n", - dev, "INCOMPLETE LABEL", fstypenames[pp->p_fstype], - pp->p_fsize, pp->p_frag, pp->p_cpg, pp->p_size); - return (0); - } - memset(fs, 0, sizeof(struct fs)); - fs->fs_fsize = pp->p_fsize; - fs->fs_frag = pp->p_frag; - fs->fs_size = pp->p_size; - fs->fs_sblkno = roundup( - howmany(lp->d_bbsize + lp->d_sbsize, fs->fs_fsize), - fs->fs_frag); - nspf = fs->fs_fsize / lp->d_secsize; - for (fs->fs_fsbtodb = 0, i = nspf; i > 1; i >>= 1) - fs->fs_fsbtodb++; - dev_bsize = lp->d_secsize; - if (fs->fs_magic == FS_UFS2_MAGIC) { - fs->fs_fpg = pp->p_cpg; - fs->fs_ncg = howmany(fs->fs_size, fs->fs_fpg); - } else /* if (fs->fs_magic == FS_UFS1_MAGIC) */ { - fs->fs_old_cpg = pp->p_cpg; - fs->fs_old_cgmask = 0xffffffff; - for (i = lp->d_ntracks; i > 1; i >>= 1) - fs->fs_old_cgmask <<= 1; - if (!POWEROF2(lp->d_ntracks)) - fs->fs_old_cgmask <<= 1; - fs->fs_old_cgoffset = roundup(howmany(lp->d_nsectors, nspf), - fs->fs_frag); - fs->fs_fpg = (fs->fs_old_cpg * lp->d_secpercyl) / nspf; - fs->fs_ncg = howmany(fs->fs_size / lp->d_secpercyl, - fs->fs_old_cpg); - } - return (1); -} - -static struct disklabel * -getdisklabel(char *s, int fd) -{ - static struct disklabel lab; - - if (ioctl(fd, DIOCGDINFO, (char *)&lab) < 0) { - if (s == NULL) - return ((struct disklabel *)NULL); - pwarn("ioctl (GCINFO): %s\n", strerror(errno)); - errx(EEXIT, "%s: can't read disk label", s); - } - return (&lab); + dev_bsize = secsize = DEV_BSIZE; } Modified: head/sbin/fsirand/fsirand.c ============================================================================== --- head/sbin/fsirand/fsirand.c Tue Jan 6 05:28:22 2015 (r276736) +++ head/sbin/fsirand/fsirand.c Tue Jan 6 05:28:37 2015 (r276737) @@ -36,7 +36,6 @@ static const char rcsid[] = #endif /* not lint */ #include -#include #include #include @@ -120,22 +119,12 @@ fsirand(char *device) char sbuf[SBLOCKSIZE], sbuftmp[SBLOCKSIZE]; int i, devfd, n, cg; u_int32_t bsize = DEV_BSIZE; - struct disklabel label; if ((devfd = open(device, printonly ? O_RDONLY : O_RDWR)) < 0) { warn("can't open %s", device); return (1); } - /* Get block size (usually 512) from disklabel if possible */ - if (!ignorelabel) { - if (ioctl(devfd, DIOCGDINFO, &label) < 0) - warn("can't read disklabel, using sector size of %d", - bsize); - else - bsize = label.d_secsize; - } - dp1 = NULL; dp2 = NULL; Modified: head/sbin/newfs/newfs.c ============================================================================== --- head/sbin/newfs/newfs.c Tue Jan 6 05:28:22 2015 (r276736) +++ head/sbin/newfs/newfs.c Tue Jan 6 05:28:37 2015 (r276737) @@ -117,11 +117,9 @@ static u_char bootarea[BBSIZE]; static int is_file; /* work on a file, not a device */ static char *dkname; static char *disktype; -static int unlabeled; static void getfssize(intmax_t *, const char *p, intmax_t, intmax_t); static struct disklabel *getdisklabel(char *s); -static void rewritelabel(char *s, struct disklabel *lp); static void usage(void); static int expand_number_int(const char *buf, int *num); @@ -402,12 +400,6 @@ main(int argc, char *argv[]) pp->p_size *= secperblk; } mkfs(pp, special); - if (!unlabeled) { - if (realsectorsize != DEV_BSIZE) - pp->p_size /= realsectorsize / DEV_BSIZE; - if (!Nflag && bcmp(pp, &oldpartition, sizeof(oldpartition))) - rewritelabel(special, lp); - } ufs_disk_close(&disk); if (!jflag) exit(0); @@ -451,9 +443,6 @@ getdisklabel(char *s) return &lab; } - if (ioctl(disk.d_fd, DIOCGDINFO, (char *)&lab) != -1) - return (&lab); - unlabeled++; if (disktype) { lp = getdiskbyname(disktype); if (lp != NULL) @@ -462,25 +451,6 @@ getdisklabel(char *s) return (NULL); } -void -rewritelabel(char *s, struct disklabel *lp) -{ - if (unlabeled) - return; - lp->d_checksum = 0; - lp->d_checksum = dkcksum(lp); - if (is_file) { - bsd_disklabel_le_enc(bootarea + 0 /* labeloffset */ + - 1 /* labelsoffset */ * sectorsize, lp); - lseek(disk.d_fd, 0, SEEK_SET); - if (write(disk.d_fd, bootarea, BBSIZE) != BBSIZE) - errx(1, "cannot write label"); - return; - } - if (ioctl(disk.d_fd, DIOCWDINFO, (char *)lp) == -1) - warn("ioctl (WDINFO): %s: can't rewrite disk label", s); -} - static void usage() { Modified: head/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/newfs_msdos.c Tue Jan 6 05:28:22 2015 (r276736) +++ head/sbin/newfs_msdos/newfs_msdos.c Tue Jan 6 05:28:37 2015 (r276737) @@ -829,28 +829,26 @@ getdiskinfo(int fd, const char *fname, c if (lp == NULL) { if (bpb->bpbBytesPerSec) dlp.d_secsize = bpb->bpbBytesPerSec; - if (ioctl(fd, DIOCGDINFO, &dlp) == -1) { - if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, - &dlp.d_secsize) == -1) - err(1, "cannot get sector size"); - - dlp.d_secperunit = ms / dlp.d_secsize; - - if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, - &dlp.d_nsectors) == -1) { - warn("cannot get number of sectors per track"); - dlp.d_nsectors = 63; - } - if (bpb->bpbHeads == 0 && - ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { - warn("cannot get number of heads"); - if (dlp.d_secperunit <= 63*1*1024) - dlp.d_ntracks = 1; - else if (dlp.d_secperunit <= 63*16*1024) - dlp.d_ntracks = 16; - else - dlp.d_ntracks = 255; - } + if (bpb->bpbBytesPerSec == 0 && ioctl(fd, DIOCGSECTORSIZE, + &dlp.d_secsize) == -1) + err(1, "cannot get sector size"); + + dlp.d_secperunit = ms / dlp.d_secsize; + + if (bpb->bpbSecPerTrack == 0 && ioctl(fd, DIOCGFWSECTORS, + &dlp.d_nsectors) == -1) { + warn("cannot get number of sectors per track"); + dlp.d_nsectors = 63; + } + if (bpb->bpbHeads == 0 && + ioctl(fd, DIOCGFWHEADS, &dlp.d_ntracks) == -1) { + warn("cannot get number of heads"); + if (dlp.d_secperunit <= 63*1*1024) + dlp.d_ntracks = 1; + else if (dlp.d_secperunit <= 63*16*1024) + dlp.d_ntracks = 16; + else + dlp.d_ntracks = 255; } hs = (ms / dlp.d_secsize) - dlp.d_secperunit; Modified: head/share/man/man4/cd.4 ============================================================================== --- head/share/man/man4/cd.4 Tue Jan 6 05:28:22 2015 (r276736) +++ head/share/man/man4/cd.4 Tue Jan 6 05:28:37 2015 (r276737) @@ -101,16 +101,6 @@ in the header files and .In sys/disklabel.h . .Bl -tag -width CDIOCREADSUBCHANNEL -.It Dv DIOCGDINFO -.It Dv DIOCSDINFO -.Pq Li "struct disklabel" -Read or write the in-core copy of the disklabel for the -drive. -The disklabel is initialized with information -read from the scsi inquiry commands, and should be the same as -the information printed at boot. -This structure is defined in the header file -.In sys/disklabel.h . .It Dv CDIOCPLAYTRACKS .Pq Li "struct ioc_play_track" Start audio playback given a track address and length. Modified: head/share/man/man4/mcd.4 ============================================================================== --- head/share/man/man4/mcd.4 Tue Jan 6 05:28:22 2015 (r276736) +++ head/share/man/man4/mcd.4 Tue Jan 6 05:28:37 2015 (r276737) @@ -56,12 +56,8 @@ The driver responds to disk-specific .Fn ioctl commands, namely the -.Dv DIOCGDINFO , -.Dv DIOCGPART , -.Dv DIOCWDINFO , -and -.Dv DIOCSDINFO , -commands. +.Dv DIOCGPART +command. Other disk-specific .Fn ioctl commands will return an error. Modified: head/sys/geom/geom_bsd.c ============================================================================== --- head/sys/geom/geom_bsd.c Tue Jan 6 05:28:22 2015 (r276736) +++ head/sys/geom/geom_bsd.c Tue Jan 6 05:28:37 2015 (r276737) @@ -305,8 +305,8 @@ g_bsd_hotwrite(void *arg, int flag) gsp = gp->softc; ms = gsp->softc; gsl = &gsp->slices[bp->bio_to->index]; - p = (u_char*)bp->bio_data + ms->labeloffset - - (bp->bio_offset + gsl->offset); + p = (u_char*)bp->bio_data + ms->labeloffset - + (bp->bio_offset + gsl->offset); error = g_bsd_modify(gp, p); if (error) { g_io_deliver(bp, EPERM); @@ -315,93 +315,6 @@ g_bsd_hotwrite(void *arg, int flag) g_slice_finish_hot(bp); } -/*- - * This start routine is only called for non-trivial requests, all the - * trivial ones are handled autonomously by the slice code. - * For requests we handle here, we must call the g_io_deliver() on the - * bio, and return non-zero to indicate to the slice code that we did so. - * This code executes in the "DOWN" I/O path, this means: - * * No sleeping. - * * Don't grab the topology lock. - * * Don't call biowait, g_getattr(), g_setattr() or g_read_data() - */ -static int -g_bsd_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, struct thread *td) -{ - struct g_geom *gp; - struct g_bsd_softc *ms; - struct g_slicer *gsp; - u_char *label; - int error; - - gp = pp->geom; - gsp = gp->softc; - ms = gsp->softc; - - switch(cmd) { - case DIOCGDINFO: - /* Return a copy of the disklabel to userland. */ - bsd_disklabel_le_dec(ms->label, data, MAXPARTITIONS); - return(0); - case DIOCBSDBB: { - struct g_consumer *cp; - u_char *buf; - void *p; - int error, i; - uint64_t sum; - - if (!(fflag & FWRITE)) - return (EPERM); - /* The disklabel to set is the ioctl argument. */ - buf = g_malloc(BBSIZE, M_WAITOK); - p = *(void **)data; - error = copyin(p, buf, BBSIZE); - if (!error) { - /* XXX: Rude, but supposedly safe */ - DROP_GIANT(); - g_topology_lock(); - /* Validate and modify our slice instance to match. */ - error = g_bsd_modify(gp, buf + ms->labeloffset); - if (!error) { - cp = LIST_FIRST(&gp->consumer); - if (ms->labeloffset == ALPHA_LABEL_OFFSET) { - sum = 0; - for (i = 0; i < 63; i++) - sum += le64dec(buf + i * 8); - le64enc(buf + 504, sum); - } - error = g_write_data(cp, 0, buf, BBSIZE); - } - g_topology_unlock(); - PICKUP_GIANT(); - } - g_free(buf); - return (error); - } - case DIOCSDINFO: - case DIOCWDINFO: { - if (!(fflag & FWRITE)) - return (EPERM); - label = g_malloc(LABELSIZE, M_WAITOK); - /* The disklabel to set is the ioctl argument. */ - bsd_disklabel_le_enc(label, data); - - DROP_GIANT(); - g_topology_lock(); - /* Validate and modify our slice instance to match. */ - error = g_bsd_modify(gp, label); - if (error == 0 && cmd == DIOCWDINFO) - error = g_bsd_writelabel(gp, NULL); - g_topology_unlock(); - PICKUP_GIANT(); - g_free(label); - return(error); - } - default: - return (ENOIOCTL); - } -} - static int g_bsd_start(struct bio *bp) { @@ -698,7 +611,6 @@ static struct g_class g_bsd_class = { .taste = g_bsd_taste, .ctlreq = g_bsd_config, .dumpconf = g_bsd_dumpconf, - .ioctl = g_bsd_ioctl, }; DECLARE_GEOM_CLASS(g_bsd_class, g_bsd); Modified: head/sys/geom/part/g_part_bsd.c ============================================================================== --- head/sys/geom/part/g_part_bsd.c Tue Jan 6 05:28:22 2015 (r276736) +++ head/sys/geom/part/g_part_bsd.c Tue Jan 6 05:28:37 2015 (r276737) @@ -83,8 +83,6 @@ static const char *g_part_bsd_type(struc static int g_part_bsd_write(struct g_part_table *, struct g_consumer *); static int g_part_bsd_resize(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); -static int g_part_bsd_ioctl(struct g_part_table *, struct g_provider *, - u_long cmd, void *data, int fflag, struct thread *td); static kobj_method_t g_part_bsd_methods[] = { KOBJMETHOD(g_part_add, g_part_bsd_add), @@ -100,7 +98,6 @@ static kobj_method_t g_part_bsd_methods[ KOBJMETHOD(g_part_read, g_part_bsd_read), KOBJMETHOD(g_part_type, g_part_bsd_type), KOBJMETHOD(g_part_write, g_part_bsd_write), - KOBJMETHOD(g_part_ioctl, g_part_bsd_ioctl), { 0, 0 } }; @@ -497,38 +494,6 @@ g_part_bsd_type(struct g_part_table *bas return (buf); } -/*- - * This start routine is only called for non-trivial requests, all the - * trivial ones are handled autonomously by the slice code. - * For requests we handle here, we must call the g_io_deliver() on the - * bio, and return non-zero to indicate to the slice code that we did so. - * This code executes in the "DOWN" I/O path, this means: - * * No sleeping. - * * Don't grab the topology lock. - * * Don't call biowait, g_getattr(), g_setattr() or g_read_data() - */ -static int -g_part_bsd_ioctl(struct g_part_table *basetable, struct g_provider *pp, - u_long cmd, void *data, int fflag, struct thread *td) -{ - - switch (cmd) - { - case DIOCGDINFO: - { - struct g_part_bsd_table *table; - u_char *p; - - table = (struct g_part_bsd_table *)basetable; - p = table->bbarea + pp->sectorsize; - return (bsd_disklabel_le_dec(p, data, MAXPARTITIONS)); - } - default: - return (ENOIOCTL); - - } -} - static int g_part_bsd_write(struct g_part_table *basetable, struct g_consumer *cp) { Modified: head/sys/sys/disklabel.h ============================================================================== --- head/sys/sys/disklabel.h Tue Jan 6 05:28:22 2015 (r276736) +++ head/sys/sys/disklabel.h Tue Jan 6 05:28:37 2015 (r276737) @@ -284,15 +284,8 @@ static const char *fstypenames[] = { #define D_CHAIN 0x10 /* can do back-back transfers */ /* - * Disklabel-specific ioctls. - * * NB: defines ioctls from 'd'/128 and up. */ - /* get and set disklabel */ -#define DIOCGDINFO _IOR('d', 101, struct disklabel)/* get */ -#define DIOCSDINFO _IOW('d', 102, struct disklabel)/* set */ -#define DIOCWDINFO _IOW('d', 103, struct disklabel)/* set, update disk */ -#define DIOCBSDBB _IOW('d', 110, void *) /* write bootblocks */ /* * Functions for proper encoding/decoding of struct disklabel into/from From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 05:26: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 ABCE339B; Tue, 6 Jan 2015 05:26: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 97FA22164; Tue, 6 Jan 2015 05:26: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 t065QFh7079625; Tue, 6 Jan 2015 05:26:15 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t065QEIo079621; Tue, 6 Jan 2015 05:26:14 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201501060526.t065QEIo079621@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 6 Jan 2015 05:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276735 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 05:26:15 -0000 Author: rodrigc Date: Tue Jan 6 05:26:13 2015 New Revision: 276735 URL: https://svnweb.freebsd.org/changeset/base/276735 Log: Refactor common options from MALTA and MALTA64 kernel configs into MALTA_COMMON file. Added: head/sys/mips/conf/MALTA_COMMON (contents, props changed) Modified: head/sys/mips/conf/MALTA head/sys/mips/conf/MALTA64 Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Tue Jan 6 03:50:43 2015 (r276734) +++ head/sys/mips/conf/MALTA Tue Jan 6 05:26:13 2015 (r276735) @@ -1,71 +1,11 @@ # MALTA -- Kernel config for MALTA boards # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: -# -# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html -# -# The handbook is also available locally in /usr/share/doc/handbook -# if you've installed the doc distribution, otherwise always see the -# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the -# latest information. -# -# An exhaustive list of options and more detailed explanations of the -# device lines is also present in the ../../conf/NOTES and NOTES files. -# If you are in doubt as to the purpose or necessity of a line, check first -# in NOTES. -# # $FreeBSD$ - + ident MALTA +include "MALTA_COMMON" + machine mips mipsel # Malta supports both, so it isn't in std.malta - + makeoptions KERNLOADADDR=0x80100000 - -options YAMON - -# Don't build any modules yet. -makeoptions MODULES_OVERRIDE="" - -options TICK_USE_YAMON_FREQ=defined -#options TICK_USE_MALTA_RTC=defined - -include "../malta/std.malta" - -hints "MALTA.hints" #Default places to look for devices. - -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols - -options DDB -options KDB - -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options NFSCL #Network Filesystem Client -options NFS_ROOT #NFS usable as /, requires NFSCL -options PSEUDOFS #Pseudo-filesystem framework -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions - -options FFS #Berkeley Fast Filesystem -options SOFTUPDATES #Enable FFS soft updates support -options UFS_ACL #Support for access control lists -options UFS_DIRHASH #Improve performance on big directories -options ROOTDEVNAME=\"ufs:ada0\" - - -# Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed - -device loop -device ether -device le -device miibus -device bpf -device md -device uart -device random Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Tue Jan 6 03:50:43 2015 (r276734) +++ head/sys/mips/conf/MALTA64 Tue Jan 6 05:26:13 2015 (r276735) @@ -1,73 +1,13 @@ -# MALTA -- Kernel config for MALTA boards -# -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: -# -# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html -# -# The handbook is also available locally in /usr/share/doc/handbook -# if you've installed the doc distribution, otherwise always see the -# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the -# latest information. -# -# An exhaustive list of options and more detailed explanations of the -# device lines is also present in the ../../conf/NOTES and NOTES files. -# If you are in doubt as to the purpose or necessity of a line, check first -# in NOTES. +# MALTA64 -- 64-bit kernel config for MALTA boards # # $FreeBSD$ + +ident MALTA64 -ident MALTA - +include "MALTA_COMMON" + machine mips mips64el # Malta supports both, so it isn't in std.malta - + makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" - -options YAMON - -# Don't build any modules yet. -makeoptions MODULES_OVERRIDE="" - -options TICK_USE_YAMON_FREQ=defined -#options TICK_USE_MALTA_RTC=defined - + makeoptions KERNLOADADDR=0xffffffff80100000 - -include "../malta/std.malta" - -hints "MALTA.hints" #Default places to look for devices. - -makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols - -options DDB -options KDB - -options SCHED_4BSD #4BSD scheduler -options INET #InterNETworking -options NFSCL #Network Filesystem Client -options NFS_ROOT #NFS usable as /, requires NFSCL -options PSEUDOFS #Pseudo-filesystem framework -options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions - -options FFS #Berkeley Fast Filesystem -options SOFTUPDATES #Enable FFS soft updates support -options UFS_ACL #Support for access control lists -options UFS_DIRHASH #Improve performance on big directories -options ROOTDEVNAME=\"ufs:ada0\" - - -# Debugging for use in -current -#options DEADLKRES #Enable the deadlock resolver -options INVARIANTS #Enable calls of extra sanity checking -options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS -#options WITNESS #Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed - -device loop -device ether -device le -device miibus -device md -device bpf -device uart -device random Added: head/sys/mips/conf/MALTA_COMMON ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/MALTA_COMMON Tue Jan 6 05:26:13 2015 (r276735) @@ -0,0 +1,52 @@ +# MALTA_COMMON -- Common kernel config options for MALTA boards +# +# $FreeBSD$ + +machine mips mipsel # Malta supports both, so it isn't in std.malta + +options YAMON + +# Don't build any modules yet. +makeoptions MODULES_OVERRIDE="" + +options TICK_USE_YAMON_FREQ=defined +#options TICK_USE_MALTA_RTC=defined + +include "../malta/std.malta" + +hints "MALTA.hints" #Default places to look for devices. + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCL #Network Filesystem Client +options NFS_ROOT #NFS usable as /, requires NFSCL +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options ROOTDEVNAME=\"ufs:ada0\" + + +# Debugging for use in -current +#options DEADLKRES #Enable the deadlock resolver +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed + +device loop +device ether +device le +device miibus +device bpf +device md +device uart +device random From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 05:28: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 BB34D48E; Tue, 6 Jan 2015 05:28: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 A88562178; Tue, 6 Jan 2015 05:28: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 t065SN4F079891; Tue, 6 Jan 2015 05:28:23 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t065SN1m079890; Tue, 6 Jan 2015 05:28:23 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201501060528.t065SN1m079890@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 6 Jan 2015 05:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276736 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 05:28:23 -0000 Author: rodrigc Date: Tue Jan 6 05:28:22 2015 New Revision: 276736 URL: https://svnweb.freebsd.org/changeset/base/276736 Log: Add some GEOM options. Modified: head/sys/mips/conf/MALTA_COMMON Modified: head/sys/mips/conf/MALTA_COMMON ============================================================================== --- head/sys/mips/conf/MALTA_COMMON Tue Jan 6 05:26:13 2015 (r276735) +++ head/sys/mips/conf/MALTA_COMMON Tue Jan 6 05:28:22 2015 (r276736) @@ -34,6 +34,9 @@ options UFS_ACL #Support for access c options UFS_DIRHASH #Improve performance on big directories options ROOTDEVNAME=\"ufs:ada0\" +options GEOM_LABEL # Provides labelization +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_RAID # Soft RAID functionality. # Debugging for use in -current #options DEADLKRES #Enable the deadlock resolver From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 07:35: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 3687E973; Tue, 6 Jan 2015 07:35: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 22D906631D; Tue, 6 Jan 2015 07:35: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 t067Z7Zt039931; Tue, 6 Jan 2015 07:35:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t067Z6KJ039930; Tue, 6 Jan 2015 07:35:06 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501060735.t067Z6KJ039930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 6 Jan 2015 07:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276738 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 07:35:07 -0000 Author: adrian Date: Tue Jan 6 07:35:05 2015 New Revision: 276738 URL: https://svnweb.freebsd.org/changeset/base/276738 Log: The QCA955x USB init path doesn't require any of this, so delete it. Obtained from: Linux/OpenWRT Modified: head/sys/mips/atheros/qca955x_chip.c Modified: head/sys/mips/atheros/qca955x_chip.c ============================================================================== --- head/sys/mips/atheros/qca955x_chip.c Tue Jan 6 05:28:37 2015 (r276737) +++ head/sys/mips/atheros/qca955x_chip.c Tue Jan 6 07:35:05 2015 (r276738) @@ -297,25 +297,6 @@ qca955x_configure_gmac(uint32_t gmac_cfg static void qca955x_chip_init_usb_peripheral(void) { -#if 0 - uint32_t reg; - - reg = ATH_READ_REG(AR934X_RESET_REG_BOOTSTRAP); - if (reg & AR934X_BOOTSTRAP_USB_MODE_DEVICE) - return; - - ar71xx_device_stop(AR934X_RESET_USBSUS_OVERRIDE); - DELAY(100); - - ar71xx_device_start(AR934X_RESET_USB_PHY); - DELAY(100); - - ar71xx_device_start(AR934X_RESET_USB_PHY_ANALOG); - DELAY(100); - - ar71xx_device_start(AR934X_RESET_USB_HOST); - DELAY(100); -#endif } static void From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 07:37: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 160ADAD2; Tue, 6 Jan 2015 07:37: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 02B8766340; Tue, 6 Jan 2015 07:37: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 t067bYch040264; Tue, 6 Jan 2015 07:37:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t067bYq8040262; Tue, 6 Jan 2015 07:37:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501060737.t067bYq8040262@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 6 Jan 2015 07:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276739 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 07:37:35 -0000 Author: adrian Date: Tue Jan 6 07:37:33 2015 New Revision: 276739 URL: https://svnweb.freebsd.org/changeset/base/276739 Log: Add an APB base/size for the QCA955X for an upcoming QCA955x specific APB mux. It's larger than the AR71xx because it needs to replace the nexus for some devices (notably wifi) and the wifi driver (if_ath_ahb.c) reads the SPI data directly at early boot whilst it's memory mapped in. I'm eventually going to rip it out and replace it with a firmware interface similar to what exists for the if_ath_pci.c path - something early on (likely something new that I'll write) will suck in the calibration data into a firmware API blob and that'll be accessed from if_ath_ahb.c. But, one thing at a time. Tested: * QCA955x SoC, AP135 development board Modified: head/sys/mips/atheros/qca955xreg.h Modified: head/sys/mips/atheros/qca955xreg.h ============================================================================== --- head/sys/mips/atheros/qca955xreg.h Tue Jan 6 07:35:05 2015 (r276738) +++ head/sys/mips/atheros/qca955xreg.h Tue Jan 6 07:37:33 2015 (r276739) @@ -35,6 +35,19 @@ #define REV_ID_MAJOR_QCA9558 0x1130 #define QCA955X_REV_ID_REVISION_MASK 0xf +/* Big enough to cover APB and SPI, and most peripherals */ +/* + * it needs to cover SPI because right now the if_ath_ahb + * code uses rman to map in the SPI address into memory + * to read data instead of us squirreling it away at early + * boot-time and using the firmware interface. + * + * if_ath_ahb.c should use the same firmware interface + * that if_ath_pci.c uses. + */ +#define QCA955X_APB_BASE 0x18000000 +#define QCA955X_APB_SIZE 0x08000000 + #define QCA955X_PCI_MEM_BASE0 0x10000000 #define QCA955X_PCI_MEM_BASE1 0x12000000 #define QCA955X_PCI_MEM_SIZE 0x02000000 From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 07:43: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 0D33AD44; Tue, 6 Jan 2015 07:43: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 ED3DF6430F; Tue, 6 Jan 2015 07:43:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t067h94D044422; Tue, 6 Jan 2015 07:43:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t067h8oT044415; Tue, 6 Jan 2015 07:43:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501060743.t067h8oT044415@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 6 Jan 2015 07:43:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276741 - in head/sys/mips: atheros 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 07:43:10 -0000 Author: adrian Date: Tue Jan 6 07:43:07 2015 New Revision: 276741 URL: https://svnweb.freebsd.org/changeset/base/276741 Log: Make the apb.c code optional behind ar71xx_apb rather than standard. The QCA955x has more mux interrupts going on - and the AR934x actually does, but I cheated and assigned wlan and pcie to the same interrupt line. They are, there's just a status register mux that I should've been using. Luckily this isn't too bad a change in itself - almost all of the Atheros MIPS configurations use a _BASE file to inherit from. Except PB92, which I should really fix up at some point. The AR934x will use the legacy apb for now until I write its replacement. The QCA955x SoC I'm doing bring-up on will have a separate qca955x_apb.c implementation that includes hooking into IP2/IP3 and doing further interrupt demuxing as appropriate. Modified: head/sys/mips/atheros/files.ar71xx head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR724X_BASE head/sys/mips/conf/AR91XX_BASE head/sys/mips/conf/AR933X_BASE head/sys/mips/conf/AR934X_BASE head/sys/mips/conf/PB92 Modified: head/sys/mips/atheros/files.ar71xx ============================================================================== --- head/sys/mips/atheros/files.ar71xx Tue Jan 6 07:41:30 2015 (r276740) +++ head/sys/mips/atheros/files.ar71xx Tue Jan 6 07:43:07 2015 (r276741) @@ -1,6 +1,6 @@ # $FreeBSD$ -mips/atheros/apb.c standard +mips/atheros/apb.c optional ar71xx_apb mips/atheros/ar71xx_gpio.c optional gpio mips/atheros/ar71xx_machdep.c standard mips/atheros/ar71xx_ehci.c optional ehci Modified: head/sys/mips/conf/AR71XX_BASE ============================================================================== --- head/sys/mips/conf/AR71XX_BASE Tue Jan 6 07:41:30 2015 (r276740) +++ head/sys/mips/conf/AR71XX_BASE Tue Jan 6 07:43:07 2015 (r276741) @@ -110,6 +110,8 @@ device ar71xx_wdog device uart device uart_ar71xx +device ar71xx_apb + device loop device ether device md Modified: head/sys/mips/conf/AR724X_BASE ============================================================================== --- head/sys/mips/conf/AR724X_BASE Tue Jan 6 07:41:30 2015 (r276740) +++ head/sys/mips/conf/AR724X_BASE Tue Jan 6 07:43:07 2015 (r276741) @@ -119,6 +119,8 @@ device ar71xx_wdog device uart device uart_ar71xx +device ar71xx_apb + device loop device ether device md Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Tue Jan 6 07:41:30 2015 (r276740) +++ head/sys/mips/conf/AR91XX_BASE Tue Jan 6 07:43:07 2015 (r276741) @@ -108,6 +108,8 @@ device ar71xx_wdog device uart device uart_ar71xx +device ar71xx_apb + device loop device ether device md Modified: head/sys/mips/conf/AR933X_BASE ============================================================================== --- head/sys/mips/conf/AR933X_BASE Tue Jan 6 07:41:30 2015 (r276740) +++ head/sys/mips/conf/AR933X_BASE Tue Jan 6 07:43:07 2015 (r276741) @@ -113,6 +113,8 @@ device ar71xx_wdog device uart device uart_ar933x +device ar71xx_apb + device loop device ether device md Modified: head/sys/mips/conf/AR934X_BASE ============================================================================== --- head/sys/mips/conf/AR934X_BASE Tue Jan 6 07:41:30 2015 (r276740) +++ head/sys/mips/conf/AR934X_BASE Tue Jan 6 07:43:07 2015 (r276741) @@ -117,6 +117,9 @@ device ar71xx_wdog device uart device uart_ar71xx +# XXX for now; later a separate APB mux is needed to demux PCI/WLAN interrupts. +device ar71xx_apb + device loop device ether device md Modified: head/sys/mips/conf/PB92 ============================================================================== --- head/sys/mips/conf/PB92 Tue Jan 6 07:41:30 2015 (r276740) +++ head/sys/mips/conf/PB92 Tue Jan 6 07:43:07 2015 (r276741) @@ -126,6 +126,8 @@ device ar71xx_wdog device uart device uart_ar71xx +device ar71xx_apb + # Network twiddling device loop device ether From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 07:51: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 E5076F32; Tue, 6 Jan 2015 07:51: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 D1B9164488; Tue, 6 Jan 2015 07:51: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 t067plQn048911; Tue, 6 Jan 2015 07:51:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t067plKN048910; Tue, 6 Jan 2015 07:51:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501060751.t067plKN048910@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 6 Jan 2015 07:51:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276742 - 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 07:51:48 -0000 Author: adrian Date: Tue Jan 6 07:51:46 2015 New Revision: 276742 URL: https://svnweb.freebsd.org/changeset/base/276742 Log: Add option to support the QCA955x SoC wifi. Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Jan 6 07:43:07 2015 (r276741) +++ head/sys/conf/options Tue Jan 6 07:51:46 2015 (r276742) @@ -804,6 +804,7 @@ AH_SUPPORT_AR9130 opt_ah.h # This is required for AR933x SoC support AH_SUPPORT_AR9330 opt_ah.h AH_SUPPORT_AR9340 opt_ah.h +AH_SUPPORT_QCA9550 opt_ah.h AH_DEBUG opt_ah.h AH_ASSERT opt_ah.h From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 07:52: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 BEBA6F8; Tue, 6 Jan 2015 07:52: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 AA8656449C; Tue, 6 Jan 2015 07:52: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 t067qKm0049034; Tue, 6 Jan 2015 07:52:20 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t067qKkd049033; Tue, 6 Jan 2015 07:52:20 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501060752.t067qKkd049033@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 6 Jan 2015 07:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276743 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 07:52:20 -0000 Author: adrian Date: Tue Jan 6 07:52:19 2015 New Revision: 276743 URL: https://svnweb.freebsd.org/changeset/base/276743 Log: Glue to suck in the QCA9550 HAL support if AH_SUPPORT_QCA9550 is defined. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Tue Jan 6 07:51:46 2015 (r276742) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Tue Jan 6 07:52:19 2015 (r276743) @@ -57,7 +57,9 @@ #ifdef AH_SUPPORT_AR9340 #define AH_SUPPORT_WASP 1 #endif /* AH_SUPPORT_AR9340 */ -//#define AH_SUPPORT_SCORPION 1 +#ifdef AH_SUPPORT_QCA9550 +#define AH_SUPPORT_SCORPION 1 +#endif /* AH_SUPPORT_QCA9550 */ #define FIX_NOISE_FLOOR 1 /* XXX this needs to be removed! No atomics in the HAL! */ From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 08:39:09 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 4AFDED31; Tue, 6 Jan 2015 08:39:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A6B064A44; Tue, 6 Jan 2015 08:39:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t068d9Vs068542; Tue, 6 Jan 2015 08:39:09 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t068d7dH068533; Tue, 6 Jan 2015 08:39:07 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201501060839.t068d7dH068533@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 6 Jan 2015 08:39:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276746 - in head/sys: net netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 08:39:09 -0000 Author: rodrigc Date: Tue Jan 6 08:39:06 2015 New Revision: 276746 URL: https://svnweb.freebsd.org/changeset/base/276746 Log: Merge: r258322 from projects/pf branch Split functions that initialize various pf parts into their vimage parts and global parts. Since global parts appeared to be only mutex initializations, just abandon them and use MTX_SYSINIT() instead. Kill my incorrect VNET_FOREACH() iterator and instead use correct approach with VNET_SYSINIT(). PR: 194515 Differential Revision: D1309 Submitted by: glebius, Nikos Vassiliadis Reviewed by: trociny, zec, gnn Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_if.c head/sys/netpfil/pf/pf_ioctl.c head/sys/netpfil/pf/pf_norm.c head/sys/netpfil/pf/pf_table.c Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Tue Jan 6 08:03:01 2015 (r276745) +++ head/sys/net/pfvar.h Tue Jan 6 08:39:06 2015 (r276746) @@ -829,7 +829,6 @@ typedef int pflog_packet_t(struct pfi_ki struct pf_ruleset *, struct pf_pdesc *, int); extern pflog_packet_t *pflog_packet_ptr; -#define V_pf_end_threads VNET(pf_end_threads) #endif /* _KERNEL */ #define PFSYNC_FLAG_SRCNODE 0x04 Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Tue Jan 6 08:03:01 2015 (r276745) +++ head/sys/netpfil/pf/pf.c Tue Jan 6 08:39:06 2015 (r276746) @@ -290,8 +290,6 @@ static void pf_route6(struct mbuf **, int in4_cksum(struct mbuf *m, u_int8_t nxt, int off, int len); -VNET_DECLARE(int, pf_end_threads); - VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); #define PACKET_LOOPED(pd) ((pd)->pf_mtag && \ Modified: head/sys/netpfil/pf/pf_if.c ============================================================================== --- head/sys/netpfil/pf/pf_if.c Tue Jan 6 08:03:01 2015 (r276745) +++ head/sys/netpfil/pf/pf_if.c Tue Jan 6 08:39:06 2015 (r276746) @@ -115,7 +115,8 @@ pfi_initialize(void) V_pfi_buffer = malloc(V_pfi_buffer_max * sizeof(*V_pfi_buffer), PFI_MTYPE, M_WAITOK); - mtx_init(&pfi_unlnkdkifs_mtx, "pf unlinked interfaces", NULL, MTX_DEF); + if (IS_DEFAULT_VNET(curvnet)) + mtx_init(&pfi_unlnkdkifs_mtx, "pf unlinked interfaces", NULL, MTX_DEF); kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK); PF_RULES_WLOCK(); @@ -129,18 +130,20 @@ pfi_initialize(void) pfi_attach_ifnet(ifp); IFNET_RUNLOCK(); - pfi_attach_cookie = EVENTHANDLER_REGISTER(ifnet_arrival_event, - pfi_attach_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); - pfi_detach_cookie = EVENTHANDLER_REGISTER(ifnet_departure_event, - pfi_detach_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); - pfi_attach_group_cookie = EVENTHANDLER_REGISTER(group_attach_event, - pfi_attach_group_event, curvnet, EVENTHANDLER_PRI_ANY); - pfi_change_group_cookie = EVENTHANDLER_REGISTER(group_change_event, - pfi_change_group_event, curvnet, EVENTHANDLER_PRI_ANY); - pfi_detach_group_cookie = EVENTHANDLER_REGISTER(group_detach_event, - pfi_detach_group_event, curvnet, EVENTHANDLER_PRI_ANY); - pfi_ifaddr_event_cookie = EVENTHANDLER_REGISTER(ifaddr_event, - pfi_ifaddr_event, NULL, EVENTHANDLER_PRI_ANY); + if (IS_DEFAULT_VNET(curvnet)) { + pfi_attach_cookie = EVENTHANDLER_REGISTER(ifnet_arrival_event, + pfi_attach_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); + pfi_detach_cookie = EVENTHANDLER_REGISTER(ifnet_departure_event, + pfi_detach_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); + pfi_attach_group_cookie = EVENTHANDLER_REGISTER(group_attach_event, + pfi_attach_group_event, curvnet, EVENTHANDLER_PRI_ANY); + pfi_change_group_cookie = EVENTHANDLER_REGISTER(group_change_event, + pfi_change_group_event, curvnet, EVENTHANDLER_PRI_ANY); + pfi_detach_group_cookie = EVENTHANDLER_REGISTER(group_detach_event, + pfi_detach_group_event, curvnet, EVENTHANDLER_PRI_ANY); + pfi_ifaddr_event_cookie = EVENTHANDLER_REGISTER(ifaddr_event, + pfi_ifaddr_event, NULL, EVENTHANDLER_PRI_ANY); + } } void Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Tue Jan 6 08:03:01 2015 (r276745) +++ head/sys/netpfil/pf/pf_ioctl.c Tue Jan 6 08:39:06 2015 (r276746) @@ -189,7 +189,6 @@ static struct cdevsw pf_cdevsw = { static volatile VNET_DEFINE(int, pf_pfil_hooked); #define V_pf_pfil_hooked VNET(pf_pfil_hooked) -VNET_DEFINE(int, pf_end_threads); struct rwlock pf_rules_lock; struct sx pf_ioctl_lock; @@ -276,10 +275,13 @@ pfattach(void) for (int i = 0; i < SCNT_MAX; i++) V_pf_status.scounters[i] = counter_u64_alloc(M_WAITOK); - if ((error = kproc_create(pf_purge_thread, curvnet, NULL, 0, 0, - "pf purge")) != 0) - /* XXXGL: leaked all above. */ - return (error); + if (IS_DEFAULT_VNET(curvnet)) { + if ((error = kproc_create(pf_purge_thread, curvnet, NULL, 0, 0, + "pf purge")) != 0) { + /* XXXGL: leaked all above. */ + return (error); + } + } if ((error = swi_add(NULL, "pf send", pf_intr, curvnet, SWI_NET, INTR_MPSAFE, &V_pf_swi_cookie)) != 0) /* XXXGL: leaked all above. */ @@ -3759,11 +3761,6 @@ pf_unload(void) } PF_RULES_WLOCK(); shutdown_pf(); - V_pf_end_threads = 1; - while (V_pf_end_threads < 2) { - wakeup_one(pf_purge_thread); - rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftmo", 0); - } pf_normalize_cleanup(); pfi_cleanup(); pfr_cleanup(); @@ -3813,3 +3810,6 @@ static moduledata_t pf_mod = { DECLARE_MODULE(pf, pf_mod, SI_SUB_PSEUDO, SI_ORDER_FIRST); MODULE_VERSION(pf, PF_MODVER); + +VNET_SYSINIT(vnet_pf_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY - 255, + vnet_pf_init, NULL); Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Tue Jan 6 08:03:01 2015 (r276745) +++ head/sys/netpfil/pf/pf_norm.c Tue Jan 6 08:39:06 2015 (r276746) @@ -162,7 +162,8 @@ pf_normalize_init(void) uma_zone_set_max(V_pf_frent_z, PFFRAG_FRENT_HIWAT); uma_zone_set_warning(V_pf_frent_z, "PF frag entries limit reached"); - mtx_init(&pf_frag_mtx, "pf fragments", NULL, MTX_DEF); + if (IS_DEFAULT_VNET(curvnet)) + mtx_init(&pf_frag_mtx, "pf fragments", NULL, MTX_DEF); TAILQ_INIT(&V_pf_fragqueue); TAILQ_INIT(&V_pf_cachequeue); Modified: head/sys/netpfil/pf/pf_table.c ============================================================================== --- head/sys/netpfil/pf/pf_table.c Tue Jan 6 08:03:01 2015 (r276745) +++ head/sys/netpfil/pf/pf_table.c Tue Jan 6 08:39:06 2015 (r276746) @@ -184,9 +184,13 @@ static struct pfr_kentry static RB_PROTOTYPE(pfr_ktablehead, pfr_ktable, pfrkt_tree, pfr_ktable_compare); static RB_GENERATE(pfr_ktablehead, pfr_ktable, pfrkt_tree, pfr_ktable_compare); -struct pfr_ktablehead pfr_ktables; +VNET_DEFINE(struct pfr_ktablehead, pfr_ktables); +#define V_pfr_ktables VNET(pfr_ktables) + struct pfr_table pfr_nulltable; -int pfr_ktable_cnt; + +VNET_DEFINE(int, pfr_ktable_cnt); +#define V_pfr_ktable_cnt VNET(pfr_ktable_cnt) void pfr_initialize(void) @@ -1083,7 +1087,7 @@ pfr_clr_tables(struct pfr_table *filter, return (ENOENT); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (pfr_skip_table(filter, p, flags)) continue; if (!strcmp(p->pfrkt_anchor, PF_RESERVED_ANCHOR)) @@ -1118,7 +1122,7 @@ pfr_add_tables(struct pfr_table *tbl, in flags & PFR_FLAG_USERIOCTL)) senderr(EINVAL); key.pfrkt_flags |= PFR_TFLAG_ACTIVE; - p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (p == NULL) { p = pfr_create_ktable(&key.pfrkt_t, tzero, 1); if (p == NULL) @@ -1134,7 +1138,7 @@ pfr_add_tables(struct pfr_table *tbl, in /* find or create root table */ bzero(key.pfrkt_anchor, sizeof(key.pfrkt_anchor)); - r = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + r = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (r != NULL) { p->pfrkt_root = r; goto _skip; @@ -1190,7 +1194,7 @@ pfr_del_tables(struct pfr_table *tbl, in if (pfr_validate_table(&key.pfrkt_t, 0, flags & PFR_FLAG_USERIOCTL)) return (EINVAL); - p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (p != NULL && (p->pfrkt_flags & PFR_TFLAG_ACTIVE)) { SLIST_FOREACH(q, &workq, pfrkt_workq) if (!pfr_ktable_compare(p, q)) @@ -1229,7 +1233,7 @@ pfr_get_tables(struct pfr_table *filter, *size = n; return (0); } - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (pfr_skip_table(filter, p, flags)) continue; if (n-- <= 0) @@ -1264,7 +1268,7 @@ pfr_get_tstats(struct pfr_table *filter, return (0); } SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (pfr_skip_table(filter, p, flags)) continue; if (n-- <= 0) @@ -1296,7 +1300,7 @@ pfr_clr_tstats(struct pfr_table *tbl, in bcopy(tbl + i, &key.pfrkt_t, sizeof(key.pfrkt_t)); if (pfr_validate_table(&key.pfrkt_t, 0, 0)) return (EINVAL); - p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (p != NULL) { SLIST_INSERT_HEAD(&workq, p, pfrkt_workq); xzero++; @@ -1328,7 +1332,7 @@ pfr_set_tflags(struct pfr_table *tbl, in if (pfr_validate_table(&key.pfrkt_t, 0, flags & PFR_FLAG_USERIOCTL)) return (EINVAL); - p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (p != NULL && (p->pfrkt_flags & PFR_TFLAG_ACTIVE)) { p->pfrkt_nflags = (p->pfrkt_flags | setflag) & ~clrflag; @@ -1370,7 +1374,7 @@ pfr_ina_begin(struct pfr_table *trs, u_i if (rs == NULL) return (ENOMEM); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (!(p->pfrkt_flags & PFR_TFLAG_INACTIVE) || pfr_skip_table(trs, p, 0)) continue; @@ -1415,7 +1419,7 @@ pfr_ina_define(struct pfr_table *tbl, st return (EBUSY); tbl->pfrt_flags |= PFR_TFLAG_INACTIVE; SLIST_INIT(&tableq); - kt = RB_FIND(pfr_ktablehead, &pfr_ktables, (struct pfr_ktable *)tbl); + kt = RB_FIND(pfr_ktablehead, &V_pfr_ktables, (struct pfr_ktable *)tbl); if (kt == NULL) { kt = pfr_create_ktable(tbl, 0, 1); if (kt == NULL) @@ -1428,7 +1432,7 @@ pfr_ina_define(struct pfr_table *tbl, st /* find or create root table */ bzero(&key, sizeof(key)); strlcpy(key.pfrkt_name, tbl->pfrt_name, sizeof(key.pfrkt_name)); - rt = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); + rt = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); if (rt != NULL) { kt->pfrkt_root = rt; goto _skip; @@ -1505,7 +1509,7 @@ pfr_ina_rollback(struct pfr_table *trs, if (rs == NULL || !rs->topen || ticket != rs->tticket) return (0); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (!(p->pfrkt_flags & PFR_TFLAG_INACTIVE) || pfr_skip_table(trs, p, 0)) continue; @@ -1541,7 +1545,7 @@ pfr_ina_commit(struct pfr_table *trs, u_ return (EBUSY); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { if (!(p->pfrkt_flags & PFR_TFLAG_INACTIVE) || pfr_skip_table(trs, p, 0)) continue; @@ -1687,7 +1691,7 @@ pfr_table_count(struct pfr_table *filter PF_RULES_ASSERT(); if (flags & PFR_FLAG_ALLRSETS) - return (pfr_ktable_cnt); + return (V_pfr_ktable_cnt); if (filter->pfrt_anchor[0]) { rs = pf_find_ruleset(filter->pfrt_anchor); return ((rs != NULL) ? rs->tables : -1); @@ -1720,8 +1724,8 @@ pfr_insert_ktable(struct pfr_ktable *kt) PF_RULES_WASSERT(); - RB_INSERT(pfr_ktablehead, &pfr_ktables, kt); - pfr_ktable_cnt++; + RB_INSERT(pfr_ktablehead, &V_pfr_ktables, kt); + V_pfr_ktable_cnt++; if (kt->pfrkt_root != NULL) if (!kt->pfrkt_root->pfrkt_refcnt[PFR_REFCNT_ANCHOR]++) pfr_setflags_ktable(kt->pfrkt_root, @@ -1752,14 +1756,14 @@ pfr_setflags_ktable(struct pfr_ktable *k if (!(newf & PFR_TFLAG_ACTIVE)) newf &= ~PFR_TFLAG_USRMASK; if (!(newf & PFR_TFLAG_SETMASK)) { - RB_REMOVE(pfr_ktablehead, &pfr_ktables, kt); + RB_REMOVE(pfr_ktablehead, &V_pfr_ktables, kt); if (kt->pfrkt_root != NULL) if (!--kt->pfrkt_root->pfrkt_refcnt[PFR_REFCNT_ANCHOR]) pfr_setflags_ktable(kt->pfrkt_root, kt->pfrkt_root->pfrkt_flags & ~PFR_TFLAG_REFDANCHOR); pfr_destroy_ktable(kt, 1); - pfr_ktable_cnt--; + V_pfr_ktable_cnt--; return; } if (!(newf & PFR_TFLAG_ACTIVE) && kt->pfrkt_cnt) { @@ -1880,7 +1884,7 @@ static struct pfr_ktable * pfr_lookup_table(struct pfr_table *tbl) { /* struct pfr_ktable start like a struct pfr_table */ - return (RB_FIND(pfr_ktablehead, &pfr_ktables, + return (RB_FIND(pfr_ktablehead, &V_pfr_ktables, (struct pfr_ktable *)tbl)); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 09:03: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 9F2BF68C; Tue, 6 Jan 2015 09:03: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 8024E2FCE; Tue, 6 Jan 2015 09:03: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 t06934Z0081876; Tue, 6 Jan 2015 09:03:04 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06934qp081875; Tue, 6 Jan 2015 09:03:04 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201501060903.t06934qp081875@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 6 Jan 2015 09:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276747 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 09:03:04 -0000 Author: rodrigc Date: Tue Jan 6 09:03:03 2015 New Revision: 276747 URL: https://svnweb.freebsd.org/changeset/base/276747 Log: Instead of creating a purge thread for every vnet, create a single purge thread and clean up all vnets from this thread. PR: 194515 Differential Revision: D1315 Submitted by: Nikos Vassiliadis Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Tue Jan 6 08:39:06 2015 (r276746) +++ head/sys/netpfil/pf/pf.c Tue Jan 6 09:03:03 2015 (r276747) @@ -1384,71 +1384,37 @@ pf_intr(void *v) } void -pf_purge_thread(void *v) +pf_purge_thread(void *v __unused) { u_int idx = 0; - - CURVNET_SET((struct vnet *)v); + VNET_ITERATOR_DECL(vnet_iter); for (;;) { - PF_RULES_RLOCK(); - rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftm", hz / 10); - - if (V_pf_end_threads) { - /* - * To cleanse up all kifs and rules we need - * two runs: first one clears reference flags, - * then pf_purge_expired_states() doesn't - * raise them, and then second run frees. - */ - PF_RULES_RUNLOCK(); - pf_purge_unlinked_rules(); - pfi_kif_purge(); - - /* - * Now purge everything. - */ - pf_purge_expired_states(0, pf_hashmask); - pf_purge_expired_fragments(); - pf_purge_expired_src_nodes(); - - /* - * Now all kifs & rules should be unreferenced, - * thus should be successfully freed. - */ - pf_purge_unlinked_rules(); - pfi_kif_purge(); + tsleep(pf_purge_thread, PWAIT, "pftm", hz / 10); + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + /* Process 1/interval fraction of the state table every run. */ + idx = pf_purge_expired_states(idx, pf_hashmask / + (V_pf_default_rule.timeout[PFTM_INTERVAL] * 10)); - /* - * Announce success and exit. - */ - PF_RULES_RLOCK(); - V_pf_end_threads++; - PF_RULES_RUNLOCK(); - wakeup(pf_purge_thread); - kproc_exit(0); - } - PF_RULES_RUNLOCK(); - - /* Process 1/interval fraction of the state table every run. */ - idx = pf_purge_expired_states(idx, pf_hashmask / - (V_pf_default_rule.timeout[PFTM_INTERVAL] * 10)); - - /* Purge other expired types every PFTM_INTERVAL seconds. */ - if (idx == 0) { - /* - * Order is important: - * - states and src nodes reference rules - * - states and rules reference kifs - */ - pf_purge_expired_fragments(); - pf_purge_expired_src_nodes(); - pf_purge_unlinked_rules(); - pfi_kif_purge(); + /* Purge other expired types every PFTM_INTERVAL seconds. */ + if (idx == 0) { + /* + * Order is important: + * - states and src nodes reference rules + * - states and rules reference kifs + */ + pf_purge_expired_fragments(); + pf_purge_expired_src_nodes(); + pf_purge_unlinked_rules(); + pfi_kif_purge(); + } + CURVNET_RESTORE(); } + VNET_LIST_RUNLOCK(); } /* not reached */ - CURVNET_RESTORE(); } u_int32_t From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 09:35: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 3BEFBA7; Tue, 6 Jan 2015 09:35:10 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE27866468; Tue, 6 Jan 2015 09:35:09 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 2E29D1FE022; Tue, 6 Jan 2015 10:35:06 +0100 (CET) Message-ID: <54ABAC7A.6080002@selasky.org> Date: Tue, 06 Jan 2015 10:35:54 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Craig Rodrigues , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r276747 - head/sys/netpfil/pf References: <201501060903.t06934qp081875@svn.freebsd.org> In-Reply-To: <201501060903.t06934qp081875@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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 09:35:10 -0000 On 01/06/15 09:39, Craig Rodrigues wrote:> Author: rodrigc > Date: Tue Jan 6 08:39:06 2015 > New Revision: 276746 > URL: https://svnweb.freebsd.org/changeset/base/276746 > > Log: > Merge: r258322 from projects/pf branch > > Split functions that initialize various pf parts into their > vimage parts and global parts. > Since global parts appeared to be only mutex initializations, just > abandon them and use MTX_SYSINIT() instead. > Kill my incorrect VNET_FOREACH() iterator and instead use correct > approach with VNET_SYSINIT(). > > PR: 194515 > Differential Revision: D1309 > Submitted by: glebius, Nikos Vassiliadis > Reviewed by: trociny, zec, gnn This results in the following build failures: sys/modules/pf/../../netpfil/pf/pf_ioctl.c:3728:3: error: use of undeclared identifier 'V_pf_end_threads' V_pf_end_threads = 0; ^ sys/modules/pf/../../netpfil/pf/pf_ioctl.c:3815:6: error: use of undeclared identifier 'vnet_pf_init' vnet_pf_init, NULL); ^ sys/net/vnet.h:414:35: note: expanded from macro 'VNET_SYSINIT' SYSINIT(ident, subsystem, order, func, arg) ^ sys/sys/kernel.h:243:36: note: expanded from macro 'SYSINIT' (sysinit_cfunc_t)(sysinit_nfunc_t)func, (void *)(ident)) ^ sys/sys/kernel.h:236:3: note: expanded from macro 'C_SYSINIT' func --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 09:39: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 0CA9A382; Tue, 6 Jan 2015 09:39: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 DB9136651D; Tue, 6 Jan 2015 09:39: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 t069dh1S000221; Tue, 6 Jan 2015 09:39:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t069dh0Y000220; Tue, 6 Jan 2015 09:39:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501060939.t069dh0Y000220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 6 Jan 2015 09:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276748 - 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 09:39:44 -0000 Author: hselasky Date: Tue Jan 6 09:39:42 2015 New Revision: 276748 URL: https://svnweb.freebsd.org/changeset/base/276748 Log: Fix kernel build after r276730. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 6 09:03:03 2015 (r276747) +++ head/sys/conf/files Tue Jan 6 09:39:42 2015 (r276748) @@ -3316,7 +3316,7 @@ net80211/ieee80211_scan_sta.c optional w net80211/ieee80211_sta.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_superg.c optional wlan ieee80211_support_superg -net80211/ieee80211_swscan.c optional wlan +net80211/ieee80211_scan_sw.c optional wlan net80211/ieee80211_tdma.c optional wlan ieee80211_support_tdma net80211/ieee80211_wds.c optional wlan net80211/ieee80211_xauth.c optional wlan wlan_xauth From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 09:43: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 3F047DA8; Tue, 6 Jan 2015 09:43:35 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00A1266615; Tue, 6 Jan 2015 09:43:35 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 2DEA41FE022; Tue, 6 Jan 2015 10:43:32 +0100 (CET) Message-ID: <54ABAE74.8030406@selasky.org> Date: Tue, 06 Jan 2015 10:44:20 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r276730 - in head/sys: conf modules/wlan net80211 References: <201501060208.t0628kkh086961@svn.freebsd.org> In-Reply-To: <201501060208.t0628kkh086961@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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 09:43:35 -0000 On 01/06/15 03:08, Adrian Chadd wrote: > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Tue Jan 6 01:30:32 2015 (r276729) > +++ head/sys/conf/files Tue Jan 6 02:08:45 2015 (r276730) > @@ -3316,6 +3316,7 @@ net80211/ieee80211_scan_sta.c optional w > net80211/ieee80211_sta.c optional wlan \ > compile-with "${NORMAL_C} -Wno-unused-function" > net80211/ieee80211_superg.c optional wlan ieee80211_support_superg > +net80211/ieee80211_swscan.c optional wlan > net80211/ieee80211_tdma.c optional wlan ieee80211_support_tdma > net80211/ieee80211_wds.c optional wlan > net80211/ieee80211_xauth.c optional wlan wlan_xauth > > Modified: head/sys/modules/wlan/Makefile > ============================================================================== > --- head/sys/modules/wlan/Makefile Tue Jan 6 01:30:32 2015 (r276729) > +++ head/sys/modules/wlan/Makefile Tue Jan 6 02:08:45 2015 (r276730) > @@ -7,7 +7,7 @@ SRCS= ieee80211.c ieee80211_action.c iee > ieee80211_crypto.c ieee80211_crypto_none.c ieee80211_dfs.c \ > ieee80211_freebsd.c ieee80211_input.c ieee80211_ioctl.c \ > ieee80211_mesh.c ieee80211_node.c ieee80211_output.c ieee80211_phy.c \ > - ieee80211_power.c ieee80211_proto.c ieee80211_scan.c \ > + ieee80211_power.c ieee80211_proto.c ieee80211_scan.c ieee80211_scan_sw.c \ > ieee80211_scan_sta.c ieee80211_radiotap.c ieee80211_ratectl.c \ > ieee80211_ratectl_none.c ieee80211_regdomain.c \ > ieee80211_ht.c ieee80211_hwmp.c ieee80211_adhoc.c ieee80211_hostap.c \ Hi, FYI: What you put into "head/sys/conf/files" mismatches "head/sys/modules/wlan/Makefile" :-) See r276748. Hope is OK. --HPS From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 10:02: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 791EF340; Tue, 6 Jan 2015 10:02: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 4C384641D7; Tue, 6 Jan 2015 10: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 t06A2HYP015810; Tue, 6 Jan 2015 10:02:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06A2F5i015802; Tue, 6 Jan 2015 10:02:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501061002.t06A2F5i015802@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 6 Jan 2015 10:02:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276749 - in head/sys/ofed: drivers/infiniband/hw/mlx4 drivers/net/mlx4 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 10:02:43 -0000 Author: hselasky Date: Tue Jan 6 10:02:14 2015 New Revision: 276749 URL: https://svnweb.freebsd.org/changeset/base/276749 Log: Fixes and updates for the Linux compatibility layer: - Remove unsupported "bus" field from "struct pci_dev". - Fix logic inside "pci_enable_msix()" when the number of allocated interrupts are less than the number of available interrupts. - Update header files included from "list.h". - Ensure that "idr_destroy()" removes all entries before destroying the IDR root node(s). - Set the "device->release" function so that we don't leak memory at device destruction. - Use FreeBSD's "log()" function for certain debug printouts. - Put parenthesis around arguments inside the min, max, min_t and max_t macros. - Make sure we don't leak file descriptors by dropping the extra file reference counts done by the FreeBSD kernel when calling falloc() and fget_unlocked(). MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/ofed/drivers/net/mlx4/main.c head/sys/ofed/include/linux/file.h head/sys/ofed/include/linux/kernel.h head/sys/ofed/include/linux/linux_compat.c head/sys/ofed/include/linux/linux_idr.c head/sys/ofed/include/linux/list.h head/sys/ofed/include/linux/pci.h Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Jan 6 09:39:42 2015 (r276748) +++ head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Jan 6 10:02:14 2015 (r276749) @@ -1613,8 +1613,12 @@ static void mlx4_ib_alloc_eqs(struct mlx eq = 0; mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_IB) { for (j = 0; j < eq_per_port; j++) { - //sprintf(name, "mlx4-ib-%d-%d@%s", - // i, j, dev->pdev->bus->conf.pd_name); + snprintf(name, sizeof(name), "mlx4-ib-%d-%d@%d:%d:%d:%d", i, j, + pci_get_domain(dev->pdev->dev.bsddev), + pci_get_bus(dev->pdev->dev.bsddev), + PCI_SLOT(dev->pdev->devfn), + PCI_FUNC(dev->pdev->devfn)); + /* Set IRQ for specific name (per ring) */ if (mlx4_assign_eq(dev, name, &ibdev->eq_table[eq])) { Modified: head/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/main.c Tue Jan 6 09:39:42 2015 (r276748) +++ head/sys/ofed/drivers/net/mlx4/main.c Tue Jan 6 10:02:14 2015 (r276749) @@ -504,10 +504,6 @@ int mlx4_get_val(struct mlx4_dbdf2val *t if (!pdev) return -EINVAL; - if (!pdev->bus) { - return -EINVAL; - } - dbdf = dbdf_to_u64(pci_get_domain(pdev->dev.bsddev), pci_get_bus(pdev->dev.bsddev), PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); Modified: head/sys/ofed/include/linux/file.h ============================================================================== --- head/sys/ofed/include/linux/file.h Tue Jan 6 09:39:42 2015 (r276748) +++ head/sys/ofed/include/linux/file.h Tue Jan 6 10:02:14 2015 (r276749) @@ -77,7 +77,15 @@ put_unused_fd(unsigned int fd) NULL) != 0) { return; } + /* + * NOTE: We should only get here when the "fd" has not been + * installed, so no need to free the associated Linux file + * structure. + */ fdclose(curthread->td_proc->p_fd, file, fd, curthread); + + /* drop extra reference */ + fdrop(file, curthread); } static inline void @@ -90,7 +98,10 @@ fd_install(unsigned int fd, struct linux file = NULL; } filp->_file = file; - finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); + finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); + + /* drop the extra reference */ + fput(filp); } static inline int @@ -103,6 +114,8 @@ get_unused_fd(void) error = falloc(curthread, &file, &fd, 0); if (error) return -error; + /* drop the extra reference */ + fdrop(file, curthread); return fd; } Modified: head/sys/ofed/include/linux/kernel.h ============================================================================== --- head/sys/ofed/include/linux/kernel.h Tue Jan 6 09:39:42 2015 (r276748) +++ head/sys/ofed/include/linux/kernel.h Tue Jan 6 10:02:14 2015 (r276749) @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -65,7 +66,23 @@ #define DIV_ROUND_UP howmany #define printk(X...) printf(X) -#define pr_debug(fmt, ...) printk(KERN_DEBUG # fmt, ##__VA_ARGS__) + +/* + * The "pr_debug()" and "pr_devel()" macros should produce zero code + * unless DEBUG is defined: + */ +#ifdef DEBUG +#define pr_debug(fmt, ...) \ + log(LOG_DEBUG, fmt, ##__VA_ARGS__) +#define pr_devel(fmt, ...) \ + log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__) +#else +#define pr_debug(fmt, ...) \ + ({ if (0) log(LOG_DEBUG, fmt, ##__VA_ARGS__); 0; }) +#define pr_devel(fmt, ...) \ + ({ if (0) log(LOG_DEBUG, pr_fmt(fmt), ##__VA_ARGS__); 0; }) +#endif + #define udelay(t) DELAY(t) #ifndef pr_fmt @@ -75,45 +92,46 @@ /* * Print a one-time message (analogous to WARN_ONCE() et al): */ -#define printk_once(x...) ({ \ - static bool __print_once; \ - \ - if (!__print_once) { \ - __print_once = true; \ - printk(x); \ - } \ -}) - +#define printk_once(...) do { \ + static bool __print_once; \ + \ + if (!__print_once) { \ + __print_once = true; \ + printk(__VA_ARGS__); \ + } \ +} while (0) +/* + * Log a one-time message (analogous to WARN_ONCE() et al): + */ +#define log_once(level,...) do { \ + static bool __log_once; \ + \ + if (!__log_once) { \ + __log_once = true; \ + log(level, __VA_ARGS__); \ + } \ +} while (0) #define pr_emerg(fmt, ...) \ - printk(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_EMERG, pr_fmt(fmt), ##__VA_ARGS__) #define pr_alert(fmt, ...) \ - printk(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_ALERT, pr_fmt(fmt), ##__VA_ARGS__) #define pr_crit(fmt, ...) \ - printk(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_CRIT, pr_fmt(fmt), ##__VA_ARGS__) #define pr_err(fmt, ...) \ - printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_ERR, pr_fmt(fmt), ##__VA_ARGS__) #define pr_warning(fmt, ...) \ - printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_WARNING, pr_fmt(fmt), ##__VA_ARGS__) #define pr_warn pr_warning #define pr_notice(fmt, ...) \ - printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_NOTICE, pr_fmt(fmt), ##__VA_ARGS__) #define pr_info(fmt, ...) \ - printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) + log(LOG_INFO, pr_fmt(fmt), ##__VA_ARGS__) #define pr_info_once(fmt, ...) \ - printk_once(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) + log_once(LOG_INFO, pr_fmt(fmt), ##__VA_ARGS__) #define pr_cont(fmt, ...) \ - printk(KERN_CONT fmt, ##__VA_ARGS__) - -/* pr_devel() should produce zero code unless DEBUG is defined */ -#ifdef DEBUG -#define pr_devel(fmt, ...) \ - printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) -#else -#define pr_devel(fmt, ...) \ - ({ if (0) printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); 0; }) -#endif + printk(KERN_CONT fmt, ##__VA_ARGS__) #ifndef WARN #define WARN(condition, format...) ({ \ @@ -136,10 +154,10 @@ #define simple_strtol strtol #define kstrtol(a,b,c) ({*(c) = strtol(a,0,b);}) -#define min(x, y) (x < y ? x : y) -#define max(x, y) (x > y ? x : y) -#define min_t(type, _x, _y) (type)(_x) < (type)(_y) ? (type)(_x) : (_y) -#define max_t(type, _x, _y) (type)(_x) > (type)(_y) ? (type)(_x) : (_y) +#define min(x, y) ((x) < (y) ? (x) : (y)) +#define max(x, y) ((x) > (y) ? (x) : (y)) +#define min_t(type, _x, _y) ((type)(_x) < (type)(_y) ? (type)(_x) : (type)(_y)) +#define max_t(type, _x, _y) ((type)(_x) > (type)(_y) ? (type)(_x) : (type)(_y)) /* * This looks more complex than it should be. But we need to Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Tue Jan 6 09:39:42 2015 (r276748) +++ head/sys/ofed/include/linux/linux_compat.c Tue Jan 6 10:02:14 2015 (r276749) @@ -174,6 +174,13 @@ kobject_kfree_name(struct kobject *kobj) struct kobj_type kfree_type = { .release = kobject_kfree }; +static void +dev_release(struct device *dev) +{ + pr_debug("dev_release: %s\n", dev_name(dev)); + kfree(dev); +} + struct device * device_create(struct class *class, struct device *parent, dev_t devt, void *drvdata, const char *fmt, ...) @@ -186,6 +193,7 @@ device_create(struct class *class, struc dev->class = class; dev->devt = devt; dev->driver_data = drvdata; + dev->release = dev_release; va_start(args, fmt); kobject_set_name_vargs(&dev->kobj, fmt, args); va_end(args); Modified: head/sys/ofed/include/linux/linux_idr.c ============================================================================== --- head/sys/ofed/include/linux/linux_idr.c Tue Jan 6 09:39:42 2015 (r276748) +++ head/sys/ofed/include/linux/linux_idr.c Tue Jan 6 10:02:14 2015 (r276749) @@ -77,6 +77,7 @@ idr_destroy(struct idr *idr) { struct idr_layer *il, *iln; + idr_remove_all(idr); mtx_lock(&idr->lock); for (il = idr->free; il != NULL; il = iln) { iln = il->ary[0]; Modified: head/sys/ofed/include/linux/list.h ============================================================================== --- head/sys/ofed/include/linux/list.h Tue Jan 6 09:39:42 2015 (r276748) +++ head/sys/ofed/include/linux/list.h Tue Jan 6 10:02:14 2015 (r276749) @@ -58,6 +58,7 @@ #include #include +#include #include #include Modified: head/sys/ofed/include/linux/pci.h ============================================================================== --- head/sys/ofed/include/linux/pci.h Tue Jan 6 09:39:42 2015 (r276748) +++ head/sys/ofed/include/linux/pci.h Tue Jan 6 10:02:14 2015 (r276749) @@ -149,9 +149,8 @@ struct pci_dev { uint16_t device; uint16_t vendor; unsigned int irq; - unsigned int devfn; - u8 revision; - struct pci_devinfo *bus; /* bus this device is on, equivalent to linux struct pci_bus */ + unsigned int devfn; + u8 revision; }; static inline struct resource_list_entry * @@ -581,6 +580,14 @@ pci_enable_msix(struct pci_dev *pdev, st avail = nreq; if ((error = -pci_alloc_msix(pdev->dev.bsddev, &avail)) != 0) return error; + /* + * Handle case where "pci_alloc_msix()" may allocate less + * interrupts than available and return with no error: + */ + if (avail < nreq) { + pci_release_msi(pdev->dev.bsddev); + return avail; + } rle = _pci_get_rle(pdev, SYS_RES_IRQ, 1); pdev->dev.msix = rle->start; pdev->dev.msix_max = rle->start + avail; From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 12:59: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 AFA42A9F; Tue, 6 Jan 2015 12:59: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 97F8E64670; Tue, 6 Jan 2015 12:59: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 t06CxoaZ096545; Tue, 6 Jan 2015 12:59:50 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06CxcTc096488; Tue, 6 Jan 2015 12:59:38 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501061259.t06CxcTc096488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Tue, 6 Jan 2015 12:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276750 - in head: share/man/man9 sys/contrib/ipfilter/netinet sys/dev/an sys/dev/bge sys/dev/ce sys/dev/cm sys/dev/cp sys/dev/cs sys/dev/ctau sys/dev/ed sys/dev/ex sys/dev/fe sys/dev/h... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 12:59:50 -0000 Author: rwatson Date: Tue Jan 6 12:59:37 2015 New Revision: 276750 URL: https://svnweb.freebsd.org/changeset/base/276750 Log: In order to reduce use of M_EXT outside of the mbuf allocator and socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value. With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations. NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature. Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man9/mbuf.9 head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c head/sys/dev/an/if_an.c head/sys/dev/bge/if_bge.c head/sys/dev/ce/if_ce.c head/sys/dev/cm/smc90cx6.c head/sys/dev/cp/if_cp.c head/sys/dev/cs/if_cs.c head/sys/dev/ctau/if_ct.c head/sys/dev/ed/if_ed.c head/sys/dev/ex/if_ex.c head/sys/dev/fe/if_fe.c head/sys/dev/hifn/hifn7751.c head/sys/dev/ie/if_ie.c head/sys/dev/le/lance.c head/sys/dev/lmc/if_lmc.c head/sys/dev/mn/if_mn.c head/sys/dev/my/if_my.c head/sys/dev/pcn/if_pcn.c head/sys/dev/pdq/pdq_freebsd.h head/sys/dev/pdq/pdq_ifsubr.c head/sys/dev/pdq/pdqvar.h head/sys/dev/safe/safe.c head/sys/dev/sbni/if_sbni.c head/sys/dev/smc/if_smc.c head/sys/dev/sn/if_sn.c head/sys/dev/snc/dp83932.c head/sys/dev/ti/if_ti.c head/sys/dev/tl/if_tl.c head/sys/dev/usb/misc/udbp.c head/sys/dev/vx/if_vx.c head/sys/dev/wb/if_wb.c head/sys/dev/xe/if_xe.c head/sys/dev/xen/netfront/netfront.c head/sys/mips/adm5120/if_admsw.c head/sys/netgraph/atm/ngatmbase.c head/sys/netgraph/atm/sscop/ng_sscop_cust.h head/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c head/sys/netgraph/ng_vjc.c head/sys/netipsec/key.c head/sys/netipsec/keysock.c head/sys/sys/mbuf.h Modified: head/share/man/man9/mbuf.9 ============================================================================== --- head/share/man/man9/mbuf.9 Tue Jan 6 10:02:14 2015 (r276749) +++ head/share/man/man9/mbuf.9 Tue Jan 6 12:59:37 2015 (r276750) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 21, 2014 +.Dd January 5, 2015 .Dt MBUF 9 .Os .\" @@ -40,6 +40,7 @@ .Ss Mbuf allocation macros .Fn MGET "struct mbuf *mbuf" "int how" "short type" .Fn MGETHDR "struct mbuf *mbuf" "int how" "short type" +.Ft int .Fn MCLGET "struct mbuf *mbuf" "int how" .Fo MEXTADD .Fa "struct mbuf *mbuf" @@ -436,10 +437,12 @@ Allocate and attach an .Vt mbuf cluster to .Fa mbuf . -If the macro fails, the +On success, a non-zero value returned; otherwise, 0. +Historically, consumers would check for success by testing the .Dv M_EXT -flag will not be set in -.Fa mbuf . +flag on the mbuf, but this is now discouraged to avoid unnecessary awareness +of the implementation of external storage in protocol stacks and device +drivers. .It Fn M_ALIGN mbuf len Set the pointer .Fa mbuf->m_data Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Jan 6 12:59:37 2015 (r276750) @@ -386,8 +386,7 @@ ipf_send_reset(fin) if (m == NULL) return -1; if (sizeof(*tcp2) + hlen > MLEN) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { FREE_MB_T(m); return -1; } @@ -610,8 +609,7 @@ ipf_send_icmp_err(type, fin, dst) code = icmptoicmp6unreach[code]; if (iclen + max_linkhdr + fin->fin_plen > avail) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { FREE_MB_T(m); return -1; } Modified: head/sys/dev/an/if_an.c ============================================================================== --- head/sys/dev/an/if_an.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/an/if_an.c Tue Jan 6 12:59:37 2015 (r276750) @@ -943,8 +943,7 @@ an_rxeof(struct an_softc *sc) if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); return; } - MCLGET(m, M_NOWAIT); - if (!(m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); return; @@ -1034,8 +1033,7 @@ an_rxeof(struct an_softc *sc) if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); return; } - MCLGET(m, M_NOWAIT); - if (!(m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); return; Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/bge/if_bge.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1383,8 +1383,7 @@ bge_newbuf_jumbo(struct bge_softc *sc, i if (m == NULL) return (ENOBUFS); - m_cljget(m, M_NOWAIT, MJUM9BYTES); - if (!(m->m_flags & M_EXT)) { + if (m_cljget(m, M_NOWAIT, MJUM9BYTES) == NULL) { m_freem(m); return (ENOBUFS); } Modified: head/sys/dev/ce/if_ce.c ============================================================================== --- head/sys/dev/ce/if_ce.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/ce/if_ce.c Tue Jan 6 12:59:37 2015 (r276750) @@ -307,8 +307,7 @@ static struct mbuf *makembuf (void *buf, MGETHDR (m, M_NOWAIT, MT_DATA); if (! m) return 0; - MCLGET (m, M_NOWAIT); - if (! (m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem (m); return 0; } Modified: head/sys/dev/cm/smc90cx6.c ============================================================================== --- head/sys/dev/cm/smc90cx6.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/cm/smc90cx6.c Tue Jan 6 12:59:37 2015 (r276750) @@ -540,10 +540,7 @@ cm_srint_locked(vsc) */ if ((len + 2 + 2) > MHLEN) { /* attach an mbuf cluster */ - MCLGET(m, M_NOWAIT); - - /* Insist on getting a cluster */ - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); goto cleanup; } Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/cp/if_cp.c Tue Jan 6 12:59:37 2015 (r276750) @@ -191,8 +191,7 @@ static struct mbuf *makembuf (void *buf, MGETHDR (m, M_NOWAIT, MT_DATA); if (! m) return 0; - MCLGET (m, M_NOWAIT); - if (! (m->m_flags & M_EXT)) { + if (!(MCLGET (m, M_NOWAIT))) { m_freem (m); return 0; } Modified: head/sys/dev/cs/if_cs.c ============================================================================== --- head/sys/dev/cs/if_cs.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/cs/if_cs.c Tue Jan 6 12:59:37 2015 (r276750) @@ -716,8 +716,7 @@ cs_get_packet(struct cs_softc *sc) return (-1); if (length > MHLEN) { - MCLGET(m, M_NOWAIT); - if (!(m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); return (-1); } Modified: head/sys/dev/ctau/if_ct.c ============================================================================== --- head/sys/dev/ctau/if_ct.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/ctau/if_ct.c Tue Jan 6 12:59:37 2015 (r276750) @@ -194,8 +194,7 @@ static struct mbuf *makembuf (void *buf, MGETHDR (m, M_NOWAIT, MT_DATA); if (! m) return 0; - MCLGET (m, M_NOWAIT); - if (! (m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem (m); return 0; } Modified: head/sys/dev/ed/if_ed.c ============================================================================== --- head/sys/dev/ed/if_ed.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/ed/if_ed.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1323,10 +1323,7 @@ ed_get_packet(struct ed_softc *sc, bus_s */ if ((len + 2) > MHLEN) { /* Attach an mbuf cluster */ - MCLGET(m, M_NOWAIT); - - /* Insist on getting a cluster */ - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); return; } Modified: head/sys/dev/ex/if_ex.c ============================================================================== --- head/sys/dev/ex/if_ex.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/ex/if_ex.c Tue Jan 6 12:59:37 2015 (r276750) @@ -745,8 +745,7 @@ ex_rx_intr(struct ex_softc *sc) while (pkt_len > 0) { if (pkt_len >= MINCLSIZE) { - MCLGET(m, M_NOWAIT); - if (m->m_flags & M_EXT) { + if (MCLGET(m, M_NOWAIT)) { m->m_len = MCLBYTES; } else { m_freem(ipkt); Modified: head/sys/dev/fe/if_fe.c ============================================================================== --- head/sys/dev/fe/if_fe.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/fe/if_fe.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1880,8 +1880,7 @@ fe_get_packet (struct fe_softc * sc, u_s /* Attach a cluster if this packet doesn't fit in a normal mbuf. */ if (len > MHLEN - NFS_MAGIC_OFFSET) { - MCLGET(m, M_NOWAIT); - if (!(m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); return -1; } Modified: head/sys/dev/hifn/hifn7751.c ============================================================================== --- head/sys/dev/hifn/hifn7751.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/hifn/hifn7751.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1890,8 +1890,7 @@ hifn_crypto( goto err_srcmap; } if (totlen >= MINCLSIZE) { - MCLGET(m0, M_NOWAIT); - if ((m0->m_flags & M_EXT) == 0) { + if (!(MCLGET(m0, M_NOWAIT))) { hifnstats.hst_nomem_mcl++; err = sc->sc_cmdu ? ERESTART : ENOMEM; m_freem(m0); @@ -1913,8 +1912,7 @@ hifn_crypto( } len = MLEN; if (totlen >= MINCLSIZE) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { hifnstats.hst_nomem_mcl++; err = sc->sc_cmdu ? ERESTART : ENOMEM; mlast->m_next = m; Modified: head/sys/dev/ie/if_ie.c ============================================================================== --- head/sys/dev/ie/if_ie.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/ie/if_ie.c Tue Jan 6 12:59:37 2015 (r276750) @@ -728,8 +728,7 @@ ieget(struct ie_softc *sc, struct mbuf * m->m_len = MLEN; } if (resid >= MINCLSIZE) { - MCLGET(m, M_NOWAIT); - if (m->m_flags & M_EXT) + if (MCLGET(m, M_NOWAIT)) m->m_len = min(resid, MCLBYTES); } else { if (resid < m->m_len) { Modified: head/sys/dev/le/lance.c ============================================================================== --- head/sys/dev/le/lance.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/le/lance.c Tue Jan 6 12:59:37 2015 (r276750) @@ -398,8 +398,7 @@ lance_get(struct lance_softc *sc, int bo while (totlen > 0) { if (totlen >= MINCLSIZE) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) + if (!(MCLGET(m, M_NOWAIT))) goto bad; len = MCLBYTES; } Modified: head/sys/dev/lmc/if_lmc.c ============================================================================== --- head/sys/dev/lmc/if_lmc.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/lmc/if_lmc.c Tue Jan 6 12:59:37 2015 (r276750) @@ -2689,8 +2689,7 @@ rxintr_setup(softc_t *sc) printf("%s: rxintr_setup: MGETHDR() failed\n", NAME_UNIT); return 0; } - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); sc->status.cntrs.rxdma++; Modified: head/sys/dev/mn/if_mn.c ============================================================================== --- head/sys/dev/mn/if_mn.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/mn/if_mn.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1165,8 +1165,7 @@ mn_rx_intr(struct mn_softc *sc, u_int32_ mn_free_desc(dp); return; /* ENOBUFS */ } - MCLGET(m, M_NOWAIT); - if((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { mn_free_desc(dp); m_freem(m); return; /* ENOBUFS */ Modified: head/sys/dev/my/if_my.c ============================================================================== --- head/sys/dev/my/if_my.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/my/if_my.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1085,8 +1085,7 @@ my_newbuf(struct my_softc * sc, struct m "no memory for rx list -- packet dropped!\n"); return (ENOBUFS); } - MCLGET(m_new, M_NOWAIT); - if (!(m_new->m_flags & M_EXT)) { + if (!(MCLGET(m_new, M_NOWAIT))) { device_printf(sc->my_dev, "no memory for rx list -- packet dropped!\n"); m_freem(m_new); @@ -1352,8 +1351,7 @@ my_encap(struct my_softc * sc, struct my return (1); } if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_NOWAIT); - if (!(m_new->m_flags & M_EXT)) { + if (!(MCLGET(m_new, M_NOWAIT))) { m_freem(m_new); device_printf(sc->my_dev, "no memory for tx list"); return (1); Modified: head/sys/dev/pcn/if_pcn.c ============================================================================== --- head/sys/dev/pcn/if_pcn.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/pcn/if_pcn.c Tue Jan 6 12:59:37 2015 (r276750) @@ -803,8 +803,7 @@ pcn_newbuf(sc, idx, m) if (m_new == NULL) return(ENOBUFS); - MCLGET(m_new, M_NOWAIT); - if (!(m_new->m_flags & M_EXT)) { + if (!(MCLGET(m_new, M_NOWAIT))) { m_freem(m_new); return(ENOBUFS); } Modified: head/sys/dev/pdq/pdq_freebsd.h ============================================================================== --- head/sys/dev/pdq/pdq_freebsd.h Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/pdq/pdq_freebsd.h Tue Jan 6 12:59:37 2015 (r276750) @@ -190,8 +190,7 @@ typedef struct _pdq_os_ctx_t { PDQ_OS_DATABUF_T *x_m0; \ MGETHDR(x_m0, M_NOWAIT, MT_DATA); \ if (x_m0 != NULL) { \ - MCLGET(x_m0, M_NOWAIT); \ - if ((x_m0->m_flags & M_EXT) == 0) { \ + if (!(MCLGET(x_m0, M_NOWAIT))) { \ m_free(x_m0); \ (b) = NULL; \ } else { \ Modified: head/sys/dev/pdq/pdq_ifsubr.c ============================================================================== --- head/sys/dev/pdq/pdq_ifsubr.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/pdq/pdq_ifsubr.c Tue Jan 6 12:59:37 2015 (r276750) @@ -748,8 +748,7 @@ pdq_os_databuf_alloc( printf("%s: can't alloc small buf\n", sc->sc_dev.dv_xname); return NULL; } - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { printf("%s: can't alloc cluster\n", sc->sc_dev.dv_xname); m_free(m); return NULL; Modified: head/sys/dev/pdq/pdqvar.h ============================================================================== --- head/sys/dev/pdq/pdqvar.h Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/pdq/pdqvar.h Tue Jan 6 12:59:37 2015 (r276750) @@ -216,8 +216,7 @@ typedef struct mbuf PDQ_OS_DATABUF_T; PDQ_OS_DATABUF_T *x_m0; \ MGETHDR(x_m0, M_NOWAIT, MT_DATA); \ if (x_m0 != NULL) { \ - MCLGET(x_m0, M_NOWAIT); \ - if ((x_m0->m_flags & M_EXT) == 0) { \ + if (!(MCLGET(x_m0, M_NOWAIT))) { \ m_free(x_m0); \ (b) = NULL; \ } else { \ Modified: head/sys/dev/safe/safe.c ============================================================================== --- head/sys/dev/safe/safe.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/safe/safe.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1328,8 +1328,7 @@ safe_process(device_t dev, struct crypto goto errout; } if (totlen >= MINCLSIZE) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { m_free(m); safestats.st_nomcl++; err = sc->sc_nqchip ? @@ -1355,8 +1354,7 @@ safe_process(device_t dev, struct crypto len = MLEN; } if (top && totlen >= MINCLSIZE) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { *mp = m; m_freem(top); safestats.st_nomcl++; Modified: head/sys/dev/sbni/if_sbni.c ============================================================================== --- head/sys/dev/sbni/if_sbni.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/sbni/if_sbni.c Tue Jan 6 12:59:37 2015 (r276750) @@ -878,8 +878,7 @@ get_rx_buf(struct sbni_softc *sc) */ if (ETHER_MAX_LEN + 2 > MHLEN) { /* Attach an mbuf cluster */ - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); return (0); } Modified: head/sys/dev/smc/if_smc.c ============================================================================== --- head/sys/dev/smc/if_smc.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/smc/if_smc.c Tue Jan 6 12:59:37 2015 (r276750) @@ -693,8 +693,7 @@ smc_task_rx(void *context, int pending) if (m == NULL) { break; } - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); break; } Modified: head/sys/dev/sn/if_sn.c ============================================================================== --- head/sys/dev/sn/if_sn.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/sn/if_sn.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1065,14 +1065,9 @@ read_another: m->m_pkthdr.len = m->m_len = packet_length; /* - * Attach an mbuf cluster + * Attach an mbuf cluster. */ - MCLGET(m, M_NOWAIT); - - /* - * Insist on getting a cluster - */ - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); printf("sn: snread() kernel memory allocation problem\n"); Modified: head/sys/dev/snc/dp83932.c ============================================================================== --- head/sys/dev/snc/dp83932.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/snc/dp83932.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1129,8 +1129,7 @@ sonic_get(struct snc_softc *sc, u_int32_ len = MLEN; } if (datalen >= MINCLSIZE) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { if (top) m_freem(top); return (0); } Modified: head/sys/dev/ti/if_ti.c ============================================================================== --- head/sys/dev/ti/if_ti.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/ti/if_ti.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1596,8 +1596,7 @@ ti_newbuf_jumbo(struct ti_softc *sc, int "failed -- packet dropped!\n"); goto nobufs; } - MCLGET(m[NPAYLOAD], M_NOWAIT); - if ((m[NPAYLOAD]->m_flags & M_EXT) == 0) { + if (!(MCLGET(m[NPAYLOAD], M_NOWAIT))) { device_printf(sc->ti_dev, "mbuf allocation failed " "-- packet dropped!\n"); goto nobufs; Modified: head/sys/dev/tl/if_tl.c ============================================================================== --- head/sys/dev/tl/if_tl.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/tl/if_tl.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1813,8 +1813,7 @@ tl_encap(sc, c, m_head) return(1); } if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_NOWAIT); - if (!(m_new->m_flags & M_EXT)) { + if (!(MCLGET(m_new, M_NOWAIT))) { m_freem(m_new); if_printf(ifp, "no memory for tx list\n"); return(1); Modified: head/sys/dev/usb/misc/udbp.c ============================================================================== --- head/sys/dev/usb/misc/udbp.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/usb/misc/udbp.c Tue Jan 6 12:59:37 2015 (r276750) @@ -417,9 +417,8 @@ udbp_bulk_read_callback(struct usb_xfer if (m == NULL) { goto tr_setup; } - MCLGET(m, M_NOWAIT); - if (!(m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); goto tr_setup; } Modified: head/sys/dev/vx/if_vx.c ============================================================================== --- head/sys/dev/vx/if_vx.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/vx/if_vx.c Tue Jan 6 12:59:37 2015 (r276750) @@ -865,8 +865,7 @@ vx_get(struct vx_softc *sc, u_int totlen len = MLEN; } if (totlen >= MINCLSIZE) { - MCLGET(m, M_NOWAIT); - if (m->m_flags & M_EXT) + if (MCLGET(m, M_NOWAIT)) len = MCLBYTES; } len = min(totlen, len); Modified: head/sys/dev/wb/if_wb.c ============================================================================== --- head/sys/dev/wb/if_wb.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/wb/if_wb.c Tue Jan 6 12:59:37 2015 (r276750) @@ -1194,8 +1194,7 @@ wb_encap(sc, c, m_head) if (m_new == NULL) return(1); if (m_head->m_pkthdr.len > MHLEN) { - MCLGET(m_new, M_NOWAIT); - if (!(m_new->m_flags & M_EXT)) { + if (!(MCLGET(m_new, M_NOWAIT))) { m_freem(m_new); return(1); } Modified: head/sys/dev/xe/if_xe.c ============================================================================== --- head/sys/dev/xe/if_xe.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/xe/if_xe.c Tue Jan 6 12:59:37 2015 (r276750) @@ -765,8 +765,7 @@ xe_rxintr(struct xe_softc *scp, uint8_t } if (len + 3 > MHLEN) { - MCLGET(mbp, M_NOWAIT); - if ((mbp->m_flags & M_EXT) == 0) { + if (!(MCLGET(mbp, M_NOWAIT))) { m_freem(mbp); if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); continue; Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/dev/xen/netfront/netfront.c Tue Jan 6 12:59:37 2015 (r276750) @@ -822,8 +822,7 @@ network_alloc_rx_buffers(struct netfront goto no_mbuf; } - m_cljget(m_new, M_NOWAIT, MJUMPAGESIZE); - if ((m_new->m_flags & M_EXT) == 0) { + if (m_cljget(m_new, M_NOWAIT, MJUMPAGESIZE) == NULL) { printf("%s: m_cljget failed\n", __func__); m_freem(m_new); Modified: head/sys/mips/adm5120/if_admsw.c ============================================================================== --- head/sys/mips/adm5120/if_admsw.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/mips/adm5120/if_admsw.c Tue Jan 6 12:59:37 2015 (r276750) @@ -655,8 +655,7 @@ admsw_start(struct ifnet *ifp) break; } if (m0->m_pkthdr.len > MHLEN) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { device_printf(sc->sc_dev, "unable to allocate Tx cluster\n"); m_freem(m); @@ -1227,8 +1226,7 @@ admsw_add_rxbuf(struct admsw_softc *sc, if (m == NULL) return (ENOBUFS); - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); return (ENOBUFS); } Modified: head/sys/netgraph/atm/ngatmbase.c ============================================================================== --- head/sys/netgraph/atm/ngatmbase.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/netgraph/atm/ngatmbase.c Tue Jan 6 12:59:37 2015 (r276750) @@ -151,8 +151,7 @@ uni_msg_pack_mbuf(struct uni_msg *msg, v } else { if ((n = uni_msg_len(msg)) > MHLEN) { - MCLGET(m0, M_NOWAIT); - if (!(m0->m_flags & M_EXT)) + if (!(MCLGET(m0, M_NOWAIT))) goto drop; if (n > MCLBYTES) n = MCLBYTES; @@ -173,8 +172,7 @@ uni_msg_pack_mbuf(struct uni_msg *msg, v last = m; if (n > MLEN) { - MCLGET(m, M_NOWAIT); - if (!(m->m_flags & M_EXT)) + if (!(MCLGET(m, M_NOWAIT))) goto drop; if (n > MCLBYTES) n = MCLBYTES; Modified: head/sys/netgraph/atm/sscop/ng_sscop_cust.h ============================================================================== --- head/sys/netgraph/atm/sscop/ng_sscop_cust.h Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/netgraph/atm/sscop/ng_sscop_cust.h Tue Jan 6 12:59:37 2015 (r276750) @@ -327,8 +327,7 @@ ng_sscop_mbuf_alloc(size_t n) \ m->m_len = 0; \ m->m_pkthdr.len = 0; \ if (n > MHLEN) { \ - MCLGET(m, M_NOWAIT); \ - if (!(m->m_flags & M_EXT)){ \ + if (!(MCLGET(m, M_NOWAIT))){ \ m_free(m); \ m = NULL; \ } \ Modified: head/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c Tue Jan 6 12:59:37 2015 (r276750) @@ -814,8 +814,7 @@ bt3c_receive(bt3c_softc_p sc) break; /* XXX lost of sync */ } - MCLGET(sc->m, M_NOWAIT); - if (!(sc->m->m_flags & M_EXT)) { + if (!(MCLGET(sc->m, M_NOWAIT))) { NG_FREE_M(sc->m); NG_BT3C_ERR(sc->dev, "Could not get cluster\n"); Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Tue Jan 6 12:59:37 2015 (r276750) @@ -816,8 +816,7 @@ ubt_intr_read_callback(struct usb_xfer * goto submit_next; } - MCLGET(m, M_NOWAIT); - if (!(m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { UBT_STAT_IERROR(sc); goto submit_next; } @@ -916,8 +915,7 @@ ubt_bulk_read_callback(struct usb_xfer * goto submit_next; } - MCLGET(m, M_NOWAIT); - if (!(m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { UBT_STAT_IERROR(sc); goto submit_next; } @@ -1126,8 +1124,7 @@ ubt_isoc_read_one_frame(struct usb_xfer return (-1); /* XXX out of sync! */ } - MCLGET(m, M_NOWAIT); - if (!(m->m_flags & M_EXT)) { + if (!(MCLGET(m, M_NOWAIT))) { UBT_STAT_IERROR(sc); NG_FREE_M(m); return (-1); /* XXX out of sync! */ Modified: head/sys/netgraph/ng_vjc.c ============================================================================== --- head/sys/netgraph/ng_vjc.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/netgraph/ng_vjc.c Tue Jan 6 12:59:37 2015 (r276750) @@ -484,8 +484,7 @@ ng_vjc_rcvdata(hook_p hook, item_p item) hm->m_len = 0; hm->m_pkthdr.rcvif = NULL; if (hlen > MHLEN) { /* unlikely, but can happen */ - MCLGET(hm, M_NOWAIT); - if ((hm->m_flags & M_EXT) == 0) { + if (!(MCLGET(hm, M_NOWAIT))) { m_freem(hm); priv->slc.sls_errorin++; NG_FREE_M(m); Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/netipsec/key.c Tue Jan 6 12:59:37 2015 (r276750) @@ -2153,8 +2153,7 @@ key_spddelete2(struct socket *so, struct MGETHDR(n, M_NOWAIT, MT_DATA); if (n && len > MHLEN) { - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { + if (!(MCLGET(n, M_NOWAIT))) { m_freem(n); n = NULL; } @@ -3496,8 +3495,7 @@ key_setsadbmsg(u_int8_t type, u_int16_t return NULL; MGETHDR(m, M_NOWAIT, MT_DATA); if (m && len > MHLEN) { - MCLGET(m, M_NOWAIT); - if ((m->m_flags & M_EXT) == 0) { + if (!(MCLGET(m, M_NOWAIT))) { m_freem(m); m = NULL; } @@ -4694,8 +4692,7 @@ key_getspi(struct socket *so, struct mbu MGETHDR(n, M_NOWAIT, MT_DATA); if (len > MHLEN) { - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { + if (!(MCLGET(n, M_NOWAIT))) { m_freem(n); n = NULL; } @@ -6628,8 +6625,7 @@ key_register(struct socket *so, struct m MGETHDR(n, M_NOWAIT, MT_DATA); if (len > MHLEN) { - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { + if (!(MCLGET(n, M_NOWAIT))) { m_freem(n); n = NULL; } @@ -7187,8 +7183,7 @@ key_parse(struct mbuf *m, struct socket MGETHDR(n, M_NOWAIT, MT_DATA); if (n && m->m_pkthdr.len > MHLEN) { - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { + if (!(MCLGET(n, M_NOWAIT))) { m_free(n); n = NULL; } Modified: head/sys/netipsec/keysock.c ============================================================================== --- head/sys/netipsec/keysock.c Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/netipsec/keysock.c Tue Jan 6 12:59:37 2015 (r276750) @@ -223,8 +223,7 @@ key_sendup(struct socket *so, struct sad n->m_len = MLEN; } if (tlen >= MCLBYTES) { /*XXX better threshold? */ - MCLGET(n, M_NOWAIT); - if ((n->m_flags & M_EXT) == 0) { + if (!(MCLGET(n, M_NOWAIT))) { m_free(n); m_freem(m); PFKEYSTAT_INC(in_nomem); Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Tue Jan 6 10:02:14 2015 (r276749) +++ head/sys/sys/mbuf.h Tue Jan 6 12:59:37 2015 (r276750) @@ -667,7 +667,7 @@ m_getcl(int how, short type, int flags) return (uma_zalloc_arg(zone_pack, &args, how)); } -static __inline void +static __inline int m_clget(struct mbuf *m, int how) { @@ -683,6 +683,7 @@ m_clget(struct mbuf *m, int how) zone_drain(zone_pack); uma_zalloc_arg(zone_clust, m, how); } + return (m->m_flags & M_EXT); } /* From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 13:07: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 9B06EFD3; Tue, 6 Jan 2015 13:07: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 873B1647E5; Tue, 6 Jan 2015 13:07: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 t06D7EEp001359; Tue, 6 Jan 2015 13:07:14 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06D7E0a001358; Tue, 6 Jan 2015 13:07:14 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501061307.t06D7E0a001358@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 6 Jan 2015 13:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276751 - 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 13:07:14 -0000 Author: loos Date: Tue Jan 6 13:07:13 2015 New Revision: 276751 URL: https://svnweb.freebsd.org/changeset/base/276751 Log: Remove the check that prevent carp(4) advskew to be set to '0'. CARP devices are created with advskew set to '0' and once you set it to any other value in the valid range (0..254) you can't set it back to zero. The code in question is also used to prevent that zeroed values overwrite the CARP defaults when a new CARP device is created. Since advskew already defaults to '0' for newly created devices and the new value is guaranteed to be within the valid range, it is safe to overwrite it here. PR: 194672 Reported by: cmb@pfsense.org In collaboration with: garga Tested by: garga MFC after: 2 weeks Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Tue Jan 6 12:59:37 2015 (r276750) +++ head/sys/netinet/ip_carp.c Tue Jan 6 13:07:13 2015 (r276751) @@ -1703,13 +1703,11 @@ carp_ioctl(struct ifreq *ifr, u_long cmd } sc->sc_advbase = carpr.carpr_advbase; } - if (carpr.carpr_advskew > 0) { - if (carpr.carpr_advskew >= 255) { - error = EINVAL; - break; - } - sc->sc_advskew = carpr.carpr_advskew; + if (carpr.carpr_advskew >= 255) { + error = EINVAL; + break; } + sc->sc_advskew = carpr.carpr_advskew; if (carpr.carpr_key[0] != '\0') { bcopy(carpr.carpr_key, sc->sc_key, sizeof(sc->sc_key)); carp_hmac_prepare(sc); From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 14:32: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 60CD4421; Tue, 6 Jan 2015 14:32: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 4D1B6666C8; Tue, 6 Jan 2015 14:32: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 t06EWTNl043027; Tue, 6 Jan 2015 14:32:29 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06EWT45043026; Tue, 6 Jan 2015 14:32:29 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501061432.t06EWT45043026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Tue, 6 Jan 2015 14:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276752 - 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 14:32:29 -0000 Author: rwatson Date: Tue Jan 6 14:32:28 2015 New Revision: 276752 URL: https://svnweb.freebsd.org/changeset/base/276752 Log: Use M_WRITABLE() and M_LEADINGSPACE() rather than checking M_EXT and doing hand-crafted length calculations in the IP options code. Reviewed by: bz Sponsored by: EMC / Isilon Storage Division Modified: head/sys/netinet/ip_options.c Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Tue Jan 6 13:07:13 2015 (r276751) +++ head/sys/netinet/ip_options.c Tue Jan 6 14:32:28 2015 (r276752) @@ -500,7 +500,7 @@ ip_insertoptions(struct mbuf *m, struct } if (p->ipopt_dst.s_addr) ip->ip_dst = p->ipopt_dst; - if (m->m_flags & M_EXT || m->m_data - optlen < m->m_pktdat) { + if (!M_WRITABLE(m) || M_LEADINGSPACE(m) < optlen) { n = m_gethdr(M_NOWAIT, MT_DATA); if (n == NULL) { *phlen = 0; From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 15:41: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 AE6EF807; Tue, 6 Jan 2015 15:41: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 9B6D83E9; Tue, 6 Jan 2015 15:41: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 t06FfOKP075842; Tue, 6 Jan 2015 15:41:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06FfONs075841; Tue, 6 Jan 2015 15:41:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501061541.t06FfONs075841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Jan 2015 15:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276753 - head/sys/dev/mrsas X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 15:41:24 -0000 Author: jhb Date: Tue Jan 6 15:41:23 2015 New Revision: 276753 URL: https://svnweb.freebsd.org/changeset/base/276753 Log: Use struct thread directly instead of d_thread_t. This driver is not likely to be backported to 4.x. Reviewed by: kadesai Modified: head/sys/dev/mrsas/mrsas.c Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Tue Jan 6 14:32:28 2015 (r276752) +++ head/sys/dev/mrsas/mrsas.c Tue Jan 6 15:41:23 2015 (r276753) @@ -204,7 +204,7 @@ MALLOC_DEFINE(M_MRSAS, "mrsasbuf", "Buff * routine when we create the /dev entry. */ int -mrsas_open(struct cdev *dev, int oflags, int devtype, d_thread_t *td) +mrsas_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { struct mrsas_softc *sc; @@ -213,7 +213,7 @@ mrsas_open(struct cdev *dev, int oflags, } int -mrsas_close(struct cdev *dev, int fflag, int devtype, d_thread_t *td) +mrsas_close(struct cdev *dev, int fflag, int devtype, struct thread *td) { struct mrsas_softc *sc; @@ -1238,7 +1238,8 @@ mrsas_resume(device_t dev) * appropriate function for processing depending on the command received. */ static int -mrsas_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, d_thread_t *td) +mrsas_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, + struct thread *td) { struct mrsas_softc *sc; int ret = 0, i = 0; From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 15:48: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 2587BBC4; Tue, 6 Jan 2015 15:48: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 EC93B692; Tue, 6 Jan 2015 15:48: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 t06FmLZL077251; Tue, 6 Jan 2015 15:48:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06FmLoC077248; Tue, 6 Jan 2015 15:48:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501061548.t06FmLoC077248@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Jan 2015 15:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276754 - head/sys/dev/ciss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 15:48:22 -0000 Author: jhb Date: Tue Jan 6 15:48:20 2015 New Revision: 276754 URL: https://svnweb.freebsd.org/changeset/base/276754 Log: Remove compat shims for FreeBSD versions older than 6 (really early 5). The only diffs in the disassembly were different line numbers passed to lock functions. Modified: head/sys/dev/ciss/ciss.c head/sys/dev/ciss/cissvar.h Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Tue Jan 6 15:41:23 2015 (r276753) +++ head/sys/dev/ciss/ciss.c Tue Jan 6 15:48:20 2015 (r276754) @@ -4164,9 +4164,7 @@ ciss_notify_thread(void *arg) struct ciss_notify *cn; sc = (struct ciss_softc *)arg; -#if __FreeBSD_version >= 500000 mtx_lock(&sc->ciss_mtx); -#endif for (;;) { if (STAILQ_EMPTY(&sc->ciss_notify) != 0 && @@ -4201,9 +4199,7 @@ ciss_notify_thread(void *arg) sc->ciss_notify_thread = NULL; wakeup(&sc->ciss_notify_thread); -#if __FreeBSD_version >= 500000 mtx_unlock(&sc->ciss_mtx); -#endif kproc_exit(0); } @@ -4214,15 +4210,9 @@ static void ciss_spawn_notify_thread(struct ciss_softc *sc) { -#if __FreeBSD_version > 500005 if (kproc_create((void(*)(void *))ciss_notify_thread, sc, &sc->ciss_notify_thread, 0, 0, "ciss_notify%d", device_get_unit(sc->ciss_dev))) -#else - if (kproc_create((void(*)(void *))ciss_notify_thread, sc, - &sc->ciss_notify_thread, "ciss_notify%d", - device_get_unit(sc->ciss_dev))) -#endif panic("Could not create notify thread\n"); } Modified: head/sys/dev/ciss/cissvar.h ============================================================================== --- head/sys/dev/ciss/cissvar.h Tue Jan 6 15:41:23 2015 (r276753) +++ head/sys/dev/ciss/cissvar.h Tue Jan 6 15:48:20 2015 (r276754) @@ -77,14 +77,6 @@ typedef STAILQ_HEAD(, ciss_request) cr_q #define CISS_HEARTBEAT_RATE 10 /************************************************************************ - * Compatibility with older versions of FreeBSD - */ -#if __FreeBSD_version < 440001 -#warning testing old-FreeBSD compat -typedef struct proc d_thread_t; -#endif - -/************************************************************************ * Driver version. Only really significant to the ACU interface. */ #define CISS_DRIVER_VERSION 20011201 From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 16:16: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 08CD2C54; Tue, 6 Jan 2015 16:16: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 E8C652D52; Tue, 6 Jan 2015 16:16: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 t06GGDZe091507; Tue, 6 Jan 2015 16:16:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06GFxkV091409; Tue, 6 Jan 2015 16:15:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501061615.t06GFxkV091409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 6 Jan 2015 16:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276755 - in head/sys: amd64/conf arm/conf conf i386/conf mips/conf pc98/conf powerpc/conf sparc64/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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 16:16:14 -0000 Author: jhb Date: Tue Jan 6 16:15:57 2015 New Revision: 276755 URL: https://svnweb.freebsd.org/changeset/base/276755 Log: Remove "New" label from NFSCL/NFSD now that they are the only NFS client/server. While here, remove duplicate NFSCL from sys/conf/NOTES. Approved by: rmacklem Modified: head/sys/amd64/conf/GENERIC head/sys/arm/conf/ARMADAXP head/sys/arm/conf/ATMEL head/sys/arm/conf/AVILA head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/BWCT head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CNS11XXNAS head/sys/arm/conf/CRB head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/CUBIEBOARD2 head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/EB9200 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EP80219 head/sys/arm/conf/ETHERNUT5 head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/GUMSTIX head/sys/arm/conf/HL200 head/sys/arm/conf/HL201 head/sys/arm/conf/IMX53 head/sys/arm/conf/IMX6 head/sys/arm/conf/IQ31244 head/sys/arm/conf/KB920X head/sys/arm/conf/LN2410SBC head/sys/arm/conf/NSLU head/sys/arm/conf/PANDABOARD head/sys/arm/conf/QILA9G20 head/sys/arm/conf/RK3188 head/sys/arm/conf/RPI-B head/sys/arm/conf/SAM9260EK head/sys/arm/conf/SAM9G20EK head/sys/arm/conf/SAM9X25EK head/sys/arm/conf/SHEEVAPLUG head/sys/arm/conf/SN9G45 head/sys/arm/conf/SOCKIT head/sys/arm/conf/SOCKIT-BERI head/sys/arm/conf/TS7800 head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/VYBRID head/sys/arm/conf/ZEDBOARD head/sys/conf/NOTES head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/i386/conf/XEN head/sys/mips/conf/BERI_DE4_BASE head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/WII head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/amd64/conf/GENERIC Tue Jan 6 16:15:57 2015 (r276755) @@ -37,8 +37,8 @@ options UFS_DIRHASH # Improve performa options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/ARMADAXP ============================================================================== --- head/sys/arm/conf/ARMADAXP Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/ARMADAXP Tue Jan 6 16:15:57 2015 (r276755) @@ -39,7 +39,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/ATMEL ============================================================================== --- head/sys/arm/conf/ATMEL Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/ATMEL Tue Jan 6 16:15:57 2015 (r276755) @@ -44,8 +44,8 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options TMPFS # Efficient memory filesystem Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/AVILA Tue Jan 6 16:15:57 2015 (r276755) @@ -52,7 +52,7 @@ options GEOM_PART_MBR # MBR partition options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP options BOOTP_NFSROOT Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/BEAGLEBONE Tue Jan 6 16:15:57 2015 (r276755) @@ -39,7 +39,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/BWCT ============================================================================== --- head/sys/arm/conf/BWCT Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/BWCT Tue Jan 6 16:15:57 2015 (r276755) @@ -46,8 +46,8 @@ options SOFTUPDATES # Enable FFS soft #options MD_ROOT_SIZE=4096 # 4MB ram disk #options ROOTDEVNAME=\"ufs:md0\" #options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP_NFSROOT Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/CAMBRIA Tue Jan 6 16:15:57 2015 (r276755) @@ -53,7 +53,7 @@ options GEOM_PART_MBR # MBR partition options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP options BOOTP_NFSROOT Modified: head/sys/arm/conf/CNS11XXNAS ============================================================================== --- head/sys/arm/conf/CNS11XXNAS Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/CNS11XXNAS Tue Jan 6 16:15:57 2015 (r276755) @@ -67,8 +67,8 @@ options FFS # Berkeley Fast Filesyste options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options TMPFS # Efficient memory filesystem Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/CRB Tue Jan 6 16:15:57 2015 (r276755) @@ -40,8 +40,8 @@ options FFS # Berkeley Fast Filesyste options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL #options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/CUBIEBOARD Tue Jan 6 16:15:57 2015 (r276755) @@ -38,7 +38,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- head/sys/arm/conf/CUBIEBOARD2 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/CUBIEBOARD2 Tue Jan 6 16:15:57 2015 (r276755) @@ -38,7 +38,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/DB-78XXX ============================================================================== --- head/sys/arm/conf/DB-78XXX Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/DB-78XXX Tue Jan 6 16:15:57 2015 (r276755) @@ -21,7 +21,7 @@ options GEOM_PART_MBR # MBR partition options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP Modified: head/sys/arm/conf/DB-88F5XXX ============================================================================== --- head/sys/arm/conf/DB-88F5XXX Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/DB-88F5XXX Tue Jan 6 16:15:57 2015 (r276755) @@ -20,7 +20,7 @@ options GEOM_PART_BSD # BSD partition options GEOM_PART_MBR # MBR partition scheme options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/DB-88F6XXX Tue Jan 6 16:15:57 2015 (r276755) @@ -21,7 +21,7 @@ options GEOM_PART_MBR # MBR partition options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP Modified: head/sys/arm/conf/EB9200 ============================================================================== --- head/sys/arm/conf/EB9200 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/EB9200 Tue Jan 6 16:15:57 2015 (r276755) @@ -36,8 +36,8 @@ options FFS # Berkeley Fast Filesyste #options MD_ROOT # MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk #options ROOTDEVNAME=\"ufs:/dev/da0s1a\" -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP_NFSROOT Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/EFIKA_MX Tue Jan 6 16:15:57 2015 (r276755) @@ -36,8 +36,8 @@ options UFS_DIRHASH # Improve performa options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS #options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/EP80219 Tue Jan 6 16:15:57 2015 (r276755) @@ -39,8 +39,8 @@ options FFS # Berkeley Fast Filesyste options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options TMPFS # Efficient memory filesystem Modified: head/sys/arm/conf/ETHERNUT5 ============================================================================== --- head/sys/arm/conf/ETHERNUT5 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/ETHERNUT5 Tue Jan 6 16:15:57 2015 (r276755) @@ -39,8 +39,8 @@ options SOFTUPDATES # Enable FFS soft options UFS_DIRHASH # Improve performance on big directories #options UFS_GJOURNAL # Enable gjournal-based UFS journaling #options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options GEOM_PART_BSD # BSD partition scheme Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/EXYNOS5.common Tue Jan 6 16:15:57 2015 (r276755) @@ -35,7 +35,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/GUMSTIX ============================================================================== --- head/sys/arm/conf/GUMSTIX Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/GUMSTIX Tue Jan 6 16:15:57 2015 (r276755) @@ -44,8 +44,8 @@ options FFS # Berkeley Fast Filesyste options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server options NFS_ROOT # NFS usable as /, requires NFSCL options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme Modified: head/sys/arm/conf/HL200 ============================================================================== --- head/sys/arm/conf/HL200 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/HL200 Tue Jan 6 16:15:57 2015 (r276755) @@ -41,8 +41,8 @@ options FFS # Berkeley Fast Filesyste #options MD_ROOT # MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk #options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP_NFSROOT Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/HL201 Tue Jan 6 16:15:57 2015 (r276755) @@ -40,8 +40,8 @@ options FFS # Berkeley Fast Filesyste #options MD_ROOT_SIZE=4096 # 4MB ram disk options NANDFS # NAND file system options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP_NFSROOT Modified: head/sys/arm/conf/IMX53 ============================================================================== --- head/sys/arm/conf/IMX53 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/IMX53 Tue Jan 6 16:15:57 2015 (r276755) @@ -33,8 +33,8 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/IMX6 Tue Jan 6 16:15:57 2015 (r276755) @@ -33,8 +33,8 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/IQ31244 Tue Jan 6 16:15:57 2015 (r276755) @@ -40,8 +40,8 @@ options FFS # Berkeley Fast Filesyste options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options GEOM_PART_BSD # BSD partition scheme Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/KB920X Tue Jan 6 16:15:57 2015 (r276755) @@ -42,8 +42,8 @@ options FFS # Berkeley Fast Filesyste #options MD_ROOT # MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk options ROOTDEVNAME=\"ufs:/dev/mmcsd0s1a\" -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager #options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP_NFSROOT Modified: head/sys/arm/conf/LN2410SBC ============================================================================== --- head/sys/arm/conf/LN2410SBC Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/LN2410SBC Tue Jan 6 16:15:57 2015 (r276755) @@ -44,7 +44,7 @@ options ROOTDEVNAME=\"ufs:da0s1\" #options BOOTP #options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info -#options NFSCL # New Network Filesystem Client +#options NFSCL # Network Filesystem Client #options NFS_ROOT # NFS usable as root device options GEOM_PART_BSD # BSD partition scheme Modified: head/sys/arm/conf/NSLU ============================================================================== --- head/sys/arm/conf/NSLU Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/NSLU Tue Jan 6 16:15:57 2015 (r276755) @@ -59,8 +59,8 @@ options FFS # Berkeley Fast Filesyste options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options GEOM_PART_BSD # BSD partition scheme Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/PANDABOARD Tue Jan 6 16:15:57 2015 (r276755) @@ -44,7 +44,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/QILA9G20 ============================================================================== --- head/sys/arm/conf/QILA9G20 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/QILA9G20 Tue Jan 6 16:15:57 2015 (r276755) @@ -41,8 +41,8 @@ options FFS # Berkeley Fast Filesyste #options UFS_DIRHASH # Improve performance on big directories #options MD_ROOT # MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager #options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP_NFSROOT Modified: head/sys/arm/conf/RK3188 ============================================================================== --- head/sys/arm/conf/RK3188 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/RK3188 Tue Jan 6 16:15:57 2015 (r276755) @@ -34,7 +34,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/RPI-B Tue Jan 6 16:15:57 2015 (r276755) @@ -34,7 +34,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/SAM9260EK ============================================================================== --- head/sys/arm/conf/SAM9260EK Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/SAM9260EK Tue Jan 6 16:15:57 2015 (r276755) @@ -41,8 +41,8 @@ options UFS_DIRHASH # Improve performa #options UFS_GJOURNAL # Enable gjournal-based UFS journaling #options MD_ROOT # MD is a potential root device options NANDFS # NAND file system -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options TMPFS # Efficient memory filesystem Modified: head/sys/arm/conf/SAM9G20EK ============================================================================== --- head/sys/arm/conf/SAM9G20EK Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/SAM9G20EK Tue Jan 6 16:15:57 2015 (r276755) @@ -42,8 +42,8 @@ options FFS # Berkeley Fast Filesyste #options MD_ROOT # MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk options NANDFS # NAND file system -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager #options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP_NFSROOT Modified: head/sys/arm/conf/SAM9X25EK ============================================================================== --- head/sys/arm/conf/SAM9X25EK Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/SAM9X25EK Tue Jan 6 16:15:57 2015 (r276755) @@ -43,8 +43,8 @@ options FFS # Berkeley Fast Filesyste #options UFS_DIRHASH # Improve performance on big directories #options MD_ROOT # MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager #options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP_NFSROOT Modified: head/sys/arm/conf/SHEEVAPLUG ============================================================================== --- head/sys/arm/conf/SHEEVAPLUG Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/SHEEVAPLUG Tue Jan 6 16:15:57 2015 (r276755) @@ -21,7 +21,7 @@ options GEOM_PART_MBR # MBR partition options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options NANDFS # NAND Filesystem -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP Modified: head/sys/arm/conf/SN9G45 ============================================================================== --- head/sys/arm/conf/SN9G45 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/SN9G45 Tue Jan 6 16:15:57 2015 (r276755) @@ -40,8 +40,8 @@ options FFS # Berkeley Fast Filesyste #options UFS_DIRHASH # Improve performance on big directories #options MD_ROOT # MD is a potential root device #options MD_ROOT_SIZE=4096 # 4MB ram disk -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager #options NFS_ROOT # NFS usable as /, requires NFSCL #options BOOTP_NFSROOT Modified: head/sys/arm/conf/SOCKIT ============================================================================== --- head/sys/arm/conf/SOCKIT Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/SOCKIT Tue Jan 6 16:15:57 2015 (r276755) @@ -37,7 +37,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/SOCKIT-BERI ============================================================================== --- head/sys/arm/conf/SOCKIT-BERI Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/SOCKIT-BERI Tue Jan 6 16:15:57 2015 (r276755) @@ -37,7 +37,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/TS7800 ============================================================================== --- head/sys/arm/conf/TS7800 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/TS7800 Tue Jan 6 16:15:57 2015 (r276755) @@ -18,7 +18,7 @@ options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options BOOTP Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/VERSATILEPB Tue Jan 6 16:15:57 2015 (r276755) @@ -43,7 +43,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/VYBRID ============================================================================== --- head/sys/arm/conf/VYBRID Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/VYBRID Tue Jan 6 16:15:57 2015 (r276755) @@ -38,7 +38,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/arm/conf/ZEDBOARD Tue Jan 6 16:15:57 2015 (r276755) @@ -37,7 +37,7 @@ options UFS_ACL # Support for access options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client #options NFSSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/conf/NOTES Tue Jan 6 16:15:57 2015 (r276755) @@ -1019,7 +1019,7 @@ options DUMMYNET # One of these is mandatory: options FFS #Fast filesystem -options NFSCL #Network File System client +options NFSCL #Network File System client # The rest are optional: options AUTOFS #Automounter filesystem @@ -1028,8 +1028,7 @@ options FDESCFS #File descriptor file options FUSE #FUSE support module options MSDOSFS #MS DOS File System (FAT, FAT32) options NFSLOCKD #Network Lock Manager -options NFSCL #New Network Filesystem Client -options NFSD #New Network Filesystem Server +options NFSD #Network Filesystem Server options KGSSAPI #Kernel GSSAPI implementation options NULLFS #NULL filesystem Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/i386/conf/GENERIC Tue Jan 6 16:15:57 2015 (r276755) @@ -39,8 +39,8 @@ options UFS_DIRHASH # Improve performa options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/i386/conf/XBOX ============================================================================== --- head/sys/i386/conf/XBOX Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/i386/conf/XBOX Tue Jan 6 16:15:57 2015 (r276755) @@ -27,8 +27,8 @@ options SOFTUPDATES # Enable FFS soft #options UFS_ACL # Support for access control lists #options UFS_DIRHASH # Improve performance on big directories #options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +#options NFSD # Network Filesystem Server #options NFSLOCKD # Network Lock Manager #options NFS_ROOT # NFS usable as /, requires NFSCL #options MSDOSFS # MSDOS Filesystem Modified: head/sys/i386/conf/XEN ============================================================================== --- head/sys/i386/conf/XEN Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/i386/conf/XEN Tue Jan 6 16:15:57 2015 (r276755) @@ -25,8 +25,8 @@ options SOFTUPDATES # Enable FFS soft options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/mips/conf/BERI_DE4_BASE ============================================================================== --- head/sys/mips/conf/BERI_DE4_BASE Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/mips/conf/BERI_DE4_BASE Tue Jan 6 16:15:57 2015 (r276755) @@ -11,7 +11,7 @@ include "BERI_TEMPLATE" ident BERI_DE4_BASE -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/pc98/conf/GENERIC Tue Jan 6 16:15:57 2015 (r276755) @@ -37,8 +37,8 @@ options UFS_DIRHASH # Improve performa options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/powerpc/conf/GENERIC Tue Jan 6 16:15:57 2015 (r276755) @@ -44,8 +44,8 @@ options UFS_DIRHASH #Improve performan options UFS_GJOURNAL #Enable gjournal-based UFS journaling options QUOTA #Enable disk quotas for UFS options MD_ROOT #MD is a potential root device -options NFSCL #New Network Filesystem Client -options NFSD #New Network Filesystem Server +options NFSCL #Network Filesystem Client +options NFSD #Network Filesystem Server options NFSLOCKD #Network Lock Manager options NFS_ROOT #NFS usable as root device options MSDOSFS #MSDOS Filesystem Modified: head/sys/powerpc/conf/GENERIC64 ============================================================================== --- head/sys/powerpc/conf/GENERIC64 Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/powerpc/conf/GENERIC64 Tue Jan 6 16:15:57 2015 (r276755) @@ -45,8 +45,8 @@ options UFS_DIRHASH #Improve performan options UFS_GJOURNAL #Enable gjournal-based UFS journaling options QUOTA #Enable disk quotas for UFS options MD_ROOT #MD is a potential root device -options NFSCL #New Network Filesystem Client -options NFSD #New Network Filesystem Server +options NFSCL #Network Filesystem Client +options NFSD #Network Filesystem Server options NFSLOCKD #Network Lock Manager options NFS_ROOT #NFS usable as root device options MSDOSFS #MSDOS Filesystem Modified: head/sys/powerpc/conf/WII ============================================================================== --- head/sys/powerpc/conf/WII Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/powerpc/conf/WII Tue Jan 6 16:15:57 2015 (r276755) @@ -22,8 +22,8 @@ options UFS_ACL #Support for access c options UFS_DIRHASH #Improve performance on big directories options UFS_GJOURNAL #Enable gjournal-based UFS journaling options MD_ROOT #MD is a potential root device -options NFSCL #New Network Filesystem Client -options NFSD #New Network Filesystem Server +options NFSCL #Network Filesystem Client +options NFSD #Network Filesystem Server options NFSLOCKD #Network Lock Manager options NFS_ROOT #NFS usable as root device options MSDOSFS #MSDOS Filesystem Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Tue Jan 6 15:48:20 2015 (r276754) +++ head/sys/sparc64/conf/GENERIC Tue Jan 6 16:15:57 2015 (r276755) @@ -38,8 +38,8 @@ options UFS_DIRHASH # Improve performa options UFS_GJOURNAL # Enable gjournal-based UFS journaling options QUOTA # Enable disk quotas for UFS options MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -options NFSD # New Network Filesystem Server +options NFSCL # Network Filesystem Client +options NFSD # Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL #options MSDOSFS # MSDOS Filesystem From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 16:47: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 E14AB93E; Tue, 6 Jan 2015 16:47: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 C287E64277; Tue, 6 Jan 2015 16:47: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 t06Gl4En005950; Tue, 6 Jan 2015 16:47:04 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06Gl3X2005944; Tue, 6 Jan 2015 16:47:03 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201501061647.t06Gl3X2005944@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 6 Jan 2015 16:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276756 - in head/sys: net netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 16:47:05 -0000 Author: rodrigc Date: Tue Jan 6 16:47:02 2015 New Revision: 276756 URL: https://svnweb.freebsd.org/changeset/base/276756 Log: Reapply previous patch to fix build. PR: 194515 Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_if.c head/sys/netpfil/pf/pf_ioctl.c head/sys/netpfil/pf/pf_norm.c Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Tue Jan 6 16:15:57 2015 (r276755) +++ head/sys/net/pfvar.h Tue Jan 6 16:47:02 2015 (r276756) @@ -1494,7 +1494,7 @@ VNET_DECLARE(struct pf_altqqueue *, pf_ VNET_DECLARE(struct pf_rulequeue, pf_unlinked_rules); #define V_pf_unlinked_rules VNET(pf_unlinked_rules) -void pf_initialize(void); +void pf_vnet_initialize(void); void pf_mtag_initialize(void); void pf_mtag_cleanup(void); void pf_cleanup(void); @@ -1586,7 +1586,7 @@ int pf_match_addr_range(struct pf_addr * struct pf_addr *, sa_family_t); int pf_match_port(u_int8_t, u_int16_t, u_int16_t, u_int16_t); -void pf_normalize_init(void); +void pf_vnet_normalize_init(void); void pf_normalize_cleanup(void); int pf_normalize_ip(struct mbuf **, int, struct pfi_kif *, u_short *, struct pf_pdesc *); @@ -1648,7 +1648,7 @@ MALLOC_DECLARE(PFI_MTYPE); VNET_DECLARE(struct pfi_kif *, pfi_all); #define V_pfi_all VNET(pfi_all) -void pfi_initialize(void); +void pfi_vnet_initialize(void); void pfi_cleanup(void); void pfi_kif_ref(struct pfi_kif *); void pfi_kif_unref(struct pfi_kif *); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Tue Jan 6 16:15:57 2015 (r276755) +++ head/sys/netpfil/pf/pf.c Tue Jan 6 16:47:02 2015 (r276756) @@ -151,6 +151,7 @@ static VNET_DEFINE(struct pf_send_head, #define V_pf_sendqueue VNET(pf_sendqueue) static struct mtx pf_sendqueue_mtx; +MTX_SYSINIT(pf_sendqueue_mtx, &pf_sendqueue_mtx, "pf send queue", MTX_DEF); #define PF_SENDQ_LOCK() mtx_lock(&pf_sendqueue_mtx) #define PF_SENDQ_UNLOCK() mtx_unlock(&pf_sendqueue_mtx) @@ -172,11 +173,15 @@ static VNET_DEFINE(struct task, pf_overl #define V_pf_overloadtask VNET(pf_overloadtask) static struct mtx pf_overloadqueue_mtx; +MTX_SYSINIT(pf_overloadqueue_mtx, &pf_overloadqueue_mtx, + "pf overload/flush queue", MTX_DEF); #define PF_OVERLOADQ_LOCK() mtx_lock(&pf_overloadqueue_mtx) #define PF_OVERLOADQ_UNLOCK() mtx_unlock(&pf_overloadqueue_mtx) VNET_DEFINE(struct pf_rulequeue, pf_unlinked_rules); struct mtx pf_unlnkdrules_mtx; +MTX_SYSINIT(pf_unlnkdrules_mtx, &pf_unlnkdrules_mtx, "pf unlinked rules", + MTX_DEF); static VNET_DEFINE(uma_zone_t, pf_sources_z); #define V_pf_sources_z VNET(pf_sources_z) @@ -726,7 +731,7 @@ pf_mtag_initialize() /* Per-vnet data storage structures initialization. */ void -pf_initialize() +pf_vnet_initialize() { struct pf_keyhash *kh; struct pf_idhash *ih; @@ -786,13 +791,9 @@ pf_initialize() STAILQ_INIT(&V_pf_sendqueue); SLIST_INIT(&V_pf_overloadqueue); TASK_INIT(&V_pf_overloadtask, 0, pf_overload_task, curvnet); - mtx_init(&pf_sendqueue_mtx, "pf send queue", NULL, MTX_DEF); - mtx_init(&pf_overloadqueue_mtx, "pf overload/flush queue", NULL, - MTX_DEF); /* Unlinked, but may be referenced rules. */ TAILQ_INIT(&V_pf_unlinked_rules); - mtx_init(&pf_unlnkdrules_mtx, "pf unlinked rules", NULL, MTX_DEF); } void @@ -835,10 +836,6 @@ pf_cleanup() free(pfse, M_PFTEMP); } - mtx_destroy(&pf_sendqueue_mtx); - mtx_destroy(&pf_overloadqueue_mtx); - mtx_destroy(&pf_unlnkdrules_mtx); - uma_zdestroy(V_pf_sources_z); uma_zdestroy(V_pf_state_z); uma_zdestroy(V_pf_state_key_z); Modified: head/sys/netpfil/pf/pf_if.c ============================================================================== --- head/sys/netpfil/pf/pf_if.c Tue Jan 6 16:15:57 2015 (r276755) +++ head/sys/netpfil/pf/pf_if.c Tue Jan 6 16:47:02 2015 (r276756) @@ -102,10 +102,13 @@ MALLOC_DEFINE(PFI_MTYPE, "pf_ifnet", "pf LIST_HEAD(pfi_list, pfi_kif); static VNET_DEFINE(struct pfi_list, pfi_unlinked_kifs); #define V_pfi_unlinked_kifs VNET(pfi_unlinked_kifs) + static struct mtx pfi_unlnkdkifs_mtx; +MTX_SYSINIT(pfi_unlnkdkifs_mtx, &pfi_unlnkdkifs_mtx, "pf unlinked interfaces", + MTX_DEF); void -pfi_initialize(void) +pfi_vnet_initialize(void) { struct ifg_group *ifg; struct ifnet *ifp; @@ -169,8 +172,6 @@ pfi_cleanup(void) free(p, PFI_MTYPE); } - mtx_destroy(&pfi_unlnkdkifs_mtx); - free(V_pfi_buffer, PFI_MTYPE); } Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Tue Jan 6 16:15:57 2015 (r276755) +++ head/sys/netpfil/pf/pf_ioctl.c Tue Jan 6 16:47:02 2015 (r276756) @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); #include #endif -static int pfattach(void); +static int pf_vnet_init(void); static struct pf_pool *pf_get_pool(char *, u_int32_t, u_int8_t, u_int32_t, u_int8_t, u_int8_t, u_int8_t); @@ -204,17 +204,20 @@ pfsync_defer_t *pfsync_defer_ptr = NUL pflog_packet_t *pflog_packet_ptr = NULL; static int -pfattach(void) +pf_vnet_init(void) { u_int32_t *my_timeout = V_pf_default_rule.timeout; int error; if (IS_DEFAULT_VNET(curvnet)) pf_mtag_initialize(); - pf_initialize(); + TAILQ_INIT(&V_pf_tags); + TAILQ_INIT(&V_pf_qids); + + pf_vnet_initialize(); pfr_initialize(); - pfi_initialize(); - pf_normalize_init(); + pfi_vnet_initialize(); + pf_vnet_normalize_init(); V_pf_limits[PF_LIMIT_STATES].limit = PFSTATE_HIWAT; V_pf_limits[PF_LIMIT_SRC_NODES].limit = PFSNODE_HIWAT; @@ -3717,27 +3720,11 @@ dehook_pf(void) static int pf_load(void) { - int error; - - VNET_ITERATOR_DECL(vnet_iter); - - VNET_LIST_RLOCK(); - VNET_FOREACH(vnet_iter) { - CURVNET_SET(vnet_iter); - V_pf_pfil_hooked = 0; - V_pf_end_threads = 0; - TAILQ_INIT(&V_pf_tags); - TAILQ_INIT(&V_pf_qids); - CURVNET_RESTORE(); - } - VNET_LIST_RUNLOCK(); rw_init(&pf_rules_lock, "pf rulesets"); sx_init(&pf_ioctl_lock, "pf ioctl"); pf_dev = make_dev(&pf_cdevsw, 0, 0, 0, 0600, PF_NAME); - if ((error = pfattach()) != 0) - return (error); return (0); } @@ -3810,6 +3797,5 @@ static moduledata_t pf_mod = { DECLARE_MODULE(pf, pf_mod, SI_SUB_PSEUDO, SI_ORDER_FIRST); MODULE_VERSION(pf, PF_MODVER); - -VNET_SYSINIT(vnet_pf_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY - 255, - vnet_pf_init, NULL); +VNET_SYSINIT(pf_vnet_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY - 255, + pf_vnet_init, NULL); Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Tue Jan 6 16:15:57 2015 (r276755) +++ head/sys/netpfil/pf/pf_norm.c Tue Jan 6 16:47:02 2015 (r276756) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_pf.h" #include +#include #include #include #include @@ -92,6 +93,7 @@ struct pf_fragment { }; static struct mtx pf_frag_mtx; +MTX_SYSINIT(pf_frag_mtx, &pf_frag_mtx, "pf fragments", MTX_DEF); #define PF_FRAG_LOCK() mtx_lock(&pf_frag_mtx) #define PF_FRAG_UNLOCK() mtx_unlock(&pf_frag_mtx) #define PF_FRAG_ASSERT() mtx_assert(&pf_frag_mtx, MA_OWNED) @@ -146,7 +148,7 @@ static void pf_scrub_ip6(struct mbuf * } while(0) void -pf_normalize_init(void) +pf_vnet_normalize_init(void) { V_pf_frag_z = uma_zcreate("pf frags", sizeof(struct pf_fragment), @@ -176,8 +178,6 @@ pf_normalize_cleanup(void) uma_zdestroy(V_pf_state_scrub_z); uma_zdestroy(V_pf_frent_z); uma_zdestroy(V_pf_frag_z); - - mtx_destroy(&pf_frag_mtx); } static int From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 17:26: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 6ED04648; Tue, 6 Jan 2015 17:26:01 +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 21A87668E1; Tue, 6 Jan 2015 17:26:00 +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 BF2E425D388C; Tue, 6 Jan 2015 17:25:50 +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 D6719C76FFA; Tue, 6 Jan 2015 17:25:49 +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 varzfnPdogGS; Tue, 6 Jan 2015 17:25:48 +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 2C99CC76FD7; Tue, 6 Jan 2015 17:25:47 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276735 - head/sys/mips/conf From: "Bjoern A. Zeeb" In-Reply-To: <201501060526.t065QEIo079621@svn.freebsd.org> Date: Tue, 6 Jan 2015 17:25:46 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501060526.t065QEIo079621@svn.freebsd.org> To: Craig Rodrigues X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 17:26:01 -0000 > On 06 Jan 2015, at 05:26 , Craig Rodrigues = wrote: >=20 > Author: rodrigc > Date: Tue Jan 6 05:26:13 2015 > New Revision: 276735 > URL: https://svnweb.freebsd.org/changeset/base/276735 >=20 > Log: > Refactor common options from MALTA and MALTA64 kernel > configs into MALTA_COMMON file. >=20 > Added: > head/sys/mips/conf/MALTA_COMMON (contents, props changed) > Modified: > head/sys/mips/conf/MALTA > head/sys/mips/conf/MALTA64 I started seeing as of last night: bmake: =E2=80=9C/scratch/tmp/bz/head.svn/Makefile=E2=80=9D line 479: = =E2=80=9CTarget architecture for mips/conf/MALTA64 unknown. config(8) = likely too old." can you shed a light on this? =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 Tue Jan 6 20:03: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 A7E14DA4; Tue, 6 Jan 2015 20:03: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 3DDC764979; Tue, 6 Jan 2015 19:04: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 t06J44fS072743; Tue, 6 Jan 2015 19:04:04 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06J42IX072736; Tue, 6 Jan 2015 19:04:02 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501061904.t06J42IX072736@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 6 Jan 2015 19:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276763 - 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 20:03:56 -0000 Author: neel Date: Tue Jan 6 19:04:02 2015 New Revision: 276763 URL: https://svnweb.freebsd.org/changeset/base/276763 Log: Clear blocking due to STI or MOV SS in the hypervisor when an instruction is emulated or when the vcpu incurs an exception. This matches the CPU behavior. Remove special case code in HLT processing that was clearing the interrupt shadow. This is now redundant because the interrupt shadow is always cleared when the vcpu is resumed after an instruction is emulated. Reported by: David Reed (david.reed@tidalscale.com) MFC after: 2 weeks Modified: head/sys/amd64/vmm/amd/svm.c head/sys/amd64/vmm/amd/svm_softc.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/intel/vmx.h head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Tue Jan 6 19:03:36 2015 (r276762) +++ head/sys/amd64/vmm/amd/svm.c Tue Jan 6 19:04:02 2015 (r276763) @@ -554,6 +554,7 @@ svm_vminit(struct vm *vm, pmap_t pmap) pml4_pa = svm_sc->nptp; for (i = 0; i < VM_MAXCPU; i++) { vcpu = svm_get_vcpu(svm_sc, i); + vcpu->nextrip = ~0; vcpu->lastcpu = NOCPU; vcpu->vmcb_pa = vtophys(&vcpu->vmcb); vmcb_init(svm_sc, i, iopm_pa, msrpm_pa, pml4_pa); @@ -1479,15 +1480,24 @@ svm_inj_interrupts(struct svm_softc *sc, { struct vmcb_ctrl *ctrl; struct vmcb_state *state; + struct svm_vcpu *vcpustate; uint8_t v_tpr; int vector, need_intr_window, pending_apic_vector; state = svm_get_vmcb_state(sc, vcpu); ctrl = svm_get_vmcb_ctrl(sc, vcpu); + vcpustate = svm_get_vcpu(sc, vcpu); need_intr_window = 0; pending_apic_vector = 0; + if (vcpustate->nextrip != state->rip) { + ctrl->intr_shadow = 0; + VCPU_CTR2(sc->vm, vcpu, "Guest interrupt blocking " + "cleared due to rip change: %#lx/%#lx", + vcpustate->nextrip, state->rip); + } + /* * Inject pending events or exceptions for this vcpu. * @@ -1958,6 +1968,9 @@ svm_vmrun(void *arg, int vcpu, register_ /* #VMEXIT disables interrupts so re-enable them here. */ enable_gintr(); + /* Update 'nextrip' */ + vcpustate->nextrip = state->rip; + /* Handle #VMEXIT and if required return to user space. */ handled = svm_vmexit(svm_sc, vcpu, vmexit); } while (handled); Modified: head/sys/amd64/vmm/amd/svm_softc.h ============================================================================== --- head/sys/amd64/vmm/amd/svm_softc.h Tue Jan 6 19:03:36 2015 (r276762) +++ head/sys/amd64/vmm/amd/svm_softc.h Tue Jan 6 19:04:02 2015 (r276763) @@ -45,6 +45,7 @@ struct svm_vcpu { struct vmcb vmcb; /* hardware saved vcpu context */ struct svm_regctx swctx; /* software saved vcpu context */ uint64_t vmcb_pa; /* VMCB physical address */ + uint64_t nextrip; /* next instruction to be executed by guest */ int lastcpu; /* host cpu that the vcpu last ran on */ uint32_t dirty; /* state cache bits that must be cleared */ long eptgen; /* pmap->pm_eptgen when the vcpu last ran */ Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Tue Jan 6 19:03:36 2015 (r276762) +++ head/sys/amd64/vmm/intel/vmx.c Tue Jan 6 19:04:02 2015 (r276763) @@ -941,6 +941,7 @@ vmx_vminit(struct vm *vm, pmap_t pmap) vmx->cap[i].proc_ctls = procbased_ctls; vmx->cap[i].proc_ctls2 = procbased_ctls2; + vmx->state[i].nextrip = ~0; vmx->state[i].lastcpu = NOCPU; vmx->state[i].vpid = vpid[i]; @@ -1169,12 +1170,24 @@ vmx_inject_nmi(struct vmx *vmx, int vcpu } static void -vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic) +vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic, + uint64_t guestrip) { int vector, need_nmi_exiting, extint_pending; uint64_t rflags, entryinfo; uint32_t gi, info; + if (vmx->state[vcpu].nextrip != guestrip) { + gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY); + if (gi & HWINTR_BLOCKING) { + VCPU_CTR2(vmx->vm, vcpu, "Guest interrupt blocking " + "cleared due to rip change: %#lx/%#lx", + vmx->state[vcpu].nextrip, guestrip); + gi &= ~HWINTR_BLOCKING; + vmcs_write(VMCS_GUEST_INTERRUPTIBILITY, gi); + } + } + if (vm_entry_intinfo(vmx->vm, vcpu, &entryinfo)) { KASSERT((entryinfo & VMCS_INTR_VALID) != 0, ("%s: entry " "intinfo is not valid: %#lx", __func__, entryinfo)); @@ -2540,7 +2553,7 @@ vmx_exit_handle_nmi(struct vmx *vmx, int } static int -vmx_run(void *arg, int vcpu, register_t startrip, pmap_t pmap, +vmx_run(void *arg, int vcpu, register_t rip, pmap_t pmap, void *rendezvous_cookie, void *suspend_cookie) { int rc, handled, launched; @@ -2550,7 +2563,6 @@ vmx_run(void *arg, int vcpu, register_t struct vmcs *vmcs; struct vm_exit *vmexit; struct vlapic *vlapic; - uint64_t rip; uint32_t exit_reason; vmx = arg; @@ -2578,11 +2590,13 @@ vmx_run(void *arg, int vcpu, register_t */ vmcs_write(VMCS_HOST_CR3, rcr3()); - vmcs_write(VMCS_GUEST_RIP, startrip); + vmcs_write(VMCS_GUEST_RIP, rip); vmx_set_pcpu_defaults(vmx, vcpu, pmap); do { - handled = UNHANDLED; + KASSERT(vmcs_guest_rip() == rip, ("%s: vmcs guest rip mismatch " + "%#lx/%#lx", __func__, vmcs_guest_rip(), rip)); + handled = UNHANDLED; /* * Interrupts are disabled from this point on until the * guest starts executing. This is done for the following @@ -2602,7 +2616,7 @@ vmx_run(void *arg, int vcpu, register_t * pmap_invalidate_ept(). */ disable_intr(); - vmx_inject_interrupts(vmx, vcpu, vlapic); + vmx_inject_interrupts(vmx, vcpu, vlapic, rip); /* * Check for vcpu suspension after injecting events because @@ -2611,20 +2625,20 @@ vmx_run(void *arg, int vcpu, register_t */ if (vcpu_suspended(suspend_cookie)) { enable_intr(); - vm_exit_suspended(vmx->vm, vcpu, vmcs_guest_rip()); + vm_exit_suspended(vmx->vm, vcpu, rip); break; } if (vcpu_rendezvous_pending(rendezvous_cookie)) { enable_intr(); - vm_exit_rendezvous(vmx->vm, vcpu, vmcs_guest_rip()); + vm_exit_rendezvous(vmx->vm, vcpu, rip); break; } if (vcpu_should_yield(vm, vcpu)) { enable_intr(); - vm_exit_astpending(vmx->vm, vcpu, vmcs_guest_rip()); - vmx_astpending_trace(vmx, vcpu, vmexit->rip); + vm_exit_astpending(vmx->vm, vcpu, rip); + vmx_astpending_trace(vmx, vcpu, rip); handled = HANDLED; break; } @@ -2638,6 +2652,9 @@ vmx_run(void *arg, int vcpu, register_t vmexit->u.vmx.exit_reason = exit_reason = vmcs_exit_reason(); vmexit->u.vmx.exit_qualification = vmcs_exit_qualification(); + /* Update 'nextrip' */ + vmx->state[vcpu].nextrip = rip; + if (rc == VMX_GUEST_VMEXIT) { vmx_exit_handle_nmi(vmx, vcpu, vmexit); enable_intr(); @@ -2648,6 +2665,7 @@ vmx_run(void *arg, int vcpu, register_t } launched = 1; vmx_exit_trace(vmx, vcpu, rip, exit_reason, handled); + rip = vmexit->rip; } while (handled); /* Modified: head/sys/amd64/vmm/intel/vmx.h ============================================================================== --- head/sys/amd64/vmm/intel/vmx.h Tue Jan 6 19:03:36 2015 (r276762) +++ head/sys/amd64/vmm/intel/vmx.h Tue Jan 6 19:04:02 2015 (r276763) @@ -78,6 +78,7 @@ struct vmxcap { }; struct vmxstate { + uint64_t nextrip; /* next instruction to be executed by guest */ int lastcpu; /* host cpu that this 'vcpu' last ran on */ uint16_t vpid; }; Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Tue Jan 6 19:03:36 2015 (r276762) +++ head/sys/amd64/vmm/vmm.c Tue Jan 6 19:04:02 2015 (r276763) @@ -1109,7 +1109,7 @@ vm_handle_hlt(struct vm *vm, int vcpuid, { struct vcpu *vcpu; const char *wmesg; - int error, t, vcpu_halted, vm_halted; + int t, vcpu_halted, vm_halted; KASSERT(!CPU_ISSET(vcpuid, &vm->halted_cpus), ("vcpu already halted")); @@ -1117,22 +1117,6 @@ vm_handle_hlt(struct vm *vm, int vcpuid, vcpu_halted = 0; vm_halted = 0; - /* - * The typical way to halt a cpu is to execute: "sti; hlt" - * - * STI sets RFLAGS.IF to enable interrupts. However, the processor - * remains in an "interrupt shadow" for an additional instruction - * following the STI. This guarantees that "sti; hlt" sequence is - * atomic and a pending interrupt will be recognized after the HLT. - * - * After the HLT emulation is done the vcpu is no longer in an - * interrupt shadow and a pending interrupt can be injected on - * the next entry into the guest. - */ - error = vm_set_register(vm, vcpuid, VM_REG_GUEST_INTR_SHADOW, 0); - KASSERT(error == 0, ("%s: error %d clearing interrupt shadow", - __func__, error)); - vcpu_lock(vcpu); while (1) { /* @@ -1741,6 +1725,7 @@ int vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *exception) { struct vcpu *vcpu; + int error; if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); @@ -1765,6 +1750,16 @@ vm_inject_exception(struct vm *vm, int v return (EBUSY); } + /* + * From section 26.6.1 "Interruptibility State" in Intel SDM: + * + * Event blocking by "STI" or "MOV SS" is cleared after guest executes + * one instruction or incurs an exception. + */ + error = vm_set_register(vm, vcpuid, VM_REG_GUEST_INTR_SHADOW, 0); + KASSERT(error == 0, ("%s: error %d clearing interrupt shadow", + __func__, error)); + vcpu->exception_pending = 1; vcpu->exception = *exception; VCPU_CTR1(vm, vcpuid, "Exception %d pending", exception->vector); From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:03: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 D4C21F05; Tue, 6 Jan 2015 20:03: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 3548E645B7; Tue, 6 Jan 2015 18: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 t06IrBUQ067416; Tue, 6 Jan 2015 18:53:11 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06IrAki067414; Tue, 6 Jan 2015 18:53:10 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501061853.t06IrAki067414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Tue, 6 Jan 2015 18:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276758 - head/usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 20:03:59 -0000 Author: dchagin Date: Tue Jan 6 18:53:09 2015 New Revision: 276758 URL: https://svnweb.freebsd.org/changeset/base/276758 Log: kdump: eliminate new clang warnings. MFC after: 1 week Modified: head/usr.bin/kdump/Makefile head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/Makefile ============================================================================== --- head/usr.bin/kdump/Makefile Tue Jan 6 18:25:10 2015 (r276757) +++ head/usr.bin/kdump/Makefile Tue Jan 6 18:53:09 2015 (r276758) @@ -23,13 +23,13 @@ CFLAGS+=-DHAVE_LIBCAPSICUM CFLAGS+=-DPF .endif -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" -SRCS+= linux_syscalls.c -.endif - NO_WERROR?= YES -CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c +CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h + +.if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386") +CLEANFILES+= linux_syscalls.c +.endif ioctl.c: mkioctls env MACHINE=${MACHINE} CPP="${CPP}" \ @@ -41,11 +41,9 @@ kdump_subr.h: mksubr kdump_subr.c: mksubr kdump_subr.h sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET} - -linux_syscalls.c: - /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ +.if (${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386") + sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ ${.CURDIR}/../../sys/${MACHINE_ARCH}/linux${SFX}/syscalls.master ${.CURDIR}/linux_syscalls.conf - echo "int nlinux_syscalls = sizeof(linux_syscallnames) / sizeof(linux_syscallnames[0]);" \ - >> linux_syscalls.c +.endif .include Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Tue Jan 6 18:25:10 2015 (r276757) +++ head/usr.bin/kdump/kdump.c Tue Jan 6 18:53:09 2015 (r276758) @@ -148,8 +148,11 @@ static struct ktr_header ktr_header; void linux_ktrsyscall(struct ktr_syscall *); void linux_ktrsysret(struct ktr_sysret *); -extern char *linux_syscallnames[]; -extern int nlinux_syscalls; +extern const char *linux_syscallnames[]; + +#include +static int nlinux_syscalls = sizeof(linux_syscallnames) / \ + sizeof(linux_syscallnames[0]); /* * from linux.h @@ -1934,7 +1937,7 @@ void ktrfault(struct ktr_fault *ktr) { - printf("0x%jx ", ktr->vaddr); + printf("0x%jx ", (uintmax_t)ktr->vaddr); vmprotname(ktr->type); printf("\n"); } From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:04: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 45D37184; Tue, 6 Jan 2015 20:04:37 +0000 (UTC) Received: from mail-we0-x236.google.com (mail-we0-x236.google.com [IPv6:2a00:1450:400c:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FCC6E8; Tue, 6 Jan 2015 17:59:55 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id w62so10079489wes.41; Tue, 06 Jan 2015 09:59:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=SSPnDGqEhX7rOLORRl0Cj9Jmzsrjf3oKSX+CBks4m+w=; b=r7RsVMRqL2bF+sfP39aVzR7pBSJkwLCeRtn8lhGx5WKFP/GQKvEt9ZorzmiTiUMM+W mRr4liWkVknRilggVivxw8KREw54XiCKcvPw4Dr8OsFZDd9dJkTS8QbqFeZR7CMY/HoX WexgdPcsRtvdOgkPY+hQIeBXrdg1TF3hHh5HnWWf1w6dDqyfATEYXFunqEXiTT5dEXrA 0yvli8PFEs8gtjidcj0suTOGpUfK356MWFWt3BccivYb9oIVkimqYa1aH551soxkjh4x 2WgxYJv1FbaIg94JoYw0h8b4M4CjK+KJWLBqFXba25wc69eM6bcNxWjoNziQuuBnW/Vf 0VbA== MIME-Version: 1.0 X-Received: by 10.194.5.37 with SMTP id p5mr73359381wjp.20.1420567192858; Tue, 06 Jan 2015 09:59:52 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Tue, 6 Jan 2015 09:59:52 -0800 (PST) In-Reply-To: References: <201501060526.t065QEIo079621@svn.freebsd.org> Date: Tue, 6 Jan 2015 09:59:52 -0800 X-Google-Sender-Auth: jv-6MZLEin5uUGkwBUd0QcuqE7g Message-ID: Subject: Re: svn commit: r276735 - head/sys/mips/conf From: Adrian Chadd To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Craig Rodrigues , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 20:04:37 -0000 MALTA_COMMON likely shouldn't have a machine line. -adrian On 6 January 2015 at 09:25, Bjoern A. Zeeb wrote: > >> On 06 Jan 2015, at 05:26 , Craig Rodrigues wrote: >> >> Author: rodrigc >> Date: Tue Jan 6 05:26:13 2015 >> New Revision: 276735 >> URL: https://svnweb.freebsd.org/changeset/base/276735 >> >> Log: >> Refactor common options from MALTA and MALTA64 kernel >> configs into MALTA_COMMON file. >> >> Added: >> head/sys/mips/conf/MALTA_COMMON (contents, props changed) >> Modified: >> head/sys/mips/conf/MALTA >> head/sys/mips/conf/MALTA64 > > I started seeing as of last night: > > bmake: =E2=80=9C/scratch/tmp/bz/head.svn/Makefile=E2=80=9D line 479: =E2= =80=9CTarget architecture for mips/conf/MALTA64 unknown. config(8) likely = too old." > > can you shed a light on this? > > =E2=80=94 > 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 Tue Jan 6 20:04: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 CA49E48F; Tue, 6 Jan 2015 20:04: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 2C91B2B86; Tue, 6 Jan 2015 18:25: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 t06IPCw4052948; Tue, 6 Jan 2015 18:25:12 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06IPBTg052943; Tue, 6 Jan 2015 18:25:11 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501061825.t06IPBTg052943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 6 Jan 2015 18:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276757 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 20:04:45 -0000 Author: adrian Date: Tue Jan 6 18:25:10 2015 New Revision: 276757 URL: https://svnweb.freebsd.org/changeset/base/276757 Log: Global-ify channel_type() - this fixes non-debug net80211 builds. Modified: head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_scan_sw.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Tue Jan 6 16:47:02 2015 (r276756) +++ head/sys/net80211/ieee80211.c Tue Jan 6 18:25:10 2015 (r276757) @@ -1747,3 +1747,23 @@ ieee80211_mac_hash(const struct ieee8021 return c; } #undef mix + +char +ieee80211_channel_type_char(const struct ieee80211_channel *c) +{ + if (IEEE80211_IS_CHAN_ST(c)) + return 'S'; + if (IEEE80211_IS_CHAN_108A(c)) + return 'T'; + if (IEEE80211_IS_CHAN_108G(c)) + return 'G'; + if (IEEE80211_IS_CHAN_HT(c)) + return 'n'; + if (IEEE80211_IS_CHAN_A(c)) + return 'a'; + if (IEEE80211_IS_CHAN_ANYG(c)) + return 'g'; + if (IEEE80211_IS_CHAN_B(c)) + return 'b'; + return 'f'; +} Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Tue Jan 6 16:47:02 2015 (r276756) +++ head/sys/net80211/ieee80211_scan.c Tue Jan 6 18:25:10 2015 (r276757) @@ -260,29 +260,6 @@ ieee80211_scan_update_locked(struct ieee } } -/* - * XXX TODO: should be a global method! - */ -static char -channel_type(const struct ieee80211_channel *c) -{ - if (IEEE80211_IS_CHAN_ST(c)) - return 'S'; - if (IEEE80211_IS_CHAN_108A(c)) - return 'T'; - if (IEEE80211_IS_CHAN_108G(c)) - return 'G'; - if (IEEE80211_IS_CHAN_HT(c)) - return 'n'; - if (IEEE80211_IS_CHAN_A(c)) - return 'a'; - if (IEEE80211_IS_CHAN_ANYG(c)) - return 'g'; - if (IEEE80211_IS_CHAN_B(c)) - return 'b'; - return 'f'; -} - void ieee80211_scan_dump_channels(const struct ieee80211_scan_state *ss) { @@ -295,7 +272,7 @@ ieee80211_scan_dump_channels(const struc const struct ieee80211_channel *c = ss->ss_chans[i]; printf("%s%u%c", sep, ieee80211_chan2ieee(ic, c), - channel_type(c)); + ieee80211_channel_type_char(c)); sep = ", "; } } Modified: head/sys/net80211/ieee80211_scan_sw.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sw.c Tue Jan 6 16:47:02 2015 (r276756) +++ head/sys/net80211/ieee80211_scan_sw.c Tue Jan 6 18:25:10 2015 (r276757) @@ -185,27 +185,6 @@ ieee80211_swscan_vdetach(struct ieee8021 } } -/* XXX should be a global net80211 function */ -static char -channel_type(const struct ieee80211_channel *c) -{ - if (IEEE80211_IS_CHAN_ST(c)) - return 'S'; - if (IEEE80211_IS_CHAN_108A(c)) - return 'T'; - if (IEEE80211_IS_CHAN_108G(c)) - return 'G'; - if (IEEE80211_IS_CHAN_HT(c)) - return 'n'; - if (IEEE80211_IS_CHAN_A(c)) - return 'a'; - if (IEEE80211_IS_CHAN_ANYG(c)) - return 'g'; - if (IEEE80211_IS_CHAN_B(c)) - return 'b'; - return 'f'; -} - void ieee80211_swscan_set_scan_duration(struct ieee80211vap *vap, u_int duration) { @@ -667,8 +646,9 @@ scan_task(void *arg, int pending) "%s: chan %3d%c -> %3d%c [%s, dwell min %lums max %lums]\n", __func__, ieee80211_chan2ieee(ic, ic->ic_curchan), - channel_type(ic->ic_curchan), - ieee80211_chan2ieee(ic, chan), channel_type(chan), + ieee80211_channel_type_char(ic->ic_curchan), + ieee80211_chan2ieee(ic, chan), + ieee80211_channel_type_char(chan), (ss->ss_flags & IEEE80211_SCAN_ACTIVE) && (chan->ic_flags & IEEE80211_CHAN_PASSIVE) == 0 ? "active" : "passive", @@ -878,7 +858,7 @@ ieee80211_swscan_add_scan(struct ieee802 "%s: chan %3d%c min dwell met (%u > %lu)\n", __func__, ieee80211_chan2ieee(ic, ic->ic_curchan), - channel_type(ic->ic_curchan), + ieee80211_channel_type_char(ic->ic_curchan), ticks, SCAN_PRIVATE(ss)->ss_chanmindwell); SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_MINDWELL; /* Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Tue Jan 6 16:47:02 2015 (r276756) +++ head/sys/net80211/ieee80211_var.h Tue Jan 6 18:25:10 2015 (r276757) @@ -711,6 +711,7 @@ int ieee80211_setmode(struct ieee80211co enum ieee80211_phymode ieee80211_chan2mode(const struct ieee80211_channel *); uint32_t ieee80211_mac_hash(const struct ieee80211com *, const uint8_t addr[IEEE80211_ADDR_LEN]); +char ieee80211_channel_type_char(const struct ieee80211_channel *c); void ieee80211_radiotap_attach(struct ieee80211com *, struct ieee80211_radiotap_header *th, int tlen, From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:05: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 A60E2D4F; Tue, 6 Jan 2015 20:05:13 +0000 (UTC) Received: from mail-lb0-x232.google.com (mail-lb0-x232.google.com [IPv6:2a00:1450:4010:c04::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4873646FF; Tue, 6 Jan 2015 18:58:36 +0000 (UTC) Received: by mail-lb0-f178.google.com with SMTP id u14so1453732lbd.23; Tue, 06 Jan 2015 10:58:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=R9cvpLIlukPrhs1rm4VZAAOJR/zNj2OpIGJdYatrrhU=; b=ipJb8gp86BzzObONzbHDkLBzecu7Ywj8UdjE56t4xoBdGhB4L4G3PDR94+zwtB7Xd8 A5u/QA2eC7XMUOCoehS/f+20wZGEWm5cyqe/+hRXZC3S1A4V0xyOP8BsorYoqyhuJFQZ GJRjMyCeqpYaUU5wYAxgXBm4EjC6WPh/R0S08PbgMp2DTQevp22dK60IyJwbz7KUzUnY BstgItxnr2E+BBnEKoxuWAQDhAdGQNxZEdk7jt9SM9okQFrzWsCzSbPcbTFW8OT9R/Wx OnUlPKjgug4SbijpRG+pE8/n+MDLgX0Va8VDGCsB7QWw1hBtuYMjGo/qa+INkKt5WiXG hEUQ== MIME-Version: 1.0 X-Received: by 10.112.125.41 with SMTP id mn9mr87774788lbb.80.1420570714674; Tue, 06 Jan 2015 10:58:34 -0800 (PST) Sender: rizzo.unipi@gmail.com Received: by 10.114.10.168 with HTTP; Tue, 6 Jan 2015 10:58:34 -0800 (PST) In-Reply-To: <201412312319.sBVNJHca031041@svn.freebsd.org> References: <201412312319.sBVNJHca031041@svn.freebsd.org> Date: Tue, 6 Jan 2015 19:58:34 +0100 X-Google-Sender-Auth: NeG45TrP-2S4RhHveommZSUTeE8 Message-ID: Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe From: Luigi Rizzo To: Navdeep Parhar Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 20:05:13 -0000 On Thu, Jan 1, 2015 at 12:19 AM, Navdeep Parhar wrote: > Author: np > Date: Wed Dec 31 23:19:16 2014 > New Revision: 276485 > URL: https://svnweb.freebsd.org/changeset/base/276485 > > Log: > cxgbe(4): major tx rework. > =E2=80=8BFYI, this commit has some unnamed unions (eg. in t4_mp_ring.c) which prevent the kernel from compiling with our stock gcc and its standard kernel build flags (specifically -std=3D...). Adding the following in the kernel config makeoptions COPTFLAGS=3D"-fms-extensions" seems to do the job I know it is unavoidable that we'll end up with gcc not working, =E2=80=8Bbut maybe we can still avoid unnamed unions. cheers luigi =E2=80=8B =E2=80=8B > > a) Front load as much work as possible in if_transmit, before any drive= r > lock or software queue has to get involved. > > b) Replace buf_ring with a brand new mp_ring (multiproducer ring). Thi= s > is specifically for the tx multiqueue model where one of the if_transmi= t > producer threads becomes the consumer and other producers carry on as > usual. mp_ring is implemented as standalone code and it should be > possible to use it in any driver with tx multiqueue. It also has: > - the ability to enqueue/dequeue multiple items. This might become > significant if packet batching is ever implemented. > - an abdication mechanism to allow a thread to give up writing tx > descriptors and have another if_transmit thread take over. A thread > that's writing tx descriptors can end up doing so for an unbounded > time period if a) there are other if_transmit threads continuously > feeding the sofware queue, and b) the chip keeps up with whatever the > thread is throwing at it. > - accurate statistics about interesting events even when the stats come > at the expense of additional branches/conditional code. > > The NIC txq lock is uncontested on the fast path at this point. I've > left it there for synchronization with the control events (interface > up/down, modload/unload). > > c) Add support for "type 1" coalescing work request in the normal NIC t= x > path. This work request is optimized for frames with a single item in > the DMA gather list. These are very common when forwarding packets. > Note that netmap tx in cxgbe already uses these "type 1" work requests. > > d) Do not request automatic cidx updates every 32 descriptors. Instead= , > request updates via bits in individual work requests (still every 32 > descriptors approximately). Also, request an automatic final update > when the queue idles after activity. This means NIC tx reclaim is stil= l > performed lazily but it will catch up quickly as soon as the queue > idles. This seems to be the best middle ground and I'll probably do > something similar for netmap tx as well. > > e) Implement a faster tx path for WRQs (used by TOE tx and control > queues, _not_ by the normal NIC tx). Allow work requests to be written > directly to the hardware descriptor ring if room is available. I will > convert t4_tom and iw_cxgbe modules to this faster style gradually. > > MFC after: 2 months > > Added: > head/sys/dev/cxgbe/t4_mp_ring.c (contents, props changed) > head/sys/dev/cxgbe/t4_mp_ring.h (contents, props changed) > Modified: > head/sys/conf/files > head/sys/dev/cxgbe/adapter.h > head/sys/dev/cxgbe/t4_l2t.c > head/sys/dev/cxgbe/t4_main.c > head/sys/dev/cxgbe/t4_sge.c > head/sys/modules/cxgbe/if_cxgbe/Makefile > > Modified: head/sys/conf/files > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/files Wed Dec 31 22:52:43 2014 (r276484) > +++ head/sys/conf/files Wed Dec 31 23:19:16 2014 (r276485) > @@ -1142,6 +1142,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p > compile-with "${NORMAL_C} -I$S/dev/cxgb" > dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ > compile-with "${NORMAL_C} -I$S/dev/cxgb" > +dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ > + compile-with "${NORMAL_C} -I$S/dev/cxgbe" > dev/cxgbe/t4_main.c optional cxgbe pci \ > compile-with "${NORMAL_C} -I$S/dev/cxgbe" > dev/cxgbe/t4_netmap.c optional cxgbe pci \ > > Modified: head/sys/dev/cxgbe/adapter.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/cxgbe/adapter.h Wed Dec 31 22:52:43 2014 > (r276484) > +++ head/sys/dev/cxgbe/adapter.h Wed Dec 31 23:19:16 2014 > (r276485) > @@ -152,7 +152,8 @@ enum { > CL_METADATA_SIZE =3D CACHE_LINE_SIZE, > > SGE_MAX_WR_NDESC =3D SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in > desc */ > - TX_SGL_SEGS =3D 36, > + TX_SGL_SEGS =3D 39, > + TX_SGL_SEGS_TSO =3D 38, > TX_WR_FLITS =3D SGE_MAX_WR_LEN / 8 > }; > > @@ -273,6 +274,7 @@ struct port_info { > struct timeval last_refreshed; > struct port_stats stats; > u_int tnl_cong_drops; > + u_int tx_parse_error; > > eventhandler_tag vlan_c; > > @@ -308,23 +310,9 @@ struct tx_desc { > __be64 flit[8]; > }; > > -struct tx_map { > - struct mbuf *m; > - bus_dmamap_t map; > -}; > - > -/* DMA maps used for tx */ > -struct tx_maps { > - struct tx_map *maps; > - uint32_t map_total; /* # of DMA maps */ > - uint32_t map_pidx; /* next map to be used */ > - uint32_t map_cidx; /* reclaimed up to this index */ > - uint32_t map_avail; /* # of available maps */ > -}; > - > struct tx_sdesc { > + struct mbuf *m; /* m_nextpkt linked chain of frames */ > uint8_t desc_used; /* # of hardware descriptors used by the > WR */ > - uint8_t credits; /* NIC txq: # of frames sent out in the W= R > */ > }; > > > @@ -378,16 +366,12 @@ struct sge_iq { > enum { > EQ_CTRL =3D 1, > EQ_ETH =3D 2, > -#ifdef TCP_OFFLOAD > EQ_OFLD =3D 3, > -#endif > > /* eq flags */ > - EQ_TYPEMASK =3D 7, /* 3 lsbits hold the type */ > - EQ_ALLOCATED =3D (1 << 3), /* firmware resources allocated= */ > - EQ_DOOMED =3D (1 << 4), /* about to be destroyed */ > - EQ_CRFLUSHED =3D (1 << 5), /* expecting an update from SGE= */ > - EQ_STALLED =3D (1 << 6), /* out of hw descriptors or > dmamaps */ > + EQ_TYPEMASK =3D 0x3, /* 2 lsbits hold the type (see > above) */ > + EQ_ALLOCATED =3D (1 << 2), /* firmware resources allocated= */ > + EQ_ENABLED =3D (1 << 3), /* open for business */ > }; > > /* Listed in order of preference. Update t4_sysctls too if you change > these */ > @@ -402,32 +386,25 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB > struct sge_eq { > unsigned int flags; /* MUST be first */ > unsigned int cntxt_id; /* SGE context id for the eq */ > - bus_dma_tag_t desc_tag; > - bus_dmamap_t desc_map; > - char lockname[16]; > struct mtx eq_lock; > > struct tx_desc *desc; /* KVA of descriptor ring */ > - bus_addr_t ba; /* bus address of descriptor ring */ > - struct sge_qstat *spg; /* status page, for convenience */ > uint16_t doorbells; > volatile uint32_t *udb; /* KVA of doorbell (lies within BAR2) */ > u_int udb_qid; /* relative qid within the doorbell page = */ > - uint16_t cap; /* max # of desc, for convenience */ > - uint16_t avail; /* available descriptors, for convenience > */ > - uint16_t qsize; /* size (# of entries) of the queue */ > + uint16_t sidx; /* index of the entry with the status pag= e > */ > uint16_t cidx; /* consumer idx (desc idx) */ > uint16_t pidx; /* producer idx (desc idx) */ > - uint16_t pending; /* # of descriptors used since last > doorbell */ > + uint16_t equeqidx; /* EQUEQ last requested at this pidx */ > + uint16_t dbidx; /* pidx of the most recent doorbell */ > uint16_t iqid; /* iq that gets egr_update for the eq */ > uint8_t tx_chan; /* tx channel used by the eq */ > - struct task tx_task; > - struct callout tx_callout; > + volatile u_int equiq; /* EQUIQ outstanding */ > > - /* stats */ > - > - uint32_t egr_update; /* # of SGE_EGR_UPDATE notifications for > eq */ > - uint32_t unstalled; /* recovered from stall */ > + bus_dma_tag_t desc_tag; > + bus_dmamap_t desc_map; > + bus_addr_t ba; /* bus address of descriptor ring */ > + char lockname[16]; > }; > > struct sw_zone_info { > @@ -499,18 +476,19 @@ struct sge_fl { > struct cluster_layout cll_alt; /* alternate refill zone, layout = */ > }; > > +struct mp_ring; > + > /* txq: SGE egress queue + what's needed for Ethernet NIC */ > struct sge_txq { > struct sge_eq eq; /* MUST be first */ > > struct ifnet *ifp; /* the interface this txq belongs to */ > - bus_dma_tag_t tx_tag; /* tag for transmit buffers */ > - struct buf_ring *br; /* tx buffer ring */ > + struct mp_ring *r; /* tx software ring */ > struct tx_sdesc *sdesc; /* KVA of software descriptor ring */ > - struct mbuf *m; /* held up due to temporary resource > shortage */ > - > - struct tx_maps txmaps; > + struct sglist *gl; > + __be32 cpl_ctrl0; /* for convenience */ > > + struct task tx_reclaim_task; > /* stats for common events first */ > > uint64_t txcsum; /* # of times hardware assisted with > checksum */ > @@ -519,13 +497,12 @@ struct sge_txq { > uint64_t imm_wrs; /* # of work requests with immediate data > */ > uint64_t sgl_wrs; /* # of work requests with direct SGL */ > uint64_t txpkt_wrs; /* # of txpkt work requests (not > coalesced) */ > - uint64_t txpkts_wrs; /* # of coalesced tx work requests */ > - uint64_t txpkts_pkts; /* # of frames in coalesced tx work > requests */ > + uint64_t txpkts0_wrs; /* # of type0 coalesced tx work requests = */ > + uint64_t txpkts1_wrs; /* # of type1 coalesced tx work requests = */ > + uint64_t txpkts0_pkts; /* # of frames in type0 coalesced tx WRs = */ > + uint64_t txpkts1_pkts; /* # of frames in type1 coalesced tx WRs = */ > > /* stats for not-that-common events */ > - > - uint32_t no_dmamap; /* no DMA map to load the mbuf */ > - uint32_t no_desc; /* out of hardware descriptors */ > } __aligned(CACHE_LINE_SIZE); > > /* rxq: SGE ingress queue + SGE free list + miscellaneous items */ > @@ -574,7 +551,13 @@ struct wrqe { > STAILQ_ENTRY(wrqe) link; > struct sge_wrq *wrq; > int wr_len; > - uint64_t wr[] __aligned(16); > + char wr[] __aligned(16); > +}; > + > +struct wrq_cookie { > + TAILQ_ENTRY(wrq_cookie) link; > + int ndesc; > + int pidx; > }; > > /* > @@ -585,17 +568,32 @@ struct sge_wrq { > struct sge_eq eq; /* MUST be first */ > > struct adapter *adapter; > + struct task wrq_tx_task; > + > + /* Tx desc reserved but WR not "committed" yet. */ > + TAILQ_HEAD(wrq_incomplete_wrs , wrq_cookie) incomplete_wrs; > > - /* List of WRs held up due to lack of tx descriptors */ > + /* List of WRs ready to go out as soon as descriptors are > available. */ > STAILQ_HEAD(, wrqe) wr_list; > + u_int nwr_pending; > + u_int ndesc_needed; > > /* stats for common events first */ > > - uint64_t tx_wrs; /* # of tx work requests */ > + uint64_t tx_wrs_direct; /* # of WRs written directly to desc ring= . > */ > + uint64_t tx_wrs_ss; /* # of WRs copied from scratch space. */ > + uint64_t tx_wrs_copied; /* # of WRs queued and copied to desc > ring. */ > > /* stats for not-that-common events */ > > - uint32_t no_desc; /* out of hardware descriptors */ > + /* > + * Scratch space for work requests that wrap around after reachin= g > the > + * status page, and some infomation about the last WR that used i= t. > + */ > + uint16_t ss_pidx; > + uint16_t ss_len; > + uint8_t ss[SGE_MAX_WR_LEN]; > + > } __aligned(CACHE_LINE_SIZE); > > > @@ -744,7 +742,7 @@ struct adapter { > struct sge sge; > int lro_timeout; > > - struct taskqueue *tq[NCHAN]; /* taskqueues that flush data out > */ > + struct taskqueue *tq[NCHAN]; /* General purpose taskqueues */ > struct port_info *port[MAX_NPORTS]; > uint8_t chan_map[NCHAN]; > > @@ -978,12 +976,11 @@ static inline int > tx_resume_threshold(struct sge_eq *eq) > { > > - return (eq->qsize / 4); > + /* not quite the same as qsize / 4, but this will do. */ > + return (eq->sidx / 4); > } > > /* t4_main.c */ > -void t4_tx_task(void *, int); > -void t4_tx_callout(void *); > int t4_os_find_pci_capability(struct adapter *, int); > int t4_os_pci_save_state(struct adapter *); > int t4_os_pci_restore_state(struct adapter *); > @@ -1024,16 +1021,15 @@ int t4_setup_adapter_queues(struct adapt > int t4_teardown_adapter_queues(struct adapter *); > int t4_setup_port_queues(struct port_info *); > int t4_teardown_port_queues(struct port_info *); > -int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, int); > -void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t); > void t4_intr_all(void *); > void t4_intr(void *); > void t4_intr_err(void *); > void t4_intr_evt(void *); > void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct wrqe *)= ; > -int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); > void t4_update_fl_bufsize(struct ifnet *); > -int can_resume_tx(struct sge_eq *); > +int parse_pkt(struct mbuf **); > +void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); > +void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); > > /* t4_tracer.c */ > struct t4_tracer; > > Modified: head/sys/dev/cxgbe/t4_l2t.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 22:52:43 2014 (r276484) > +++ head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 23:19:16 2014 (r276485) > @@ -113,16 +113,15 @@ found: > int > t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync) > { > - struct wrqe *wr; > + struct wrq_cookie cookie; > struct cpl_l2t_write_req *req; > int idx =3D e->idx + sc->vres.l2t.start; > > mtx_assert(&e->lock, MA_OWNED); > > - wr =3D alloc_wrqe(sizeof(*req), &sc->sge.mgmtq); > - if (wr =3D=3D NULL) > + req =3D start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*req), 16), > &cookie); > + if (req =3D=3D NULL) > return (ENOMEM); > - req =3D wrtod(wr); > > INIT_TP_WR(req, 0); > OPCODE_TID(req) =3D htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, idx | > @@ -132,7 +131,7 @@ t4_write_l2e(struct adapter *sc, struct > req->vlan =3D htons(e->vlan); > memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); > > - t4_wrq_tx(sc, wr); > + commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); > > if (sync && e->state !=3D L2T_STATE_SWITCHING) > e->state =3D L2T_STATE_SYNC_WRITE; > > Modified: head/sys/dev/cxgbe/t4_main.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/cxgbe/t4_main.c Wed Dec 31 22:52:43 2014 > (r276484) > +++ head/sys/dev/cxgbe/t4_main.c Wed Dec 31 23:19:16 2014 > (r276485) > @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); > #include "common/t4_regs_values.h" > #include "t4_ioctl.h" > #include "t4_l2t.h" > +#include "t4_mp_ring.h" > > /* T4 bus driver interface */ > static int t4_probe(device_t); > @@ -378,7 +379,8 @@ static void build_medialist(struct port_ > static int cxgbe_init_synchronized(struct port_info *); > static int cxgbe_uninit_synchronized(struct port_info *); > static int setup_intr_handlers(struct adapter *); > -static void quiesce_eq(struct adapter *, struct sge_eq *); > +static void quiesce_txq(struct adapter *, struct sge_txq *); > +static void quiesce_wrq(struct adapter *, struct sge_wrq *); > static void quiesce_iq(struct adapter *, struct sge_iq *); > static void quiesce_fl(struct adapter *, struct sge_fl *); > static int t4_alloc_irq(struct adapter *, struct irq *, int rid, > @@ -434,7 +436,6 @@ static int sysctl_tx_rate(SYSCTL_HANDLER > static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); > static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); > #endif > -static inline void txq_start(struct ifnet *, struct sge_txq *); > static uint32_t fconf_to_mode(uint32_t); > static uint32_t mode_to_fconf(uint32_t); > static uint32_t fspec_to_fconf(struct t4_filter_specification *); > @@ -1429,67 +1430,36 @@ cxgbe_transmit(struct ifnet *ifp, struct > { > struct port_info *pi =3D ifp->if_softc; > struct adapter *sc =3D pi->adapter; > - struct sge_txq *txq =3D &sc->sge.txq[pi->first_txq]; > - struct buf_ring *br; > + struct sge_txq *txq; > + void *items[1]; > int rc; > > M_ASSERTPKTHDR(m); > + MPASS(m->m_nextpkt =3D=3D NULL); /* not quite ready for this y= et */ > > if (__predict_false(pi->link_cfg.link_ok =3D=3D 0)) { > m_freem(m); > return (ENETDOWN); > } > > - /* check if flowid is set */ > - if (M_HASHTYPE_GET(m) !=3D M_HASHTYPE_NONE) > - txq +=3D ((m->m_pkthdr.flowid % (pi->ntxq - > pi->rsrv_noflowq)) > - + pi->rsrv_noflowq); > - br =3D txq->br; > - > - if (TXQ_TRYLOCK(txq) =3D=3D 0) { > - struct sge_eq *eq =3D &txq->eq; > - > - /* > - * It is possible that t4_eth_tx finishes up and releases > the > - * lock between the TRYLOCK above and the drbr_enqueue > here. We > - * need to make sure that this mbuf doesn't just sit ther= e > in > - * the drbr. > - */ > - > - rc =3D drbr_enqueue(ifp, br, m); > - if (rc =3D=3D 0 && callout_pending(&eq->tx_callout) =3D= =3D 0 && > - !(eq->flags & EQ_DOOMED)) > - callout_reset(&eq->tx_callout, 1, t4_tx_callout, > eq); > + rc =3D parse_pkt(&m); > + if (__predict_false(rc !=3D 0)) { > + MPASS(m =3D=3D NULL); /* was freed > already */ > + atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic i= s > ok */ > return (rc); > } > > - /* > - * txq->m is the mbuf that is held up due to a temporary shortage > of > - * resources and it should be put on the wire first. Then what's > in > - * drbr and finally the mbuf that was just passed in to us. > - * > - * Return code should indicate the fate of the mbuf that was > passed in > - * this time. > - */ > - > - TXQ_LOCK_ASSERT_OWNED(txq); > - if (drbr_needs_enqueue(ifp, br) || txq->m) { > - > - /* Queued for transmission. */ > - > - rc =3D drbr_enqueue(ifp, br, m); > - m =3D txq->m ? txq->m : drbr_dequeue(ifp, br); > - (void) t4_eth_tx(ifp, txq, m); > - TXQ_UNLOCK(txq); > - return (rc); > - } > + /* Select a txq. */ > + txq =3D &sc->sge.txq[pi->first_txq]; > + if (M_HASHTYPE_GET(m) !=3D M_HASHTYPE_NONE) > + txq +=3D ((m->m_pkthdr.flowid % (pi->ntxq - > pi->rsrv_noflowq)) + > + pi->rsrv_noflowq); > > - /* Direct transmission. */ > - rc =3D t4_eth_tx(ifp, txq, m); > - if (rc !=3D 0 && txq->m) > - rc =3D 0; /* held, will be transmitted soon (hopefully) *= / > + items[0] =3D m; > + rc =3D mp_ring_enqueue(txq->r, items, 1, 4096); > + if (__predict_false(rc !=3D 0)) > + m_freem(m); > > - TXQ_UNLOCK(txq); > return (rc); > } > > @@ -1499,17 +1469,17 @@ cxgbe_qflush(struct ifnet *ifp) > struct port_info *pi =3D ifp->if_softc; > struct sge_txq *txq; > int i; > - struct mbuf *m; > > /* queues do not exist if !PORT_INIT_DONE. */ > if (pi->flags & PORT_INIT_DONE) { > for_each_txq(pi, i, txq) { > TXQ_LOCK(txq); > - m_freem(txq->m); > - txq->m =3D NULL; > - while ((m =3D buf_ring_dequeue_sc(txq->br)) !=3D = NULL) > - m_freem(m); > + txq->eq.flags &=3D ~EQ_ENABLED; > TXQ_UNLOCK(txq); > + while (!mp_ring_is_idle(txq->r)) { > + mp_ring_check_drainage(txq->r, 0); > + pause("qflush", 1); > + } > } > } > if_qflush(ifp); > @@ -1564,7 +1534,7 @@ cxgbe_get_counter(struct ifnet *ifp, ift > struct sge_txq *txq; > > for_each_txq(pi, i, txq) > - drops +=3D txq->br->br_drops; > + drops +=3D counter_u64_fetch(txq->r->drop= s); > } > > return (drops); > @@ -3236,7 +3206,8 @@ cxgbe_init_synchronized(struct port_info > { > struct adapter *sc =3D pi->adapter; > struct ifnet *ifp =3D pi->ifp; > - int rc =3D 0; > + int rc =3D 0, i; > + struct sge_txq *txq; > > ASSERT_SYNCHRONIZED_OP(sc); > > @@ -3265,6 +3236,17 @@ cxgbe_init_synchronized(struct port_info > } > > /* > + * Can't fail from this point onwards. Review > cxgbe_uninit_synchronized > + * if this changes. > + */ > + > + for_each_txq(pi, i, txq) { > + TXQ_LOCK(txq); > + txq->eq.flags |=3D EQ_ENABLED; > + TXQ_UNLOCK(txq); > + } > + > + /* > * The first iq of the first port to come up is used for tracing. > */ > if (sc->traceq < 0) { > @@ -3297,7 +3279,8 @@ cxgbe_uninit_synchronized(struct port_in > { > struct adapter *sc =3D pi->adapter; > struct ifnet *ifp =3D pi->ifp; > - int rc; > + int rc, i; > + struct sge_txq *txq; > > ASSERT_SYNCHRONIZED_OP(sc); > > @@ -3314,6 +3297,12 @@ cxgbe_uninit_synchronized(struct port_in > return (rc); > } > > + for_each_txq(pi, i, txq) { > + TXQ_LOCK(txq); > + txq->eq.flags &=3D ~EQ_ENABLED; > + TXQ_UNLOCK(txq); > + } > + > clrbit(&sc->open_device_map, pi->port_id); > PORT_LOCK(pi); > ifp->if_drv_flags &=3D ~IFF_DRV_RUNNING; > @@ -3543,15 +3532,17 @@ port_full_uninit(struct port_info *pi) > > if (pi->flags & PORT_INIT_DONE) { > > - /* Need to quiesce queues. XXX: ctrl queues? */ > + /* Need to quiesce queues. */ > + > + quiesce_wrq(sc, &sc->sge.ctrlq[pi->port_id]); > > for_each_txq(pi, i, txq) { > - quiesce_eq(sc, &txq->eq); > + quiesce_txq(sc, txq); > } > > #ifdef TCP_OFFLOAD > for_each_ofld_txq(pi, i, ofld_txq) { > - quiesce_eq(sc, &ofld_txq->eq); > + quiesce_wrq(sc, ofld_txq); > } > #endif > > @@ -3576,23 +3567,39 @@ port_full_uninit(struct port_info *pi) > } > > static void > -quiesce_eq(struct adapter *sc, struct sge_eq *eq) > +quiesce_txq(struct adapter *sc, struct sge_txq *txq) > { > - EQ_LOCK(eq); > - eq->flags |=3D EQ_DOOMED; > + struct sge_eq *eq =3D &txq->eq; > + struct sge_qstat *spg =3D (void *)&eq->desc[eq->sidx]; > > - /* > - * Wait for the response to a credit flush if one's > - * pending. > - */ > - while (eq->flags & EQ_CRFLUSHED) > - mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0); > - EQ_UNLOCK(eq); > + (void) sc; /* unused */ > > - callout_drain(&eq->tx_callout); /* XXX: iffy */ > - pause("callout", 10); /* Still iffy */ > +#ifdef INVARIANTS > + TXQ_LOCK(txq); > + MPASS((eq->flags & EQ_ENABLED) =3D=3D 0); > + TXQ_UNLOCK(txq); > +#endif > > - taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task); > + /* Wait for the mp_ring to empty. */ > + while (!mp_ring_is_idle(txq->r)) { > + mp_ring_check_drainage(txq->r, 0); > + pause("rquiesce", 1); > + } > + > + /* Then wait for the hardware to finish. */ > + while (spg->cidx !=3D htobe16(eq->pidx)) > + pause("equiesce", 1); > + > + /* Finally, wait for the driver to reclaim all descriptors. */ > + while (eq->cidx !=3D eq->pidx) > + pause("dquiesce", 1); > +} > + > +static void > +quiesce_wrq(struct adapter *sc, struct sge_wrq *wrq) > +{ > + > + /* XXXTX */ > } > > static void > @@ -4892,6 +4899,9 @@ cxgbe_sysctls(struct port_info *pi) > oid =3D SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "stats", CTLFLAG= _RD, > NULL, "port statistics"); > children =3D SYSCTL_CHILDREN(oid); > + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "tx_parse_error", > CTLFLAG_RD, > + &pi->tx_parse_error, 0, > + "# of tx packets with invalid length or # of segments"); > > #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ > SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ > @@ -6947,74 +6957,6 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) > } > #endif > > -static inline void > -txq_start(struct ifnet *ifp, struct sge_txq *txq) > -{ > - struct buf_ring *br; > - struct mbuf *m; > - > - TXQ_LOCK_ASSERT_OWNED(txq); > - > - br =3D txq->br; > - m =3D txq->m ? txq->m : drbr_dequeue(ifp, br); > - if (m) > - t4_eth_tx(ifp, txq, m); > -} > - > -void > -t4_tx_callout(void *arg) > -{ > - struct sge_eq *eq =3D arg; > - struct adapter *sc; > - > - if (EQ_TRYLOCK(eq) =3D=3D 0) > - goto reschedule; > - > - if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) { > - EQ_UNLOCK(eq); > -reschedule: > - if (__predict_true(!(eq->flags && EQ_DOOMED))) > - callout_schedule(&eq->tx_callout, 1); > - return; > - } > - > - EQ_LOCK_ASSERT_OWNED(eq); > - > - if (__predict_true((eq->flags & EQ_DOOMED) =3D=3D 0)) { > - > - if ((eq->flags & EQ_TYPEMASK) =3D=3D EQ_ETH) { > - struct sge_txq *txq =3D arg; > - struct port_info *pi =3D txq->ifp->if_softc; > - > - sc =3D pi->adapter; > - } else { > - struct sge_wrq *wrq =3D arg; > - > - sc =3D wrq->adapter; > - } > - > - taskqueue_enqueue(sc->tq[eq->tx_chan], &eq->tx_task); > - } > - > - EQ_UNLOCK(eq); > -} > - > -void > -t4_tx_task(void *arg, int count) > -{ > - struct sge_eq *eq =3D arg; > - > - EQ_LOCK(eq); > - if ((eq->flags & EQ_TYPEMASK) =3D=3D EQ_ETH) { > - struct sge_txq *txq =3D arg; > - txq_start(txq->ifp, txq); > - } else { > - struct sge_wrq *wrq =3D arg; > - t4_wrq_tx_locked(wrq->adapter, wrq, NULL); > - } > - EQ_UNLOCK(eq); > -} > - > static uint32_t > fconf_to_mode(uint32_t fconf) > { > @@ -7452,9 +7394,9 @@ static int > set_filter_wr(struct adapter *sc, int fidx) > { > struct filter_entry *f =3D &sc->tids.ftid_tab[fidx]; > - struct wrqe *wr; > struct fw_filter_wr *fwr; > unsigned int ftid; > + struct wrq_cookie cookie; > > ASSERT_SYNCHRONIZED_OP(sc); > > @@ -7473,12 +7415,10 @@ set_filter_wr(struct adapter *sc, int fi > > ftid =3D sc->tids.ftid_base + fidx; > > - wr =3D alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); > - if (wr =3D=3D NULL) > + fwr =3D start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), > &cookie); > + if (fwr =3D=3D NULL) > return (ENOMEM); > - > - fwr =3D wrtod(wr); > - bzero(fwr, sizeof (*fwr)); > + bzero(fwr, sizeof(*fwr)); > > fwr->op_pkd =3D htobe32(V_FW_WR_OP(FW_FILTER_WR)); > fwr->len16_pkd =3D htobe32(FW_LEN16(*fwr)); > @@ -7547,7 +7487,7 @@ set_filter_wr(struct adapter *sc, int fi > f->pending =3D 1; > sc->tids.ftids_in_use++; > > - t4_wrq_tx(sc, wr); > + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); > return (0); > } > > @@ -7555,22 +7495,21 @@ static int > del_filter_wr(struct adapter *sc, int fidx) > { > struct filter_entry *f =3D &sc->tids.ftid_tab[fidx]; > - struct wrqe *wr; > struct fw_filter_wr *fwr; > unsigned int ftid; > + struct wrq_cookie cookie; > > ftid =3D sc->tids.ftid_base + fidx; > > - wr =3D alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); > - if (wr =3D=3D NULL) > + fwr =3D start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), > &cookie); > + if (fwr =3D=3D NULL) > return (ENOMEM); > - fwr =3D wrtod(wr); > bzero(fwr, sizeof (*fwr)); > > t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); > > f->pending =3D 1; > - t4_wrq_tx(sc, wr); > + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); > return (0); > } > > @@ -8170,6 +8109,7 @@ t4_ioctl(struct cdev *dev, unsigned long > > /* MAC stats */ > t4_clr_port_stats(sc, pi->tx_chan); > + pi->tx_parse_error =3D 0; > > if (pi->flags & PORT_INIT_DONE) { > struct sge_rxq *rxq; > @@ -8192,24 +8132,24 @@ t4_ioctl(struct cdev *dev, unsigned long > txq->imm_wrs =3D 0; > txq->sgl_wrs =3D 0; > txq->txpkt_wrs =3D 0; > - txq->txpkts_wrs =3D 0; > - txq->txpkts_pkts =3D 0; > - txq->br->br_drops =3D 0; > - txq->no_dmamap =3D 0; > - txq->no_desc =3D 0; > + txq->txpkts0_wrs =3D 0; > + txq->txpkts1_wrs =3D 0; > + txq->txpkts0_pkts =3D 0; > + txq->txpkts1_pkts =3D 0; > + mp_ring_reset_stats(txq->r); > } > > #ifdef TCP_OFFLOAD > /* nothing to clear for each ofld_rxq */ > > for_each_ofld_txq(pi, i, wrq) { > - wrq->tx_wrs =3D 0; > - wrq->no_desc =3D 0; > + wrq->tx_wrs_direct =3D 0; > + wrq->tx_wrs_copied =3D 0; > } > #endif > wrq =3D &sc->sge.ctrlq[pi->port_id]; > - wrq->tx_wrs =3D 0; > - wrq->no_desc =3D 0; > + wrq->tx_wrs_direct =3D 0; > + wrq->tx_wrs_copied =3D 0; > } > break; > } > > Added: head/sys/dev/cxgbe/t4_mp_ring.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/cxgbe/t4_mp_ring.c Wed Dec 31 23:19:16 2014 > (r276485) > @@ -0,0 +1,364 @@ > +/*- > + * Copyright (c) 2014 Chelsio Communications, Inc. > + * All rights reserved. > + * Written by: Navdeep Parhar > + * > + * 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. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AN= D > + * 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 LIAB= LE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > + * 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, > 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 O= F > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "t4_mp_ring.h" > + > +union ring_state { > + struct { > + uint16_t pidx_head; > + uint16_t pidx_tail; > + uint16_t cidx; > + uint16_t flags; > + }; > + uint64_t state; > +}; > + > +enum { > + IDLE =3D 0, /* consumer ran to completion, nothing more to = do. > */ > + BUSY, /* consumer is running already, or will be > shortly. */ > + STALLED, /* consumer stopped due to lack of resources. */ > + ABDICATED, /* consumer stopped even though there was work to > be > + done because it wants another thread to take > over. */ > +}; > + > +static inline uint16_t > +space_available(struct mp_ring *r, union ring_state s) > +{ > + uint16_t x =3D r->size - 1; > + > + if (s.cidx =3D=3D s.pidx_head) > + return (x); > + else if (s.cidx > s.pidx_head) > + return (s.cidx - s.pidx_head - 1); > + else > + return (x - s.pidx_head + s.cidx); > +} > + > +static inline uint16_t > +increment_idx(struct mp_ring *r, uint16_t idx, uint16_t n) > +{ > + int x =3D r->size - idx; > + > + MPASS(x > 0); > + return (x > n ? idx + n : n - x); > +} > + > +/* Consumer is about to update the ring's state to s */ > +static inline uint16_t > +state_to_flags(union ring_state s, int abdicate) > +{ > + > + if (s.cidx =3D=3D s.pidx_tail) > + return (IDLE); > + else if (abdicate && s.pidx_tail !=3D s.pidx_head) > + return (ABDICATED); > + > + return (BUSY); > +} > + > +/* > + * Caller passes in a state, with a guarantee that there is work to do > and that > + * all items up to the pidx_tail in the state are visible. > + */ > +static void > +drain_ring(struct mp_ring *r, union ring_state os, uint16_t prev, int > budget) > +{ > + union ring_state ns; > + int n, pending, total; > + uint16_t cidx =3D os.cidx; > + uint16_t pidx =3D os.pidx_tail; > + > + MPASS(os.flags =3D=3D BUSY); > + MPASS(cidx !=3D pidx); > + > + if (prev =3D=3D IDLE) > + counter_u64_add(r->starts, 1); > + pending =3D 0; > + total =3D 0; > + > + while (cidx !=3D pidx) { > + > + /* Items from cidx to pidx are available for consumption. > */ > + n =3D r->drain(r, cidx, pidx); > + if (n =3D=3D 0) { > + critical_enter(); > + do { > + os.state =3D ns.state =3D r->state; > + ns.cidx =3D cidx; > + ns.flags =3D STALLED; > + } while (atomic_cmpset_64(&r->state, os.state, > + ns.state) =3D=3D 0); > + critical_exit(); > + if (prev !=3D STALLED) > + counter_u64_add(r->stalls, 1); > + else if (total > 0) { > + counter_u64_add(r->restarts, 1); > + counter_u64_add(r->stalls, 1); > + } > + break; > + } > + cidx =3D increment_idx(r, cidx, n); > + pending +=3D n; > + total +=3D n; > + > + /* > + * We update the cidx only if we've caught up with the > pidx, the > + * real cidx is getting too far ahead of the one visible = to > + * everyone else, or we have exceeded our budget. > + */ > + if (cidx !=3D pidx && pending < 64 && total < budget) > + continue; > + critical_enter(); > + do { > + os.state =3D ns.state =3D r->state; > + ns.cidx =3D cidx; > + ns.flags =3D state_to_flags(ns, total >=3D budget= ); > + } while (atomic_cmpset_acq_64(&r->state, os.state, > ns.state) =3D=3D 0); > + critical_exit(); > + > + if (ns.flags =3D=3D ABDICATED) > + counter_u64_add(r->abdications, 1); > + if (ns.flags !=3D BUSY) { > + /* Wrong loop exit if we're going to stall. */ > + MPASS(ns.flags !=3D STALLED); > + if (prev =3D=3D STALLED) { > + MPASS(total > 0); > + counter_u64_add(r->restarts, 1); > + } > + break; > + } > + > + /* > + * The acquire style atomic above guarantees visibility o= f > items > + * associated with any pidx change that we notice here. > + */ > + pidx =3D ns.pidx_tail; > + pending =3D 0; > + } > +} > + > +int > +mp_ring_alloc(struct mp_ring **pr, int size, void *cookie, ring_drain_t > drain, > + ring_can_drain_t can_drain, struct malloc_type *mt, int flags) > +{ > + struct mp_ring *r; > + > + /* All idx are 16b so size can be 65536 at most */ > + if (pr =3D=3D NULL || size < 2 || size > 65536 || drain =3D=3D NU= LL || > + can_drain =3D=3D NULL) > + return (EINVAL); > + *pr =3D NULL; > + flags &=3D M_NOWAIT | M_WAITOK; > + MPASS(flags !=3D 0); > + > + r =3D malloc(__offsetof(struct mp_ring, items[size]), mt, flags | > M_ZERO); > + if (r =3D=3D NULL) > + return (ENOMEM); > + r->size =3D size; > + r->cookie =3D cookie; > + r->mt =3D mt; > + r->drain =3D drain; > + r->can_drain =3D can_drain; > + r->enqueues =3D counter_u64_alloc(flags); > + r->drops =3D counter_u64_alloc(flags); > + r->starts =3D counter_u64_alloc(flags); > + r->stalls =3D counter_u64_alloc(flags); > + r->restarts =3D counter_u64_alloc(flags); > + r->abdications =3D counter_u64_alloc(flags); > + if (r->enqueues =3D=3D NULL || r->drops =3D=3D NULL || r->starts = =3D=3D NULL || > + r->stalls =3D=3D NULL || r->restarts =3D=3D NULL || > + r->abdications =3D=3D NULL) { > + mp_ring_free(r); > + return (ENOMEM); > + } > + > + *pr =3D r; > + return (0); > +} > + > +void > + > +mp_ring_free(struct mp_ring *r) > +{ > + > + if (r =3D=3D NULL) > + return; > + > + if (r->enqueues !=3D NULL) > + counter_u64_free(r->enqueues); > + if (r->drops !=3D NULL) > + counter_u64_free(r->drops); > + if (r->starts !=3D NULL) > + counter_u64_free(r->starts); > + if (r->stalls !=3D NULL) > + counter_u64_free(r->stalls); > + if (r->restarts !=3D NULL) > + counter_u64_free(r->restarts); > + if (r->abdications !=3D NULL) > + counter_u64_free(r->abdications); > + > + free(r, r->mt); > +} > + > +/* > + * Enqueue n items and maybe drain the ring for some time. > + * > + * Returns an errno. > + */ > +int > +mp_ring_enqueue(struct mp_ring *r, void **items, int n, int budget) > +{ > + union ring_state os, ns; > + uint16_t pidx_start, pidx_stop; > + int i; > + > + MPASS(items !=3D NULL); > + MPASS(n > 0); > + > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > --=20 -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2211611 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+------------------------------- From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:10: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 38138938; Tue, 6 Jan 2015 20:10: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 2368066FDF; Tue, 6 Jan 2015 20:10: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 t06KAh5F003683; Tue, 6 Jan 2015 20:10:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06KAgdL003682; Tue, 6 Jan 2015 20:10:42 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501062010.t06KAgdL003682@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 6 Jan 2015 20:10:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276764 - 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 20:10:43 -0000 Author: andrew Date: Tue Jan 6 20:10:42 2015 New Revision: 276764 URL: https://svnweb.freebsd.org/changeset/base/276764 Log: Add support to crunchide for handling AArch64 (arm64) ELF files. 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 Jan 6 19:04:02 2015 (r276763) +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Tue Jan 6 20:10:42 2015 (r276764) @@ -174,6 +174,10 @@ 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; #ifndef EM_ARM #define EM_ARM 40 #endif From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:33: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 26A3B1B2; Tue, 6 Jan 2015 20:33:50 +0000 (UTC) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [IPv6:2607:f8b0:400e:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF90D3DB; Tue, 6 Jan 2015 20:33:49 +0000 (UTC) Received: by mail-pa0-f46.google.com with SMTP id lf10so15510pab.5; Tue, 06 Jan 2015 12:33:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=wAkrUEhLFOUhXhFR84/EtnVaowtak4/VcNKFrYVW6kQ=; b=FzLSIke2hAAhcIQGGUtnDtrzw6z6vYIVvDG/Skuc13dIclIO0tA1C8QWTlALngxqEd 6atghftGrL1EHtShcJ3tVkVwj/6hlUUMFmPCNA1kuNh6GR/4EU39Vik7OHsaineDR17y 7OkhVbKVpQw8Sau+WN/k+aV6tQX7i5OrJrQLt77bRguK1gN5kSho9qaEoS9IY5QKc4IZ jqGZ6tVD/MgpF5C3hitIIX6oO0FdZ5UnR+B993SvZ6qoOJyFgqLCKAko3O+F0CDU0Pqq P+YnltrGoYs1uloQQ9FDx/0akUMlwrd2nlm9k2eRCCamwQeKlDC3te9q0lh2y9+fIFqg yxzw== X-Received: by 10.66.251.167 with SMTP id zl7mr161478244pac.140.1420576429361; Tue, 06 Jan 2015 12:33:49 -0800 (PST) Received: from ox ([24.6.44.228]) by mx.google.com with ESMTPSA id hs10sm57812548pdb.33.2015.01.06.12.33.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 06 Jan 2015 12:33:48 -0800 (PST) Sender: Navdeep Parhar Date: Tue, 6 Jan 2015 12:33:44 -0800 From: Navdeep Parhar To: Luigi Rizzo Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Message-ID: <20150106203344.GB26068@ox> Mail-Followup-To: Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201412312319.sBVNJHca031041@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 20:33:50 -0000 On Tue, Jan 06, 2015 at 07:58:34PM +0100, Luigi Rizzo wrote: > > > On Thu, Jan 1, 2015 at 12:19 AM, Navdeep Parhar wrote: > > Author: np > Date: Wed Dec 31 23:19:16 2014 > New Revision: 276485 > URL: https://svnweb.freebsd.org/changeset/base/276485 > > Log: >   cxgbe(4): major tx rework. > > > FYI, this commit has some unnamed unions (eg. in t4_mp_ring.c) > which prevent the kernel from compiling with our stock gcc > and its standard kernel build flags (specifically -std=...). > > Adding the following in the kernel config > > makeoptions COPTFLAGS="-fms-extensions" > > seems to do the job > > I know it is unavoidable that we'll end up with gcc not working, > but maybe we can still avoid unnamed unions. There are two unresolved issues with mp_ring and I had to make the driver amd64-only while I consider my options. - platforms where gcc is the default (and our version has problems with unnamed unions). This is simple to fix but reduces the readability of the code. But sure, if building head with gcc is popular then that trumps readability. I wonder if adding -fms-extensions just to the driver's build flags would be an acceptable compromise. - platforms without the acq/rel versions of 64b cmpset. I think it would be simple to add acq/rel variants to i386/pc98 and others that already have 64b cmpset. The driver will be permanently unplugged from whatever remains (only 32 bit powerpc I think). I'll try to sort all this out within the next couple of weeks. Regards, Navdeep > > cheers > luigi >   > > >   a) Front load as much work as possible in if_transmit, before any driver >   lock or software queue has to get involved. > >   b) Replace buf_ring with a brand new mp_ring (multiproducer ring).  This >   is specifically for the tx multiqueue model where one of the if_transmit >   producer threads becomes the consumer and other producers carry on as >   usual.  mp_ring is implemented as standalone code and it should be >   possible to use it in any driver with tx multiqueue.  It also has: >   - the ability to enqueue/dequeue multiple items.  This might become >     significant if packet batching is ever implemented. >   - an abdication mechanism to allow a thread to give up writing tx >     descriptors and have another if_transmit thread take over.  A thread >     that's writing tx descriptors can end up doing so for an unbounded >     time period if a) there are other if_transmit threads continuously >     feeding the sofware queue, and b) the chip keeps up with whatever the >     thread is throwing at it. >   - accurate statistics about interesting events even when the stats come >     at the expense of additional branches/conditional code. > >   The NIC txq lock is uncontested on the fast path at this point.  I've >   left it there for synchronization with the control events (interface >   up/down, modload/unload). > >   c) Add support for "type 1" coalescing work request in the normal NIC tx >   path.  This work request is optimized for frames with a single item in >   the DMA gather list.  These are very common when forwarding packets. >   Note that netmap tx in cxgbe already uses these "type 1" work requests. > >   d) Do not request automatic cidx updates every 32 descriptors.  Instead, >   request updates via bits in individual work requests (still every 32 >   descriptors approximately).  Also, request an automatic final update >   when the queue idles after activity.  This means NIC tx reclaim is still >   performed lazily but it will catch up quickly as soon as the queue >   idles.  This seems to be the best middle ground and I'll probably do >   something similar for netmap tx as well. > >   e) Implement a faster tx path for WRQs (used by TOE tx and control >   queues, _not_ by the normal NIC tx).  Allow work requests to be written >   directly to the hardware descriptor ring if room is available.  I will >   convert t4_tom and iw_cxgbe modules to this faster style gradually. > >   MFC after:    2 months > > Added: >   head/sys/dev/cxgbe/t4_mp_ring.c   (contents, props changed) >   head/sys/dev/cxgbe/t4_mp_ring.h   (contents, props changed) > Modified: >   head/sys/conf/files >   head/sys/dev/cxgbe/adapter.h >   head/sys/dev/cxgbe/t4_l2t.c >   head/sys/dev/cxgbe/t4_main.c >   head/sys/dev/cxgbe/t4_sge.c >   head/sys/modules/cxgbe/if_cxgbe/Makefile > > Modified: head/sys/conf/files > =========================================================================== > === > --- head/sys/conf/files Wed Dec 31 22:52:43 2014        (r276484) > +++ head/sys/conf/files Wed Dec 31 23:19:16 2014        (r276485) > @@ -1142,6 +1142,8 @@ dev/cxgb/sys/uipc_mvec.c  optional cxgb p >         compile-with "${NORMAL_C} -I$S/dev/cxgb" >  dev/cxgb/cxgb_t3fw.c           optional cxgb cxgb_t3fw \ >         compile-with "${NORMAL_C} -I$S/dev/cxgb" > +dev/cxgbe/t4_mp_ring.c         optional cxgbe pci \ > +       compile-with "${NORMAL_C} -I$S/dev/cxgbe" >  dev/cxgbe/t4_main.c            optional cxgbe pci \ >         compile-with "${NORMAL_C} -I$S/dev/cxgbe" >  dev/cxgbe/t4_netmap.c          optional cxgbe pci \ > > Modified: head/sys/dev/cxgbe/adapter.h > =========================================================================== > === > --- head/sys/dev/cxgbe/adapter.h        Wed Dec 31 22:52:43 2014        > (r276484) > +++ head/sys/dev/cxgbe/adapter.h        Wed Dec 31 23:19:16 2014        > (r276485) > @@ -152,7 +152,8 @@ enum { >         CL_METADATA_SIZE = CACHE_LINE_SIZE, > >         SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in > desc */ > -       TX_SGL_SEGS = 36, > +       TX_SGL_SEGS = 39, > +       TX_SGL_SEGS_TSO = 38, >         TX_WR_FLITS = SGE_MAX_WR_LEN / 8 >  }; > > @@ -273,6 +274,7 @@ struct port_info { >         struct timeval last_refreshed; >         struct port_stats stats; >         u_int tnl_cong_drops; > +       u_int tx_parse_error; > >         eventhandler_tag vlan_c; > > @@ -308,23 +310,9 @@ struct tx_desc { >         __be64 flit[8]; >  }; > > -struct tx_map { > -       struct mbuf *m; > -       bus_dmamap_t map; > -}; > - > -/* DMA maps used for tx */ > -struct tx_maps { > -       struct tx_map *maps; > -       uint32_t map_total;     /* # of DMA maps */ > -       uint32_t map_pidx;      /* next map to be used */ > -       uint32_t map_cidx;      /* reclaimed up to this index */ > -       uint32_t map_avail;     /* # of available maps */ > -}; > - >  struct tx_sdesc { > +       struct mbuf *m;         /* m_nextpkt linked chain of frames */ >         uint8_t desc_used;      /* # of hardware descriptors used by the WR > */ > -       uint8_t credits;        /* NIC txq: # of frames sent out in the WR > */ >  }; > > > @@ -378,16 +366,12 @@ struct sge_iq { >  enum { >         EQ_CTRL         = 1, >         EQ_ETH          = 2, > -#ifdef TCP_OFFLOAD >         EQ_OFLD         = 3, > -#endif > >         /* eq flags */ > -       EQ_TYPEMASK     = 7,            /* 3 lsbits hold the type */ > -       EQ_ALLOCATED    = (1 << 3),     /* firmware resources allocated */ > -       EQ_DOOMED       = (1 << 4),     /* about to be destroyed */ > -       EQ_CRFLUSHED    = (1 << 5),     /* expecting an update from SGE */ > -       EQ_STALLED      = (1 << 6),     /* out of hw descriptors or dmamaps > */ > +       EQ_TYPEMASK     = 0x3,          /* 2 lsbits hold the type (see > above) */ > +       EQ_ALLOCATED    = (1 << 2),     /* firmware resources allocated */ > +       EQ_ENABLED      = (1 << 3),     /* open for business */ >  }; > >  /* Listed in order of preference.  Update t4_sysctls too if you change > these */ > @@ -402,32 +386,25 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB >  struct sge_eq { >         unsigned int flags;     /* MUST be first */ >         unsigned int cntxt_id;  /* SGE context id for the eq */ > -       bus_dma_tag_t desc_tag; > -       bus_dmamap_t desc_map; > -       char lockname[16]; >         struct mtx eq_lock; > >         struct tx_desc *desc;   /* KVA of descriptor ring */ > -       bus_addr_t ba;          /* bus address of descriptor ring */ > -       struct sge_qstat *spg;  /* status page, for convenience */ >         uint16_t doorbells; >         volatile uint32_t *udb; /* KVA of doorbell (lies within BAR2) */ >         u_int udb_qid;          /* relative qid within the doorbell page */ > -       uint16_t cap;           /* max # of desc, for convenience */ > -       uint16_t avail;         /* available descriptors, for convenience * > / > -       uint16_t qsize;         /* size (# of entries) of the queue */ > +       uint16_t sidx;          /* index of the entry with the status page > */ >         uint16_t cidx;          /* consumer idx (desc idx) */ >         uint16_t pidx;          /* producer idx (desc idx) */ > -       uint16_t pending;       /* # of descriptors used since last > doorbell */ > +       uint16_t equeqidx;      /* EQUEQ last requested at this pidx */ > +       uint16_t dbidx;         /* pidx of the most recent doorbell */ >         uint16_t iqid;          /* iq that gets egr_update for the eq */ >         uint8_t tx_chan;        /* tx channel used by the eq */ > -       struct task tx_task; > -       struct callout tx_callout; > +       volatile u_int equiq;   /* EQUIQ outstanding */ > > -       /* stats */ > - > -       uint32_t egr_update;    /* # of SGE_EGR_UPDATE notifications for eq > */ > -       uint32_t unstalled;     /* recovered from stall */ > +       bus_dma_tag_t desc_tag; > +       bus_dmamap_t desc_map; > +       bus_addr_t ba;          /* bus address of descriptor ring */ > +       char lockname[16]; >  }; > >  struct sw_zone_info { > @@ -499,18 +476,19 @@ struct sge_fl { >         struct cluster_layout cll_alt;  /* alternate refill zone, layout */ >  }; > > +struct mp_ring; > + >  /* txq: SGE egress queue + what's needed for Ethernet NIC */ >  struct sge_txq { >         struct sge_eq eq;       /* MUST be first */ > >         struct ifnet *ifp;      /* the interface this txq belongs to */ > -       bus_dma_tag_t tx_tag;   /* tag for transmit buffers */ > -       struct buf_ring *br;    /* tx buffer ring */ > +       struct mp_ring *r;      /* tx software ring */ >         struct tx_sdesc *sdesc; /* KVA of software descriptor ring */ > -       struct mbuf *m;         /* held up due to temporary resource > shortage */ > - > -       struct tx_maps txmaps; > +       struct sglist *gl; > +       __be32 cpl_ctrl0;       /* for convenience */ > > +       struct task tx_reclaim_task; >         /* stats for common events first */ > >         uint64_t txcsum;        /* # of times hardware assisted with > checksum */ > @@ -519,13 +497,12 @@ struct sge_txq { >         uint64_t imm_wrs;       /* # of work requests with immediate data * > / >         uint64_t sgl_wrs;       /* # of work requests with direct SGL */ >         uint64_t txpkt_wrs;     /* # of txpkt work requests (not coalesced) > */ > -       uint64_t txpkts_wrs;    /* # of coalesced tx work requests */ > -       uint64_t txpkts_pkts;   /* # of frames in coalesced tx work > requests */ > +       uint64_t txpkts0_wrs;   /* # of type0 coalesced tx work requests */ > +       uint64_t txpkts1_wrs;   /* # of type1 coalesced tx work requests */ > +       uint64_t txpkts0_pkts;  /* # of frames in type0 coalesced tx WRs */ > +       uint64_t txpkts1_pkts;  /* # of frames in type1 coalesced tx WRs */ > >         /* stats for not-that-common events */ > - > -       uint32_t no_dmamap;     /* no DMA map to load the mbuf */ > -       uint32_t no_desc;       /* out of hardware descriptors */ >  } __aligned(CACHE_LINE_SIZE); > >  /* rxq: SGE ingress queue + SGE free list + miscellaneous items */ > @@ -574,7 +551,13 @@ struct wrqe { >         STAILQ_ENTRY(wrqe) link; >         struct sge_wrq *wrq; >         int wr_len; > -       uint64_t wr[] __aligned(16); > +       char wr[] __aligned(16); > +}; > + > +struct wrq_cookie { > +       TAILQ_ENTRY(wrq_cookie) link; > +       int ndesc; > +       int pidx; >  }; > >  /* > @@ -585,17 +568,32 @@ struct sge_wrq { >         struct sge_eq eq;       /* MUST be first */ > >         struct adapter *adapter; > +       struct task wrq_tx_task; > + > +       /* Tx desc reserved but WR not "committed" yet. */ > +       TAILQ_HEAD(wrq_incomplete_wrs , wrq_cookie) incomplete_wrs; > > -       /* List of WRs held up due to lack of tx descriptors */ > +       /* List of WRs ready to go out as soon as descriptors are > available. */ >         STAILQ_HEAD(, wrqe) wr_list; > +       u_int nwr_pending; > +       u_int ndesc_needed; > >         /* stats for common events first */ > > -       uint64_t tx_wrs;        /* # of tx work requests */ > +       uint64_t tx_wrs_direct; /* # of WRs written directly to desc ring. > */ > +       uint64_t tx_wrs_ss;     /* # of WRs copied from scratch space. */ > +       uint64_t tx_wrs_copied; /* # of WRs queued and copied to desc ring. > */ > >         /* stats for not-that-common events */ > > -       uint32_t no_desc;       /* out of hardware descriptors */ > +       /* > +        * Scratch space for work requests that wrap around after reaching > the > +        * status page, and some infomation about the last WR that used it. > +        */ > +       uint16_t ss_pidx; > +       uint16_t ss_len; > +       uint8_t ss[SGE_MAX_WR_LEN]; > + >  } __aligned(CACHE_LINE_SIZE); > > > @@ -744,7 +742,7 @@ struct adapter { >         struct sge sge; >         int lro_timeout; > > -       struct taskqueue *tq[NCHAN];    /* taskqueues that flush data out * > / > +       struct taskqueue *tq[NCHAN];    /* General purpose taskqueues */ >         struct port_info *port[MAX_NPORTS]; >         uint8_t chan_map[NCHAN]; > > @@ -978,12 +976,11 @@ static inline int >  tx_resume_threshold(struct sge_eq *eq) >  { > > -       return (eq->qsize / 4); > +       /* not quite the same as qsize / 4, but this will do. */ > +       return (eq->sidx / 4); >  } > >  /* t4_main.c */ > -void t4_tx_task(void *, int); > -void t4_tx_callout(void *); >  int t4_os_find_pci_capability(struct adapter *, int); >  int t4_os_pci_save_state(struct adapter *); >  int t4_os_pci_restore_state(struct adapter *); > @@ -1024,16 +1021,15 @@ int t4_setup_adapter_queues(struct adapt >  int t4_teardown_adapter_queues(struct adapter *); >  int t4_setup_port_queues(struct port_info *); >  int t4_teardown_port_queues(struct port_info *); > -int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, int); > -void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t); >  void t4_intr_all(void *); >  void t4_intr(void *); >  void t4_intr_err(void *); >  void t4_intr_evt(void *); >  void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct wrqe *); > -int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); >  void t4_update_fl_bufsize(struct ifnet *); > -int can_resume_tx(struct sge_eq *); > +int parse_pkt(struct mbuf **); > +void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); > +void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); > >  /* t4_tracer.c */ >  struct t4_tracer; > > Modified: head/sys/dev/cxgbe/t4_l2t.c > =========================================================================== > === > --- head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 22:52:43 2014        (r276484) > +++ head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 23:19:16 2014        (r276485) > @@ -113,16 +113,15 @@ found: >  int >  t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync) >  { > -       struct wrqe *wr; > +       struct wrq_cookie cookie; >         struct cpl_l2t_write_req *req; >         int idx = e->idx + sc->vres.l2t.start; > >         mtx_assert(&e->lock, MA_OWNED); > > -       wr = alloc_wrqe(sizeof(*req), &sc->sge.mgmtq); > -       if (wr == NULL) > +       req = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*req), 16), & > cookie); > +       if (req == NULL) >                 return (ENOMEM); > -       req = wrtod(wr); > >         INIT_TP_WR(req, 0); >         OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, idx | > @@ -132,7 +131,7 @@ t4_write_l2e(struct adapter *sc, struct >         req->vlan = htons(e->vlan); >         memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); > > -       t4_wrq_tx(sc, wr); > +       commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); > >         if (sync && e->state != L2T_STATE_SWITCHING) >                 e->state = L2T_STATE_SYNC_WRITE; > > Modified: head/sys/dev/cxgbe/t4_main.c > =========================================================================== > === > --- head/sys/dev/cxgbe/t4_main.c        Wed Dec 31 22:52:43 2014        > (r276484) > +++ head/sys/dev/cxgbe/t4_main.c        Wed Dec 31 23:19:16 2014        > (r276485) > @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); >  #include "common/t4_regs_values.h" >  #include "t4_ioctl.h" >  #include "t4_l2t.h" > +#include "t4_mp_ring.h" > >  /* T4 bus driver interface */ >  static int t4_probe(device_t); > @@ -378,7 +379,8 @@ static void build_medialist(struct port_ >  static int cxgbe_init_synchronized(struct port_info *); >  static int cxgbe_uninit_synchronized(struct port_info *); >  static int setup_intr_handlers(struct adapter *); > -static void quiesce_eq(struct adapter *, struct sge_eq *); > +static void quiesce_txq(struct adapter *, struct sge_txq *); > +static void quiesce_wrq(struct adapter *, struct sge_wrq *); >  static void quiesce_iq(struct adapter *, struct sge_iq *); >  static void quiesce_fl(struct adapter *, struct sge_fl *); >  static int t4_alloc_irq(struct adapter *, struct irq *, int rid, > @@ -434,7 +436,6 @@ static int sysctl_tx_rate(SYSCTL_HANDLER >  static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); >  static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); >  #endif > -static inline void txq_start(struct ifnet *, struct sge_txq *); >  static uint32_t fconf_to_mode(uint32_t); >  static uint32_t mode_to_fconf(uint32_t); >  static uint32_t fspec_to_fconf(struct t4_filter_specification *); > @@ -1429,67 +1430,36 @@ cxgbe_transmit(struct ifnet *ifp, struct >  { >         struct port_info *pi = ifp->if_softc; >         struct adapter *sc = pi->adapter; > -       struct sge_txq *txq = &sc->sge.txq[pi->first_txq]; > -       struct buf_ring *br; > +       struct sge_txq *txq; > +       void *items[1]; >         int rc; > >         M_ASSERTPKTHDR(m); > +       MPASS(m->m_nextpkt == NULL);    /* not quite ready for this yet */ > >         if (__predict_false(pi->link_cfg.link_ok == 0)) { >                 m_freem(m); >                 return (ENETDOWN); >         } > > -       /* check if flowid is set */ > -       if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) > -               txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> > rsrv_noflowq)) > -                   + pi->rsrv_noflowq); > -       br = txq->br; > - > -       if (TXQ_TRYLOCK(txq) == 0) { > -               struct sge_eq *eq = &txq->eq; > - > -               /* > -                * It is possible that t4_eth_tx finishes up and releases > the > -                * lock between the TRYLOCK above and the drbr_enqueue > here.  We > -                * need to make sure that this mbuf doesn't just sit there > in > -                * the drbr. > -                */ > - > -               rc = drbr_enqueue(ifp, br, m); > -               if (rc == 0 && callout_pending(&eq->tx_callout) == 0 && > -                   !(eq->flags & EQ_DOOMED)) > -                       callout_reset(&eq->tx_callout, 1, t4_tx_callout, > eq); > +       rc = parse_pkt(&m); > +       if (__predict_false(rc != 0)) { > +               MPASS(m == NULL);                       /* was freed > already */ > +               atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic is > ok */ >                 return (rc); >         } > > -       /* > -        * txq->m is the mbuf that is held up due to a temporary shortage > of > -        * resources and it should be put on the wire first.  Then what's > in > -        * drbr and finally the mbuf that was just passed in to us. > -        * > -        * Return code should indicate the fate of the mbuf that was passed > in > -        * this time. > -        */ > - > -       TXQ_LOCK_ASSERT_OWNED(txq); > -       if (drbr_needs_enqueue(ifp, br) || txq->m) { > - > -               /* Queued for transmission. */ > - > -               rc = drbr_enqueue(ifp, br, m); > -               m = txq->m ? txq->m : drbr_dequeue(ifp, br); > -               (void) t4_eth_tx(ifp, txq, m); > -               TXQ_UNLOCK(txq); > -               return (rc); > -       } > +       /* Select a txq. */ > +       txq = &sc->sge.txq[pi->first_txq]; > +       if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) > +               txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> > rsrv_noflowq)) + > +                   pi->rsrv_noflowq); > > -       /* Direct transmission. */ > -       rc = t4_eth_tx(ifp, txq, m); > -       if (rc != 0 && txq->m) > -               rc = 0; /* held, will be transmitted soon (hopefully) */ > +       items[0] = m; > +       rc = mp_ring_enqueue(txq->r, items, 1, 4096); > +       if (__predict_false(rc != 0)) > +               m_freem(m); > > -       TXQ_UNLOCK(txq); >         return (rc); >  } > > @@ -1499,17 +1469,17 @@ cxgbe_qflush(struct ifnet *ifp) >         struct port_info *pi = ifp->if_softc; >         struct sge_txq *txq; >         int i; > -       struct mbuf *m; > >         /* queues do not exist if !PORT_INIT_DONE. */ >         if (pi->flags & PORT_INIT_DONE) { >                 for_each_txq(pi, i, txq) { >                         TXQ_LOCK(txq); > -                       m_freem(txq->m); > -                       txq->m = NULL; > -                       while ((m = buf_ring_dequeue_sc(txq->br)) != NULL) > -                               m_freem(m); > +                       txq->eq.flags &= ~EQ_ENABLED; >                         TXQ_UNLOCK(txq); > +                       while (!mp_ring_is_idle(txq->r)) { > +                               mp_ring_check_drainage(txq->r, 0); > +                               pause("qflush", 1); > +                       } >                 } >         } >         if_qflush(ifp); > @@ -1564,7 +1534,7 @@ cxgbe_get_counter(struct ifnet *ifp, ift >                         struct sge_txq *txq; > >                         for_each_txq(pi, i, txq) > -                               drops += txq->br->br_drops; > +                               drops += counter_u64_fetch(txq->r->drops); >                 } > >                 return (drops); > @@ -3236,7 +3206,8 @@ cxgbe_init_synchronized(struct port_info >  { >         struct adapter *sc = pi->adapter; >         struct ifnet *ifp = pi->ifp; > -       int rc = 0; > +       int rc = 0, i; > +       struct sge_txq *txq; > >         ASSERT_SYNCHRONIZED_OP(sc); > > @@ -3265,6 +3236,17 @@ cxgbe_init_synchronized(struct port_info >         } > >         /* > +        * Can't fail from this point onwards.  Review > cxgbe_uninit_synchronized > +        * if this changes. > +        */ > + > +       for_each_txq(pi, i, txq) { > +               TXQ_LOCK(txq); > +               txq->eq.flags |= EQ_ENABLED; > +               TXQ_UNLOCK(txq); > +       } > + > +       /* >          * The first iq of the first port to come up is used for tracing. >          */ >         if (sc->traceq < 0) { > @@ -3297,7 +3279,8 @@ cxgbe_uninit_synchronized(struct port_in >  { >         struct adapter *sc = pi->adapter; >         struct ifnet *ifp = pi->ifp; > -       int rc; > +       int rc, i; > +       struct sge_txq *txq; > >         ASSERT_SYNCHRONIZED_OP(sc); > > @@ -3314,6 +3297,12 @@ cxgbe_uninit_synchronized(struct port_in >                 return (rc); >         } > > +       for_each_txq(pi, i, txq) { > +               TXQ_LOCK(txq); > +               txq->eq.flags &= ~EQ_ENABLED; > +               TXQ_UNLOCK(txq); > +       } > + >         clrbit(&sc->open_device_map, pi->port_id); >         PORT_LOCK(pi); >         ifp->if_drv_flags &= ~IFF_DRV_RUNNING; > @@ -3543,15 +3532,17 @@ port_full_uninit(struct port_info *pi) > >         if (pi->flags & PORT_INIT_DONE) { > > -               /* Need to quiesce queues.  XXX: ctrl queues? */ > +               /* Need to quiesce queues.  */ > + > +               quiesce_wrq(sc, &sc->sge.ctrlq[pi->port_id]); > >                 for_each_txq(pi, i, txq) { > -                       quiesce_eq(sc, &txq->eq); > +                       quiesce_txq(sc, txq); >                 } > >  #ifdef TCP_OFFLOAD >                 for_each_ofld_txq(pi, i, ofld_txq) { > -                       quiesce_eq(sc, &ofld_txq->eq); > +                       quiesce_wrq(sc, ofld_txq); >                 } >  #endif > > @@ -3576,23 +3567,39 @@ port_full_uninit(struct port_info *pi) >  } > >  static void > -quiesce_eq(struct adapter *sc, struct sge_eq *eq) > +quiesce_txq(struct adapter *sc, struct sge_txq *txq) >  { > -       EQ_LOCK(eq); > -       eq->flags |= EQ_DOOMED; > +       struct sge_eq *eq = &txq->eq; > +       struct sge_qstat *spg = (void *)&eq->desc[eq->sidx]; > > -       /* > -        * Wait for the response to a credit flush if one's > -        * pending. > -        */ > -       while (eq->flags & EQ_CRFLUSHED) > -               mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0); > -       EQ_UNLOCK(eq); > +       (void) sc;      /* unused */ > > -       callout_drain(&eq->tx_callout); /* XXX: iffy */ > -       pause("callout", 10);           /* Still iffy */ > +#ifdef INVARIANTS > +       TXQ_LOCK(txq); > +       MPASS((eq->flags & EQ_ENABLED) == 0); > +       TXQ_UNLOCK(txq); > +#endif > > -       taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task); > +       /* Wait for the mp_ring to empty. */ > +       while (!mp_ring_is_idle(txq->r)) { > +               mp_ring_check_drainage(txq->r, 0); > +               pause("rquiesce", 1); > +       } > + > +       /* Then wait for the hardware to finish. */ > +       while (spg->cidx != htobe16(eq->pidx)) > +               pause("equiesce", 1); > + > +       /* Finally, wait for the driver to reclaim all descriptors. */ > +       while (eq->cidx != eq->pidx) > +               pause("dquiesce", 1); > +} > + > +static void > +quiesce_wrq(struct adapter *sc, struct sge_wrq *wrq) > +{ > + > +       /* XXXTX */ >  } > >  static void > @@ -4892,6 +4899,9 @@ cxgbe_sysctls(struct port_info *pi) >         oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "stats", CTLFLAG_RD, >             NULL, "port statistics"); >         children = SYSCTL_CHILDREN(oid); > +       SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "tx_parse_error", > CTLFLAG_RD, > +           &pi->tx_parse_error, 0, > +           "# of tx packets with invalid length or # of segments"); > >  #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ >         SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ > @@ -6947,74 +6957,6 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) >  } >  #endif > > -static inline void > -txq_start(struct ifnet *ifp, struct sge_txq *txq) > -{ > -       struct buf_ring *br; > -       struct mbuf *m; > - > -       TXQ_LOCK_ASSERT_OWNED(txq); > - > -       br = txq->br; > -       m = txq->m ? txq->m : drbr_dequeue(ifp, br); > -       if (m) > -               t4_eth_tx(ifp, txq, m); > -} > - > -void > -t4_tx_callout(void *arg) > -{ > -       struct sge_eq *eq = arg; > -       struct adapter *sc; > - > -       if (EQ_TRYLOCK(eq) == 0) > -               goto reschedule; > - > -       if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) { > -               EQ_UNLOCK(eq); > -reschedule: > -               if (__predict_true(!(eq->flags && EQ_DOOMED))) > -                       callout_schedule(&eq->tx_callout, 1); > -               return; > -       } > - > -       EQ_LOCK_ASSERT_OWNED(eq); > - > -       if (__predict_true((eq->flags & EQ_DOOMED) == 0)) { > - > -               if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { > -                       struct sge_txq *txq = arg; > -                       struct port_info *pi = txq->ifp->if_softc; > - > -                       sc = pi->adapter; > -               } else { > -                       struct sge_wrq *wrq = arg; > - > -                       sc = wrq->adapter; > -               } > - > -               taskqueue_enqueue(sc->tq[eq->tx_chan], &eq->tx_task); > -       } > - > -       EQ_UNLOCK(eq); > -} > - > -void > -t4_tx_task(void *arg, int count) > -{ > -       struct sge_eq *eq = arg; > - > -       EQ_LOCK(eq); > -       if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { > -               struct sge_txq *txq = arg; > -               txq_start(txq->ifp, txq); > -       } else { > -               struct sge_wrq *wrq = arg; > -               t4_wrq_tx_locked(wrq->adapter, wrq, NULL); > -       } > -       EQ_UNLOCK(eq); > -} > - >  static uint32_t >  fconf_to_mode(uint32_t fconf) >  { > @@ -7452,9 +7394,9 @@ static int >  set_filter_wr(struct adapter *sc, int fidx) >  { >         struct filter_entry *f = &sc->tids.ftid_tab[fidx]; > -       struct wrqe *wr; >         struct fw_filter_wr *fwr; >         unsigned int ftid; > +       struct wrq_cookie cookie; > >         ASSERT_SYNCHRONIZED_OP(sc); > > @@ -7473,12 +7415,10 @@ set_filter_wr(struct adapter *sc, int fi > >         ftid = sc->tids.ftid_base + fidx; > > -       wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); > -       if (wr == NULL) > +       fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), & > cookie); > +       if (fwr == NULL) >                 return (ENOMEM); > - > -       fwr = wrtod(wr); > -       bzero(fwr, sizeof (*fwr)); > +       bzero(fwr, sizeof(*fwr)); > >         fwr->op_pkd = htobe32(V_FW_WR_OP(FW_FILTER_WR)); >         fwr->len16_pkd = htobe32(FW_LEN16(*fwr)); > @@ -7547,7 +7487,7 @@ set_filter_wr(struct adapter *sc, int fi >         f->pending = 1; >         sc->tids.ftids_in_use++; > > -       t4_wrq_tx(sc, wr); > +       commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >         return (0); >  } > > @@ -7555,22 +7495,21 @@ static int >  del_filter_wr(struct adapter *sc, int fidx) >  { >         struct filter_entry *f = &sc->tids.ftid_tab[fidx]; > -       struct wrqe *wr; >         struct fw_filter_wr *fwr; >         unsigned int ftid; > +       struct wrq_cookie cookie; > >         ftid = sc->tids.ftid_base + fidx; > > -       wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); > -       if (wr == NULL) > +       fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), & > cookie); > +       if (fwr == NULL) >                 return (ENOMEM); > -       fwr = wrtod(wr); >         bzero(fwr, sizeof (*fwr)); > >         t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); > >         f->pending = 1; > -       t4_wrq_tx(sc, wr); > +       commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >         return (0); >  } > > @@ -8170,6 +8109,7 @@ t4_ioctl(struct cdev *dev, unsigned long > >                 /* MAC stats */ >                 t4_clr_port_stats(sc, pi->tx_chan); > +               pi->tx_parse_error = 0; > >                 if (pi->flags & PORT_INIT_DONE) { >                         struct sge_rxq *rxq; > @@ -8192,24 +8132,24 @@ t4_ioctl(struct cdev *dev, unsigned long >                                 txq->imm_wrs = 0; >                                 txq->sgl_wrs = 0; >                                 txq->txpkt_wrs = 0; > -                               txq->txpkts_wrs = 0; > -                               txq->txpkts_pkts = 0; > -                               txq->br->br_drops = 0; > -                               txq->no_dmamap = 0; > -                               txq->no_desc = 0; > +                               txq->txpkts0_wrs = 0; > +                               txq->txpkts1_wrs = 0; > +                               txq->txpkts0_pkts = 0; > +                               txq->txpkts1_pkts = 0; > +                               mp_ring_reset_stats(txq->r); >                         } > >  #ifdef TCP_OFFLOAD >                         /* nothing to clear for each ofld_rxq */ > >                         for_each_ofld_txq(pi, i, wrq) { > -                               wrq->tx_wrs = 0; > -                               wrq->no_desc = 0; > +                               wrq->tx_wrs_direct = 0; > +                               wrq->tx_wrs_copied = 0; >                         } >  #endif >                         wrq = &sc->sge.ctrlq[pi->port_id]; > -                       wrq->tx_wrs = 0; > -                       wrq->no_desc = 0; > +                       wrq->tx_wrs_direct = 0; > +                       wrq->tx_wrs_copied = 0; >                 } >                 break; >         } > > Added: head/sys/dev/cxgbe/t4_mp_ring.c > =========================================================================== > === > --- /dev/null   00:00:00 1970   (empty, because file is newly added) > +++ head/sys/dev/cxgbe/t4_mp_ring.c     Wed Dec 31 23:19:16 2014        > (r276485) > @@ -0,0 +1,364 @@ > +/*- > + * Copyright (c) 2014 Chelsio Communications, Inc. > + * All rights reserved. > + * Written by: Navdeep Parhar > + * > + * 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 "t4_mp_ring.h" > + > +union ring_state { > +       struct { > +               uint16_t pidx_head; > +               uint16_t pidx_tail; > +               uint16_t cidx; > +               uint16_t flags; > +       }; > +       uint64_t state; > +}; > + > +enum { > +       IDLE = 0,       /* consumer ran to completion, nothing more to do. > */ > +       BUSY,           /* consumer is running already, or will be shortly. > */ > +       STALLED,        /* consumer stopped due to lack of resources. */ > +       ABDICATED,      /* consumer stopped even though there was work to > be > +                          done because it wants another thread to take > over. */ > +}; > + > +static inline uint16_t > +space_available(struct mp_ring *r, union ring_state s) > +{ > +       uint16_t x = r->size - 1; > + > +       if (s.cidx == s.pidx_head) > +               return (x); > +       else if (s.cidx > s.pidx_head) > +               return (s.cidx - s.pidx_head - 1); > +       else > +               return (x - s.pidx_head + s.cidx); > +} > + > +static inline uint16_t > +increment_idx(struct mp_ring *r, uint16_t idx, uint16_t n) > +{ > +       int x = r->size - idx; > + > +       MPASS(x > 0); > +       return (x > n ? idx + n : n - x); > +} > + > +/* Consumer is about to update the ring's state to s */ > +static inline uint16_t > +state_to_flags(union ring_state s, int abdicate) > +{ > + > +       if (s.cidx == s.pidx_tail) > +               return (IDLE); > +       else if (abdicate && s.pidx_tail != s.pidx_head) > +               return (ABDICATED); > + > +       return (BUSY); > +} > + > +/* > + * Caller passes in a state, with a guarantee that there is work to do and > that > + * all items up to the pidx_tail in the state are visible. > + */ > +static void > +drain_ring(struct mp_ring *r, union ring_state os, uint16_t prev, int > budget) > +{ > +       union ring_state ns; > +       int n, pending, total; > +       uint16_t cidx = os.cidx; > +       uint16_t pidx = os.pidx_tail; > + > +       MPASS(os.flags == BUSY); > +       MPASS(cidx != pidx); > + > +       if (prev == IDLE) > +               counter_u64_add(r->starts, 1); > +       pending = 0; > +       total = 0; > + > +       while (cidx != pidx) { > + > +               /* Items from cidx to pidx are available for consumption. * > / > +               n = r->drain(r, cidx, pidx); > +               if (n == 0) { > +                       critical_enter(); > +                       do { > +                               os.state = ns.state = r->state; > +                               ns.cidx = cidx; > +                               ns.flags = STALLED; > +                       } while (atomic_cmpset_64(&r->state, os.state, > +                           ns.state) == 0); > +                       critical_exit(); > +                       if (prev != STALLED) > +                               counter_u64_add(r->stalls, 1); > +                       else if (total > 0) { > +                               counter_u64_add(r->restarts, 1); > +                               counter_u64_add(r->stalls, 1); > +                       } > +                       break; > +               } > +               cidx = increment_idx(r, cidx, n); > +               pending += n; > +               total += n; > + > +               /* > +                * We update the cidx only if we've caught up with the > pidx, the > +                * real cidx is getting too far ahead of the one visible to > +                * everyone else, or we have exceeded our budget. > +                */ > +               if (cidx != pidx && pending < 64 && total < budget) > +                       continue; > +               critical_enter(); > +               do { > +                       os.state = ns.state = r->state; > +                       ns.cidx = cidx; > +                       ns.flags = state_to_flags(ns, total >= budget); > +               } while (atomic_cmpset_acq_64(&r->state, os.state, > ns.state) == 0); > +               critical_exit(); > + > +               if (ns.flags == ABDICATED) > +                       counter_u64_add(r->abdications, 1); > +               if (ns.flags != BUSY) { > +                       /* Wrong loop exit if we're going to stall. */ > +                       MPASS(ns.flags != STALLED); > +                       if (prev == STALLED) { > +                               MPASS(total > 0); > +                               counter_u64_add(r->restarts, 1); > +                       } > +                       break; > +               } > + > +               /* > +                * The acquire style atomic above guarantees visibility of > items > +                * associated with any pidx change that we notice here. > +                */ > +               pidx = ns.pidx_tail; > +               pending = 0; > +       } > +} > + > +int > +mp_ring_alloc(struct mp_ring **pr, int size, void *cookie, ring_drain_t > drain, > +    ring_can_drain_t can_drain, struct malloc_type *mt, int flags) > +{ > +       struct mp_ring *r; > + > +       /* All idx are 16b so size can be 65536 at most */ > +       if (pr == NULL || size < 2 || size > 65536 || drain == NULL || > +           can_drain == NULL) > +               return (EINVAL); > +       *pr = NULL; > +       flags &= M_NOWAIT | M_WAITOK; > +       MPASS(flags != 0); > + > +       r = malloc(__offsetof(struct mp_ring, items[size]), mt, flags | > M_ZERO); > +       if (r == NULL) > +               return (ENOMEM); > +       r->size = size; > +       r->cookie = cookie; > +       r->mt = mt; > +       r->drain = drain; > +       r->can_drain = can_drain; > +       r->enqueues = counter_u64_alloc(flags); > +       r->drops = counter_u64_alloc(flags); > +       r->starts = counter_u64_alloc(flags); > +       r->stalls = counter_u64_alloc(flags); > +       r->restarts = counter_u64_alloc(flags); > +       r->abdications = counter_u64_alloc(flags); > +       if (r->enqueues == NULL || r->drops == NULL || r->starts == NULL || > +           r->stalls == NULL || r->restarts == NULL || > +           r->abdications == NULL) { > +               mp_ring_free(r); > +               return (ENOMEM); > +       } > + > +       *pr = r; > +       return (0); > +} > + > +void > + > +mp_ring_free(struct mp_ring *r) > +{ > + > +       if (r == NULL) > +               return; > + > +       if (r->enqueues != NULL) > +               counter_u64_free(r->enqueues); > +       if (r->drops != NULL) > +               counter_u64_free(r->drops); > +       if (r->starts != NULL) > +               counter_u64_free(r->starts); > +       if (r->stalls != NULL) > +               counter_u64_free(r->stalls); > +       if (r->restarts != NULL) > +               counter_u64_free(r->restarts); > +       if (r->abdications != NULL) > +               counter_u64_free(r->abdications); > + > +       free(r, r->mt); > +} > + > +/* > + * Enqueue n items and maybe drain the ring for some time. > + * > + * Returns an errno. > + */ > +int > +mp_ring_enqueue(struct mp_ring *r, void **items, int n, int budget) > +{ > +       union ring_state os, ns; > +       uint16_t pidx_start, pidx_stop; > +       int i; > + > +       MPASS(items != NULL); > +       MPASS(n > 0); > + > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > > > > > > -- > -----------------------------------------+------------------------------- >  Prof. Luigi RIZZO, rizzo@iet.unipi.it  . Dip. di Ing. dell'Informazione >  http://www.iet.unipi.it/~luigi/        . Universita` di Pisa >  TEL      +39-050-2211611               . via Diotisalvi 2 >  Mobile   +39-338-6809875               . 56122 PISA (Italy) > -----------------------------------------+------------------------------- From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:42: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 F063437B; Tue, 6 Jan 2015 20:42: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 DBE976CA; Tue, 6 Jan 2015 20:42: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 t06Kgp4M021320; Tue, 6 Jan 2015 20:42:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06KgpZm021319; Tue, 6 Jan 2015 20:42:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501062042.t06KgpZm021319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Jan 2015 20:42:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276765 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 20:42:52 -0000 Author: gjb Date: Tue Jan 6 20:42:50 2015 New Revision: 276765 URL: https://svnweb.freebsd.org/changeset/base/276765 Log: Update pkg-stage.sh to be compatible with pkg-1.4.x. In 1.3.x and earlier, ABI format is, for example, freebsd:11:x86:64. In 1.4.x, ABI format is FreeBSD:11:amd64, and a new configuration entry, ALTABI, is: freebsd:11:x86:64. Export PKG_ABI and PKG_ALTABI accordingly, and if PKG_ALTABI is set, create a symlink within the dvd PKG_CACHEDIR so both new and old ABI directories exist. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Tue Jan 6 20:10:42 2015 (r276764) +++ head/release/scripts/pkg-stage.sh Tue Jan 6 20:42:50 2015 (r276765) @@ -40,10 +40,15 @@ if [ ! -x /usr/local/sbin/pkg ]; then /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi +export DVD_DIR="dvd/packages" export PKG_ABI=$(pkg config ABI) -export PKG_REPODIR="dvd/packages/${PKG_ABI}" +export PKG_ALTABI=$(pkg config ALTABI 2>/dev/null) +export PKG_REPODIR="${DVD_DIR}/${PKG_ABI}" /bin/mkdir -p ${PKG_REPODIR} +if [ ! -z "${PKG_ALTABI}" ]; then + ln -s ${PKG_ABI} ${PKG_ALTABI} +fi # Print pkg(8) information to make debugging easier. ${PKGCMD} -vv From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 20:46: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 4137550E; Tue, 6 Jan 2015 20:46: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 2D533766; Tue, 6 Jan 2015 20:46: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 t06KkU2O021846; Tue, 6 Jan 2015 20:46:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06KkUPW021845; Tue, 6 Jan 2015 20:46:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501062046.t06KkUPW021845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 6 Jan 2015 20:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276766 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 20:46:30 -0000 Author: gjb Date: Tue Jan 6 20:46:29 2015 New Revision: 276766 URL: https://svnweb.freebsd.org/changeset/base/276766 Log: Properly change directories before creating the PKG_ALTABI -> PKG_ABI symlink. MFC after: 3 days X-MFC-With: r276765 Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Tue Jan 6 20:42:50 2015 (r276765) +++ head/release/scripts/pkg-stage.sh Tue Jan 6 20:46:29 2015 (r276766) @@ -47,7 +47,7 @@ export PKG_REPODIR="${DVD_DIR}/${PKG_ABI /bin/mkdir -p ${PKG_REPODIR} if [ ! -z "${PKG_ALTABI}" ]; then - ln -s ${PKG_ABI} ${PKG_ALTABI} + (cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI}) fi # Print pkg(8) information to make debugging easier. From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 21:11:21 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 2C029FC1; Tue, 6 Jan 2015 21:11:21 +0000 (UTC) Received: from webmail2.jnielsen.net (webmail2.jnielsen.net [50.114.224.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "webmail2.jnielsen.net", Issuer "freebsdsolutions.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 087FCB26; Tue, 6 Jan 2015 21:11:20 +0000 (UTC) Received: from [10.10.1.196] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by webmail2.jnielsen.net (8.15.1/8.14.9) with ESMTPSA id t06KqUdn053968 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2015 13:52:33 -0700 (MST) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail2.jnielsen.net: Host office.betterlinux.com [199.58.199.60] claimed to be [10.10.1.196] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 From: John Nielsen In-Reply-To: <201410100609.s9A690NU067686@svn.freebsd.org> Date: Tue, 6 Jan 2015 13:52:29 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201410100609.s9A690NU067686@svn.freebsd.org> To: Bryan Venteicher X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 21:11:21 -0000 Bryan- On Oct 10, 2014, at 12:09 AM, Bryan Venteicher = wrote: > Author: bryanv > Date: Fri Oct 10 06:08:59 2014 > New Revision: 272886 > URL: https://svnweb.freebsd.org/changeset/base/272886 >=20 > Log: > Add context pointer and source address to the UDP tunnel callback >=20 > These are needed for the forthcoming vxlan implementation. The = context > pointer means we do not have to use a spare pointer field in the = inpcb, > and the source address is required to populate vxlan's forwarding = table. >=20 > While I highly doubt there is an out of tree consumer of the UDP > tunneling callback, this change may be a difficult to eventually MFC. I noticed this comment while doing an MFC of vxlan to my local tree. Do = you think an MFC to 10-STABLE of this change (and vxlan generally) will = be feasible? Is there precedent for ABI changes like this being = sanctioned? Could symbol versioning help? > Phabricator: https://reviews.freebsd.org/D383 > Reviewed by: gnn >=20 > Modified: > head/sys/netinet/sctputil.c > head/sys/netinet/udp_usrreq.c > head/sys/netinet/udp_var.h > head/sys/netinet6/udp6_usrreq.c Thanks, JN From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 21:26: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 AFBB35E6; Tue, 6 Jan 2015 21:26: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 9BD2864D5B; Tue, 6 Jan 2015 21:26: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 t06LQaWX041366; Tue, 6 Jan 2015 21:26:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06LQaAV041365; Tue, 6 Jan 2015 21:26:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501062126.t06LQaAV041365@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 6 Jan 2015 21:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276767 - head/sys/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 21:26:36 -0000 Author: imp Date: Tue Jan 6 21:26:35 2015 New Revision: 276767 URL: https://svnweb.freebsd.org/changeset/base/276767 Log: Pacify clang 3.3 by ending the file with a newline. This is common practice in the rest of the tree, but this file slipped through. Modified: head/sys/xen/xen_msi.h Modified: head/sys/xen/xen_msi.h ============================================================================== --- head/sys/xen/xen_msi.h Tue Jan 6 20:46:29 2015 (r276766) +++ head/sys/xen/xen_msi.h Tue Jan 6 21:26:35 2015 (r276767) @@ -36,4 +36,4 @@ int xen_msi_release(int *irqs, int count int xen_msix_alloc(device_t dev, int *irq); int xen_msix_release(int irq); -#endif /* !__XEN_MSI_H__ */ \ No newline at end of file +#endif /* !__XEN_MSI_H__ */ From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 22:00: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 1175C166; Tue, 6 Jan 2015 22:00:36 +0000 (UTC) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C82326635E; Tue, 6 Jan 2015 22:00:35 +0000 (UTC) Received: by mail-ig0-f179.google.com with SMTP id r2so344248igi.6; Tue, 06 Jan 2015 14:00:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=9jBHsITh4mOgwdY+GEukPAtq2KydJFAv0oW2GoOuoG8=; b=N8LlQVDGsMsCh8VyQZPOQirG8UDoJKgluS8/oK+ilhekWkmfbOjGQhgP533sTERN3t 73ezmFKjiCNLuhpmcMgMP+zsLSSIkevFvwx7rjcNMZuHDxEssUFQOX2WcS2aymoe+lnC jYFexEOk93IQhOWT90YE0iYuc2HvqVez2zwjetaCxcQtWFjgvFhjtFFCl0fT6TyQX5n7 oAuDw8Usr7mGIqZgAyYbnV2uOnQnuuC5fkD9S6meBNqGBlOB1sDpthK5ObdWOMZAf0oN nkyKEVeavTXMFk9KG27VZQDQ8FVfBCaG0yvhHzvsCDowxLVTRQql96VNyeF3MvYLqAni WXDA== X-Received: by 10.50.120.7 with SMTP id ky7mr581405igb.45.1420581635219; Tue, 06 Jan 2015 14:00:35 -0800 (PST) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.0.171 with HTTP; Tue, 6 Jan 2015 14:00:04 -0800 (PST) In-Reply-To: References: <201410100609.s9A690NU067686@svn.freebsd.org> From: Bryan Venteicher Date: Tue, 6 Jan 2015 16:00:04 -0600 X-Google-Sender-Auth: G7rOhtv05OnTlqzEVZd0KK448hE Message-ID: Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 To: John Nielsen Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 22:00:36 -0000 On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen wrote: > Bryan- > > On Oct 10, 2014, at 12:09 AM, Bryan Venteicher wrote: > > > Author: bryanv > > Date: Fri Oct 10 06:08:59 2014 > > New Revision: 272886 > > URL: https://svnweb.freebsd.org/changeset/base/272886 > > > > Log: > > Add context pointer and source address to the UDP tunnel callback > > > > These are needed for the forthcoming vxlan implementation. The context > > pointer means we do not have to use a spare pointer field in the inpcb, > > and the source address is required to populate vxlan's forwarding table. > > > > While I highly doubt there is an out of tree consumer of the UDP > > tunneling callback, this change may be a difficult to eventually MFC. > > I noticed this comment while doing an MFC of vxlan to my local tree. Do > you think an MFC to 10-STABLE of this change (and vxlan generally) will be > feasible? Is there precedent for ABI changes like this being sanctioned? > Could symbol versioning help? > > I'd like to get some consensus on whether this commit is OK to MFC. With this commit, vxlan should be an easy to MFC. > > Phabricator: https://reviews.freebsd.org/D383 > > Reviewed by: gnn > > > > Modified: > > head/sys/netinet/sctputil.c > > head/sys/netinet/udp_usrreq.c > > head/sys/netinet/udp_var.h > > head/sys/netinet6/udp6_usrreq.c > > Thanks, > > JN > > From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 22:29: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 37AC2721; Tue, 6 Jan 2015 22:29: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 1F45D7F2; Tue, 6 Jan 2015 22:29: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 t06MTGXE070280; Tue, 6 Jan 2015 22:29:16 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06MTDVl070256; Tue, 6 Jan 2015 22:29:13 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501062229.t06MTDVl070256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 6 Jan 2015 22:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276768 - in head: contrib/libpcap contrib/libpcap/bpf/net contrib/libpcap/lbl contrib/libpcap/missing contrib/libpcap/pcap contrib/libpcap/tests lib/libpcap 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 22:29:17 -0000 Author: delphij Date: Tue Jan 6 22:29:12 2015 New Revision: 276768 URL: https://svnweb.freebsd.org/changeset/base/276768 Log: MFV r276759: libpcap 1.6.2. MFC after: 1 month Added: head/contrib/libpcap/Makefile-devel-adds - copied unchanged from r276759, vendor/libpcap/dist/Makefile-devel-adds head/contrib/libpcap/pcap-bt-monitor-linux.c - copied unchanged from r276759, vendor/libpcap/dist/pcap-bt-monitor-linux.c head/contrib/libpcap/pcap-bt-monitor-linux.h - copied unchanged from r276759, vendor/libpcap/dist/pcap-bt-monitor-linux.h head/contrib/libpcap/pcap-dbus.c - copied unchanged from r276759, vendor/libpcap/dist/pcap-dbus.c head/contrib/libpcap/pcap-dbus.h - copied unchanged from r276759, vendor/libpcap/dist/pcap-dbus.h head/contrib/libpcap/pcap/nflog.h - copied unchanged from r276759, vendor/libpcap/dist/pcap/nflog.h head/contrib/libpcap/pcap_get_tstamp_precision.3pcap head/contrib/libpcap/pcap_get_tstamp_precision.3pcap.in - copied unchanged from r276759, vendor/libpcap/dist/pcap_get_tstamp_precision.3pcap.in head/contrib/libpcap/pcap_set_immediate_mode.3pcap - copied unchanged from r276759, vendor/libpcap/dist/pcap_set_immediate_mode.3pcap head/contrib/libpcap/pcap_set_tstamp_precision.3pcap head/contrib/libpcap/pcap_set_tstamp_precision.3pcap.in - copied unchanged from r276759, vendor/libpcap/dist/pcap_set_tstamp_precision.3pcap.in head/contrib/libpcap/tests/capturetest.c - copied unchanged from r276759, vendor/libpcap/dist/tests/capturetest.c head/contrib/libpcap/tests/valgrindtest.c - copied unchanged from r276759, vendor/libpcap/dist/tests/valgrindtest.c Deleted: head/contrib/libpcap/tests/nonblocktest.c Modified: head/contrib/libpcap/CHANGES head/contrib/libpcap/CREDITS head/contrib/libpcap/INSTALL.txt head/contrib/libpcap/Makefile.in head/contrib/libpcap/README head/contrib/libpcap/VERSION head/contrib/libpcap/arcnet.h head/contrib/libpcap/atmuni31.h head/contrib/libpcap/bpf/net/bpf_filter.c head/contrib/libpcap/bpf_dump.c head/contrib/libpcap/bpf_image.c head/contrib/libpcap/config.guess head/contrib/libpcap/config.h.in head/contrib/libpcap/config.sub head/contrib/libpcap/configure head/contrib/libpcap/configure.in head/contrib/libpcap/dlpisubs.c head/contrib/libpcap/dlpisubs.h head/contrib/libpcap/etherent.c head/contrib/libpcap/ethertype.h head/contrib/libpcap/fad-getad.c head/contrib/libpcap/fad-gifc.c head/contrib/libpcap/fad-glifc.c head/contrib/libpcap/fad-null.c head/contrib/libpcap/fad-sita.c head/contrib/libpcap/fad-win32.c head/contrib/libpcap/gencode.c head/contrib/libpcap/gencode.h head/contrib/libpcap/grammar.y head/contrib/libpcap/inet.c head/contrib/libpcap/lbl/os-aix4.h head/contrib/libpcap/lbl/os-hpux11.h head/contrib/libpcap/lbl/os-osf4.h head/contrib/libpcap/lbl/os-osf5.h head/contrib/libpcap/lbl/os-solaris2.h head/contrib/libpcap/lbl/os-sunos4.h head/contrib/libpcap/lbl/os-ultrix4.h head/contrib/libpcap/llc.h head/contrib/libpcap/missing/snprintf.c head/contrib/libpcap/mkdep head/contrib/libpcap/nametoaddr.c head/contrib/libpcap/nlpid.h head/contrib/libpcap/optimize.c head/contrib/libpcap/pcap-bpf.c head/contrib/libpcap/pcap-bpf.h head/contrib/libpcap/pcap-bt-linux.c head/contrib/libpcap/pcap-bt-linux.h head/contrib/libpcap/pcap-can-linux.c head/contrib/libpcap/pcap-canusb-linux.c head/contrib/libpcap/pcap-common.c head/contrib/libpcap/pcap-common.h head/contrib/libpcap/pcap-config.1 head/contrib/libpcap/pcap-dag.c head/contrib/libpcap/pcap-dag.h head/contrib/libpcap/pcap-dlpi.c head/contrib/libpcap/pcap-dos.c head/contrib/libpcap/pcap-dos.h head/contrib/libpcap/pcap-enet.c head/contrib/libpcap/pcap-filter.manmisc head/contrib/libpcap/pcap-filter.manmisc.in head/contrib/libpcap/pcap-int.h head/contrib/libpcap/pcap-libdlpi.c head/contrib/libpcap/pcap-linktype.manmisc head/contrib/libpcap/pcap-linktype.manmisc.in head/contrib/libpcap/pcap-linux.c head/contrib/libpcap/pcap-namedb.h head/contrib/libpcap/pcap-netfilter-linux.c head/contrib/libpcap/pcap-nit.c head/contrib/libpcap/pcap-null.c head/contrib/libpcap/pcap-pf.c head/contrib/libpcap/pcap-savefile.manfile head/contrib/libpcap/pcap-savefile.manfile.in head/contrib/libpcap/pcap-septel.c head/contrib/libpcap/pcap-septel.h head/contrib/libpcap/pcap-sita.c head/contrib/libpcap/pcap-sita.h head/contrib/libpcap/pcap-snf.c head/contrib/libpcap/pcap-snit.c head/contrib/libpcap/pcap-snoop.c head/contrib/libpcap/pcap-stdinc.h head/contrib/libpcap/pcap-tstamp.manmisc head/contrib/libpcap/pcap-tstamp.manmisc.in head/contrib/libpcap/pcap-usb-linux.c head/contrib/libpcap/pcap-usb-linux.h head/contrib/libpcap/pcap-win32.c head/contrib/libpcap/pcap.3pcap head/contrib/libpcap/pcap.3pcap.in head/contrib/libpcap/pcap.c head/contrib/libpcap/pcap.h head/contrib/libpcap/pcap/bluetooth.h head/contrib/libpcap/pcap/bpf.h head/contrib/libpcap/pcap/namedb.h head/contrib/libpcap/pcap/pcap.h head/contrib/libpcap/pcap/sll.h head/contrib/libpcap/pcap/usb.h head/contrib/libpcap/pcap/vlan.h head/contrib/libpcap/pcap_activate.3pcap head/contrib/libpcap/pcap_breakloop.3pcap head/contrib/libpcap/pcap_can_set_rfmon.3pcap head/contrib/libpcap/pcap_close.3pcap head/contrib/libpcap/pcap_compile.3pcap head/contrib/libpcap/pcap_compile.3pcap.in head/contrib/libpcap/pcap_create.3pcap head/contrib/libpcap/pcap_datalink.3pcap head/contrib/libpcap/pcap_datalink.3pcap.in head/contrib/libpcap/pcap_datalink_name_to_val.3pcap head/contrib/libpcap/pcap_datalink_val_to_name.3pcap head/contrib/libpcap/pcap_dump.3pcap head/contrib/libpcap/pcap_dump_close.3pcap head/contrib/libpcap/pcap_dump_file.3pcap head/contrib/libpcap/pcap_dump_flush.3pcap head/contrib/libpcap/pcap_dump_ftell.3pcap head/contrib/libpcap/pcap_dump_open.3pcap head/contrib/libpcap/pcap_dump_open.3pcap.in head/contrib/libpcap/pcap_file.3pcap head/contrib/libpcap/pcap_fileno.3pcap head/contrib/libpcap/pcap_findalldevs.3pcap head/contrib/libpcap/pcap_freecode.3pcap head/contrib/libpcap/pcap_get_selectable_fd.3pcap head/contrib/libpcap/pcap_geterr.3pcap head/contrib/libpcap/pcap_inject.3pcap head/contrib/libpcap/pcap_is_swapped.3pcap head/contrib/libpcap/pcap_lib_version.3pcap head/contrib/libpcap/pcap_list_datalinks.3pcap head/contrib/libpcap/pcap_list_datalinks.3pcap.in head/contrib/libpcap/pcap_lookupdev.3pcap head/contrib/libpcap/pcap_lookupnet.3pcap head/contrib/libpcap/pcap_loop.3pcap head/contrib/libpcap/pcap_major_version.3pcap head/contrib/libpcap/pcap_next_ex.3pcap head/contrib/libpcap/pcap_offline_filter.3pcap head/contrib/libpcap/pcap_open_dead.3pcap head/contrib/libpcap/pcap_open_dead.3pcap.in head/contrib/libpcap/pcap_open_live.3pcap head/contrib/libpcap/pcap_open_offline.3pcap head/contrib/libpcap/pcap_open_offline.3pcap.in head/contrib/libpcap/pcap_set_buffer_size.3pcap head/contrib/libpcap/pcap_set_datalink.3pcap head/contrib/libpcap/pcap_set_promisc.3pcap head/contrib/libpcap/pcap_set_rfmon.3pcap head/contrib/libpcap/pcap_set_snaplen.3pcap head/contrib/libpcap/pcap_set_timeout.3pcap head/contrib/libpcap/pcap_setdirection.3pcap head/contrib/libpcap/pcap_setfilter.3pcap head/contrib/libpcap/pcap_setnonblock.3pcap head/contrib/libpcap/pcap_snapshot.3pcap head/contrib/libpcap/pcap_stats.3pcap head/contrib/libpcap/pcap_statustostr.3pcap head/contrib/libpcap/pcap_strerror.3pcap head/contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap head/contrib/libpcap/ppp.h head/contrib/libpcap/runlex.sh head/contrib/libpcap/savefile.c head/contrib/libpcap/scanner.l head/contrib/libpcap/sf-pcap-ng.c head/contrib/libpcap/sf-pcap-ng.h head/contrib/libpcap/sf-pcap.c head/contrib/libpcap/sf-pcap.h head/contrib/libpcap/sunatmpos.h head/contrib/libpcap/tests/filtertest.c head/lib/libpcap/Makefile head/lib/libpcap/config.h head/sys/net/bpf.h Directory Properties: head/contrib/libpcap/ (props changed) Modified: head/contrib/libpcap/CHANGES ============================================================================== --- head/contrib/libpcap/CHANGES Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/CHANGES Tue Jan 6 22:29:12 2015 (r276768) @@ -1,9 +1,66 @@ -Monday March 18, 2013 guy@alum.mit.edu +Monday Aug. 12, 2014 guy@alum.mit.edu + Summary for 1.6.2 tcpdump release + Don't crash on filters testing a non-existent link-layer type + field. + Fix sending in non-blocking mode on Linux with memory-mapped + capture. + Fix timestamps when reading pcap-ng files on big-endian + machines. + +Saturday Jul. 19, 2014 mcr@sandelman.ca + Summary for 1.6.1 tcpdump release + some fixes for the any device + changes for how --enable-XXX works + +Wednesday Jul. 2, 2014 mcr@sandelman.ca + Summary for 1.6.0 tcpdump release + Don't support D-Bus sniffing on OS X + fixes for byte order issues with NFLOG captures + Handle using cooked mode for DLT_NETLINK in activate_new(). + on platforms where you can not capture on down interfaces, do not list them + but: do list interfaces which are down, if you can capture on them! + +Wednesday December 18, 2013 guy@alum.mit.edu +Summary for 1.5.3 libpcap release + Don't let packets that don't match the current filter get to the + application when TPACKET_V3 is used. (GitHub issue #331) + Fix handling of pcap_loop()/pcap_dispatch() with a packet count + of 0 on some platforms (including Linux with TPACKET_V3). + (GitHub issue #333) + Work around TPACKET_V3 deficiency that causes packets to be lost + when a timeout of 0 is specified. (GitHub issue #335) + Man page formatting fixes. + +Wednesday December 4, 2013 guy@alum.mit.edu +Summary for 1.5.2 libpcap release + Fix libpcap to work when compiled with TPACKET_V3 support and + running on a kernel without TPACKET_V3 support. (GitHub + issue #329) + +Wednesday November 20, 2013 guy@alum.mit.edu +Summary for 1.5.1 libpcap release + Report an error, rather than crashing, if an IPv6 address is + used for link-layer filtering. (Wireshark bug 9376) + +Wednesday October 30, 2013 guy@alum.mit.edu +Summary for 1.5.0 libpcap release + TPACKET_V3 support added for Linux + Point users to the the-tcpdump-group repository on GitHub rather + than the mcr repository + Checks added for malloc()/realloc()/etc. failures + Fixed build on Solaris 11 + Support filtering filtering E1 SS7 traffic on MTP2 layer Annex A + Use "ln -s" to link man pages by default + Add support for getting nanosecond-resolution time stamps when + capturing and reading capture files + Many changes to autoconf to deal better with non-GCC compilers + added many new DLT types + +Saturday April 6, 2013 guy@alum.mit.edu Summary for 1.4.0 libpcap release Add netfilter/nfqueue interface. If we don't have support for IPv6 address resolution, support, in filter expressions, what IPv6 stuff we can. - Checks added for malloc()/realloc()/etc. failures. Fix pcap-config to include -lpthread if canusb support is present Try to fix "pcap_parse not defined" problems when --without-flex @@ -29,6 +86,7 @@ Summary for 1.4.0 libpcap release kernels, for VLAN tag valid flag Clean up some man pages Support libnl3 as well as libnl1 and libnl2 on Linux + Fix handling of Bluetooth devices on 3.x Linux kernels Friday March 30, 2012. mcr@sandelman.ca Summary for 1.3.0 libpcap release @@ -208,7 +266,7 @@ Mon. October 27, 2008. ken@netfuncti DLT: Add JUNIPER_ST 802.15.4 support Variable length 802.11 header support - X2E data type support + X2E data type support SITA ACN Interface support - see README.sita Support for memory-mapped capture on Linux Support for zerocopy BPF on platforms that support it @@ -220,7 +278,7 @@ Mon. October 27, 2008. ken@netfuncti can print better diagnostic information Return PCAP_ERROR_PERM_DENIED if we don't have permission to open a device, so applications can tell the user they need to go play with permissions - On Linux, ignore ENETDOWN so we can continue to capture packets if the + On Linux, ignore ENETDOWN so we can continue to capture packets if the interface goes down and comes back up again. On Linux, support new tpacket frame headers (2.6.27+) On Mac OS X, add scripts for changing permissions on /dev/bpf* and launchd plist @@ -233,14 +291,14 @@ Mon. September 10, 2007. ken@xeleran Change build process to put public libpcap headers into pcap subir DLT: Add value for IPMI IPMB packets DLT: Add value for u10 Networks boards - Require for pf definitions - allows reading of pflog formatted + Require for pf definitions - allows reading of pflog formatted libpcap files on an OS other than where the file was generated Wed. April 25, 2007. ken@xelerance.com. Summary for 0.9.6 libpcap release Put the public libpcap headers into a pcap subdirectory in both the source directory and the target include directory, and have include - files at the top-level directory to include those headers, for + files at the top-level directory to include those headers, for backwards compatibility. Add Bluetooth support Add USB capturing support on Linux @@ -248,30 +306,30 @@ Wed. April 25, 2007. ken@xelerance.com. Add support for new FreeBSD BIOCSDIRECTION ioctl Add additional filter operations for 802.11 frame types Add support for filtering on MTP2 frame types - Propagate some changes from the main branch, so the x.9 branch has + Propagate some changes from the main branch, so the x.9 branch has all the DLT_ and LINKTYPE_ values that the main branch does - Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info) + Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info) encapsulated packets - Add LINKTYPE_ for IEEE 802.15.4, with address fields padded as done + Add LINKTYPE_ for IEEE 802.15.4, with address fields padded as done by Linux drivers Add LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS. Add DLT for IEEE 802.16 (WiMAX) MAC Common Part Sublayer Add DLT for Bluetooth HCI UART transport layer When building a shared library, build with "-fPIC" on Linux to support x86_64 - Link with "$(CC) -shared" rather than "ld -shared" when building a + Link with "$(CC) -shared" rather than "ld -shared" when building a ".so" shared library Add support for autoconf 2.60 Fixes to discard unread packets when changing filters - Changes to handle name changes in the DAG library resulting from + Changes to handle name changes in the DAG library resulting from switching to libtool. Add support for new DAG ERF types. - Add an explicit "-ldag" when building the shared library, so the DAG + Add an explicit "-ldag" when building the shared library, so the DAG library dependency is explicit. Mac OSX fixes for dealing with "wlt" devices Fixes in add_or_find_if() & pcap_findalldevs() to optimize generating device lists Fixed a bug in pcap_open_live(). The return value of PacketSetHwFilter - was not checked. + was not checked. Tue. September 19, 2006. ken@xelerance.com. Summary for 0.9.5 libpcap release @@ -283,19 +341,19 @@ Tue. September 19, 2006. ken@xelerance.c OP_PACKET now matches the beginning of the packet, instead of beginning+link-layer Add DLT/LINKTYPE for carrying FRF.16 Multi-link Frame Relay - Fix allocation of buffer for list of link-layer types + Fix allocation of buffer for list of link-layer types Added a new DLT and LINKTYPE value for ARINC 653 Interpartition Communcation Messages Fixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_ Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the right value for CAN). Added definition for DLT_A429 and LINKTYPE_A429 as #184. Added a new DLT and LINKTYPE value for CAN v2.0B frames. Add support for DLT_JUNIPER_VP. - Don't double-count received packets on Linux systems that - support the PACKET_STATISTICS getsockopt() argument on + Don't double-count received packets on Linux systems that + support the PACKET_STATISTICS getsockopt() argument on PF_PACKET sockets. - Add support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link + Add support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link layers in Windows - Add support to build libpcap.lib and wpcap.dll under Cygnus and + Add support to build libpcap.lib and wpcap.dll under Cygnus and MingW32. Mon. September 5, 2005. ken@xelerance.com. Summary for 0.9.4 libpcap release Modified: head/contrib/libpcap/CREDITS ============================================================================== --- head/contrib/libpcap/CREDITS Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/CREDITS Tue Jan 6 22:29:12 2015 (r276768) @@ -2,6 +2,7 @@ This file lists people who have contribu The current maintainers: Bill Fenner + Denis Ovsienko Fulvio Risso Guy Harris Hannes Gredler @@ -9,20 +10,24 @@ The current maintainers: Additional people who have contributed patches: + Akos Vandra Alan Bawden Albert Chin Alexander 'Leo' Bergolth Alexey Kuznetsov Alon Bar-Lev + Andres Perera Andrew Brown + Ani Sinha Antti Kantee Arien Vijn Arkadiusz Miskiewicz Armando L. Caro Jr. Assar Westerlund + Bill Parker + Brent Cook Brian Ginsbach - Bill Parker Charles M. Hannum Chris G. Demetriou Chris Lightfoot @@ -30,15 +35,21 @@ Additional people who have contributed p Chris Pepper Christian Bell Christian Peron + Christian Svensson Daniele Orlandi + Darren Lim Darren Reed + David Clark David Kaelbling + David Ward David Young Dean Gaudet dhruv Don Ebright Dug Song Dustin Spicuzza + dzejarczech + Edward Sheldrake Eric Anderson Erik de Castro Lopo Felix Obenhuber @@ -47,15 +58,18 @@ Additional people who have contributed p frederich Fulko Hew Fumiyuki Shimizu + Gabor Tatarka Garrett Cooper + George Neville-Neil Gianluca Varenni Gilbert Hoyek Gisle Vanem Graeme Hewson + Gregor Maier Greg Stark Greg Troxel - Gregor Maier Guillaume Pelat + Gustavo Zacarias Hagen Paul Pfeifer Henri Doreau Hyung Sik Yoon @@ -64,15 +78,17 @@ Additional people who have contributed p Jan-Philip Velders Jason R. Thorpe Javier Achirica + Jean-Louis Charton Jean Tourrilhes - Jean-Louis Charton Jefferson Ogata Jesper Dangaard Brouer Jesper Peterson + Jiri Slaby Joerg Mayer John Bankier Jon Lindgren Jon Smirl + Jorge Boncompte [DTI2] Juergen Schoenwaelder Julien Moutinho Jung-uk Kim @@ -86,6 +102,7 @@ Additional people who have contributed p Love Hörnquist-Ã…strand Luis MartinGarcia Maciej W. Rozycki + Mansour Behabadi Marcus Felipe Pereira Mark C. Brown Mark Pizzolato @@ -94,14 +111,17 @@ Additional people who have contributed p Márton Németh Matthew Luckie Max Laier + Michal Labedzki + Michal Sekletar Mike Frysinger Mike Kershaw Mike Wiacek Miroslav Lichvar Monroe Williams - - N. Leiten Nicolas Dade + Niko Delarich + N. Leiten + Octavian Cerna Olaf Kirch Ollie Wild @@ -145,8 +165,8 @@ Additional people who have contributed p Xianjie Zhang Xin Li Yen Yen Lim - Yvan Vanhullebus Yoann Vandoorselaere + Yvan Vanhullebus The original LBL crew: Steve McCanne Modified: head/contrib/libpcap/INSTALL.txt ============================================================================== --- head/contrib/libpcap/INSTALL.txt Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/INSTALL.txt Tue Jan 6 22:29:12 2015 (r276768) @@ -1,5 +1,3 @@ -@(#) $Header: /tcpdump/master/libpcap/INSTALL.txt,v 1.29 2008-06-12 20:21:51 guy Exp $ (LBL) - To build libpcap, run "./configure" (a shell script). The configure script will determine your system attributes and generate an appropriate Makefile from Makefile.in. Next run "make". If everything @@ -31,19 +29,14 @@ where the configure scripts fails to det You will need an ANSI C compiler to build libpcap. The configure script will abort if your compiler is not ANSI compliant. If this happens, use -the GNU C compiler, available via anonymous ftp: - - ftp://ftp.gnu.org/pub/gnu/gcc/ +the generally available GNU C compiler (GCC). If you use flex, you must use version 2.4.6 or higher. The configure script automatically detects the version of flex and will not use it unless it is new enough. You can use "flex -V" to see what version you have (unless it's really old). The current version of flex is available -via anonymous ftp: - - ftp://ftp.ee.lbl.gov/flex-*.tar.Z - -As of this writing, the current version is 2.5.4. +at flex.sourceforge.net and often comes packaged by means of the OS. +As of this writing, the current version is 2.5.37. If you use bison, you must use flex (and visa versa). The configure script automatically falls back to lex and yacc if both flex and bison Copied: head/contrib/libpcap/Makefile-devel-adds (from r276759, vendor/libpcap/dist/Makefile-devel-adds) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libpcap/Makefile-devel-adds Tue Jan 6 22:29:12 2015 (r276768, copy of r276759, vendor/libpcap/dist/Makefile-devel-adds) @@ -0,0 +1,22 @@ +# +# Auto-regenerate configure script or Makefile when things change. +# From autoconf.info . Works best with GNU Make. +# +${srcdir}/configure: configure.in aclocal.m4 + cd ${srcdir} && autoconf + +# autoheader might not change config.h.in, so touch a stamp file. +${srcdir}/config.h.in: ${srcdir}/stamp-h.in +${srcdir}/stamp-h.in: configure.in aclocal.m4 + cd ${srcdir} && autoheader + echo timestamp > ${srcdir}/stamp-h.in + +config.h: stamp-h +stamp-h: ${srcdir}/config.h.in config.status + ./config.status + +Makefile: Makefile.in config.status + ./config.status + +config.status: ${srcdir}/configure + ./config.status --recheck Modified: head/contrib/libpcap/Makefile.in ============================================================================== --- head/contrib/libpcap/Makefile.in Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/Makefile.in Tue Jan 6 22:29:12 2015 (r276768) @@ -16,8 +16,6 @@ # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -# -# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.142 2008-11-22 17:30:24 guy Exp $ (LBL) # # Various configurable paths (remember to edit Makefile.in, not Makefile) @@ -47,6 +45,8 @@ VPATH = @srcdir@ LD = /usr/bin/ld CC = @CC@ AR = @AR@ +LN_S = @LN_S@ +MKDEP = @MKDEP@ CCOPT = @V_CCOPT@ INCLS = -I. @V_INCLS@ DEFS = @DEFS@ @V_DEFS@ @@ -57,6 +57,7 @@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ DYEXT = @DYEXT@ V_RPATH_OPT = @V_RPATH_OPT@ +DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ PROG=libpcap # Standard CFLAGS @@ -82,7 +83,7 @@ YACC = @V_YACC@ @rm -f $@ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ @DBUS_SRC@ FSRC = fad-@V_FINDALLDEVS@.c SSRC = @SSRC@ CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ @@ -104,6 +105,7 @@ PUBHDR = \ pcap/bluetooth.h \ pcap/ipnet.h \ pcap/namedb.h \ + pcap/nflog.h \ pcap/pcap.h \ pcap/sll.h \ pcap/vlan.h \ @@ -126,19 +128,21 @@ HDR = $(PUBHDR) \ sunatmpos.h TESTS = \ + capturetest \ filtertest \ findalldevstest \ - nonblocktest \ opentest \ - selpolltest + selpolltest \ + valgrindtest TESTS_SRC = \ + tests/capturetest.c \ tests/filtertest.c \ tests/findalldevstest.c \ - tests/nonblocktest.c \ tests/opentest.c \ tests/reactivatetest.c \ - tests/selpolltest.c + tests/selpolltest.c \ + tests/valgrindtest.c GENHDR = \ scanner.h tokdefs.h version.h @@ -157,10 +161,12 @@ MAN3PCAP_EXPAND = \ pcap_compile.3pcap.in \ pcap_datalink.3pcap.in \ pcap_dump_open.3pcap.in \ + pcap_get_tstamp_precision.3pcap.in \ pcap_list_datalinks.3pcap.in \ pcap_list_tstamp_types.3pcap.in \ pcap_open_dead.3pcap.in \ pcap_open_offline.3pcap.in \ + pcap_set_tstamp_precision.3pcap.in \ pcap_set_tstamp_type.3pcap.in MAN3PCAP_NOEXPAND = \ @@ -194,6 +200,7 @@ MAN3PCAP_NOEXPAND = \ pcap_open_live.3pcap \ pcap_set_buffer_size.3pcap \ pcap_set_datalink.3pcap \ + pcap_set_immediate_mode.3pcap \ pcap_set_promisc.3pcap \ pcap_set_rfmon.3pcap \ pcap_set_snaplen.3pcap \ @@ -227,6 +234,7 @@ EXTRA_DIST = \ INSTALL.txt \ LICENSE \ Makefile.in \ + Makefile-devel-adds \ README \ README.aix \ README.dag \ @@ -287,6 +295,8 @@ EXTRA_DIST = \ pcap-bpf.c \ pcap-bt-linux.c \ pcap-bt-linux.h \ + pcap-bt-monitor-linux.c \ + pcap-bt-monitor-linux.h \ pcap-can-linux.c \ pcap-can-linux.h \ pcap-canusb-linux.c \ @@ -294,6 +304,8 @@ EXTRA_DIST = \ pcap-config.in \ pcap-dag.c \ pcap-dag.h \ + pcap-dbus.c \ + pcap-dbus.h \ pcap-dlpi.c \ pcap-dos.c \ pcap-dos.h \ @@ -515,21 +527,24 @@ pcap-config: $(srcdir)/pcap-config.in ./ # tests: $(TESTS) +capturetest: tests/capturetest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o capturetest $(srcdir)/tests/capturetest.c libpcap.a $(LIBS) + filtertest: tests/filtertest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o filtertest $(srcdir)/tests/filtertest.c libpcap.a $(LIBS) findalldevstest: tests/findalldevstest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o findalldevstest $(srcdir)/tests/findalldevstest.c libpcap.a $(LIBS) -nonblocktest: tests/nonblocktest.c libpcap.a - $(CC) $(FULL_CFLAGS) -I. -L. -o nonblocktest $(srcdir)/tests/nonblocktest.c libpcap.a $(LIBS) - opentest: tests/opentest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o opentest $(srcdir)/tests/opentest.c libpcap.a $(LIBS) selpolltest: tests/selpolltest.c libpcap.a $(CC) $(FULL_CFLAGS) -I. -L. -o selpolltest $(srcdir)/tests/selpolltest.c libpcap.a $(LIBS) +valgrindtest: tests/valgrindtest.c libpcap.a + $(CC) $(FULL_CFLAGS) -I. -L. -o valgrindtest $(srcdir)/tests/valgrindtest.c libpcap.a $(LIBS) + install: install-shared install-archive pcap-config [ -d $(DESTDIR)$(libdir) ] || \ (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) @@ -560,42 +575,41 @@ install: install-shared install-archive for i in $(MAN3PCAP_EXPAND:.in=); do \ $(INSTALL_DATA) $$i \ $(DESTDIR)$(mandir)/man3/$$i; done - rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_name.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_dump_open.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_findalldevs.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_geterr.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_inject.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_list_datalinks.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_list_tstamp_types.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_loop.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_major_version.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_next_ex.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_next.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_open_offline.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap - rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap - ln $(DESTDIR)$(mandir)/man3/pcap_setnonblock.3pcap \ - $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap + (cd $(DESTDIR)$(mandir)/man3 && \ + rm -f pcap_datalink_val_to_description.3pcap && \ + $(LN_S) pcap_datalink_val_to_name.3pcap \ + pcap_datalink_val_to_description.3pcap && \ + rm -f pcap_dump_fopen.3pcap && \ + $(LN_S) pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \ + rm -f pcap_freealldevs.3pcap && \ + $(LN_S) pcap_findalldevs.3pcap pcap_freealldevs.3pcap && \ + rm -f pcap_perror.3pcap && \ + $(LN_S) pcap_geterr.3pcap pcap_perror.3pcap && \ + rm -f pcap_sendpacket.3pcap && \ + $(LN_S) pcap_inject.3pcap pcap_sendpacket.3pcap && \ + rm -f pcap_free_datalinks.3pcap && \ + $(LN_S) pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap && \ + rm -f pcap_free_tstamp_types.3pcap && \ + $(LN_S) pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap && \ + rm -f pcap_dispatch.3pcap && \ + $(LN_S) pcap_loop.3pcap pcap_dispatch.3pcap && \ + rm -f pcap_minor_version.3pcap && \ + $(LN_S) pcap_major_version.3pcap pcap_minor_version.3pcap && \ + rm -f pcap_next.3pcap && \ + $(LN_S) pcap_next_ex.3pcap pcap_next.3pcap && \ + rm -f pcap_open_dead_with_tstamp_precision.3pcap && \ + $(LN_S) pcap_open_dead.3pcap \ + pcap_open_dead_with_tstamp_precision.3pcap && \ + rm -f pcap_open_offline_with_tstamp_precision.3pcap && \ + $(LN_S) pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap && \ + rm -f pcap_fopen_offline.3pcap && \ + $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \ + rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \ + $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \ + rm -f pcap_tstamp_type_val_to_description.3pcap && \ + $(LN_S) pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap && \ + rm -f pcap_getnonblock.3pcap && \ + $(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap) for i in $(MANFILE); do \ $(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \ $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done @@ -672,8 +686,12 @@ uninstall: uninstall-shared rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_open_dead_with_tstamp_precision.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_open_offline_with_tstamp_precision.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline_with_tstamp_precision.3pcap rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap + rm -f $(DESTDIR)$(mandir)/man3/pcap_tstamp_type_val_to_description.3pcap for i in $(MANFILE); do \ rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done for i in $(MANMISC); do \ @@ -717,7 +735,7 @@ packaging/pcap.spec: packaging/pcap.spec RPMVERSION=`cat VERSION | sed s/-.*//g`; \ sed -e s/@VERSION@/$$RPMVERSION/ -e s/@NAME@/libpcap-`cat VERSION`/ $< > $@ -releasetar: +releasetar: @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \ mkdir $$name; \ tar cf - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \ @@ -727,9 +745,4 @@ releasetar: rm -rf $$name depend: $(GENSRC) $(GENHDR) bpf_filter.c - ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC) - -Makefile: Makefile.in config.status - ./config.status - @echo your Makefile was out of date, now run $(MAKE) again - exit 1 + $(MKDEP) -c $(CC) -m $(CFLAGS) $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC) Modified: head/contrib/libpcap/README ============================================================================== --- head/contrib/libpcap/README Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/README Tue Jan 6 22:29:12 2015 (r276768) @@ -1,5 +1,3 @@ -@(#) $Header: /tcpdump/master/libpcap/README,v 1.34 2008-12-14 19:44:14 guy Exp $ (LBL) - LIBPCAP 1.x.y www.tcpdump.org @@ -10,18 +8,15 @@ Please send inquiries/comments/reports t Anonymous Git is available via: git clone git://bpf.tcpdump.org/libpcap -Version 1.x.y of LIBPCAP can be retrieved with the CVS tag "libpcap_1_{x}rel{y}": - cvs -d :pserver:tcpdump@cvs.tcpdump.org:/tcpdump/master checkout -r libpcap_1_{x}rel{y} libpcap - Please submit patches by forking the branch on GitHub at - http://github.com/mcr/libpcap/tree/master + http://github.com/the-tcpdump-group/libpcap/tree/master and issuing a pull request. formerly from Lawrence Berkeley National Laboratory Network Research Group - ftp://ftp.ee.lbl.gov/libpcap.tar.Z (0.4) + ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z This directory contains source code for libpcap, a system-independent interface for user-level packet capture. libpcap provides a portable @@ -97,12 +92,12 @@ to the address "tcpdump-workers@lists.tc requests, and feature requests may also be submitted on the GitHub issue tracker for libpcap at - https://github.com/mcr/libpcap/issues + https://github.com/the-tcpdump-group/libpcap/issues Source code contributions, etc. should be sent to the email address above or submitted by forking the branch on GitHub at - http://github.com/mcr/libpcap/tree/master + http://github.com/the-tcpdump-group/libpcap/tree/master and issuing a pull request. Modified: head/contrib/libpcap/VERSION ============================================================================== --- head/contrib/libpcap/VERSION Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/VERSION Tue Jan 6 22:29:12 2015 (r276768) @@ -1 +1 @@ -1.4.0 +1.6.2 Modified: head/contrib/libpcap/arcnet.h ============================================================================== --- head/contrib/libpcap/arcnet.h Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/arcnet.h Tue Jan 6 22:29:12 2015 (r276768) @@ -30,8 +30,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#) $Id: arcnet.h,v 1.2 2001-04-24 02:17:52 guy Exp $ (LBL) - * * from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp */ Modified: head/contrib/libpcap/atmuni31.h ============================================================================== --- head/contrib/libpcap/atmuni31.h Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/atmuni31.h Tue Jan 6 22:29:12 2015 (r276768) @@ -28,8 +28,6 @@ * 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. - * - * @(#) $Header: /tcpdump/master/libpcap/atmuni31.h,v 1.3 2007-10-22 19:28:58 guy Exp $ (LBL) */ /* Based on UNI3.1 standard by ATM Forum */ Modified: head/contrib/libpcap/bpf/net/bpf_filter.c ============================================================================== --- head/contrib/libpcap/bpf/net/bpf_filter.c Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/bpf/net/bpf_filter.c Tue Jan 6 22:29:12 2015 (r276768) @@ -38,11 +38,6 @@ * @(#)bpf.c 7.5 (Berkeley) 7/15/91 */ -#if !(defined(lint) || defined(KERNEL) || defined(_KERNEL)) -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/bpf/net/bpf_filter.c,v 1.46 2008-01-02 04:16:46 guy Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -469,6 +464,12 @@ bpf_filter(pc, p, wirelen, buflen) A /= X; continue; + case BPF_ALU|BPF_MOD|BPF_X: + if (X == 0) + return 0; + A %= X; + continue; + case BPF_ALU|BPF_AND|BPF_X: A &= X; continue; @@ -477,6 +478,10 @@ bpf_filter(pc, p, wirelen, buflen) A |= X; continue; + case BPF_ALU|BPF_XOR|BPF_X: + A ^= X; + continue; + case BPF_ALU|BPF_LSH|BPF_X: A <<= X; continue; @@ -501,6 +506,10 @@ bpf_filter(pc, p, wirelen, buflen) A /= pc->k; continue; + case BPF_ALU|BPF_MOD|BPF_K: + A %= pc->k; + continue; + case BPF_ALU|BPF_AND|BPF_K: A &= pc->k; continue; @@ -509,6 +518,10 @@ bpf_filter(pc, p, wirelen, buflen) A |= pc->k; continue; + case BPF_ALU|BPF_XOR|BPF_K: + A ^= pc->k; + continue; + case BPF_ALU|BPF_LSH|BPF_K: A <<= pc->k; continue; @@ -611,13 +624,16 @@ bpf_validate(f, len) case BPF_MUL: case BPF_OR: case BPF_AND: + case BPF_XOR: case BPF_LSH: case BPF_RSH: case BPF_NEG: break; case BPF_DIV: + case BPF_MOD: /* - * Check for constant division by 0. + * Check for constant division or modulus + * by 0. */ if (BPF_SRC(p->code) == BPF_K && p->k == 0) return 0; Modified: head/contrib/libpcap/bpf_dump.c ============================================================================== --- head/contrib/libpcap/bpf_dump.c Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/bpf_dump.c Tue Jan 6 22:29:12 2015 (r276768) @@ -18,10 +18,6 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/bpf_dump.c,v 1.15 2008-01-02 04:16:46 guy Exp $ (LBL)"; -#endif #ifdef HAVE_CONFIG_H #include "config.h" Modified: head/contrib/libpcap/bpf_image.c ============================================================================== --- head/contrib/libpcap/bpf_image.c Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/bpf_image.c Tue Jan 6 22:29:12 2015 (r276768) @@ -19,11 +19,6 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/bpf_image.c,v 1.28 2008-01-02 04:16:46 guy Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -216,6 +211,11 @@ bpf_image(p, n) fmt = "x"; break; + case BPF_ALU|BPF_MOD|BPF_X: + op = "mod"; + fmt = "x"; + break; + case BPF_ALU|BPF_AND|BPF_X: op = "and"; fmt = "x"; @@ -226,6 +226,11 @@ bpf_image(p, n) fmt = "x"; break; + case BPF_ALU|BPF_XOR|BPF_X: + op = "xor"; + fmt = "x"; + break; + case BPF_ALU|BPF_LSH|BPF_X: op = "lsh"; fmt = "x"; @@ -256,6 +261,11 @@ bpf_image(p, n) fmt = "#%d"; break; + case BPF_ALU|BPF_MOD|BPF_K: + op = "mod"; + fmt = "#%d"; + break; + case BPF_ALU|BPF_AND|BPF_K: op = "and"; fmt = "#0x%x"; @@ -266,6 +276,11 @@ bpf_image(p, n) fmt = "#0x%x"; break; + case BPF_ALU|BPF_XOR|BPF_K: + op = "xor"; + fmt = "#0x%x"; + break; + case BPF_ALU|BPF_LSH|BPF_K: op = "lsh"; fmt = "#%d"; Modified: head/contrib/libpcap/config.guess ============================================================================== --- head/contrib/libpcap/config.guess Tue Jan 6 21:26:35 2015 (r276767) +++ head/contrib/libpcap/config.guess Tue Jan 6 22:29:12 2015 (r276768) @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2009-12-30' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ timestamp='2009-12-30' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -57,8 +55,8 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -181,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -224,7 +222,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -270,7 +268,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -296,7 +297,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -395,23 +396,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -481,8 +482,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -495,7 +496,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -552,7 +553,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -595,52 +596,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 23:04: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 58426FE8; Tue, 6 Jan 2015 23:04: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 441E5CC3; Tue, 6 Jan 2015 23:04: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 t06N4g1D088821; Tue, 6 Jan 2015 23:04:42 GMT (envelope-from kargl@FreeBSD.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06N4gEf088820; Tue, 6 Jan 2015 23:04:42 GMT (envelope-from kargl@FreeBSD.org) Message-Id: <201501062304.t06N4gEf088820@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kargl set sender to kargl@FreeBSD.org using -f From: Steve Kargl Date: Tue, 6 Jan 2015 23:04:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276769 - head/share/man/man3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 23:04:42 -0000 Author: kargl Date: Tue Jan 6 23:04:41 2015 New Revision: 276769 URL: https://svnweb.freebsd.org/changeset/base/276769 Log: Fix a typographical error. Confirmed by: n1256.pdf Obtained from: Dragonfly BSD Modified: head/share/man/man3/tgmath.3 Modified: head/share/man/man3/tgmath.3 ============================================================================== --- head/share/man/man3/tgmath.3 Tue Jan 6 22:29:12 2015 (r276768) +++ head/share/man/man3/tgmath.3 Tue Jan 6 23:04:41 2015 (r276769) @@ -115,7 +115,7 @@ complex value to a generic argument invo .It Fn erf Ta Fn frexp Ta Fn logb Ta Fn scalbn .It Fn erfc Ta Fn hypot Ta Fn lrint Ta Fn scalbln .It Fn exp2 Ta Fn ilogb Ta Fn lround Ta Fn tgamma -.It Fn expm1 Ta Fn ldexp Ta Fn nextbyint Ta Fn trunc +.It Fn expm1 Ta Fn ldexp Ta Fn nearbyint Ta Fn trunc .It Fn fdim Ta Fn lgamma Ta Fn nextafter Ta \& .It Fn floor Ta Fn llrint Ta Fn nexttoward Ta \& .El From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 23:08: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 9A741275; Tue, 6 Jan 2015 23:08: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 866C8D1D; Tue, 6 Jan 2015 23:08: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 t06N8mF9089397; Tue, 6 Jan 2015 23:08:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06N8mDI089395; Tue, 6 Jan 2015 23:08:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501062308.t06N8mDI089395@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 6 Jan 2015 23:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276770 - 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.18-1 Precedence: list List-Id: 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, 06 Jan 2015 23:08:48 -0000 Author: imp Date: Tue Jan 6 23:08:47 2015 New Revision: 276770 URL: https://svnweb.freebsd.org/changeset/base/276770 Log: Fix typo from too many cut-n-paste operations. Use IMPSRC:T to just get the tail part of the path. We can now build kernels the old-fashioned way on FreeBSD 9.x and 10.x on at least amd64 using clang 3.3, 3.4 or gcc 4.2.1 (though with the latter you need WITHOUT_MODULES="aesni vmm cxgbe" due to various issues with gcc 4.2.1). Modified: head/sys/conf/kern.mk head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Tue Jan 6 23:04:41 2015 (r276769) +++ head/sys/conf/kern.mk Tue Jan 6 23:08:47 2015 (r276770) @@ -176,7 +176,7 @@ CFLAGS+= -gdwarf-2 .endif CFLAGS+= ${CWARNEXTRA} ${CWARNFLAGS} ${CWARNFLAGS.${.IMPSRC:T}} -CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC}} +CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC:T}} # Tell bmake not to mistake standard targets for things to be searched for # or expect to ever be up-to-date. Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Jan 6 23:04:41 2015 (r276769) +++ head/sys/conf/kern.pre.mk Tue Jan 6 23:08:47 2015 (r276770) @@ -103,7 +103,7 @@ CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS} WERROR?= -Werror # XXX LOCORE means "don't declare C stuff" not "for locore.s". -ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC}} +ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} ${ASM_CFLAGS.${.IMPSRC:T}} .if defined(PROFLEVEL) && ${PROFLEVEL} >= 1 CFLAGS+= -DGPROF From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 23:27: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 A69309E7 for ; Tue, 6 Jan 2015 23:27:08 +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 6E26BFF7 for ; Tue, 6 Jan 2015 23:27:08 +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 t06NR800002011 for ; Tue, 6 Jan 2015 23:27:08 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t06NR8kL002008 for svn-src-head@freebsd.org; Tue, 6 Jan 2015 23:27:08 GMT (envelope-from bdrewery) Received: (qmail 38720 invoked from network); 6 Jan 2015 17:27:06 -0600 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 6 Jan 2015 17:27:06 -0600 Message-ID: <54AC6F4E.1000707@FreeBSD.org> Date: Tue, 06 Jan 2015 17:27:10 -0600 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Bryan Venteicher , John Nielsen Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 References: <201410100609.s9A690NU067686@svn.freebsd.org> In-Reply-To: OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 23:27:08 -0000 On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > > > On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen > wrote: > > Bryan- > > On Oct 10, 2014, at 12:09 AM, Bryan Venteicher > wrote: > > > Author: bryanv > > Date: Fri Oct 10 06:08:59 2014 > > New Revision: 272886 > > URL: https://svnweb.freebsd.org/changeset/base/272886 > > > > Log: > > Add context pointer and source address to the UDP tunnel callback > > > > These are needed for the forthcoming vxlan implementation. The context > > pointer means we do not have to use a spare pointer field in the inpcb, > > and the source address is required to populate vxlan's forwarding table. > > > > While I highly doubt there is an out of tree consumer of the UDP > > tunneling callback, this change may be a difficult to eventually MFC. > > I noticed this comment while doing an MFC of vxlan to my local tree. > Do you think an MFC to 10-STABLE of this change (and vxlan > generally) will be feasible? Is there precedent for ABI changes like > this being sanctioned? Could symbol versioning help? > > > > I'd like to get some consensus on whether this commit is OK to MFC. With > this commit, vxlan should be an easy to MFC. Breaking ABI will potentially hurt packages. FreeBSD builds packages for the oldest supported release on a branch. If you break ABI in 10.2 while we are building packages for 10.1 then any packages using these interfaces may not work right or result in panics packages with kmods. Please consider that. > > > > > Phabricator: https://reviews.freebsd.org/D383 > > Reviewed by: gnn > > > > Modified: > > head/sys/netinet/sctputil.c > > head/sys/netinet/udp_usrreq.c > > head/sys/netinet/udp_var.h > > head/sys/netinet6/udp6_usrreq.c > > Thanks, > > JN > > -- Regards, Bryan Drewery From owner-svn-src-head@FreeBSD.ORG Tue Jan 6 23:40: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 3E7D4D56; Tue, 6 Jan 2015 23:40: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 1F5FA6433B; Tue, 6 Jan 2015 23:40: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 t06Nedom006836; Tue, 6 Jan 2015 23:40:39 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t06Ned3H006835; Tue, 6 Jan 2015 23:40:39 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501062340.t06Ned3H006835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 6 Jan 2015 23:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276771 - head/usr.bin/timeout X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 06 Jan 2015 23:40:40 -0000 Author: bapt Date: Tue Jan 6 23:40:39 2015 New Revision: 276771 URL: https://svnweb.freebsd.org/changeset/base/276771 Log: Use the new process reaper functionality When not using the --foreground option timeout(1) is supported to signal all command children hierarchy, timeout(1) now acquire the reaper to ensure this really happens and no children process can escaper from timeout(1) control Modified: head/usr.bin/timeout/timeout.c Modified: head/usr.bin/timeout/timeout.c ============================================================================== --- head/usr.bin/timeout/timeout.c Tue Jan 6 23:08:47 2015 (r276770) +++ head/usr.bin/timeout/timeout.c Tue Jan 6 23:40:39 2015 (r276771) @@ -28,6 +28,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include @@ -166,12 +167,14 @@ main(int argc, char **argv) int foreground, preserve; int error, pstat, status; int killsig = SIGTERM; - pid_t pgid, pid, cpid; + pid_t pid, cpid; double first_kill; double second_kill; bool timedout = false; bool do_second_kill = false; struct sigaction signals; + struct procctl_reaper_status info; + struct procctl_reaper_kill killemall; int signums[] = { -1, SIGTERM, @@ -185,7 +188,6 @@ main(int argc, char **argv) foreground = preserve = 0; second_kill = 0; cpid = -1; - pgid = -1; const struct option longopts[] = { { "preserve-status", no_argument, &preserve, 1 }, @@ -225,10 +227,9 @@ main(int argc, char **argv) argv++; if (!foreground) { - pgid = setpgid(0,0); - - if (pgid == -1) - err(EX_OSERR, "setpgid()"); + /* Aquire a reaper */ + if (procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL) == -1) + err(EX_OSERR, "Fail to acquire the reaper"); } memset(&signals, 0, sizeof(signals)); @@ -285,15 +286,27 @@ main(int argc, char **argv) if (cpid == pid) { pstat = status; - break; + if (!foreground) + break; + } + if (!foreground) { + procctl(P_PID, getpid(), PROC_REAP_STATUS, + &info); + if (info.rs_children == 0) { + cpid = pid; + break; + } } } else if (sig_alrm) { sig_alrm = 0; timedout = true; - if (!foreground) - killpg(pgid, killsig); - else + if (!foreground) { + killemall.rk_sig = killsig; + killemall.rk_flags = 0; + procctl(P_PID, getpid(), PROC_REAP_KILL, + &killemall); + } else kill(pid, killsig); if (do_second_kill) { @@ -305,9 +318,12 @@ main(int argc, char **argv) break; } else if (sig_term) { - if (!foreground) - killpg(pgid, killsig); - else + if (!foreground) { + killemall.rk_sig = sig_term; + killemall.rk_flags = 0; + procctl(P_PID, getpid(), PROC_REAP_KILL, + &killemall); + } else kill(pid, sig_term); if (do_second_kill) { @@ -325,6 +341,9 @@ main(int argc, char **argv) err(EX_OSERR, "waitpid()"); } + if (!foreground) + procctl(P_PID, getpid(), PROC_REAP_RELEASE, NULL); + if (WEXITSTATUS(pstat)) pstat = WEXITSTATUS(pstat); else if(WIFSIGNALED(pstat)) From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 01:01: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 0B82413A; Wed, 7 Jan 2015 01:01: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 E86B61028; Wed, 7 Jan 2015 01:01: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 t0711gux046336; Wed, 7 Jan 2015 01:01:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0711e9O046319; Wed, 7 Jan 2015 01:01:40 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501070101.t0711e9O046319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 7 Jan 2015 01:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276772 - in head/sys: amd64/include arm/arm arm/include conf i386/include kern mips/include mips/mips pc98/include powerpc/aim powerpc/booke powerpc/include powerpc/powerpc sparc64/inc... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 01:01:43 -0000 Author: markj Date: Wed Jan 7 01:01:39 2015 New Revision: 276772 URL: https://svnweb.freebsd.org/changeset/base/276772 Log: Factor out duplicated code from dumpsys() on each architecture into generic code in sys/kern/kern_dump.c. Most dumpsys() implementations are nearly identical and simply redefine a number of constants and helper subroutines; a generic implementation will make it easier to implement features around kernel core dumps. This change does not alter any minidump code and should have no functional impact. PR: 193873 Differential Revision: https://reviews.freebsd.org/D904 Submitted by: Conrad Meyer Reviewed by: jhibbits (earlier version) Sponsored by: EMC / Isilon Storage Division Added: head/sys/amd64/include/dump.h (contents, props changed) head/sys/arm/include/dump.h (contents, props changed) head/sys/i386/include/dump.h (contents, props changed) head/sys/kern/kern_dump.c (contents, props changed) head/sys/mips/include/dump.h (contents, props changed) head/sys/pc98/include/dump.h (contents, props changed) head/sys/powerpc/include/dump.h (contents, props changed) head/sys/sparc64/include/dump.h (contents, props changed) head/sys/x86/include/dump.h (contents, props changed) Modified: head/sys/arm/arm/dump_machdep.c head/sys/conf/files head/sys/kern/kern_shutdown.c head/sys/mips/include/md_var.h head/sys/mips/mips/dump_machdep.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/powerpc/include/pmap.h head/sys/powerpc/powerpc/dump_machdep.c head/sys/powerpc/powerpc/mmu_if.m head/sys/powerpc/powerpc/pmap_dispatch.c head/sys/sparc64/sparc64/dump_machdep.c head/sys/sys/conf.h head/sys/sys/kerneldump.h head/sys/x86/x86/dump_machdep.c Added: head/sys/amd64/include/dump.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/dump.h Wed Jan 7 01:01:39 2015 (r276772) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include Modified: head/sys/arm/arm/dump_machdep.c ============================================================================== --- head/sys/arm/arm/dump_machdep.c Tue Jan 6 23:40:39 2015 (r276771) +++ head/sys/arm/arm/dump_machdep.c Wed Jan 7 01:01:39 2015 (r276772) @@ -32,148 +32,26 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include -#ifdef SW_WATCHDOG -#include -#endif + #include #include +#include #include #include #include #include -CTASSERT(sizeof(struct kerneldumpheader) == 512); - int do_minidump = 1; SYSCTL_INT(_debug, OID_AUTO, minidump, CTLFLAG_RWTUN, &do_minidump, 0, "Enable mini crash dumps"); -/* - * Don't touch the first SIZEOF_METADATA bytes on the dump device. This - * is to protect us from metadata and to protect metadata from us. - */ -#define SIZEOF_METADATA (64*1024) - -#define MD_ALIGN(x) (((off_t)(x) + PAGE_MASK) & ~PAGE_MASK) -#define DEV_ALIGN(x) (((off_t)(x) + (DEV_BSIZE-1)) & ~(DEV_BSIZE-1)) -extern struct pcb dumppcb; - -struct md_pa { - vm_paddr_t md_start; - vm_paddr_t md_size; -}; - -typedef int callback_t(struct md_pa *, int, void *); - -static struct kerneldumpheader kdh; -static off_t dumplo, fileofs; - -/* Handle buffered writes. */ -static char buffer[DEV_BSIZE]; -static size_t fragsz; - -/* XXX: I suppose 20 should be enough. */ -static struct md_pa dump_map[20]; - -static void -md_pa_init(void) +void +dumpsys_wbinv_all(void) { - int n, idx; - - bzero(dump_map, sizeof(dump_map)); - for (n = 0; n < sizeof(dump_map) / sizeof(dump_map[0]); n++) { - idx = n * 2; - if (dump_avail[idx] == 0 && dump_avail[idx + 1] == 0) - break; - dump_map[n].md_start = dump_avail[idx]; - dump_map[n].md_size = dump_avail[idx + 1] - dump_avail[idx]; - } -} - -static struct md_pa * -md_pa_first(void) -{ - - return (&dump_map[0]); -} - -static struct md_pa * -md_pa_next(struct md_pa *mdp) -{ - - mdp++; - if (mdp->md_size == 0) - mdp = NULL; - return (mdp); -} - -static int -buf_write(struct dumperinfo *di, char *ptr, size_t sz) -{ - size_t len; - int error; - - while (sz) { - len = DEV_BSIZE - fragsz; - if (len > sz) - len = sz; - bcopy(ptr, buffer + fragsz, len); - fragsz += len; - ptr += len; - sz -= len; - if (fragsz == DEV_BSIZE) { - error = dump_write(di, buffer, 0, dumplo, - DEV_BSIZE); - if (error) - return error; - dumplo += DEV_BSIZE; - fragsz = 0; - } - } - - return (0); -} - -static int -buf_flush(struct dumperinfo *di) -{ - int error; - - if (fragsz == 0) - return (0); - - error = dump_write(di, buffer, 0, dumplo, DEV_BSIZE); - dumplo += DEV_BSIZE; - fragsz = 0; - return (error); -} - -extern vm_offset_t kernel_l1kva; -extern char *pouet2; - -static int -cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) -{ - struct dumperinfo *di = (struct dumperinfo*)arg; - vm_paddr_t a, pa; - void *va; - uint32_t pgs; - size_t counter, sz, chunk; - int i, c, error; - - va = 0; - error = 0; /* catch case in which chunk size is 0 */ - counter = 0; - pgs = mdp->md_size / PAGE_SIZE; - pa = mdp->md_start; - - printf(" chunk %d: %dMB (%d pages)", seqnr, pgs * PAGE_SIZE / ( - 1024*1024), pgs); /* * Make sure we write coherent data. Note that in the SMP case this @@ -186,70 +64,25 @@ cb_dumpdata(struct md_pa *mdp, int seqnr #ifdef __XSCALE__ xscale_cache_clean_minidata(); #endif - while (pgs) { - chunk = pgs; - if (chunk > MAXDUMPPGS) - chunk = MAXDUMPPGS; - sz = chunk << PAGE_SHIFT; - counter += sz; - if (counter >> 24) { - printf(" %d", pgs * PAGE_SIZE); - counter &= (1<<24) - 1; - } - for (i = 0; i < chunk; i++) { - a = pa + i * PAGE_SIZE; - va = pmap_kenter_temporary(trunc_page(a), i); - } -#ifdef SW_WATCHDOG - wdog_kern_pat(WD_LASTVAL); -#endif - error = dump_write(di, va, 0, dumplo, sz); - if (error) - break; - dumplo += sz; - pgs -= chunk; - pa += sz; - - /* Check for user abort. */ - c = cncheckc(); - if (c == 0x03) - return (ECANCELED); - if (c != -1) - printf(" (CTRL-C to abort) "); - } - printf(" ... %s\n", (error) ? "fail" : "ok"); - return (error); } -static int -cb_dumphdr(struct md_pa *mdp, int seqnr, void *arg) +void +dumpsys_map_chunk(vm_paddr_t pa, size_t chunk, void **va) { - struct dumperinfo *di = (struct dumperinfo*)arg; - Elf_Phdr phdr; - uint64_t size; - int error; - - size = mdp->md_size; - bzero(&phdr, sizeof(phdr)); - phdr.p_type = PT_LOAD; - phdr.p_flags = PF_R; /* XXX */ - phdr.p_offset = fileofs; - phdr.p_vaddr = mdp->md_start; - phdr.p_paddr = mdp->md_start; - phdr.p_filesz = size; - phdr.p_memsz = size; - phdr.p_align = PAGE_SIZE; + vm_paddr_t a; + int i; - error = buf_write(di, (char*)&phdr, sizeof(phdr)); - fileofs += phdr.p_filesz; - return (error); + for (i = 0; i < chunk; i++) { + a = pa + i * PAGE_SIZE; + *va = pmap_kenter_temporary(trunc_page(a), i); + } } /* * Add a header to be used by libkvm to get the va to pa delta */ -static int -dump_os_header(struct dumperinfo *di) +int +dumpsys_write_aux_headers(struct dumperinfo *di) { Elf_Phdr phdr; int error; @@ -264,144 +97,6 @@ dump_os_header(struct dumperinfo *di) phdr.p_memsz = 0; phdr.p_align = PAGE_SIZE; - error = buf_write(di, (char*)&phdr, sizeof(phdr)); - return (error); -} - -static int -cb_size(struct md_pa *mdp, int seqnr, void *arg) -{ - uint32_t *sz = (uint32_t*)arg; - - *sz += (uint32_t)mdp->md_size; - return (0); -} - -static int -foreach_chunk(callback_t cb, void *arg) -{ - struct md_pa *mdp; - int error, seqnr; - - seqnr = 0; - mdp = md_pa_first(); - while (mdp != NULL) { - error = (*cb)(mdp, seqnr++, arg); - if (error) - return (-error); - mdp = md_pa_next(mdp); - } - return (seqnr); -} - -int -dumpsys(struct dumperinfo *di) -{ - Elf_Ehdr ehdr; - uint32_t dumpsize; - off_t hdrgap; - size_t hdrsz; - int error; - - if (do_minidump) - return (minidumpsys(di)); - - bzero(&ehdr, sizeof(ehdr)); - ehdr.e_ident[EI_MAG0] = ELFMAG0; - ehdr.e_ident[EI_MAG1] = ELFMAG1; - ehdr.e_ident[EI_MAG2] = ELFMAG2; - ehdr.e_ident[EI_MAG3] = ELFMAG3; - ehdr.e_ident[EI_CLASS] = ELF_CLASS; -#if BYTE_ORDER == LITTLE_ENDIAN - ehdr.e_ident[EI_DATA] = ELFDATA2LSB; -#else - ehdr.e_ident[EI_DATA] = ELFDATA2MSB; -#endif - ehdr.e_ident[EI_VERSION] = EV_CURRENT; - ehdr.e_ident[EI_OSABI] = ELFOSABI_STANDALONE; /* XXX big picture? */ - ehdr.e_type = ET_CORE; - ehdr.e_machine = EM_ARM; - ehdr.e_phoff = sizeof(ehdr); - ehdr.e_flags = 0; - ehdr.e_ehsize = sizeof(ehdr); - ehdr.e_phentsize = sizeof(Elf_Phdr); - ehdr.e_shentsize = sizeof(Elf_Shdr); - - md_pa_init(); - - /* Calculate dump size. */ - dumpsize = 0L; - ehdr.e_phnum = foreach_chunk(cb_size, &dumpsize) + 1; - hdrsz = ehdr.e_phoff + ehdr.e_phnum * ehdr.e_phentsize; - fileofs = MD_ALIGN(hdrsz); - dumpsize += fileofs; - hdrgap = fileofs - DEV_ALIGN(hdrsz); - - /* Determine dump offset on device. */ - if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2) { - error = ENOSPC; - goto fail; - } - dumplo = di->mediaoffset + di->mediasize - dumpsize; - dumplo -= sizeof(kdh) * 2; - - mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_ARM_VERSION, dumpsize, di->blocksize); - - printf("Dumping %llu MB (%d chunks)\n", (long long)dumpsize >> 20, - ehdr.e_phnum - 1); - - /* Dump leader */ - error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); - if (error) - goto fail; - dumplo += sizeof(kdh); - - /* Dump ELF header */ - error = buf_write(di, (char*)&ehdr, sizeof(ehdr)); - if (error) - goto fail; - - /* Dump program headers */ - error = foreach_chunk(cb_dumphdr, di); - if (error >= 0) - error = dump_os_header(di); - if (error < 0) - goto fail; - buf_flush(di); - - /* - * All headers are written using blocked I/O, so we know the - * current offset is (still) block aligned. Skip the alignement - * in the file to have the segment contents aligned at page - * boundary. We cannot use MD_ALIGN on dumplo, because we don't - * care and may very well be unaligned within the dump device. - */ - dumplo += hdrgap; - - /* Dump memory chunks (updates dumplo) */ - error = foreach_chunk(cb_dumpdata, di); - if (error < 0) - goto fail; - - /* Dump trailer */ - error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); - if (error) - goto fail; - - /* Signal completion, signoff and exit stage left. */ - dump_write(di, NULL, 0, 0, 0); - printf("\nDump complete\n"); - return (0); - - fail: - if (error < 0) - error = -error; - - if (error == ECANCELED) - printf("\nDump aborted\n"); - else if (error == ENOSPC) - printf("\nDump failed. Partition too small.\n"); - else - printf("\n** DUMP FAILED (ERROR %d) **\n", error); + error = dumpsys_buf_write(di, (char*)&phdr, sizeof(phdr)); return (error); } Added: head/sys/arm/include/dump.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/include/dump.h Wed Jan 7 01:01:39 2015 (r276772) @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 2014 EMC Corp. + * Author: Conrad Meyer + * 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 _MACHINE_DUMP_H_ +#define _MACHINE_DUMP_H_ + +#define KERNELDUMP_ARCH_VERSION KERNELDUMP_ARM_VERSION +#define EM_VALUE EM_ARM +/* XXX: I suppose 20 should be enough. */ +#define DUMPSYS_MD_PA_NPAIRS 20 +#define DUMPSYS_NUM_AUX_HDRS 1 + +void dumpsys_wbinv_all(void); +int dumpsys_write_aux_headers(struct dumperinfo *di); + +static inline void +dumpsys_pa_init(void) +{ + + dumpsys_gen_pa_init(); +} + +static inline struct dump_pa * +dumpsys_pa_next(struct dump_pa *p) +{ + + return (dumpsys_gen_pa_next(p)); +} + +static inline void +dumpsys_unmap_chunk(vm_paddr_t pa, size_t s, void *va) +{ + + dumpsys_gen_unmap_chunk(pa, s, va); +} + +static inline int +dumpsys(struct dumperinfo *di) +{ + + return (dumpsys_generic(di)); +} + +#endif /* !_MACHINE_DUMP_H_ */ Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 6 23:40:39 2015 (r276771) +++ head/sys/conf/files Wed Jan 7 01:01:39 2015 (r276772) @@ -2947,6 +2947,7 @@ kern/kern_cpuset.c standard kern/kern_context.c standard kern/kern_descrip.c standard kern/kern_dtrace.c optional kdtrace_hooks +kern/kern_dump.c standard kern/kern_environment.c standard kern/kern_et.c standard kern/kern_event.c standard Added: head/sys/i386/include/dump.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/i386/include/dump.h Wed Jan 7 01:01:39 2015 (r276772) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include Added: head/sys/kern/kern_dump.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/kern_dump.c Wed Jan 7 01:01:39 2015 (r276772) @@ -0,0 +1,393 @@ +/*- + * Copyright (c) 2002 Marcel Moolenaar + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_watchdog.h" + +#include +#include +#include +#include +#include +#include +#include +#ifdef SW_WATCHDOG +#include +#endif +#include +#include +#include +#include +#include +#include +#include + +CTASSERT(sizeof(struct kerneldumpheader) == 512); + +/* + * Don't touch the first SIZEOF_METADATA bytes on the dump device. This + * is to protect us from metadata and to protect metadata from us. + */ +#define SIZEOF_METADATA (64*1024) + +#define MD_ALIGN(x) (((off_t)(x) + PAGE_MASK) & ~PAGE_MASK) +#define DEV_ALIGN(x) (((off_t)(x) + (DEV_BSIZE-1)) & ~(DEV_BSIZE-1)) + +off_t dumplo; + +/* Handle buffered writes. */ +static char buffer[DEV_BSIZE]; +static size_t fragsz; + +struct dump_pa dump_map[DUMPSYS_MD_PA_NPAIRS]; + +void +dumpsys_gen_pa_init(void) +{ +#if !defined(__sparc__) && !defined(__powerpc__) + int n, idx; + + bzero(dump_map, sizeof(dump_map)); + for (n = 0; n < sizeof(dump_map) / sizeof(dump_map[0]); n++) { + idx = n * 2; + if (dump_avail[idx] == 0 && dump_avail[idx + 1] == 0) + break; + dump_map[n].pa_start = dump_avail[idx]; + dump_map[n].pa_size = dump_avail[idx + 1] - dump_avail[idx]; + } +#endif +} + +struct dump_pa * +dumpsys_gen_pa_next(struct dump_pa *mdp) +{ + + if (mdp == NULL) + return (&dump_map[0]); + + mdp++; + if (mdp->pa_size == 0) + mdp = NULL; + return (mdp); +} + +void +dumpsys_gen_wbinv_all(void) +{ +} + +void +dumpsys_gen_unmap_chunk(vm_paddr_t pa __unused, size_t chunk __unused, + void *va __unused) +{ +} + +int +dumpsys_gen_write_aux_headers(struct dumperinfo *di) +{ + + return (0); +} + +int +dumpsys_buf_write(struct dumperinfo *di, char *ptr, size_t sz) +{ + size_t len; + int error; + + while (sz) { + len = DEV_BSIZE - fragsz; + if (len > sz) + len = sz; + bcopy(ptr, buffer + fragsz, len); + fragsz += len; + ptr += len; + sz -= len; + if (fragsz == DEV_BSIZE) { + error = dump_write(di, buffer, 0, dumplo, + DEV_BSIZE); + if (error) + return (error); + dumplo += DEV_BSIZE; + fragsz = 0; + } + } + return (0); +} + +int +dumpsys_buf_flush(struct dumperinfo *di) +{ + int error; + + if (fragsz == 0) + return (0); + + error = dump_write(di, buffer, 0, dumplo, DEV_BSIZE); + dumplo += DEV_BSIZE; + fragsz = 0; + return (error); +} + +CTASSERT(PAGE_SHIFT < 20); +#define PG2MB(pgs) ((pgs + (1 << (20 - PAGE_SHIFT)) - 1) >> (20 - PAGE_SHIFT)) + +int +dumpsys_cb_dumpdata(struct dump_pa *mdp, int seqnr, void *arg) +{ + struct dumperinfo *di = (struct dumperinfo*)arg; + vm_paddr_t pa; + void *va; + uint64_t pgs; + size_t counter, sz, chunk; + int c, error; + u_int maxdumppgs; + + error = 0; /* catch case in which chunk size is 0 */ + counter = 0; /* Update twiddle every 16MB */ + va = 0; + pgs = mdp->pa_size / PAGE_SIZE; + pa = mdp->pa_start; + maxdumppgs = min(di->maxiosize / PAGE_SIZE, MAXDUMPPGS); + if (maxdumppgs == 0) /* seatbelt */ + maxdumppgs = 1; + + printf(" chunk %d: %juMB (%ju pages)", seqnr, (uintmax_t)PG2MB(pgs), + (uintmax_t)pgs); + + dumpsys_wbinv_all(); + while (pgs) { + chunk = pgs; + if (chunk > maxdumppgs) + chunk = maxdumppgs; + sz = chunk << PAGE_SHIFT; + counter += sz; + if (counter >> 24) { + printf(" %ju", (uintmax_t)PG2MB(pgs)); + counter &= (1 << 24) - 1; + } + + dumpsys_map_chunk(pa, chunk, &va); +#ifdef SW_WATCHDOG + wdog_kern_pat(WD_LASTVAL); +#endif + + error = dump_write(di, va, 0, dumplo, sz); + dumpsys_unmap_chunk(pa, chunk, va); + if (error) + break; + dumplo += sz; + pgs -= chunk; + pa += sz; + + /* Check for user abort. */ + c = cncheckc(); + if (c == 0x03) + return (ECANCELED); + if (c != -1) + printf(" (CTRL-C to abort) "); + } + printf(" ... %s\n", (error) ? "fail" : "ok"); + return (error); +} + +int +dumpsys_foreach_chunk(dumpsys_callback_t cb, void *arg) +{ + struct dump_pa *mdp; + int error, seqnr; + + seqnr = 0; + mdp = dumpsys_pa_next(NULL); + while (mdp != NULL) { + error = (*cb)(mdp, seqnr++, arg); + if (error) + return (-error); + mdp = dumpsys_pa_next(mdp); + } + return (seqnr); +} + +static off_t fileofs; + +static int +cb_dumphdr(struct dump_pa *mdp, int seqnr, void *arg) +{ + struct dumperinfo *di = (struct dumperinfo*)arg; + Elf_Phdr phdr; + uint64_t size; + int error; + + size = mdp->pa_size; + bzero(&phdr, sizeof(phdr)); + phdr.p_type = PT_LOAD; + phdr.p_flags = PF_R; /* XXX */ + phdr.p_offset = fileofs; +#ifdef __powerpc__ + phdr.p_vaddr = (do_minidump? mdp->pa_start : ~0L); + phdr.p_paddr = (do_minidump? ~0L : mdp->pa_start); +#else + phdr.p_vaddr = mdp->pa_start; + phdr.p_paddr = mdp->pa_start; +#endif + phdr.p_filesz = size; + phdr.p_memsz = size; + phdr.p_align = PAGE_SIZE; + + error = dumpsys_buf_write(di, (char*)&phdr, sizeof(phdr)); + fileofs += phdr.p_filesz; + return (error); +} + +static int +cb_size(struct dump_pa *mdp, int seqnr, void *arg) +{ + uint64_t *sz; + + sz = (uint64_t *)arg; + *sz += (uint64_t)mdp->pa_size; + return (0); +} + +int +dumpsys_generic(struct dumperinfo *di) +{ + static struct kerneldumpheader kdh; + Elf_Ehdr ehdr; + uint64_t dumpsize; + off_t hdrgap; + size_t hdrsz; + int error; + +#ifndef __powerpc__ + if (do_minidump) + return (minidumpsys(di)); +#endif + + bzero(&ehdr, sizeof(ehdr)); + ehdr.e_ident[EI_MAG0] = ELFMAG0; + ehdr.e_ident[EI_MAG1] = ELFMAG1; + ehdr.e_ident[EI_MAG2] = ELFMAG2; + ehdr.e_ident[EI_MAG3] = ELFMAG3; + ehdr.e_ident[EI_CLASS] = ELF_CLASS; +#if BYTE_ORDER == LITTLE_ENDIAN + ehdr.e_ident[EI_DATA] = ELFDATA2LSB; +#else + ehdr.e_ident[EI_DATA] = ELFDATA2MSB; +#endif + ehdr.e_ident[EI_VERSION] = EV_CURRENT; + ehdr.e_ident[EI_OSABI] = ELFOSABI_STANDALONE; /* XXX big picture? */ + ehdr.e_type = ET_CORE; + ehdr.e_machine = EM_VALUE; + ehdr.e_phoff = sizeof(ehdr); + ehdr.e_flags = 0; + ehdr.e_ehsize = sizeof(ehdr); + ehdr.e_phentsize = sizeof(Elf_Phdr); + ehdr.e_shentsize = sizeof(Elf_Shdr); + + dumpsys_pa_init(); + + /* Calculate dump size. */ + dumpsize = 0L; + ehdr.e_phnum = dumpsys_foreach_chunk(cb_size, &dumpsize) + + DUMPSYS_NUM_AUX_HDRS; + hdrsz = ehdr.e_phoff + ehdr.e_phnum * ehdr.e_phentsize; + fileofs = MD_ALIGN(hdrsz); + dumpsize += fileofs; + hdrgap = fileofs - DEV_ALIGN(hdrsz); + + /* Determine dump offset on device. */ + if (di->mediasize < SIZEOF_METADATA + dumpsize + sizeof(kdh) * 2) { + error = ENOSPC; + goto fail; + } + dumplo = di->mediaoffset + di->mediasize - dumpsize; + dumplo -= sizeof(kdh) * 2; + + mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_ARCH_VERSION, dumpsize, + di->blocksize); + + printf("Dumping %ju MB (%d chunks)\n", (uintmax_t)dumpsize >> 20, + ehdr.e_phnum - DUMPSYS_NUM_AUX_HDRS); + + /* Dump leader */ + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); + if (error) + goto fail; + dumplo += sizeof(kdh); + + /* Dump ELF header */ + error = dumpsys_buf_write(di, (char*)&ehdr, sizeof(ehdr)); + if (error) + goto fail; + + /* Dump program headers */ + error = dumpsys_foreach_chunk(cb_dumphdr, di); + if (error < 0) + goto fail; + error = dumpsys_write_aux_headers(di); + if (error < 0) + goto fail; + dumpsys_buf_flush(di); + + /* + * All headers are written using blocked I/O, so we know the + * current offset is (still) block aligned. Skip the alignement + * in the file to have the segment contents aligned at page + * boundary. We cannot use MD_ALIGN on dumplo, because we don't + * care and may very well be unaligned within the dump device. + */ + dumplo += hdrgap; + + /* Dump memory chunks (updates dumplo) */ + error = dumpsys_foreach_chunk(dumpsys_cb_dumpdata, di); + if (error < 0) + goto fail; + + /* Dump trailer */ + error = dump_write(di, &kdh, 0, dumplo, sizeof(kdh)); + if (error) + goto fail; + + /* Signal completion, signoff and exit stage left. */ + dump_write(di, NULL, 0, 0, 0); + printf("\nDump complete\n"); + return (0); + + fail: + if (error < 0) + error = -error; + + if (error == ECANCELED) + printf("\nDump aborted\n"); + else if (error == ENOSPC) + printf("\nDump failed. Partition too small.\n"); + else + printf("\n** DUMP FAILED (ERROR %d) **\n", error); + return (error); +} Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Tue Jan 6 23:40:39 2015 (r276771) +++ head/sys/kern/kern_shutdown.c Wed Jan 7 01:01:39 2015 (r276772) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Added: head/sys/mips/include/dump.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/include/dump.h Wed Jan 7 01:01:39 2015 (r276772) @@ -0,0 +1,76 @@ +/*- + * Copyright (c) 2014 EMC Corp. + * Author: Conrad Meyer + * 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 _MACHINE_DUMP_H_ +#define _MACHINE_DUMP_H_ + +#define KERNELDUMP_ARCH_VERSION KERNELDUMP_MIPS_VERSION +#define EM_VALUE EM_MIPS +/* XXX: I suppose 20 should be enough. */ +#define DUMPSYS_MD_PA_NPAIRS 20 +#define DUMPSYS_NUM_AUX_HDRS 0 + +void dumpsys_wbinv_all(void); + +static inline void +dumpsys_pa_init(void) +{ + + dumpsys_gen_pa_init(); +} + +static inline struct dump_pa * +dumpsys_pa_next(struct dump_pa *p) +{ + + return (dumpsys_gen_pa_next(p)); +} + +static inline void +dumpsys_unmap_chunk(vm_paddr_t pa, size_t s, void *va) +{ + + dumpsys_gen_unmap_chunk(pa, s, va); +} + +static inline int +dumpsys_write_aux_headers(struct dumperinfo *di) +{ + + return (dumpsys_gen_write_aux_headers(di)); +} + +static inline int +dumpsys(struct dumperinfo *di) +{ + + return (dumpsys_generic(di)); +} + +#endif /* !_MACHINE_DUMP_H_ */ Modified: head/sys/mips/include/md_var.h ============================================================================== --- head/sys/mips/include/md_var.h Tue Jan 6 23:40:39 2015 (r276771) +++ head/sys/mips/include/md_var.h Wed Jan 7 01:01:39 2015 (r276772) @@ -80,4 +80,5 @@ struct dumperinfo; void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); int minidumpsys(struct dumperinfo *); + #endif /* !_MACHINE_MD_VAR_H_ */ Modified: head/sys/mips/mips/dump_machdep.c ============================================================================== --- head/sys/mips/mips/dump_machdep.c Tue Jan 6 23:40:39 2015 (r276771) +++ head/sys/mips/mips/dump_machdep.c Wed Jan 7 01:01:39 2015 (r276772) @@ -27,342 +27,30 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_watchdog.h" - #include #include #include -#include -#include -#include -#include #include -#ifdef SW_WATCHDOG -#include -#endif -#include -#include -#include -#include -#include *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 01:07: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 8D07B439; Wed, 7 Jan 2015 01:07:43 +0000 (UTC) Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E8441093; Wed, 7 Jan 2015 01:07:43 +0000 (UTC) Received: by mail-ig0-f175.google.com with SMTP id h15so5102488igd.2; Tue, 06 Jan 2015 17:07:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=KTyBqVA9eOiGBi+UscPBf4YkAce+qBmMjy91tY4Gy9c=; b=JEDKE1QM4pdkeTIl2Kys0ceOmptQUbTLqOgcCOJzRC0aXbGm9DEnAra4boQRWEBMCP lg7VOxoJCGshEQeK6PgsiAMjsYJoVzwFK4db+Ibc2SI+EIP0SMiQMEpd2Zpqu9pjsp14 3g3GOIniG8rpSIdHWE1CpbUavXrfeoeZkcS7XEobP5YDeV/iQt59WMEAzqx13bEfKJaP +CdiL/8+rCBp8ANOTTkjVzx9PmJmOdc0T44Q9mTqk89mUtixFq9BzSo3XvLEbctkrqKe n2nFF9AqGeUisLc0FlhAawmwnmpHK9mJiiCKurHCjqXyBaLJUYUoVP3S3Tgud/qEGtn6 RsBQ== X-Received: by 10.107.46.165 with SMTP id u37mr288117iou.80.1420592862638; Tue, 06 Jan 2015 17:07:42 -0800 (PST) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.0.171 with HTTP; Tue, 6 Jan 2015 17:07:11 -0800 (PST) In-Reply-To: <54AC6F4E.1000707@FreeBSD.org> References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> From: Bryan Venteicher Date: Tue, 6 Jan 2015 19:07:11 -0600 X-Google-Sender-Auth: j9m4FZ27coo4ONI8wt3Pve6V5KY Message-ID: Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 To: Bryan Drewery Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Nielsen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 01:07:43 -0000 On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery wrote: > On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > > > > > > On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen > > wrote: > > > > Bryan- > > > > On Oct 10, 2014, at 12:09 AM, Bryan Venteicher > > wrote: > > > > > Author: bryanv > > > Date: Fri Oct 10 06:08:59 2014 > > > New Revision: 272886 > > > URL: https://svnweb.freebsd.org/changeset/base/272886 > > > > > > Log: > > > Add context pointer and source address to the UDP tunnel callback > > > > > > These are needed for the forthcoming vxlan implementation. The > context > > > pointer means we do not have to use a spare pointer field in the > inpcb, > > > and the source address is required to populate vxlan's forwarding > table. > > > > > > While I highly doubt there is an out of tree consumer of the UDP > > > tunneling callback, this change may be a difficult to eventually > MFC. > > > > I noticed this comment while doing an MFC of vxlan to my local tree. > > Do you think an MFC to 10-STABLE of this change (and vxlan > > generally) will be feasible? Is there precedent for ABI changes like > > this being sanctioned? Could symbol versioning help? > > > > > > > > I'd like to get some consensus on whether this commit is OK to MFC. With > > this commit, vxlan should be an easy to MFC. > > Breaking ABI will potentially hurt packages. FreeBSD builds packages for > the oldest supported release on a branch. If you break ABI in 10.2 while > we are building packages for 10.1 then any packages using these > interfaces may not work right or result in panics packages with kmods. > Please consider that. > > The only user visible change of this commit would be the addition of a field at the end of 'struct udpcb'. I don't think that is a problem, at least a similar change didn't prevent the MFC of UDP Lite. The kernel part of this changes the UDP tunneling functions which I guess there could be a 3rd party module out there, but I very highly doubt that, based on how un-useful the previous interface was. > > > > > > > > Phabricator: https://reviews.freebsd.org/D383 > > > Reviewed by: gnn > > > > > > Modified: > > > head/sys/netinet/sctputil.c > > > head/sys/netinet/udp_usrreq.c > > > head/sys/netinet/udp_var.h > > > head/sys/netinet6/udp6_usrreq.c > > > > Thanks, > > > > JN > > > > > > > -- > Regards, > Bryan Drewery > From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 01:41: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 4A4FE8BD; Wed, 7 Jan 2015 01:41: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 3758D15D8; Wed, 7 Jan 2015 01:41: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 t071fk1x065012; Wed, 7 Jan 2015 01:41:46 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t071fkDM065011; Wed, 7 Jan 2015 01:41:46 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201501070141.t071fkDM065011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 7 Jan 2015 01:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276773 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 01:41:46 -0000 Author: bz Date: Wed Jan 7 01:41:45 2015 New Revision: 276773 URL: https://svnweb.freebsd.org/changeset/base/276773 Log: Remove the machine directive from the common MALTA* configuration file to avoid conflicting machine lines for the MALTA64 kernel configuration making config(8) go barf and builds to fail. Pointed out by: adrian Modified: head/sys/mips/conf/MALTA_COMMON Modified: head/sys/mips/conf/MALTA_COMMON ============================================================================== --- head/sys/mips/conf/MALTA_COMMON Wed Jan 7 01:01:39 2015 (r276772) +++ head/sys/mips/conf/MALTA_COMMON Wed Jan 7 01:41:45 2015 (r276773) @@ -2,8 +2,6 @@ # # $FreeBSD$ -machine mips mipsel # Malta supports both, so it isn't in std.malta - options YAMON # Don't build any modules yet. From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 01:51: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 2E736A88; Wed, 7 Jan 2015 01:51: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 1AFD816FB; Wed, 7 Jan 2015 01:51: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 t071p2b0069157; Wed, 7 Jan 2015 01:51:02 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t071p2qM069156; Wed, 7 Jan 2015 01:51:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501070151.t071p2qM069156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 7 Jan 2015 01:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276774 - head/usr.bin/ar X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 01:51:03 -0000 Author: emaste Date: Wed Jan 7 01:51:02 2015 New Revision: 276774 URL: https://svnweb.freebsd.org/changeset/base/276774 Log: ar: Avoid null pointer deref while reading corrupt archives ELF Tool Chain ticket #467 Reported by: Alexander Cherepanov MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/ar/read.c Modified: head/usr.bin/ar/read.c ============================================================================== --- head/usr.bin/ar/read.c Wed Jan 7 01:41:45 2015 (r276773) +++ head/usr.bin/ar/read.c Wed Jan 7 01:51:02 2015 (r276774) @@ -102,7 +102,8 @@ read_archive(struct bsdar *bsdar, char m continue; } - name = archive_entry_pathname(entry); + if ((name = archive_entry_pathname(entry)) == NULL) + break; /* Skip pseudo members. */ if (strcmp(name, "/") == 0 || strcmp(name, "//") == 0) From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 06:20: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 B6E9DDF; Wed, 7 Jan 2015 06:20: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 A297B2243; Wed, 7 Jan 2015 06:20: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 t076KYOo094177; Wed, 7 Jan 2015 06:20:34 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t076KYk5094175; Wed, 7 Jan 2015 06:20:34 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501070620.t076KYk5094175@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 7 Jan 2015 06:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276775 - head/sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 06:20:34 -0000 Author: np Date: Wed Jan 7 06:20:33 2015 New Revision: 276775 URL: https://svnweb.freebsd.org/changeset/base/276775 Log: cxgbe/tom: allocate page pod addresses instead of ppod#. MFC after: 2 weeks Modified: head/sys/dev/cxgbe/tom/t4_ddp.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_ddp.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_ddp.c Wed Jan 7 01:51:02 2015 (r276774) +++ head/sys/dev/cxgbe/tom/t4_ddp.c Wed Jan 7 06:20:33 2015 (r276775) @@ -98,24 +98,26 @@ t4_dump_tcb(struct adapter *sc, int tid) #define MAX_DDP_BUFFER_SIZE (M_TCB_RX_DDP_BUF0_LEN) static int -alloc_ppods(struct tom_data *td, int n) +alloc_ppods(struct tom_data *td, int n, u_int *ppod_addr) { - vmem_addr_t ppod; + vmem_addr_t v; + int rc; MPASS(n > 0); - if (vmem_alloc(td->ppod_arena, n, M_NOWAIT | M_FIRSTFIT, &ppod) != 0) - return (-1); - return ((int)ppod); + rc = vmem_alloc(td->ppod_arena, PPOD_SZ(n), M_NOWAIT | M_FIRSTFIT, &v); + *ppod_addr = (u_int)v; + + return (rc); } static void -free_ppods(struct tom_data *td, int ppod, int n) +free_ppods(struct tom_data *td, u_int ppod_addr, int n) { MPASS(n > 0); - vmem_free(td->ppod_arena, ppod, n); + vmem_free(td->ppod_arena, (vmem_addr_t)ppod_addr, PPOD_SZ(n)); } static inline int @@ -137,7 +139,7 @@ free_ddp_buffer(struct tom_data *td, str free(db->pages, M_CXGBE); if (db->nppods > 0) - free_ppods(td, G_PPOD_TAG(db->tag), db->nppods); + free_ppods(td, db->ppod_addr, db->nppods); free(db, M_CXGBE); } @@ -652,6 +654,7 @@ alloc_ddp_buffer(struct tom_data *td, vm break; } have_pgsz: + MPASS(idx <= M_PPOD_PGSZ); db = malloc(sizeof(*db), M_CXGBE, M_NOWAIT); if (db == NULL) { @@ -660,16 +663,13 @@ have_pgsz: } nppods = pages_to_nppods(npages, t4_ddp_pgsz[idx]); - ppod = alloc_ppods(td, nppods); - if (ppod < 0) { + if (alloc_ppods(td, nppods, &db->ppod_addr) != 0) { free(db, M_CXGBE); CTR4(KTR_CXGBE, "%s: no pods, nppods %d, resid %d, pgsz %d", __func__, nppods, len, t4_ddp_pgsz[idx]); return (NULL); } - - KASSERT(idx <= M_PPOD_PGSZ && ppod <= M_PPOD_TAG, - ("%s: DDP pgsz_idx = %d, ppod = %d", __func__, idx, ppod)); + ppod = (db->ppod_addr - td->ppod_start) / PPOD_SIZE; db->tag = V_PPOD_PGSZ(idx) | V_PPOD_TAG(ppod); db->nppods = nppods; @@ -695,7 +695,8 @@ write_page_pods(struct adapter *sc, stru struct ulp_mem_io *ulpmc; struct ulptx_idata *ulpsc; struct pagepod *ppod; - int i, j, k, n, chunk, len, ddp_pgsz, idx, ppod_addr; + int i, j, k, n, chunk, len, ddp_pgsz, idx; + u_int ppod_addr; uint32_t cmd; cmd = htobe32(V_ULPTX_CMD(ULP_TX_MEM_WRITE)); @@ -704,7 +705,7 @@ write_page_pods(struct adapter *sc, stru else cmd |= htobe32(F_T5_ULP_MEMIO_IMM); ddp_pgsz = t4_ddp_pgsz[G_PPOD_PGSZ(db->tag)]; - ppod_addr = sc->vres.ddp.start + G_PPOD_TAG(db->tag) * PPOD_SIZE; + ppod_addr = db->ppod_addr; for (i = 0; i < db->nppods; ppod_addr += chunk) { /* How many page pods are we writing in this cycle */ @@ -937,10 +938,10 @@ no_ddp: void t4_init_ddp(struct adapter *sc, struct tom_data *td) { - int nppods = sc->vres.ddp.size / PPOD_SIZE; - td->ppod_arena = vmem_create("DDP page pods", 0, nppods, 1, 32, - M_FIRSTFIT | M_NOWAIT); + td->ppod_start = sc->vres.ddp.start; + td->ppod_arena = vmem_create("DDP page pods", sc->vres.ddp.start, + sc->vres.ddp.size, 1, 32, M_FIRSTFIT | M_NOWAIT); t4_register_cpl_handler(sc, CPL_RX_DATA_DDP, do_rx_data_ddp); t4_register_cpl_handler(sc, CPL_RX_DDP_COMPLETE, do_rx_ddp_complete); Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Wed Jan 7 01:51:02 2015 (r276774) +++ head/sys/dev/cxgbe/tom/t4_tom.h Wed Jan 7 06:20:33 2015 (r276775) @@ -83,6 +83,7 @@ struct ofld_tx_sdesc { struct ddp_buffer { uint32_t tag; /* includes color, page pod addr, and DDP page size */ + u_int ppod_addr; int nppods; int offset; int len; @@ -192,6 +193,7 @@ struct tom_data { u_long listen_mask; int lctx_count; /* # of lctx in the hash table */ + u_int ppod_start; vmem_t *ppod_arena; struct mtx clip_table_lock; From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 12:12: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 5AE8B9FB; Wed, 7 Jan 2015 12:12: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 471C46451C; Wed, 7 Jan 2015 12:12: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 t07CCcNk056049; Wed, 7 Jan 2015 12:12:38 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07CCbr7056046; Wed, 7 Jan 2015 12:12:37 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201501071212.t07CCbr7056046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 7 Jan 2015 12:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276776 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 12:12:38 -0000 Author: bz Date: Wed Jan 7 12:12:36 2015 New Revision: 276776 URL: https://svnweb.freebsd.org/changeset/base/276776 Log: Move MALTA_COMMON to std.MALTA (as we have for XLP and SWARM). This avoids universe trying to build MALTA_COMMON and fail due to the problem addressed in r276773. Include std.MALTA from the MALTA mipsel and MALTA64 mips64el config files, where the machine lines exist. Added: head/sys/mips/conf/std.MALTA - copied unchanged from r276775, head/sys/mips/conf/MALTA_COMMON Deleted: head/sys/mips/conf/MALTA_COMMON Modified: head/sys/mips/conf/MALTA head/sys/mips/conf/MALTA64 Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Wed Jan 7 06:20:33 2015 (r276775) +++ head/sys/mips/conf/MALTA Wed Jan 7 12:12:36 2015 (r276776) @@ -4,7 +4,7 @@ ident MALTA -include "MALTA_COMMON" +include "std.MALTA" machine mips mipsel # Malta supports both, so it isn't in std.malta Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Wed Jan 7 06:20:33 2015 (r276775) +++ head/sys/mips/conf/MALTA64 Wed Jan 7 12:12:36 2015 (r276776) @@ -4,7 +4,7 @@ ident MALTA64 -include "MALTA_COMMON" +include "std.MALTA" machine mips mips64el # Malta supports both, so it isn't in std.malta Copied: head/sys/mips/conf/std.MALTA (from r276775, head/sys/mips/conf/MALTA_COMMON) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/std.MALTA Wed Jan 7 12:12:36 2015 (r276776, copy of r276775, head/sys/mips/conf/MALTA_COMMON) @@ -0,0 +1,53 @@ +# MALTA_COMMON -- Common kernel config options for MALTA boards +# +# $FreeBSD$ + +options YAMON + +# Don't build any modules yet. +makeoptions MODULES_OVERRIDE="" + +options TICK_USE_YAMON_FREQ=defined +#options TICK_USE_MALTA_RTC=defined + +include "../malta/std.malta" + +hints "MALTA.hints" #Default places to look for devices. + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options NFSCL #Network Filesystem Client +options NFS_ROOT #NFS usable as /, requires NFSCL +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options ROOTDEVNAME=\"ufs:ada0\" + +options GEOM_LABEL # Provides labelization +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_RAID # Soft RAID functionality. + +# Debugging for use in -current +#options DEADLKRES #Enable the deadlock resolver +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed + +device loop +device ether +device le +device miibus +device bpf +device md +device uart +device random From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 16:15: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 27296EA9; Wed, 7 Jan 2015 16:15: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 13B4864BCC; Wed, 7 Jan 2015 16:15: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 t07GF07O068276; Wed, 7 Jan 2015 16:15:00 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07GF0t1068275; Wed, 7 Jan 2015 16:15:00 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201501071615.t07GF0t1068275@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Wed, 7 Jan 2015 16:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276778 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 16:15:01 -0000 Author: brd (doc committer) Date: Wed Jan 7 16:15:00 2015 New Revision: 276778 URL: https://svnweb.freebsd.org/changeset/base/276778 Log: Fix the counter_u64_alloc arguement Approved by: glebius MFC after: 2 weeks Modified: head/share/man/man9/counter.9 Modified: head/share/man/man9/counter.9 ============================================================================== --- head/share/man/man9/counter.9 Wed Jan 7 16:08:57 2015 (r276777) +++ head/share/man/man9/counter.9 Wed Jan 7 16:15:00 2015 (r276778) @@ -80,7 +80,7 @@ Thus is considered suitable for accounting in the performance-critical code pathes. .Bl -tag -width indent -.It Fn counter_u64_alloc how +.It Fn counter_u64_alloc wait Allocate a new 64-bit unsigned counter. The .Fa wait From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 16:55: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 50438900; Wed, 7 Jan 2015 16:55: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 30F346635A; Wed, 7 Jan 2015 16:55: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 t07GtuZg087553; Wed, 7 Jan 2015 16:55:56 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07Gtudu087552; Wed, 7 Jan 2015 16:55:56 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501071655.t07Gtudu087552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 7 Jan 2015 16:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276779 - head/sys/arm/rockchip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 16:55:56 -0000 Author: loos Date: Wed Jan 7 16:55:55 2015 New Revision: 276779 URL: https://svnweb.freebsd.org/changeset/base/276779 Log: Reduce the maximum number of pins for the Rockchip RK3188, this driver isn't supposed to manage all the GPIO pins in the system from a single instance, instead it will attach to each one of the four available GPIO controllers and only deal with one bank at time (32 pins per bank). Rework part of the driver to take advantage of that, this simplify the code a lot. Also fix a bug in rk30_gpio_get_function() which wouldn't return the correct values. While here fix a typo in register name. Modified: head/sys/arm/rockchip/rk30xx_gpio.c Modified: head/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_gpio.c Wed Jan 7 16:15:00 2015 (r276778) +++ head/sys/arm/rockchip/rk30xx_gpio.c Wed Jan 7 16:55:55 2015 (r276779) @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); * PC0 - PC7 | PD0 - PD7 */ -#define RK30_GPIO_PINS 128 +#define RK30_GPIO_PINS 32 #define RK30_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN) @@ -71,9 +71,6 @@ __FBSDID("$FreeBSD$"); #define RK30_GPIO_PULLUP 1 #define RK30_GPIO_PULLDOWN 2 -#define RK30_GPIO_INPUT 0 -#define RK30_GPIO_OUTPUT 1 - struct rk30_gpio_softc { device_t sc_dev; struct mtx sc_mtx; @@ -119,7 +116,7 @@ struct gpio_ctrl_entry gpio_controllers[ #define RK30_GPIO_INT_STATUS 0x40 #define RK30_GPIO_INT_RAWSTATUS 0x44 #define RK30_GPIO_DEBOUNCE 0x48 -#define RK30_GPIO_PORTS_EOI 0x4c +#define RK30_GPIO_PORT_EOI 0x4c #define RK30_GPIO_EXT_PORT 0x50 #define RK30_GPIO_LS_SYNC 0x60 @@ -131,48 +128,25 @@ struct gpio_ctrl_entry gpio_controllers[ static uint32_t rk30_gpio_get_function(struct rk30_gpio_softc *sc, uint32_t pin) { - uint32_t bank, func, offset; - - bank = pin / 32; - pin = pin % 32; - offset = 1 << pin; - - func = RK30_GPIO_READ(sc, RK30_GPIO_SWPORT_DDR); - func &= offset; - - return (func); -} - -static uint32_t -rk30_gpio_func_flag(uint32_t nfunc) -{ - switch (nfunc) { - case RK30_GPIO_INPUT: - return (GPIO_PIN_INPUT); - case RK30_GPIO_OUTPUT: + if (RK30_GPIO_READ(sc, RK30_GPIO_SWPORT_DDR) & (1U << pin)) return (GPIO_PIN_OUTPUT); - } - return (0); + else + return (GPIO_PIN_INPUT); } static void -rk30_gpio_set_function(struct rk30_gpio_softc *sc, uint32_t pin, uint32_t f) +rk30_gpio_set_function(struct rk30_gpio_softc *sc, uint32_t pin, uint32_t func) { - uint32_t bank, data, offset; + uint32_t data; /* Must be called with lock held. */ RK30_GPIO_LOCK_ASSERT(sc); - - bank = pin / 32; - pin = pin % 32; - offset = 1 << pin; - data = RK30_GPIO_READ(sc, RK30_GPIO_SWPORT_DDR); - if (f) - data |= offset; + if (func == GPIO_PIN_OUTPUT) + data |= (1U << pin); else - data &= ~offset; + data &= ~(1U << pin); RK30_GPIO_WRITE(sc, RK30_GPIO_SWPORT_DDR, data); } @@ -198,21 +172,16 @@ rk30_gpio_pin_configure(struct rk30_gpio { RK30_GPIO_LOCK(sc); - /* * Manage input/output. */ - if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { - pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); - if (flags & GPIO_PIN_OUTPUT) { + if (flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) { + pin->gp_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); + if (flags & GPIO_PIN_OUTPUT) pin->gp_flags |= GPIO_PIN_OUTPUT; - rk30_gpio_set_function(sc, pin->gp_pin, - RK30_GPIO_OUTPUT); - } else { + else pin->gp_flags |= GPIO_PIN_INPUT; - rk30_gpio_set_function(sc, pin->gp_pin, - RK30_GPIO_INPUT); - } + rk30_gpio_set_function(sc, pin->gp_pin, pin->gp_flags); } /* Manage Pull-up/pull-down. */ @@ -326,32 +295,23 @@ rk30_gpio_pin_setflags(device_t dev, uin static int rk30_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) { - struct rk30_gpio_softc *sc = device_get_softc(dev); - uint32_t bank, offset, data; int i; + struct rk30_gpio_softc *sc; + uint32_t data; + sc = device_get_softc(dev); for (i = 0; i < sc->sc_gpio_npins; i++) { if (sc->sc_gpio_pins[i].gp_pin == pin) break; } - if (i >= sc->sc_gpio_npins) return (EINVAL); - - bank = pin / 32; - pin = pin % 32; - offset = 1 << pin; - RK30_GPIO_LOCK(sc); - data = RK30_GPIO_READ(sc, RK30_GPIO_SWPORT_DDR); - data |= offset; - RK30_GPIO_WRITE(sc, RK30_GPIO_SWPORT_DDR, data); - data = RK30_GPIO_READ(sc, RK30_GPIO_SWPORT_DR); if (value) - data |= offset; + data |= (1U << pin); else - data &= ~offset; + data &= ~(1U << pin); RK30_GPIO_WRITE(sc, RK30_GPIO_SWPORT_DR, data); RK30_GPIO_UNLOCK(sc); @@ -361,26 +321,21 @@ rk30_gpio_pin_set(device_t dev, uint32_t static int rk30_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) { - struct rk30_gpio_softc *sc = device_get_softc(dev); - uint32_t bank, offset, reg_data; int i; + struct rk30_gpio_softc *sc; + uint32_t data; + sc = device_get_softc(dev); for (i = 0; i < sc->sc_gpio_npins; i++) { if (sc->sc_gpio_pins[i].gp_pin == pin) break; } - if (i >= sc->sc_gpio_npins) return (EINVAL); - - bank = pin / 32; - pin = pin % 32; - offset = 1 << pin; - RK30_GPIO_LOCK(sc); - reg_data = RK30_GPIO_READ(sc, RK30_GPIO_EXT_PORT); + data = RK30_GPIO_READ(sc, RK30_GPIO_EXT_PORT); RK30_GPIO_UNLOCK(sc); - *val = (reg_data & offset) ? 1 : 0; + *val = (data & (1U << pin)) ? 1 : 0; return (0); } @@ -388,35 +343,23 @@ rk30_gpio_pin_get(device_t dev, uint32_t static int rk30_gpio_pin_toggle(device_t dev, uint32_t pin) { - struct rk30_gpio_softc *sc = device_get_softc(dev); - uint32_t bank, data, offset; int i; + struct rk30_gpio_softc *sc; + uint32_t data; + sc = device_get_softc(dev); for (i = 0; i < sc->sc_gpio_npins; i++) { if (sc->sc_gpio_pins[i].gp_pin == pin) break; } - if (i >= sc->sc_gpio_npins) return (EINVAL); - - bank = pin / 32; - pin = pin % 32; - offset = 1 << pin; - RK30_GPIO_LOCK(sc); - data = RK30_GPIO_READ(sc, RK30_GPIO_SWPORT_DDR); - if (data & offset) - data &= ~offset; - else - data |= offset; - RK30_GPIO_WRITE(sc, RK30_GPIO_SWPORT_DDR, data); - data = RK30_GPIO_READ(sc, RK30_GPIO_SWPORT_DR); - if (data & offset) - data &= ~offset; + if (data & (1U << pin)) + data &= ~(1U << pin); else - data |= offset; + data |= (1U << pin); RK30_GPIO_WRITE(sc, RK30_GPIO_SWPORT_DR, data); RK30_GPIO_UNLOCK(sc); @@ -441,7 +384,6 @@ static int rk30_gpio_attach(device_t dev) { struct rk30_gpio_softc *sc = device_get_softc(dev); - uint32_t func; int i, rid; phandle_t gpio; @@ -483,10 +425,9 @@ rk30_gpio_attach(device_t dev) for (i = 0; i < RK30_GPIO_PINS; i++) { snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME, "pin %d", i); - func = rk30_gpio_get_function(sc, i); sc->sc_gpio_pins[i].gp_pin = i; sc->sc_gpio_pins[i].gp_caps = RK30_GPIO_DEFAULT_CAPS; - sc->sc_gpio_pins[i].gp_flags = rk30_gpio_func_flag(func); + sc->sc_gpio_pins[i].gp_flags = rk30_gpio_get_function(sc, i); } sc->sc_gpio_npins = i; @@ -591,10 +532,10 @@ rk30_gpios_prop_handle(phandle_t ctrl, p if (dir == 1) { /* Input. */ - rk30_gpio_pin_set(sc->sc_dev, pin, RK30_GPIO_INPUT); + rk30_gpio_pin_set(sc->sc_dev, pin, GPIO_PIN_INPUT); } else { /* Output. */ - rk30_gpio_pin_set(sc->sc_dev, pin, RK30_GPIO_OUTPUT); + rk30_gpio_pin_set(sc->sc_dev, pin, GPIO_PIN_OUTPUT); } gpios += gpio_cells + inc; } From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 17:22: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 620EFEC; Wed, 7 Jan 2015 17: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 337431676; Wed, 7 Jan 2015 17: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 t07HMwGV001818; Wed, 7 Jan 2015 17:22:58 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07HMvoQ001815; Wed, 7 Jan 2015 17:22:57 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501071722.t07HMvoQ001815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Wed, 7 Jan 2015 17:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276780 - in head/sys: fs/nfs fs/nfsserver nfsserver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 17:22:58 -0000 Author: rwatson Date: Wed Jan 7 17:22:56 2015 New Revision: 276780 URL: https://svnweb.freebsd.org/changeset/base/276780 Log: Use M_SIZE() instead of hand-crafted (and mostly correct) NFSMSIZ() macro in the NFS server; garbage collect now-unused NFSMSIZ() and M_HASCL() macros. Also garbage collect now-unused versions in headers for the removed previous NFS client and server. Reviewed by: rmacklem Sponsored by: EMC / Isilon Storage Division Modified: head/sys/fs/nfs/nfsm_subs.h head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/nfsserver/nfsm_subs.h Modified: head/sys/fs/nfs/nfsm_subs.h ============================================================================== --- head/sys/fs/nfs/nfsm_subs.h Wed Jan 7 16:55:55 2015 (r276779) +++ head/sys/fs/nfs/nfsm_subs.h Wed Jan 7 17:22:56 2015 (r276780) @@ -46,9 +46,6 @@ /* * First define what the actual subs. return */ -#define M_HASCL(m) ((m)->m_flags & M_EXT) -#define NFSMSIZ(m) ((M_HASCL(m))?MCLBYTES: \ - (((m)->m_flags & M_PKTHDR)?MHLEN:MLEN)) #define NFSM_DATAP(m, s) (m)->m_data += (s) /* Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 7 16:55:55 2015 (r276779) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Wed Jan 7 17:22:56 2015 (r276780) @@ -575,7 +575,7 @@ nfsvno_readlink(struct vnode *vp, struct while (len < NFS_MAXPATHLEN) { NFSMGET(mp); MCLGET(mp, M_WAITOK); - mp->m_len = NFSMSIZ(mp); + mp->m_len = M_SIZE(mp); if (len == 0) { mp3 = mp2 = mp; } else { Modified: head/sys/nfsserver/nfsm_subs.h ============================================================================== --- head/sys/nfsserver/nfsm_subs.h Wed Jan 7 16:55:55 2015 (r276779) +++ head/sys/nfsserver/nfsm_subs.h Wed Jan 7 17:22:56 2015 (r276780) @@ -47,14 +47,6 @@ */ /* - * First define what the actual subs. return - */ - -#define M_HASCL(m) ((m)->m_flags & M_EXT) -#define NFSMSIZ(m) ((M_HASCL(m))?MCLBYTES: \ - (((m)->m_flags & M_PKTHDR)?MHLEN:MLEN)) - -/* * Now for the macros that do the simple stuff and call the functions * for the hard stuff. * These macros use several vars. declared in nfsm_reqhead and these From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 17:44: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 42212741; Wed, 7 Jan 2015 17:44:39 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id ED3CE1AFE; Wed, 7 Jan 2015 17:44:38 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t07HiVT2042302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Jan 2015 09:44:31 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t07HiVb7042301; Wed, 7 Jan 2015 09:44:31 -0800 (PST) (envelope-from jmg) Date: Wed, 7 Jan 2015 09:44:31 -0800 From: John-Mark Gurney To: Robert Watson Subject: Re: svn commit: r276750 - in head: share/man/man9 sys/contrib/ipfilter/netinet sys/dev/an sys/dev/bge sys/dev/ce sys/dev/cm sys/dev/cp sys/dev/cs sys/dev/ctau sys/dev/ed sys/dev/ex sys/dev/fe sys/dev/h... Message-ID: <20150107174430.GQ1949@funkthat.com> References: <201501061259.t06CxcTc096488@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501061259.t06CxcTc096488@svn.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Wed, 07 Jan 2015 09:44:31 -0800 (PST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 17:44:39 -0000 Robert Watson wrote this message on Tue, Jan 06, 2015 at 12:59 +0000: > Author: rwatson > Date: Tue Jan 6 12:59:37 2015 > New Revision: 276750 > URL: https://svnweb.freebsd.org/changeset/base/276750 > > Log: > In order to reduce use of M_EXT outside of the mbuf allocator and > socket-buffer implementations, introduce a return value for MCLGET() > (and m_cljget() that underlies it) to allow the caller to avoid testing > M_EXT itself. Update all callers to use the return value. > > With this change, very few network device drivers remain aware of > M_EXT; the primary exceptions lie in mbuf-chain pretty printers for > debugging, and in a few cases, custom mbuf and cluster allocation > implementations. > > NB: This is a difficult-to-test change as it touches many drivers for > which I don't have physical devices. Instead we've gone for intensive > review, but further post-commit review would definitely be appreciated > to spot errors where changes could not easily be made mechanically, > but were largely mechanical in nature. Shouldn't this come w/ a FreeBSD version bump for drivers to use? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 17:51: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 D5D85BDD; Wed, 7 Jan 2015 17:51:59 +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 8C4DA1D07; Wed, 7 Jan 2015 17:51:59 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1Y8ulw-0001WZ-AQ; Wed, 07 Jan 2015 21:51:56 +0400 Date: Wed, 7 Jan 2015 21:51:56 +0400 From: Slawa Olhovchenkov To: Maxim Sobolev Subject: Re: svn commit: r267001 - head/share/man/man4 Message-ID: <20150107175156.GA5588@zxy.spb.ru> References: <201406030519.s535JB7H050905@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201406030519.s535JB7H050905@svn.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 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 17:52:00 -0000 On Tue, Jun 03, 2014 at 05:19:11AM +0000, Maxim Sobolev wrote: > Author: sobomax > Date: Tue Jun 3 05:19:10 2014 > New Revision: 267001 > URL: http://svnweb.freebsd.org/changeset/base/267001 > > Log: > Fix few outdated names of defines: > > o NR_REG_SW_NIC -> NR_REG_SW > o NR_RING_NIC_SW -> NR_REG_NIC_SW > o NETMAP_NO_TX_SYNC -> NETMAP_NO_TX_POLL > o NETMAP_DO_RX_SYNC -> NETMAP_DO_RX_POLL > > I hope dear luigi has not left those as an excercise to careful > reader, in which case I apologize in advance for ruining his play. > > MFC after: 1 week > > Modified: > head/share/man/man4/netmap.4 > MFC? From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 18:16: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 0EFE9DB0; Wed, 7 Jan 2015 18:16:17 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id D909C64246; Wed, 7 Jan 2015 18:16:16 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id ACB6346B43; Wed, 7 Jan 2015 13:16:15 -0500 (EST) Date: Wed, 7 Jan 2015 18:16:15 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John-Mark Gurney Subject: Re: svn commit: r276750 - in head: share/man/man9 sys/contrib/ipfilter/netinet sys/dev/an sys/dev/bge sys/dev/ce sys/dev/cm sys/dev/cp sys/dev/cs sys/dev/ctau sys/dev/ed sys/dev/ex sys/dev/fe sys/dev/h... In-Reply-To: <20150107174430.GQ1949@funkthat.com> Message-ID: References: <201501061259.t06CxcTc096488@svn.freebsd.org> <20150107174430.GQ1949@funkthat.com> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 18:16:17 -0000 On Wed, 7 Jan 2015, John-Mark Gurney wrote: >> Log: >> In order to reduce use of M_EXT outside of the mbuf allocator and >> socket-buffer implementations, introduce a return value for MCLGET() >> (and m_cljget() that underlies it) to allow the caller to avoid testing >> M_EXT itself. Update all callers to use the return value. >> >> With this change, very few network device drivers remain aware of >> M_EXT; the primary exceptions lie in mbuf-chain pretty printers for >> debugging, and in a few cases, custom mbuf and cluster allocation >> implementations. >> >> NB: This is a difficult-to-test change as it touches many drivers for >> which I don't have physical devices. Instead we've gone for intensive >> review, but further post-commit review would definitely be appreciated >> to spot errors where changes could not easily be made mechanically, >> but were largely mechanical in nature. > > Shouldn't this come w/ a FreeBSD version bump for drivers to use? Yes, probably. Old drivers will continue to work fine in not checking the return value (for now), but drivers seeing backporting will probably want a __FreeBSD_version ifdef. I'll do a commit to bump the version number today. (In my local tree, M_EXT is renamed _M_EXT unless MBUF_PRIVATE is defined, which really is quite a significant KPI change -- I'm not yet sure if I'm going to push that into FreeBSD 11 or not.) Robert From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 18:24: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 03E632A0; Wed, 7 Jan 2015 18:24: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 E39AF64487; Wed, 7 Jan 2015 18: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 t07IOho5031768; Wed, 7 Jan 2015 18:24:43 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07IOhu4031767; Wed, 7 Jan 2015 18:24:43 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501071824.t07IOhu4031767@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Wed, 7 Jan 2015 18:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276781 - 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.18-1 Precedence: list List-Id: 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, 07 Jan 2015 18:24:44 -0000 Author: rwatson Date: Wed Jan 7 18:24:42 2015 New Revision: 276781 URL: https://svnweb.freebsd.org/changeset/base/276781 Log: Bump __FreeBSD_version to 1100053 reflecting the addition of a return value to MCLGET(). Suggested by: jmg Sponsored by: EMC / Isilon Storage Division Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Jan 7 17:22:56 2015 (r276780) +++ head/sys/sys/param.h Wed Jan 7 18:24:42 2015 (r276781) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100052 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100053 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 19:06: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 B07A26C5; Wed, 7 Jan 2015 19:06: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 98CA866A40; Wed, 7 Jan 2015 19:06: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 t07J6bQZ051732; Wed, 7 Jan 2015 19:06:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07J6SUg051659; Wed, 7 Jan 2015 19:06:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501071906.t07J6SUg051659@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 7 Jan 2015 19:06:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276783 - in head: lib/clang lib/clang/include lib/clang/include/llvm/Config lib/clang/libllvmaarch64asmparser lib/clang/libllvmaarch64codegen lib/clang/libllvmaarch64desc lib/clang/lib... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 19:06:37 -0000 Author: dim Date: Wed Jan 7 19:06:27 2015 New Revision: 276783 URL: https://svnweb.freebsd.org/changeset/base/276783 Log: Add the AArch64 llvm backend to the build to allow for early testing and to ease any rework of how clang is built to take arm64 in to account. Submitted by: andrew Reviewed by: andrew, emaste Differential Revision: https://reviews.freebsd.org/D1446 Added: head/lib/clang/include/AArch64GenAsmMatcher.inc (contents, props changed) head/lib/clang/include/AArch64GenAsmWriter.inc (contents, props changed) head/lib/clang/include/AArch64GenAsmWriter1.inc (contents, props changed) head/lib/clang/include/AArch64GenCallingConv.inc (contents, props changed) head/lib/clang/include/AArch64GenDAGISel.inc (contents, props changed) head/lib/clang/include/AArch64GenDisassemblerTables.inc (contents, props changed) head/lib/clang/include/AArch64GenFastISel.inc (contents, props changed) head/lib/clang/include/AArch64GenInstrInfo.inc (contents, props changed) head/lib/clang/include/AArch64GenMCCodeEmitter.inc (contents, props changed) head/lib/clang/include/AArch64GenMCPseudoLowering.inc (contents, props changed) head/lib/clang/include/AArch64GenRegisterInfo.inc (contents, props changed) head/lib/clang/include/AArch64GenSubtargetInfo.inc (contents, props changed) head/lib/clang/libllvmaarch64asmparser/ head/lib/clang/libllvmaarch64asmparser/Makefile (contents, props changed) head/lib/clang/libllvmaarch64codegen/ head/lib/clang/libllvmaarch64codegen/Makefile (contents, props changed) head/lib/clang/libllvmaarch64desc/ head/lib/clang/libllvmaarch64desc/Makefile (contents, props changed) head/lib/clang/libllvmaarch64disassembler/ head/lib/clang/libllvmaarch64disassembler/Makefile (contents, props changed) head/lib/clang/libllvmaarch64info/ head/lib/clang/libllvmaarch64info/Makefile (contents, props changed) head/lib/clang/libllvmaarch64instprinter/ head/lib/clang/libllvmaarch64instprinter/Makefile (contents, props changed) head/lib/clang/libllvmaarch64utils/ head/lib/clang/libllvmaarch64utils/Makefile (contents, props changed) Modified: head/lib/clang/Makefile head/lib/clang/clang.build.mk head/lib/clang/include/llvm/Config/AsmParsers.def head/lib/clang/include/llvm/Config/AsmPrinters.def head/lib/clang/include/llvm/Config/Disassemblers.def head/lib/clang/include/llvm/Config/Targets.def head/usr.bin/clang/clang/Makefile head/usr.bin/clang/llc/Makefile head/usr.bin/clang/lldb/Makefile head/usr.bin/clang/llvm-ar/Makefile head/usr.bin/clang/llvm-mc/Makefile head/usr.bin/clang/llvm-nm/Makefile head/usr.bin/clang/llvm-objdump/Makefile head/usr.bin/clang/llvm-rtdyld/Makefile head/usr.bin/clang/opt/Makefile Modified: head/lib/clang/Makefile ============================================================================== --- head/lib/clang/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/lib/clang/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -56,6 +56,13 @@ SUBDIR= libclanganalysis \ libllvmtransformutils \ libllvmvectorize \ \ + libllvmaarch64asmparser \ + libllvmaarch64codegen \ + libllvmaarch64desc \ + libllvmaarch64disassembler \ + libllvmaarch64info \ + libllvmaarch64instprinter \ + libllvmaarch64utils \ libllvmarmasmparser \ libllvmarmcodegen \ libllvmarmdesc \ Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Wed Jan 7 18:38:04 2015 (r276782) +++ head/lib/clang/clang.build.mk Wed Jan 7 19:06:27 2015 (r276783) @@ -29,8 +29,8 @@ TARGET_ABI= gnueabi TARGET_ABI= unknown .endif -TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-${TARGET_ABI}-freebsd11.0 -BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-unknown-freebsd11.0 +TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-${TARGET_ABI}-freebsd11.0 +BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-unknown-freebsd11.0 CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" @@ -46,7 +46,7 @@ Intrinsics.inc.h: ${LLVM_SRCS}/include/l -I ${LLVM_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td .for arch in \ - ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 + AArch64/AArch64 ARM/ARM Mips/Mips PowerPC/PPC Sparc/Sparc X86/X86 . for hdr in \ AsmMatcher/-gen-asm-matcher \ AsmWriter1/-gen-asm-writer,-asmwriternum=1 \ Added: head/lib/clang/include/AArch64GenAsmMatcher.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenAsmMatcher.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenAsmMatcher.inc.h" Added: head/lib/clang/include/AArch64GenAsmWriter.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenAsmWriter.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenAsmWriter.inc.h" Added: head/lib/clang/include/AArch64GenAsmWriter1.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenAsmWriter1.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenAsmWriter1.inc.h" Added: head/lib/clang/include/AArch64GenCallingConv.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenCallingConv.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenCallingConv.inc.h" Added: head/lib/clang/include/AArch64GenDAGISel.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenDAGISel.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenDAGISel.inc.h" Added: head/lib/clang/include/AArch64GenDisassemblerTables.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenDisassemblerTables.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenDisassemblerTables.inc.h" Added: head/lib/clang/include/AArch64GenFastISel.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenFastISel.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenFastISel.inc.h" Added: head/lib/clang/include/AArch64GenInstrInfo.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenInstrInfo.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenInstrInfo.inc.h" Added: head/lib/clang/include/AArch64GenMCCodeEmitter.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenMCCodeEmitter.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenMCCodeEmitter.inc.h" Added: head/lib/clang/include/AArch64GenMCPseudoLowering.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenMCPseudoLowering.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenMCPseudoLowering.inc.h" Added: head/lib/clang/include/AArch64GenRegisterInfo.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenRegisterInfo.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenRegisterInfo.inc.h" Added: head/lib/clang/include/AArch64GenSubtargetInfo.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/include/AArch64GenSubtargetInfo.inc Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +#include "AArch64GenSubtargetInfo.inc.h" Modified: head/lib/clang/include/llvm/Config/AsmParsers.def ============================================================================== --- head/lib/clang/include/llvm/Config/AsmParsers.def Wed Jan 7 18:38:04 2015 (r276782) +++ head/lib/clang/include/llvm/Config/AsmParsers.def Wed Jan 7 19:06:27 2015 (r276783) @@ -1,5 +1,6 @@ /* $FreeBSD$ */ +LLVM_ASM_PARSER(AArch64) LLVM_ASM_PARSER(ARM) LLVM_ASM_PARSER(Mips) LLVM_ASM_PARSER(PowerPC) Modified: head/lib/clang/include/llvm/Config/AsmPrinters.def ============================================================================== --- head/lib/clang/include/llvm/Config/AsmPrinters.def Wed Jan 7 18:38:04 2015 (r276782) +++ head/lib/clang/include/llvm/Config/AsmPrinters.def Wed Jan 7 19:06:27 2015 (r276783) @@ -1,5 +1,6 @@ /* $FreeBSD$ */ +LLVM_ASM_PRINTER(AArch64) LLVM_ASM_PRINTER(ARM) LLVM_ASM_PRINTER(Mips) LLVM_ASM_PRINTER(PowerPC) Modified: head/lib/clang/include/llvm/Config/Disassemblers.def ============================================================================== --- head/lib/clang/include/llvm/Config/Disassemblers.def Wed Jan 7 18:38:04 2015 (r276782) +++ head/lib/clang/include/llvm/Config/Disassemblers.def Wed Jan 7 19:06:27 2015 (r276783) @@ -1,5 +1,6 @@ /* $FreeBSD$ */ +LLVM_DISASSEMBLER(AArch64) LLVM_DISASSEMBLER(ARM) LLVM_DISASSEMBLER(Mips) LLVM_DISASSEMBLER(PowerPC) Modified: head/lib/clang/include/llvm/Config/Targets.def ============================================================================== --- head/lib/clang/include/llvm/Config/Targets.def Wed Jan 7 18:38:04 2015 (r276782) +++ head/lib/clang/include/llvm/Config/Targets.def Wed Jan 7 19:06:27 2015 (r276783) @@ -1,5 +1,6 @@ /* $FreeBSD$ */ +LLVM_TARGET(AArch64) LLVM_TARGET(ARM) LLVM_TARGET(Mips) LLVM_TARGET(PowerPC) Added: head/lib/clang/libllvmaarch64asmparser/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmaarch64asmparser/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64asmparser + +SRCDIR= lib/Target/AArch64/AsmParser +INCDIR= lib/Target/AArch64 +SRCS= AArch64AsmParser.cpp + +TGHDRS= AArch64GenAsmMatcher \ + AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Added: head/lib/clang/libllvmaarch64codegen/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmaarch64codegen/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64codegen + +SRCDIR= lib/Target/AArch64 +SRCS= AArch64AddressTypePromotion.cpp \ + AArch64AdvSIMDScalarPass.cpp \ + AArch64AsmPrinter.cpp \ + AArch64BranchRelaxation.cpp \ + AArch64CleanupLocalDynamicTLSPass.cpp \ + AArch64CollectLOH.cpp \ + AArch64ConditionalCompares.cpp \ + AArch64DeadRegisterDefinitionsPass.cpp \ + AArch64ExpandPseudoInsts.cpp \ + AArch64FastISel.cpp \ + AArch64FrameLowering.cpp \ + AArch64ISelDAGToDAG.cpp \ + AArch64ISelLowering.cpp \ + AArch64InstrInfo.cpp \ + AArch64LoadStoreOptimizer.cpp \ + AArch64MCInstLower.cpp \ + AArch64PromoteConstant.cpp \ + AArch64RegisterInfo.cpp \ + AArch64SelectionDAGInfo.cpp \ + AArch64StorePairSuppress.cpp \ + AArch64Subtarget.cpp \ + AArch64TargetMachine.cpp \ + AArch64TargetObjectFile.cpp \ + AArch64TargetTransformInfo.cpp + +TGHDRS= AArch64GenCallingConv \ + AArch64GenDAGISel \ + AArch64GenFastISel \ + AArch64GenInstrInfo \ + AArch64GenMCPseudoLowering \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo \ + Intrinsics + +.include "../clang.lib.mk" Added: head/lib/clang/libllvmaarch64desc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmaarch64desc/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64desc + +SRCDIR= lib/Target/AArch64/MCTargetDesc +SRCS= AArch64AsmBackend.cpp \ + AArch64ELFObjectWriter.cpp \ + AArch64ELFStreamer.cpp \ + AArch64MCAsmInfo.cpp \ + AArch64MCCodeEmitter.cpp \ + AArch64MCExpr.cpp \ + AArch64MCTargetDesc.cpp \ + AArch64MachObjectWriter.cpp \ + AArch64TargetStreamer.cpp +CFLAGS+= -I${LLVM_SRCS}/${SRCDIR}/.. + +TGHDRS= AArch64GenInstrInfo \ + AArch64GenMCCodeEmitter \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Added: head/lib/clang/libllvmaarch64disassembler/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmaarch64disassembler/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64disassembler + +SRCDIR= lib/Target/AArch64/Disassembler +INCDIR= lib/Target/AArch64 +SRCS= AArch64Disassembler.cpp + +.if ${MK_CLANG_EXTRAS} != "no" +SRCS+= AArch64ExternalSymbolizer.cpp +.endif + +TGHDRS= AArch64GenDisassemblerTables \ + AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Added: head/lib/clang/libllvmaarch64info/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmaarch64info/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64info + +SRCDIR= lib/Target/AArch64/TargetInfo +INCDIR= lib/Target/AArch64 +SRCS= AArch64TargetInfo.cpp + +TGHDRS= AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Added: head/lib/clang/libllvmaarch64instprinter/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmaarch64instprinter/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64instprinter + +SRCDIR= lib/Target/AArch64/InstPrinter +INCDIR= lib/Target/AArch64 +SRCS= AArch64InstPrinter.cpp + +TGHDRS= AArch64GenAsmWriter \ + AArch64GenAsmWriter1 \ + AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Added: head/lib/clang/libllvmaarch64utils/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmaarch64utils/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +LIB= llvmaarch64utils + +SRCDIR= lib/Target/AArch64/Utils +INCDIR= lib/Target/AArch64 +SRCS= AArch64BaseInfo.cpp + +TGHDRS= AArch64GenInstrInfo \ + AArch64GenRegisterInfo \ + AArch64GenSubtargetInfo + +.include "../clang.lib.mk" Modified: head/usr.bin/clang/clang/Makefile ============================================================================== --- head/usr.bin/clang/clang/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/usr.bin/clang/clang/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -70,6 +70,13 @@ LIBDEPS=clangfrontendtool \ llvminstrumentation \ llvmbitwriter \ llvmasmparser \ + llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ llvmarmdisassembler \ llvmarmcodegen \ llvmarmasmparser \ Modified: head/usr.bin/clang/llc/Makefile ============================================================================== --- head/usr.bin/clang/llc/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/usr.bin/clang/llc/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -9,6 +9,13 @@ SRCS= llc.cpp LIBDEPS=llvmirreader \ llvmasmparser \ + llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ llvmarmdisassembler \ llvmarmcodegen \ llvmarmasmparser \ Modified: head/usr.bin/clang/lldb/Makefile ============================================================================== --- head/usr.bin/clang/lldb/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/usr.bin/clang/lldb/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -82,67 +82,73 @@ LIBDEPS=\ clangbasic \ clanglex \ \ + llvmmcdisassembler \ + llvmobjcarcopts \ + llvmprofiledata \ llvmoption \ - llvmarmasmparser \ - llvmarmcodegen \ - llvminstrumentation \ - llvmirreader \ llvmlinker \ - llvmmipsasmparser \ - llvmmipscodegen \ - llvmmipsdisassembler \ - llvmobjcarcopts \ - llvmpowerpccodegen \ - llvmx86asmparser \ - llvmx86codegen \ - llvmx86disassembler \ llvmmcjit \ - llvmmcdisassembler \ - llvmarmdisassembler \ - llvmselectiondag \ + llvmruntimedyld \ + llvmjit \ + llvmexecutionengine \ + llvmirreader \ llvmipo \ + llvmvectorize \ + llvminstrumentation \ llvmbitwriter \ llvmasmparser \ - llvminterpreter \ - llvmjit \ + llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ + llvmarmdisassembler \ + llvmarmcodegen \ + llvmarmasmparser \ llvmarmdesc \ - llvmasmprinter \ + llvmarminfo \ + llvmarminstprinter \ + llvmmipsdisassembler \ + llvmmipscodegen \ + llvmmipsasmparser \ llvmmipsdesc \ + llvmmipsinfo \ llvmmipsinstprinter \ + llvmpowerpcdisassembler \ + llvmpowerpccodegen \ + llvmpowerpcasmparser \ llvmpowerpcdesc \ + llvmpowerpcinfo \ llvmpowerpcinstprinter \ - llvmpowerpcasmparser \ - llvmpowerpcdisassembler \ - llvmprofiledata \ - llvmruntimedyld \ - llvmvectorize \ - llvmx86desc \ - llvmx86instprinter \ - llvmexecutionengine \ - llvmcodegen \ - llvmscalaropts \ llvmsparcdisassembler \ llvmsparccodegen \ llvmsparcasmparser \ llvmsparcdesc \ llvmsparcinfo \ llvmsparcinstprinter \ - llvmarminfo \ - llvmarminstprinter \ - llvmmcparser \ - llvmmipsinfo \ - llvmpowerpcinfo \ - llvmx86info \ - llvmx86utils \ - llvmobject \ - llvmbitreader \ + llvmx86disassembler \ + llvmx86asmparser \ + llvmx86codegen \ + llvmselectiondag \ + llvmasmprinter \ + llvmcodegen \ + llvmscalaropts \ llvminstcombine \ llvmtransformutils \ llvmipa \ llvmanalysis \ llvmtarget \ + llvmx86desc \ + llvmobject \ + llvmmcparser \ + llvmbitreader \ llvmcore \ + llvmx86info \ + llvmx86instprinter \ llvmmc \ + llvmx86utils \ llvmsupport .include "../clang.prog.mk" Modified: head/usr.bin/clang/llvm-ar/Makefile ============================================================================== --- head/usr.bin/clang/llvm-ar/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/usr.bin/clang/llvm-ar/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -7,7 +7,14 @@ PROG_CXX=llvm-ar SRCDIR= tools/llvm-ar SRCS= llvm-ar.cpp -LIBDEPS=llvmarmdisassembler \ +LIBDEPS=llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ + llvmarmdisassembler \ llvmarmcodegen \ llvmarmasmparser \ llvmarmdesc \ Modified: head/usr.bin/clang/llvm-mc/Makefile ============================================================================== --- head/usr.bin/clang/llvm-mc/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/usr.bin/clang/llvm-mc/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -10,6 +10,13 @@ SRCS= llvm-mc.cpp \ Disassembler.cpp LIBDEPS=llvmmcdisassembler \ + llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ llvmarmdisassembler \ llvmarmcodegen \ llvmarmasmparser \ Modified: head/usr.bin/clang/llvm-nm/Makefile ============================================================================== --- head/usr.bin/clang/llvm-nm/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/usr.bin/clang/llvm-nm/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -7,7 +7,14 @@ PROG_CXX=llvm-nm SRCDIR= tools/llvm-nm SRCS= llvm-nm.cpp -LIBDEPS=llvmarmdisassembler \ +LIBDEPS=llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ + llvmarmdisassembler \ llvmarmcodegen \ llvmarmasmparser \ llvmarmdesc \ Modified: head/usr.bin/clang/llvm-objdump/Makefile ============================================================================== --- head/usr.bin/clang/llvm-objdump/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/usr.bin/clang/llvm-objdump/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -16,6 +16,13 @@ SRCS= llvm-objdump.cpp \ LIBDEPS=llvmmcdisassembler \ llvmmcanalysis \ llvmdebuginfo \ + llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ llvmarmdisassembler \ llvmarmcodegen \ llvmarmasmparser \ Modified: head/usr.bin/clang/llvm-rtdyld/Makefile ============================================================================== --- head/usr.bin/clang/llvm-rtdyld/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/usr.bin/clang/llvm-rtdyld/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -14,6 +14,13 @@ LIBDEPS=llvmdebuginfo \ llvmjit \ llvmexecutionengine \ llvmruntimedyld \ + llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ llvmarmdisassembler \ llvmarmcodegen \ llvmarmasmparser \ Modified: head/usr.bin/clang/opt/Makefile ============================================================================== --- head/usr.bin/clang/opt/Makefile Wed Jan 7 18:38:04 2015 (r276782) +++ head/usr.bin/clang/opt/Makefile Wed Jan 7 19:06:27 2015 (r276783) @@ -15,7 +15,14 @@ SRCS= AnalysisWrappers.cpp \ opt.cpp TGHDRS= Intrinsics -LIBDEPS=llvmarmdisassembler \ +LIBDEPS=llvmaarch64disassembler \ + llvmaarch64codegen \ + llvmaarch64asmparser \ + llvmaarch64desc \ + llvmaarch64info \ + llvmaarch64instprinter \ + llvmaarch64utils \ + llvmarmdisassembler \ llvmarmcodegen \ llvmarmasmparser \ llvmarmdesc \ From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 19:15: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 C590F97D; Wed, 7 Jan 2015 19:15: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 B182466BC6; Wed, 7 Jan 2015 19:15: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 t07JFCla056355; Wed, 7 Jan 2015 19:15:12 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07JFCHW056354; Wed, 7 Jan 2015 19:15:12 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501071915.t07JFCHW056354@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 7 Jan 2015 19:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276784 - head/sys/arm/rockchip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 19:15:12 -0000 Author: loos Date: Wed Jan 7 19:15:11 2015 New Revision: 276784 URL: https://svnweb.freebsd.org/changeset/base/276784 Log: Fix the handling of pull-up and pull-down for RK3188. For this to work the driver needs to know the bank it has attached to since the registers for the first 12 pins are at a different location. Move the lock initialization to simplify the code. Modified: head/sys/arm/rockchip/rk30xx_gpio.c Modified: head/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_gpio.c Wed Jan 7 19:06:27 2015 (r276783) +++ head/sys/arm/rockchip/rk30xx_gpio.c Wed Jan 7 19:15:11 2015 (r276784) @@ -79,10 +79,14 @@ struct rk30_gpio_softc { bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; void * sc_intrhand; + int sc_bank; int sc_gpio_npins; struct gpio_pin sc_gpio_pins[RK30_GPIO_PINS]; }; +/* We use our base address to find out our bank number. */ +static unsigned long rk30_gpio_base_addr[4] = + { 0x2000a000, 0x2003c000, 0x2003e000, 0x20080000 }; static struct rk30_gpio_softc *rk30_gpio_sc = NULL; typedef int (*gpios_phandler_t)(phandle_t, pcell_t *, int); @@ -153,17 +157,28 @@ rk30_gpio_set_function(struct rk30_gpio_ static void rk30_gpio_set_pud(struct rk30_gpio_softc *sc, uint32_t pin, uint32_t state) { - uint32_t bank; - - bank = pin / 32; + uint32_t pud; /* Must be called with lock held. */ RK30_GPIO_LOCK_ASSERT(sc); - - if (bank == 0 && pin < 12) - rk30_pmu_gpio_pud(pin, state); + switch (state) { + case GPIO_PIN_PULLUP: + pud = RK30_GPIO_PULLUP; + break; + case GPIO_PIN_PULLDOWN: + pud = RK30_GPIO_PULLDOWN; + break; + default: + pud = RK30_GPIO_NONE; + } + /* + * The pull up/down registers for GPIO0A and half of GPIO0B + * (the first 12 pins on bank 0) are at a different location. + */ + if (sc->sc_bank == 0 && pin < 12) + rk30_pmu_gpio_pud(pin, pud); else - rk30_grf_gpio_pud(bank, pin, state); + rk30_grf_gpio_pud(sc->sc_bank, pin, pud); } static void @@ -183,22 +198,15 @@ rk30_gpio_pin_configure(struct rk30_gpio pin->gp_flags |= GPIO_PIN_INPUT; rk30_gpio_set_function(sc, pin->gp_pin, pin->gp_flags); } - /* Manage Pull-up/pull-down. */ - pin->gp_flags &= ~(GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN); - if (flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) { - if (flags & GPIO_PIN_PULLUP) { + pin->gp_flags &= ~(GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN); + if (flags & (GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN)) { + if (flags & GPIO_PIN_PULLUP) pin->gp_flags |= GPIO_PIN_PULLUP; - rk30_gpio_set_pud(sc, pin->gp_pin, - RK30_GPIO_PULLUP); - } else { + else pin->gp_flags |= GPIO_PIN_PULLDOWN; - rk30_gpio_set_pud(sc, pin->gp_pin, - RK30_GPIO_PULLDOWN); - } - } else - rk30_gpio_set_pud(sc, pin->gp_pin, RK30_GPIO_NONE); - + } + rk30_gpio_set_pud(sc, pin->gp_pin, pin->gp_flags); RK30_GPIO_UNLOCK(sc); } @@ -386,14 +394,12 @@ rk30_gpio_attach(device_t dev) struct rk30_gpio_softc *sc = device_get_softc(dev); int i, rid; phandle_t gpio; + unsigned long start; if (rk30_gpio_sc) return (ENXIO); - sc->sc_dev = dev; - mtx_init(&sc->sc_mtx, "rk30 gpio", "gpio", MTX_DEF); - rid = 0; sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -401,9 +407,23 @@ rk30_gpio_attach(device_t dev) device_printf(dev, "cannot allocate memory window\n"); return (ENXIO); } - sc->sc_bst = rman_get_bustag(sc->sc_mem_res); sc->sc_bsh = rman_get_bushandle(sc->sc_mem_res); + /* Check the unit we are attaching by our base address. */ + sc->sc_bank = -1; + start = rman_get_start(sc->sc_mem_res); + for (i = 0; i < nitems(rk30_gpio_base_addr); i++) { + if (rk30_gpio_base_addr[i] == start) { + sc->sc_bank = i; + break; + } + } + if (sc->sc_bank == -1) { + device_printf(dev, + "unsupported device unit (only GPIO0..3 are supported)\n"); + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + return (ENXIO); + } rid = 0; sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -421,6 +441,8 @@ rk30_gpio_attach(device_t dev) /* Node is not a GPIO controller. */ goto fail; + mtx_init(&sc->sc_mtx, "rk30 gpio", "gpio", MTX_DEF); + /* Initialize the software controlled pins. */ for (i = 0; i < RK30_GPIO_PINS; i++) { snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME, From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 19:34: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 BD4AB7F6; Wed, 7 Jan 2015 19:34: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 A98D510DA; Wed, 7 Jan 2015 19:34: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 t07JYji9066318; Wed, 7 Jan 2015 19:34:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07JYjTF066317; Wed, 7 Jan 2015 19:34:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501071934.t07JYjTF066317@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 7 Jan 2015 19:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276785 - head/contrib/elftoolchain/libelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 19:34:45 -0000 Author: emaste Date: Wed Jan 7 19:34:44 2015 New Revision: 276785 URL: https://svnweb.freebsd.org/changeset/base/276785 Log: libelf: Add arm64 config Upstream elftoolchain ticket: #470 Submitted by: Andrew Turner Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/libelf/_libelf_config.h Modified: head/contrib/elftoolchain/libelf/_libelf_config.h ============================================================================== --- head/contrib/elftoolchain/libelf/_libelf_config.h Wed Jan 7 19:15:11 2015 (r276784) +++ head/contrib/elftoolchain/libelf/_libelf_config.h Wed Jan 7 19:34:44 2015 (r276785) @@ -53,6 +53,12 @@ #define LIBELF_BYTEORDER ELFDATA2LSB #define LIBELF_CLASS ELFCLASS64 +#elif defined(__aarch64__) + +#define LIBELF_ARCH EM_AARCH64 +#define LIBELF_BYTEORDER ELFDATA2LSB +#define LIBELF_CLASS ELFCLASS64 + #elif defined(__arm__) #define LIBELF_ARCH EM_ARM From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 19:37: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 D8BE198A; Wed, 7 Jan 2015 19:37: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 C4E14112C; Wed, 7 Jan 2015 19:37: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 t07JbRaY066737; Wed, 7 Jan 2015 19:37:27 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07JbRWT066736; Wed, 7 Jan 2015 19:37:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501071937.t07JbRWT066736@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 7 Jan 2015 19:37:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276786 - head/contrib/llvm/lib/Target/AArch64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 19:37:28 -0000 Author: dim Date: Wed Jan 7 19:37:26 2015 New Revision: 276786 URL: https://svnweb.freebsd.org/changeset/base/276786 Log: Pull in r222292 from upstream llvm trunk (by Weiming Zhao): [Aarch64] Customer lowering of CTPOP to SIMD should check for NEON availability This ensures llvm's AArch64 backend does not emit floating point instructions if they are disabled. Modified: head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Modified: head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Wed Jan 7 19:34:44 2015 (r276785) +++ head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Wed Jan 7 19:37:26 2015 (r276786) @@ -3062,6 +3062,9 @@ SDValue AArch64TargetLowering::LowerCTPO AttributeSet::FunctionIndex, Attribute::NoImplicitFloat)) return SDValue(); + if (!Subtarget->hasNEON()) + return SDValue(); + // While there is no integer popcount instruction, it can // be more efficiently lowered to the following sequence that uses // AdvSIMD registers/instructions as long as the copies to/from From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 19:38: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 D9B54AEA; Wed, 7 Jan 2015 19:38: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 BAB4A115A; Wed, 7 Jan 2015 19:38: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 t07Jcrs3066951; Wed, 7 Jan 2015 19:38:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07JcrN0066950; Wed, 7 Jan 2015 19:38:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501071938.t07JcrN0066950@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 7 Jan 2015 19:38:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276787 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 19:38:54 -0000 Author: dim Date: Wed Jan 7 19:38:52 2015 New Revision: 276787 URL: https://svnweb.freebsd.org/changeset/base/276787 Log: Add llvm patch corresponding to r276786. Added: head/contrib/llvm/patches/patch-31-llvm-r222292-aarch64-no-neon.diff Added: head/contrib/llvm/patches/patch-31-llvm-r222292-aarch64-no-neon.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-31-llvm-r222292-aarch64-no-neon.diff Wed Jan 7 19:38:52 2015 (r276787) @@ -0,0 +1,61 @@ +Pull in r222292 from upstream llvm trunk (by Weiming Zhao): + + [Aarch64] Customer lowering of CTPOP to SIMD should check for NEON + availability + +This ensures llvm's AArch64 backend does not emit floating point +instructions if they are disabled. + +Introduced here: http://svnweb.freebsd.org/changeset/base/276786 + +Index: lib/Target/AArch64/AArch64ISelLowering.cpp +=================================================================== +--- lib/Target/AArch64/AArch64ISelLowering.cpp ++++ lib/Target/AArch64/AArch64ISelLowering.cpp +@@ -3062,6 +3062,9 @@ SDValue AArch64TargetLowering::LowerCTPOP(SDValue + AttributeSet::FunctionIndex, Attribute::NoImplicitFloat)) + return SDValue(); + ++ if (!Subtarget->hasNEON()) ++ return SDValue(); ++ + // While there is no integer popcount instruction, it can + // be more efficiently lowered to the following sequence that uses + // AdvSIMD registers/instructions as long as the copies to/from +Index: test/CodeGen/AArch64/arm64-popcnt.ll +=================================================================== +--- test/CodeGen/AArch64/arm64-popcnt.ll ++++ test/CodeGen/AArch64/arm64-popcnt.ll +@@ -1,4 +1,5 @@ + ; RUN: llc < %s -march=arm64 -aarch64-neon-syntax=apple | FileCheck %s ++; RUN: llc < %s -march=aarch64 -mattr -neon -aarch64-neon-syntax=apple | FileCheck -check-prefix=CHECK-NONEON %s + + define i32 @cnt32_advsimd(i32 %x) nounwind readnone { + %cnt = tail call i32 @llvm.ctpop.i32(i32 %x) +@@ -8,6 +9,13 @@ define i32 @cnt32_advsimd(i32 %x) nounwind readnon + ; CHECK: uaddlv.8b h0, v0 + ; CHECK: fmov w0, s0 + ; CHECK: ret ++; CHECK-NONEON-LABEL: cnt32_advsimd ++; CHECK-NONEON-NOT: 8b ++; CHECK-NONEON: and w{{[0-9]+}}, w{{[0-9]+}}, #0x55555555 ++; CHECK-NONEON: and w{{[0-9]+}}, w{{[0-9]+}}, #0x33333333 ++; CHECK-NONEON: and w{{[0-9]+}}, w{{[0-9]+}}, #0xf0f0f0f ++; CHECK-NONEON: mul ++ + } + + define i64 @cnt64_advsimd(i64 %x) nounwind readnone { +@@ -18,6 +26,12 @@ define i64 @cnt64_advsimd(i64 %x) nounwind readnon + ; CHECK: uaddlv.8b h0, v0 + ; CHECK: fmov w0, s0 + ; CHECK: ret ++; CHECK-NONEON-LABEL: cnt64_advsimd ++; CHECK-NONEON-NOT: 8b ++; CHECK-NONEON: and x{{[0-9]+}}, x{{[0-9]+}}, #0x5555555555555555 ++; CHECK-NONEON: and x{{[0-9]+}}, x{{[0-9]+}}, #0x3333333333333333 ++; CHECK-NONEON: and x{{[0-9]+}}, x{{[0-9]+}}, #0xf0f0f0f0f0f0f0f ++; CHECK-NONEON: mul + } + + ; Do not use AdvSIMD when -mno-implicit-float is specified. From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 19:55:21 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 7C23AE76; Wed, 7 Jan 2015 19:55: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 64CFF1382; Wed, 7 Jan 2015 19:55: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 t07JtLGE076123; Wed, 7 Jan 2015 19:55:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07JtJve076116; Wed, 7 Jan 2015 19:55:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501071955.t07JtJve076116@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 7 Jan 2015 19:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 19:55:21 -0000 Author: delphij Date: Wed Jan 7 19:55:18 2015 New Revision: 276788 URL: https://svnweb.freebsd.org/changeset/base/276788 Log: MFV r276761: tcpdump 4.6.2. MFC after: 1 month Added: head/contrib/tcpdump/README.md - copied unchanged from r276761, vendor/tcpdump/dist/README.md head/contrib/tcpdump/getopt_long.h - copied unchanged from r276761, vendor/tcpdump/dist/getopt_long.h head/contrib/tcpdump/missing/getopt_long.c - copied unchanged from r276761, vendor/tcpdump/dist/missing/getopt_long.c head/contrib/tcpdump/openflow.h - copied unchanged from r276761, vendor/tcpdump/dist/openflow.h head/contrib/tcpdump/print-ahcp.c - copied unchanged from r276761, vendor/tcpdump/dist/print-ahcp.c head/contrib/tcpdump/print-aoe.c - copied unchanged from r276761, vendor/tcpdump/dist/print-aoe.c head/contrib/tcpdump/print-calm-fast.c - copied unchanged from r276761, vendor/tcpdump/dist/print-calm-fast.c head/contrib/tcpdump/print-geonet.c - copied unchanged from r276761, vendor/tcpdump/dist/print-geonet.c head/contrib/tcpdump/print-loopback.c - copied unchanged from r276761, vendor/tcpdump/dist/print-loopback.c head/contrib/tcpdump/print-m3ua.c - copied unchanged from r276761, vendor/tcpdump/dist/print-m3ua.c head/contrib/tcpdump/print-mptcp.c - copied unchanged from r276761, vendor/tcpdump/dist/print-mptcp.c head/contrib/tcpdump/print-nflog.c - copied unchanged from r276761, vendor/tcpdump/dist/print-nflog.c head/contrib/tcpdump/print-openflow-1.0.c - copied unchanged from r276761, vendor/tcpdump/dist/print-openflow-1.0.c head/contrib/tcpdump/print-openflow.c - copied unchanged from r276761, vendor/tcpdump/dist/print-openflow.c head/contrib/tcpdump/print-pktap.c - copied unchanged from r276761, vendor/tcpdump/dist/print-pktap.c head/contrib/tcpdump/rpl.h - copied unchanged from r276761, vendor/tcpdump/dist/rpl.h Deleted: head/contrib/tcpdump/README head/contrib/tcpdump/acconfig.h head/contrib/tcpdump/aodv.h head/contrib/tcpdump/arcnet.h head/contrib/tcpdump/bgp.h head/contrib/tcpdump/dccp.h head/contrib/tcpdump/decnet.h head/contrib/tcpdump/decode_prefix.h head/contrib/tcpdump/enc.h head/contrib/tcpdump/esp.h head/contrib/tcpdump/fddi.h head/contrib/tcpdump/forces.h head/contrib/tcpdump/icmp6.h head/contrib/tcpdump/ieee802_11.h head/contrib/tcpdump/ieee802_11_radio.h head/contrib/tcpdump/igrp.h head/contrib/tcpdump/ipfc.h head/contrib/tcpdump/ipnet.h head/contrib/tcpdump/ipsec_doi.h head/contrib/tcpdump/ipx.h head/contrib/tcpdump/isakmp.h head/contrib/tcpdump/l2tp.h head/contrib/tcpdump/lane.h head/contrib/tcpdump/missing/sockstorage.h head/contrib/tcpdump/netbios.h head/contrib/tcpdump/ntp.h head/contrib/tcpdump/oakley.h head/contrib/tcpdump/ospf6.h head/contrib/tcpdump/pmap_prot.h head/contrib/tcpdump/ppi.h head/contrib/tcpdump/print-netbios.c head/contrib/tcpdump/route6d.h head/contrib/tcpdump/rx.h head/contrib/tcpdump/sctpConstants.h head/contrib/tcpdump/sctpHeader.h head/contrib/tcpdump/slip.h head/contrib/tcpdump/sll.h head/contrib/tcpdump/telnet.h head/contrib/tcpdump/tftp.h head/contrib/tcpdump/timed.h head/contrib/tcpdump/token.h Modified: head/contrib/tcpdump/CHANGES head/contrib/tcpdump/CREDITS head/contrib/tcpdump/INSTALL.txt head/contrib/tcpdump/Makefile-devel-adds head/contrib/tcpdump/Makefile.in head/contrib/tcpdump/VERSION head/contrib/tcpdump/addrtoname.c head/contrib/tcpdump/addrtoname.h head/contrib/tcpdump/af.c head/contrib/tcpdump/af.h head/contrib/tcpdump/ah.h head/contrib/tcpdump/appletalk.h head/contrib/tcpdump/atm.h head/contrib/tcpdump/atmuni31.h head/contrib/tcpdump/bootp.h head/contrib/tcpdump/bpf_dump.c head/contrib/tcpdump/chdlc.h head/contrib/tcpdump/checksum.c head/contrib/tcpdump/config.guess head/contrib/tcpdump/config.h.in head/contrib/tcpdump/config.sub head/contrib/tcpdump/configure head/contrib/tcpdump/configure.in head/contrib/tcpdump/cpack.c head/contrib/tcpdump/cpack.h head/contrib/tcpdump/ether.h head/contrib/tcpdump/ethertype.h head/contrib/tcpdump/extract.h head/contrib/tcpdump/gmpls.c head/contrib/tcpdump/gmpls.h head/contrib/tcpdump/gmt2local.c head/contrib/tcpdump/gmt2local.h head/contrib/tcpdump/in_cksum.c head/contrib/tcpdump/install-sh head/contrib/tcpdump/interface.h head/contrib/tcpdump/ip.h head/contrib/tcpdump/ip6.h head/contrib/tcpdump/ipproto.c head/contrib/tcpdump/ipproto.h head/contrib/tcpdump/l2vpn.c head/contrib/tcpdump/l2vpn.h head/contrib/tcpdump/lbl/os-osf4.h head/contrib/tcpdump/lbl/os-solaris2.h head/contrib/tcpdump/lbl/os-sunos4.h head/contrib/tcpdump/lbl/os-ultrix4.h head/contrib/tcpdump/llc.h head/contrib/tcpdump/machdep.c head/contrib/tcpdump/machdep.h head/contrib/tcpdump/makemib head/contrib/tcpdump/missing/addrinfo.h head/contrib/tcpdump/missing/datalinks.c head/contrib/tcpdump/missing/dlnames.c head/contrib/tcpdump/missing/getnameinfo.c head/contrib/tcpdump/missing/inet_aton.c head/contrib/tcpdump/missing/inet_ntop.c head/contrib/tcpdump/missing/inet_pton.c head/contrib/tcpdump/missing/snprintf.c head/contrib/tcpdump/missing/strdup.c head/contrib/tcpdump/missing/strlcat.c head/contrib/tcpdump/missing/strlcpy.c head/contrib/tcpdump/missing/strsep.c head/contrib/tcpdump/mkdep head/contrib/tcpdump/mpls.h head/contrib/tcpdump/nameser.h head/contrib/tcpdump/netdissect.h head/contrib/tcpdump/nfs.h head/contrib/tcpdump/nfsfh.h head/contrib/tcpdump/nlpid.c head/contrib/tcpdump/nlpid.h head/contrib/tcpdump/ospf.h head/contrib/tcpdump/oui.c head/contrib/tcpdump/oui.h head/contrib/tcpdump/parsenfsfh.c head/contrib/tcpdump/pcap-missing.h head/contrib/tcpdump/pcap_dump_ftell.c head/contrib/tcpdump/ppp.h head/contrib/tcpdump/print-802_11.c head/contrib/tcpdump/print-802_15_4.c head/contrib/tcpdump/print-ah.c head/contrib/tcpdump/print-aodv.c head/contrib/tcpdump/print-ap1394.c head/contrib/tcpdump/print-arcnet.c head/contrib/tcpdump/print-arp.c head/contrib/tcpdump/print-ascii.c head/contrib/tcpdump/print-atalk.c head/contrib/tcpdump/print-atm.c head/contrib/tcpdump/print-babel.c head/contrib/tcpdump/print-beep.c head/contrib/tcpdump/print-bfd.c head/contrib/tcpdump/print-bgp.c head/contrib/tcpdump/print-bootp.c head/contrib/tcpdump/print-bt.c head/contrib/tcpdump/print-carp.c head/contrib/tcpdump/print-cdp.c head/contrib/tcpdump/print-cfm.c head/contrib/tcpdump/print-chdlc.c head/contrib/tcpdump/print-cip.c head/contrib/tcpdump/print-cnfp.c head/contrib/tcpdump/print-dccp.c head/contrib/tcpdump/print-decnet.c head/contrib/tcpdump/print-dhcp6.c head/contrib/tcpdump/print-domain.c head/contrib/tcpdump/print-dtp.c head/contrib/tcpdump/print-dvmrp.c head/contrib/tcpdump/print-eap.c head/contrib/tcpdump/print-egp.c head/contrib/tcpdump/print-eigrp.c head/contrib/tcpdump/print-enc.c head/contrib/tcpdump/print-esp.c head/contrib/tcpdump/print-ether.c head/contrib/tcpdump/print-fddi.c head/contrib/tcpdump/print-forces.c head/contrib/tcpdump/print-fr.c head/contrib/tcpdump/print-frag6.c head/contrib/tcpdump/print-gre.c head/contrib/tcpdump/print-hsrp.c head/contrib/tcpdump/print-icmp.c head/contrib/tcpdump/print-icmp6.c head/contrib/tcpdump/print-igmp.c head/contrib/tcpdump/print-igrp.c head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-ip6.c head/contrib/tcpdump/print-ip6opts.c head/contrib/tcpdump/print-ipcomp.c head/contrib/tcpdump/print-ipfc.c head/contrib/tcpdump/print-ipnet.c head/contrib/tcpdump/print-ipx.c head/contrib/tcpdump/print-isakmp.c head/contrib/tcpdump/print-isoclns.c head/contrib/tcpdump/print-juniper.c head/contrib/tcpdump/print-krb.c head/contrib/tcpdump/print-l2tp.c head/contrib/tcpdump/print-lane.c head/contrib/tcpdump/print-ldp.c head/contrib/tcpdump/print-llc.c head/contrib/tcpdump/print-lldp.c head/contrib/tcpdump/print-lmp.c head/contrib/tcpdump/print-lspping.c head/contrib/tcpdump/print-lwapp.c head/contrib/tcpdump/print-lwres.c head/contrib/tcpdump/print-mobile.c head/contrib/tcpdump/print-mobility.c head/contrib/tcpdump/print-mpcp.c head/contrib/tcpdump/print-mpls.c head/contrib/tcpdump/print-msdp.c head/contrib/tcpdump/print-msnlb.c head/contrib/tcpdump/print-nfs.c head/contrib/tcpdump/print-ntp.c head/contrib/tcpdump/print-null.c head/contrib/tcpdump/print-olsr.c head/contrib/tcpdump/print-ospf.c head/contrib/tcpdump/print-ospf6.c head/contrib/tcpdump/print-otv.c head/contrib/tcpdump/print-pflog.c head/contrib/tcpdump/print-pfsync.c head/contrib/tcpdump/print-pgm.c head/contrib/tcpdump/print-pim.c head/contrib/tcpdump/print-ppi.c head/contrib/tcpdump/print-ppp.c head/contrib/tcpdump/print-pppoe.c head/contrib/tcpdump/print-pptp.c head/contrib/tcpdump/print-radius.c head/contrib/tcpdump/print-raw.c head/contrib/tcpdump/print-rip.c head/contrib/tcpdump/print-ripng.c head/contrib/tcpdump/print-rpki-rtr.c head/contrib/tcpdump/print-rrcp.c head/contrib/tcpdump/print-rsvp.c head/contrib/tcpdump/print-rt6.c head/contrib/tcpdump/print-rx.c head/contrib/tcpdump/print-sctp.c head/contrib/tcpdump/print-sflow.c head/contrib/tcpdump/print-sip.c head/contrib/tcpdump/print-sl.c head/contrib/tcpdump/print-sll.c head/contrib/tcpdump/print-slow.c head/contrib/tcpdump/print-smb.c head/contrib/tcpdump/print-snmp.c head/contrib/tcpdump/print-stp.c head/contrib/tcpdump/print-sunatm.c head/contrib/tcpdump/print-sunrpc.c head/contrib/tcpdump/print-symantec.c head/contrib/tcpdump/print-syslog.c head/contrib/tcpdump/print-tcp.c head/contrib/tcpdump/print-telnet.c head/contrib/tcpdump/print-tftp.c head/contrib/tcpdump/print-timed.c head/contrib/tcpdump/print-tipc.c head/contrib/tcpdump/print-token.c head/contrib/tcpdump/print-udld.c head/contrib/tcpdump/print-udp.c head/contrib/tcpdump/print-usb.c head/contrib/tcpdump/print-vjc.c head/contrib/tcpdump/print-vqp.c head/contrib/tcpdump/print-vrrp.c head/contrib/tcpdump/print-vtp.c head/contrib/tcpdump/print-vxlan.c head/contrib/tcpdump/print-wb.c head/contrib/tcpdump/print-zephyr.c head/contrib/tcpdump/print-zeromq.c head/contrib/tcpdump/rpc_auth.h head/contrib/tcpdump/rpc_msg.h head/contrib/tcpdump/setsignal.c head/contrib/tcpdump/setsignal.h head/contrib/tcpdump/signature.c head/contrib/tcpdump/signature.h head/contrib/tcpdump/slcompress.h head/contrib/tcpdump/smb.h head/contrib/tcpdump/smbutil.c head/contrib/tcpdump/strcasecmp.c head/contrib/tcpdump/tcp.h head/contrib/tcpdump/tcpdump-stdinc.h head/contrib/tcpdump/tcpdump.1.in head/contrib/tcpdump/tcpdump.c head/contrib/tcpdump/udp.h head/contrib/tcpdump/util.c head/contrib/tcpdump/vfprintf.c head/usr.sbin/tcpdump/tcpdump/Makefile head/usr.sbin/tcpdump/tcpdump/config.h head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/CHANGES ============================================================================== --- head/contrib/tcpdump/CHANGES Wed Jan 7 19:38:52 2015 (r276787) +++ head/contrib/tcpdump/CHANGES Wed Jan 7 19:55:18 2015 (r276788) @@ -1,4 +1,61 @@ -Thursday February 19, 2013 guy@alum.mit.edu. +Tuesday Sep. 2, 2014 mcr@sandelman.ca + fix out-of-source-tree builds: find libpcap that is out of source + better configure check for libsmi + +Saturday Jul. 19, 2014 mcr@sandelman.ca + Summary for 4.6.1 tcpdump release + added FreeBSD capsicum + add a short option '#', same as long option '--number' + +Wednesday Jul. 2, 2014 mcr@sandelman.ca + Summary for 4.6.0 tcpdump release + all of tcpdump is now using the new "NDO" code base (Thanks Denis!) + nflog, mobile, forces, pptp, AODV, AHCP, IPv6, OSPFv4, RPL, DHCPv6 enhancements/fixes + M3UA decode added. + many new test cases: 82 in 4.5.1 to 133 in 4.6.0 + many improvements to travis continuous integration system: OSX, and Coverity options + cleaned up some unnecessary header files + Added bittok2str(). + a number of unaligned access faults fixed + -A flag does not consider CR to be printable anymore + fx.lebail took over coverity baby sitting + default snapshot size increased to 256K for accomodate USB captures + WARNING: this release contains a lot of very worthwhile code churn. + +Wednesday Jan. 15, 2014 guy@alum.mit.edu + Summary for 4.5.2 tcpdump release + Man page fix + Fix crashes on SPARC + +Monday Nov. 11, 2013 mcr@sandelman.ca + Summary for 4.5.1 tcpdump release + CREDITS file fixes + +Thursday Nov. 7, 2013 mcr@sandelman.ca and guy@alum.mit.edu. + Summary for 4.5.0 tcpdump release + some NFSv4 fixes for printing + fix printing of unknown TCP options, and tcp fast-open + fixes for syslog parser + some gcc-version-specific flag tuning + adopt MacOS deprecation workarounds for openssl + improvements to babel printing + add OpenFlow 1.0 (no SSL) and test cases + GeoNet printer. + added STBC Rx support + improvements to DHCPv6 decoder + clarify which autoconf is needed + Point users to the the-tcpdump-group repository on GitHub rather + than the mcr repository + Add MSDP printer. + Fixed IPv6 check on Solaris and other OSes requiring extra + networking libraries. + Add support for VXLAN (draft-mahalingam-dutt-dcops-vxlan-03), + and add "vxlan" as an option for -T. + Add support for OTV (draft-hasmit-otv-04). + fixes for DLT_IEEE802_11_RADIO datalink types + added MPTCP decoder + +Saturday April 6, 2013 guy@alum.mit.edu. Summary for 4.4.0 tcpdump release RPKI-RTR (RFC6810) is now official (TCP Port 323) Fix detection of OpenSSL libcrypto. @@ -16,6 +73,8 @@ Thursday February 19, 2013 guy@alum.mit On Linux systems with cap-ng.h, drop root privileges using Linux Capabilities. Add support for reading multiple files. + Add MS NLB heartbeat printer. + Separate multiple nexthops in BGP. Wednesday November 28, 2012 guy@alum.mit.edu. Summary for 4.3.1 tcpdump release @@ -32,7 +91,7 @@ Wednesday November 28, 2012 guy@alum.mi Use the right maximum path length Don't treat 192_1_2, when passed to -i, as an interface number -Friday April 3, 2011. mcr@sandelman.ca. +Friday April 3, 2012. mcr@sandelman.ca. Summary for 4.3.0 tcpdump release fixes for forces: SPARSE data (per RFC 5810) some more test cases added @@ -113,7 +172,7 @@ Thu. April 1, 2010. guy@alum.mit.edu. Summary for 4.1.1 tcpdump release Fix build on systems with PF, such as FreeBSD and OpenBSD. Don't blow up if a zero-length link-layer address is passed to - linkaddr_string(). + linkaddr_string(). Thu. March 11, 2010. ken@netfunctional.ca/guy@alum.mit.edu. Summary for 4.1.0 tcpdump release @@ -142,7 +201,7 @@ Thu. March 11, 2010. ken@netfunctional. Add printer for ForCES Handle frames with an FCS Handle 802.11n Control Wrapper, Block Acq Req and Block Ack frames - Fix TCP sequence number printing + Fix TCP sequence number printing Report 802.2 packets as 802.2 instead of 802.3 Don't include -L/usr/lib in LDFLAGS On x86_64 Linux, look in lib64 directory too @@ -178,13 +237,13 @@ Mon. September 10, 2007. ken@xeleran Converted print-isakmp.c to NETDISSECT Moved AF specific stuff into af.h Test subsystem now table driven, and saves outputs and diffs to one place - Require for pf definitions - allows reading of pflog formatted + Require for pf definitions - allows reading of pflog formatted libpcap files on an OS other than where the file was generated Wed. July 23, 2007. mcr@xelerance.com. Summary for 3.9.7 libpcap release - NFS: Print unsigned values as such. + NFS: Print unsigned values as such. RX: parse safely. BGP: fixes for IPv6-less builds. 801.1ag: use standard codepoint. @@ -194,7 +253,7 @@ Wed. July 23, 2007. mcr@xelerance.com. smb: squelch an uninitialized complaint from coverity. NFS: from NetBSD; don't interpret the reply as a possible NFS reply if it got MSG_DENIED. - BGP: don't print TLV values that didn't fit, from www.digit-labs.org. + BGP: don't print TLV values that didn't fit, from www.digit-labs.org. revised INSTALL.txt about libpcap dependancy. Wed. April 25, 2007. ken@xelerance.com. Summary for 3.9.6 tcpdump release @@ -212,11 +271,11 @@ Wed. April 25, 2007. ken@xelerance.com. Add support for 802.3ah loopback ctrl msg Add support for Multiple-STP as per 802.1s Add support for rapid-SPT as per 802.1w - Add support for CFM Link-trace msg, Link-trace-Reply msg, + Add support for CFM Link-trace msg, Link-trace-Reply msg, Sender-ID tlv, private tlv, port, interface status Add support for unidirectional link detection as per http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt - Add support for the olsr protocol as per RFC 3626 plus the LQ + Add support for the olsr protocol as per RFC 3626 plus the LQ extensions from olsr.org Add support for variable-length checksum in DCCP, as per section 9 of RFC 4340. @@ -228,7 +287,7 @@ Wed. April 25, 2007. ken@xelerance.com. Tue. September 19, 2006. ken@xelerance.com. Summary for 3.9.5 tcpdump release - + Fix compiling on AIX (, at end of ENUM) Updated list of DNS RR typecodes Use local Ethernet defs on WIN32 @@ -243,7 +302,7 @@ Tue. September 19, 2006. ken@xelerance.c Add support for BGP signaled VPLS Cleanup the bootp printer Add support for PPP over Frame-Relay - Add some bounds checking to the IP options code, and clean up + Add some bounds checking to the IP options code, and clean up the options output a bit. Add additional modp groups to ISAKMP printer Add support for Address-Withdraw and Label-Withdraw Msgs Modified: head/contrib/tcpdump/CREDITS ============================================================================== --- head/contrib/tcpdump/CREDITS Wed Jan 7 19:38:52 2015 (r276787) +++ head/contrib/tcpdump/CREDITS Wed Jan 7 19:55:18 2015 (r276788) @@ -2,18 +2,20 @@ This file lists people who have contribu The current maintainers: Bill Fenner - David Young + Denis Ovsienko Fulvio Risso Guy Harris Hannes Gredler Michael Richardson + Francois-Xavier Le Bail Additional people who have contributed patches: - A Costa Aaron Campbell - Alfredo Andres + A Costa Albert Chin + Alexandra Kossovsky + Alfredo Andres Ananth Suryanarayana Andrea Bittau Andrew Brown @@ -26,17 +28,19 @@ Additional people who have contributed p Arkadiusz Miskiewicz Armando L. Caro Jr. Arnaldo Carvalho de Melo - Ben Byer Atsushi Onoe + Baptiste Jonglez + Ben Byer Ben Smithurst Bert Vermeulen Bjoern A. Zeeb + Bram Brent L. Bates Brian Ginsbach Bruce M. Simpson Carles Kishimoto Bisbe - Charlie Lenahan Charles M. Hannum + Charlie Lenahan Chris Cogdon Chris G. Demetriou Chris Jepeway @@ -52,7 +56,7 @@ Additional people who have contributed p David Horn David Smith David Young - Denis Ovsienko + Dmitrij Tejblum Dmitry Eremin-Solenikov Don Ebright Eddie Kohler @@ -60,22 +64,24 @@ Additional people who have contributed p Fang Wang Florent Drouin Florian Forster - Francis Dupont + fra + Francesco Fondelli Francisco Matias Cuenca-Acuna - Francois-Xavier Le Bail + Francis Dupont Frank Volf Fulvio Risso George Bakos Gerald Combs Gerrit Renker Gert Doering + Gilbert Ramirez Jr. + Gisle Vanem Greg Minshall + Grégoire Henry + Gregory Detal Greg Stark - Grégoire Henry - Gilbert Ramirez Jr. - Gisle Vanem - Hannes Viertel Hank Leininger + Hannes Viertel Harry Raaymakers Heinz-Ado Arnolds Hendrik Scholz @@ -90,34 +96,37 @@ Additional people who have contributed p Jeffrey Hutzelman Jesper Peterson Jim Hutchins - Jonathan Heusser - Tatuya Jinmei João Medeiros - Joerg Mayer - Jørgen Thomsen + Joerg Mayer + Jonathan Heusser + Jorge Boncompte [DTI2] + Jørgen Thomsen Julian Cowley - Juliusz Chroboczek + Juliusz Chroboczek Kaarthik Sivakumar Kaladhar Musunuru Karl Norby Kazushi Sugyo Kelly Carmichael Ken Hornstein - Kevin Steves Kenichi Maehashi + Kevin Steves Klaus Klein Kris Kennaway Krzysztof Halasa Larry Lile Lennert Buytenhek + Loganaden Velvindron + Longinus00 Loris Degioanni Love Hörnquist-Ã…strand Lucas C. Villa Real Luis MartinGarcia Maciej W. Rozycki Manu Pathak - Marc Binderberger + Marc Abramowitz Marc A. Lehmann + Marc Binderberger Mark Ellzey Thomas Marko Kiiskila Markus Schöpflin @@ -136,14 +145,16 @@ Additional people who have contributed p Minto Jeyananth Monroe Williams Motonori Shindo - Nathan J. Williams Nathaniel Couper-Noles + Nathan J. Williams Neil T. Spring - Niels Provos Nickolai Zeldovich Nicolas Ferrero + Niels Provos Noritoshi Demizu Olaf Kirch + Ola Martin Lykkja + Oleksij Rempel Onno van der Linden Paolo Abeni Pascal Hennequin @@ -153,11 +164,12 @@ Additional people who have contributed p Paul S. Traina Pavlin Radoslavov Pawel Worach - Pekka Savola + Pekka Savola + Petar Alilovic Peter Fales Peter Jeremy - Peter Volkov + Phil Wood Rafal Maszkowski Randy Sofia @@ -169,9 +181,10 @@ Additional people who have contributed p Robert Edmonds Roderick Schertler Romain Francoise + Ruben Kerkhof Sagun Shakya Sami Farin - Scott Mcmillan + Scott Mcmillan Scott Rose Sebastian Krahmer Sebastien Raveau @@ -181,20 +194,27 @@ Additional people who have contributed p Shinsuke Suzuki Simon Ruderich Steinar Haug + Stephane Bortzmeyer Swaminathan Chandrasekaran + Swaathi Vetrivel Takashi Yamamoto + Tatuya Jinmei Terry Kennedy + Thomas Jacob Timo Koskiahde Tony Li Toshihiro Kanda + Udayakumar Uns Lider Victor Oppleman + Vyacheslav Trushkin Weesan Lee Wesley Griffin Wesley Shields Wilbert de Graaf Will Drewry William J. Hulley + Wim Torfs Yen Yen Lim Yoshifumi Nishida @@ -204,4 +224,4 @@ The original LBL crew: Van Jacobson Past maintainers: - Jun-ichiro itojun Hagino + Jun-ichiro itojun Hagino Also see: http://www.wide.ad.jp/itojun-award/ Modified: head/contrib/tcpdump/INSTALL.txt ============================================================================== --- head/contrib/tcpdump/INSTALL.txt Wed Jan 7 19:38:52 2015 (r276787) +++ head/contrib/tcpdump/INSTALL.txt Wed Jan 7 19:55:18 2015 (r276788) @@ -1,5 +1,3 @@ -@(#) $Header: /tcpdump/master/tcpdump/INSTALL.txt,v 1.2 2008-02-06 10:47:53 guy Exp $ (LBL) - If you have not built libpcap, and your system does not have libpcap installed, install libpcap first. Your system might provide a version of libpcap that can be installed; if so, to compile tcpdump you might @@ -9,9 +7,7 @@ libpcap; see the README file in this dir You will need an ANSI C compiler to build tcpdump. The configure script will abort if your compiler is not ANSI compliant. If this happens, use -the GNU C compiler, available via anonymous ftp: - - ftp://ftp.gnu.org/pub/gnu/gcc/ +the generally available GNU C compiler (GCC). After libpcap has been built (either install it with "make install" or make sure both the libpcap and tcpdump source trees are in the same @@ -42,25 +38,20 @@ FILES ----- CHANGES - description of differences between releases CREDITS - people that have helped tcpdump along -FILES - list of files exported as part of the distribution INSTALL.txt - this file LICENSE - the license under which tcpdump is distributed Makefile.in - compilation rules (input to the configure script) README - description of distribution Readme.Win32 - notes on building tcpdump on Win32 systems (with WinPcap) VERSION - version of this release -acconfig.h - autoconf input aclocal.m4 - autoconf macros addrtoname.c - address to hostname routines addrtoname.h - address to hostname definitions ah.h - IPSEC Authentication Header definitions -aodv.h - AODV definitions appletalk.h - AppleTalk definitions -arcnet.h - ARCNET definitions atime.awk - TCP ack awk script atm.h - ATM traffic type definitions atmuni31.h - ATM Q.2931 definitions -bgp.h - BGP declarations bootp.h - BOOTP definitions bpf_dump.c - BPF program printing routines, in case libpcap doesn't have them @@ -72,37 +63,21 @@ config.h.in - autoconf input config.sub - autoconf support configure - configure script (run this first) configure.in - configure script source -dccp.h - DCCP definitions -decnet.h - DECnet definitions -decode_prefix.h - Declarations of "decode_prefix{4,6}()" -enc.h - OpenBSD IPsec encapsulation BPF layer definitions -esp.h - IPSEC Encapsulating Security Payload definitions ether.h - Ethernet definitions ethertype.h - Ethernet type value definitions extract.h - alignment definitions -fddi.h - Fiber Distributed Data Interface definitions gmpls.c - GMPLS definitions gmpls.h - GMPLS declarations gmt2local.c - time conversion routines gmt2local.h - time conversion prototypes -icmp6.h - ICMPv6 definitiions -ieee802_11.h - IEEE 802.11 definitions -ieee802_11_radio.h - radiotap header definitions -igrp.h - Interior Gateway Routing Protocol definitions install-sh - BSD style install script interface.h - globals, prototypes and definitions ip.h - IP definitions ip6.h - IPv6 definitions -ipfc.h - IP-over-Fibre Channel definitions ipproto.c - IP protocol type value-to-name table ipproto.h - IP protocol type value definitions -ipsec_doi.h - ISAKMP packet definitions - RFC2407 -ipx.h - IPX definitions -isakmp.h - ISAKMP packet definitions - RFC2408 l2vpn.c - L2VPN encapsulation value-to-name table l2vpn.h - L2VPN encapsulation definitions -l2tp.h - Layer Two Tunneling Protocol definitions -lane.h - ATM LANE definitions lbl/os-*.h - OS-dependent defines and prototypes llc.h - LLC definitions machdep.c - machine dependent routines @@ -113,23 +88,18 @@ missing/* - replacements for missing lib mkdep - construct Makefile dependency list mpls.h - MPLS definitions nameser.h - DNS definitions -netbios.h - NETBIOS definitions netdissect.h - definitions and declarations for tcpdump-as-library (under development) nfs.h - Network File System V2 definitions nfsfh.h - Network File System file handle definitions nlpid.c - OSI NLPID value-to-name table nlpid.h - OSI NLPID definitions -ntp.h - Network Time Protocol definitions -oakley.h - ISAKMP packet definitions - RFC2409 ospf.h - Open Shortest Path First definitions -ospf6.h - IPv6 Open Shortest Path First definitions packetdat.awk - TCP chunk summary awk script parsenfsfh.c - Network File System file parser routines pcap_dump_ftell.c - pcap_dump_ftell() implementation, in case libpcap doesn't have it pcap-missing.h - declarations of functions possibly missing from libpcap -pmap_prot.h - definitions for ONC RPC portmapper protocol ppp.h - Point to Point Protocol definitions print-802_11.c - IEEE 802.11 printer routines print-ap1394.c - Apple IP-over-IEEE 1394 printer routines @@ -184,7 +154,6 @@ print-mobile.c - IPv4 mobility printer r print-mobility.c - IPv6 mobility printer routines print-mpls.c - Multi-Protocol Label Switching printer routines print-msdp.c - Multicast Source Discovery Protocol printer routines -print-netbios.c - NetBIOS frame protocol printer routines print-nfs.c - Network File System printer routines print-ntp.c - Network Time Protocol printer routines print-null.c - BSD loopback device printer routines @@ -226,18 +195,12 @@ print-vjc.c - PPP Van Jacobson compressi print-vrrp.c - Virtual Router Redundancy Protocol print-wb.c - White Board printer routines print-zephyr.c - Zephyr printer routines -route6d.h - packet definition for IPv6 Routing Information Protocol rpc_auth.h - definitions for ONC RPC authentication rpc_msg.h - definitions for ONC RPC messages -rx.h - AFS RX definitions -sctpConstants.h - Stream Control Transmission Protocol constant definitions -sctpHeader.h - Stream Control Transmission Protocol packet definitions send-ack.awk - unidirectional tcp send/ack awk script setsignal.c - OS-independent signal routines setsignal.h - OS-independent signal prototypes slcompress.h - SLIP/PPP Van Jacobson compression (RFC1144) definitions -slip.h - SLIP definitions -sll.h - Linux "cooked" capture definitions smb.h - SMB/CIFS definitions smbutil.c - SMB/CIFS utility routines stime.awk - TCP send awk script @@ -245,10 +208,6 @@ strcasecmp.c - missing routine tcp.h - TCP definitions tcpdump.1 - manual entry tcpdump.c - main program -telnet.h - Telnet definitions -tftp.h - TFTP definitions -timed.h - BSD time daemon protocol definitions -token.h - Token Ring definitions udp.h - UDP definitions util.c - utility routines vfprintf.c - emulation routine Modified: head/contrib/tcpdump/Makefile-devel-adds ============================================================================== --- head/contrib/tcpdump/Makefile-devel-adds Wed Jan 7 19:38:52 2015 (r276787) +++ head/contrib/tcpdump/Makefile-devel-adds Wed Jan 7 19:55:18 2015 (r276788) @@ -2,12 +2,12 @@ # Auto-regenerate configure script or Makefile when things change. # From autoconf.info . Works best with GNU Make. # -${srcdir}/configure: configure.in +${srcdir}/configure: configure.in aclocal.m4 cd ${srcdir} && autoconf # autoheader might not change config.h.in, so touch a stamp file. ${srcdir}/config.h.in: ${srcdir}/stamp-h.in -${srcdir}/stamp-h.in: configure.in acconfig.h +${srcdir}/stamp-h.in: configure.in aclocal.m4 cd ${srcdir} && autoheader echo timestamp > ${srcdir}/stamp-h.in Modified: head/contrib/tcpdump/Makefile.in ============================================================================== --- head/contrib/tcpdump/Makefile.in Wed Jan 7 19:38:52 2015 (r276787) +++ head/contrib/tcpdump/Makefile.in Wed Jan 7 19:55:18 2015 (r276788) @@ -16,8 +16,6 @@ # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -# -# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.325 2008-11-21 23:17:26 guy Exp $ (LBL) # # Various configurable paths (remember to edit Makefile.in, not Makefile) @@ -41,6 +39,8 @@ VPATH = @srcdir@ # CC = @CC@ +AR = @AR@ +MKDEP = @MKDEP@ PROG = tcpdump CCOPT = @V_CCOPT@ INCLS = -I. @V_INCLS@ @@ -61,6 +61,8 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ RANLIB = @RANLIB@ +DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ + # Explicitly define compilation rule since SunOS 4's make doesn't like gcc. # Also, gcc does not remove the .o before forking 'as', which can be a # problem if you don't own the file but can write to the directory. @@ -68,126 +70,205 @@ RANLIB = @RANLIB@ @rm -f $@ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \ - nlpid.c l2vpn.c machdep.c parsenfsfh.c in_cksum.c \ - print-802_11.c print-802_15_4.c print-ap1394.c print-ah.c \ - print-arcnet.c print-aodv.c print-arp.c print-ascii.c print-atalk.c \ - print-atm.c print-beep.c print-bfd.c print-bgp.c \ - print-bootp.c print-bt.c print-carp.c print-cdp.c print-cfm.c \ - print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \ - print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ - print-eap.c print-eigrp.c\ - print-esp.c print-ether.c print-fddi.c print-forces.c print-fr.c \ - print-gre.c print-hsrp.c print-icmp.c print-igmp.c \ - print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \ - print-ipx.c print-isoclns.c print-juniper.c print-krb.c \ - print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \ - print-lmp.c print-lspping.c print-lwapp.c \ - print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \ - print-msnlb.c print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \ - print-pgm.c print-pim.c \ - print-ppi.c print-ppp.c print-pppoe.c print-pptp.c \ - print-radius.c print-raw.c print-rip.c print-rpki-rtr.c print-rrcp.c print-rsvp.c \ - print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \ - print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ - print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ - print-timed.c print-tipc.c print-token.c print-udld.c print-udp.c \ - print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \ - print-wb.c print-zephyr.c print-zeromq.c print-vxlan.c print-otv.c signature.c setsignal.c tcpdump.c util.c +CSRC = setsignal.c tcpdump.c -LIBNETDISSECT_SRC=print-isakmp.c -LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) -LIBNETDISSECT=libnetdissect.a +LIBNETDISSECT_SRC=\ + addrtoname.c \ + af.c \ + checksum.c \ + cpack.c \ + gmpls.c \ + gmt2local.c \ + in_cksum.c \ + ipproto.c \ + l2vpn.c \ + machdep.c \ + nlpid.c \ + oui.c \ + parsenfsfh.c \ + print-802_11.c \ + print-802_15_4.c \ + print-ah.c \ + print-ahcp.c \ + print-aodv.c \ + print-aoe.c \ + print-ap1394.c \ + print-arcnet.c \ + print-arp.c \ + print-ascii.c \ + print-atalk.c \ + print-atm.c \ + print-beep.c \ + print-bfd.c \ + print-bgp.c \ + print-bootp.c \ + print-bt.c \ + print-calm-fast.c \ + print-carp.c \ + print-cdp.c \ + print-cfm.c \ + print-chdlc.c \ + print-cip.c \ + print-cnfp.c \ + print-dccp.c \ + print-decnet.c \ + print-domain.c \ + print-dtp.c \ + print-dvmrp.c \ + print-eap.c \ + print-egp.c \ + print-eigrp.c \ + print-enc.c \ + print-esp.c \ + print-ether.c \ + print-fddi.c \ + print-forces.c \ + print-fr.c \ + print-geonet.c \ + print-gre.c \ + print-hsrp.c \ + print-icmp.c \ + print-igmp.c \ + print-igrp.c \ + print-ip.c \ + print-ipcomp.c \ + print-ipfc.c \ + print-ipnet.c \ + print-ipx.c \ + print-isakmp.c \ + print-isoclns.c \ + print-juniper.c \ + print-krb.c \ + print-l2tp.c \ + print-lane.c \ + print-ldp.c \ + print-llc.c \ + print-lldp.c \ + print-lmp.c \ + print-loopback.c \ + print-lspping.c \ + print-lwapp.c \ + print-lwres.c \ + print-m3ua.c \ + print-mobile.c \ + print-mpcp.c \ + print-mpls.c \ + print-mptcp.c \ + print-msdp.c \ + print-msnlb.c \ + print-nflog.c \ + print-nfs.c \ + print-ntp.c \ + print-null.c \ + print-olsr.c \ + print-openflow-1.0.c \ + print-openflow.c \ + print-ospf.c \ + print-otv.c \ + print-pgm.c \ + print-pim.c \ + print-pktap.c \ + print-ppi.c \ + print-ppp.c \ + print-pppoe.c \ + print-pptp.c \ + print-radius.c \ + print-raw.c \ + print-rip.c \ + print-rpki-rtr.c \ + print-rrcp.c \ + print-rsvp.c \ + print-rx.c \ + print-sctp.c \ + print-sflow.c \ + print-sip.c \ + print-sl.c \ + print-sll.c \ + print-slow.c \ + print-snmp.c \ + print-stp.c \ + print-sunatm.c \ + print-sunrpc.c \ + print-symantec.c \ + print-syslog.c \ + print-tcp.c \ + print-telnet.c \ + print-tftp.c \ + print-timed.c \ + print-tipc.c \ + print-token.c \ + print-udld.c \ + print-udp.c \ + print-usb.c \ + print-vjc.c \ + print-vqp.c \ + print-vrrp.c \ + print-vtp.c \ + print-vxlan.c \ + print-wb.c \ + print-zephyr.c \ + print-zeromq.c \ + signature.c \ + util.c LOCALSRC = @LOCALSRC@ GENSRC = version.c LIBOBJS = @LIBOBJS@ +LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o) ${LOCALSRC:.c=.o} ${LIBOBJS} +LIBNETDISSECT=libnetdissect.a + + SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC) # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot # hack the extra indirection -OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS) $(LIBNETDISSECT_OBJ) +OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LIBNETDISSECT_OBJ) HDR = \ - acconfig.h \ addrtoname.h \ af.h \ ah.h \ - aodv.h \ appletalk.h \ - arcnet.h \ atm.h \ atmuni31.h \ bootp.h \ - bgp.h \ chdlc.h \ cpack.h \ - dccp.h \ - decnet.h \ - decode_prefix.h \ - enc.h \ - esp.h \ ether.h \ ethertype.h \ extract.h \ - fddi.h \ - forces.h \ + getopt_long.h \ gmpls.h \ gmt2local.h \ - icmp6.h \ - ieee802_11.h \ - ieee802_11_radio.h \ - igrp.h \ interface.h \ interface.h \ ip.h \ ip6.h \ - ipfc.h \ - ipnet.h \ ipproto.h \ - ipsec_doi.h \ - ipx.h \ - isakmp.h \ - l2tp.h \ l2vpn.h \ - lane.h \ llc.h \ machdep.h \ mib.h \ mpls.h \ nameser.h \ - netbios.h \ netdissect.h \ nfs.h \ nfsfh.h \ nlpid.h \ - ntp.h \ - oakley.h \ + openflow.h \ ospf.h \ - ospf6.h \ oui.h \ pcap-missing.h \ - pmap_prot.h \ - ppi.h \ ppp.h \ - route6d.h \ rpc_auth.h \ rpc_msg.h \ - rx.h \ - sctpConstants.h \ - sctpHeader.h \ + rpl.h \ setsignal.h \ signature.h \ slcompress.h \ - slip.h \ - sll.h \ smb.h \ tcp.h \ tcpdump-stdinc.h \ - telnet.h \ - tftp.h \ - timed.h \ - token.h \ udp.h TAGHDR = \ @@ -212,7 +293,7 @@ EXTRA_DIST = \ LICENSE \ Makefile.in \ Makefile-devel-adds \ - README \ + README.md \ Readme.Win32 \ VERSION \ aclocal.m4 \ @@ -233,11 +314,11 @@ EXTRA_DIST = \ missing/dlnames.c \ missing/datalinks.c \ missing/getnameinfo.c \ + missing/getopt_long.c \ missing/inet_aton.c \ missing/inet_ntop.c \ missing/inet_pton.c \ missing/snprintf.c \ - missing/sockstorage.h \ missing/strdup.c \ missing/strlcat.c \ missing/strlcpy.c \ @@ -252,7 +333,6 @@ EXTRA_DIST = \ print-ip6.c \ print-ip6opts.c \ print-mobility.c \ - print-netbios.c \ print-ospf6.c \ print-pflog.c \ print-ripng.c \ @@ -264,18 +344,14 @@ EXTRA_DIST = \ strcasecmp.c \ tcpdump.1.in \ vfprintf.c \ - win32/Include/bittypes.h \ - win32/Include/errno.h \ - win32/Include/getopt.h \ win32/Include/w32_fzs.h \ - win32/Src/getopt.c \ win32/prj/GNUmakefile \ win32/prj/WinDump.dsp \ win32/prj/WinDump.dsw TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print` -all: $(PROG) +all: $(PROG) $(LIBNETDISSECT) $(PROG): $(OBJ) @V_PCAPDEP@ @rm -f $@ @@ -283,7 +359,7 @@ $(PROG): $(OBJ) @V_PCAPDEP@ $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ) @rm -f $@ - $(AR) $(ARFLAGS) $@ $(LIBNETDISSECT_OBJ) + $(AR) $(ARFLAGS) $@ $(LIBNETDISSECT_OBJ) $(RANLIB) $@ datalinks.o: $(srcdir)/missing/datalinks.c @@ -292,8 +368,8 @@ dlnames.o: $(srcdir)/missing/dlnames.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c getnameinfo.o: $(srcdir)/missing/getnameinfo.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c -getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c - $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c +getopt_long.o: $(srcdir)/missing/getopt_long.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getopt_long.c inet_pton.o: $(srcdir)/missing/inet_pton.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c inet_ntop.o: $(srcdir)/missing/inet_ntop.c @@ -302,6 +378,8 @@ inet_aton.o: $(srcdir)/missing/inet_aton $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c snprintf.o: $(srcdir)/missing/snprintf.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c +strdup.o: $(srcdir)/missing/strdup.c + $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strdup.c strlcat.o: $(srcdir)/missing/strlcat.c $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c strlcpy.o: $(srcdir)/missing/strlcpy.c @@ -345,8 +423,10 @@ clean: distclean: rm -f $(CLEANFILES) Makefile config.cache config.log config.status \ - config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 - rm -rf autom4te.cache + config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1 \ + libnetdissect.a tests/.failed tests/.passed \ + tests/failure-outputs.txt + rm -rf autom4te.cache tests/DIFF tests/NEW check: tcpdump (cd tests && ./TESTrun.sh) @@ -368,4 +448,4 @@ testlist: echo $(TEST_DIST) depend: $(GENSRC) - ${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC) + $(MKDEP) -c $(CC) -m $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC) Copied: head/contrib/tcpdump/README.md (from r276761, vendor/tcpdump/dist/README.md) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/tcpdump/README.md Wed Jan 7 19:55:18 2015 (r276788, copy of r276761, vendor/tcpdump/dist/README.md) @@ -0,0 +1,243 @@ +# tcpdump + +[![Build +Status](https://travis-ci.org/the-tcpdump-group/tcpdump.png)](https://travis-ci.org/the-tcpdump-group/tcpdump) + +TCPDUMP 4.x.y +Now maintained by "The Tcpdump Group" +See www.tcpdump.org + +Please send inquiries/comments/reports to: + +* tcpdump-workers@lists.tcpdump.org + +Anonymous Git is available via: + + git clone git://bpf.tcpdump.org/tcpdump + +Please submit patches by forking the branch on GitHub at: + +* http://github.com/the-tcpdump-group/tcpdump/tree/master + +and issuing a pull request. + +formerly from Lawrence Berkeley National Laboratory + Network Research Group + ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z (3.4) + +This directory contains source code for tcpdump, a tool for network +monitoring and data acquisition. This software was originally +developed by the Network Research Group at the Lawrence Berkeley +National Laboratory. The original distribution is available via +anonymous ftp to `ftp.ee.lbl.gov`, in `tcpdump.tar.Z`. More recent +development is performed at tcpdump.org, http://www.tcpdump.org/ + +Tcpdump uses libpcap, a system-independent interface for user-level +packet capture. Before building tcpdump, you must first retrieve and +build libpcap, also originally from LBL and now being maintained by +tcpdump.org; see http://www.tcpdump.org/ . + +Once libpcap is built (either install it or make sure it's in +`../libpcap`), you can build tcpdump using the procedure in the `INSTALL.txt` +file. + +The program is loosely based on SMI's "etherfind" although none of the +etherfind code remains. It was originally written by Van Jacobson as +part of an ongoing research project to investigate and improve tcp and +internet gateway performance. The parts of the program originally +taken from Sun's etherfind were later re-written by Steven McCanne of +LBL. To insure that there would be no vestige of proprietary code in +tcpdump, Steve wrote these pieces from the specification given by the +manual entry, with no access to the source of tcpdump or etherfind. + +Over the past few years, tcpdump has been steadily improved by the +excellent contributions from the Internet community (just browse +through the `CHANGES` file). We are grateful for all the input. + +Richard Stevens gives an excellent treatment of the Internet protocols +in his book *"TCP/IP Illustrated, Volume 1"*. If you want to learn more +about tcpdump and how to interpret its output, pick up this book. + +Some tools for viewing and analyzing tcpdump trace files are available +from the Internet Traffic Archive: + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 19:55: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 9302DFB1; Wed, 7 Jan 2015 19:55:42 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D257138A; Wed, 7 Jan 2015 19:55:42 +0000 (UTC) Received: from st11p02mm-spool002.mac.com ([17.172.220.247]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NHT00L2ULVMQ520@st11p02mm-asmtp002.mac.com>; Wed, 07 Jan 2015 18:54:58 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-01-07_08:2015-01-07,2015-01-07,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412080000 definitions=main-1501070198 MIME-version: 1.0 Received: from localhost ([17.172.220.163]) by st11p02mm-spool002.mac.com (Oracle Communications Messaging Server 7.0.5.33.0 64bit (built Aug 27 2014)) with ESMTP id <0NHT009E7LVLG560@st11p02mm-spool002.mac.com>; Wed, 07 Jan 2015 18:54:57 +0000 (GMT) To: Hans Petter Selasky From: Rui Paulo Subject: Re: svn commit: r276407 - head/sys/dev/usb/controller Date: Wed, 07 Jan 2015 18:54:57 +0000 (GMT) X-Mailer: iCloud MailClient14H40 MailServer14H18.17359 X-Originating-IP: [12.218.212.178] Message-id: <03ad1e28-01a1-476b-a0cb-fb827f18df81@me.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 19:55:42 -0000 On Dec 30, 2014, at 01:20 AM, Hans Petter Selasky w= rote:=0A=0AAuthor: hselasky=0ADate: Tue Dec 30 09:20:29 2014=0ANew Revisio= n: 276407=0AURL: https://svnweb.freebsd.org/changeset/base/276407=0A=0ALog= :=0AAllow systems having a page size greater than 4K to use fewer=0Ascatte= r-gather XHCI TRB entries for its payload data. The XHCI=0Acontroller can = handle at least 65536 bytes per scatter-gather list=0Aentry.=0A=0AMFC afte= r: =C2=A01 week=0ASuggested by: =C2=A0Kohji Okuno =0A=0AModified:=0Ahead/sys/dev/usb/controller/xhci.h=0A=0AModified: = head/sys/dev/usb/controller/xhci.h=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A--- head/sys/dev/usb/contr= oller/xhci.h =C2=A0Tue Dec 30 08:50:50 2014 =C2=A0 =C2=A0(r276406)=0A+++ h= ead/sys/dev/usb/controller/xhci.h =C2=A0Tue Dec 30 09:20:29 2014 =C2=A0 =C2= =A0(r276407)=0A@@ -320,11 +320,23 @@ struct xhci_dev_endpoint_trbs {=0A=C2= =A0 XHCI_MAX_TRANSFERS) + XHCI_MAX_STREAMS];=0A};=0A=0A-#define =C2=A0 =C2= =A0XHCI_TD_PAGE_NBUF =C2=A0 =C2=A0 =C2=A017 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* = units, room enough for 64Kbytes */=0A-#define =C2=A0 =C2=A0 =C2=A0XHCI_TD_= PAGE_SIZE =C2=A04096 =C2=A0 =C2=A0/* bytes */=0A-#define =C2=A0XHCI_TD_PAY= LOAD_MAX =C2=A0 =C2=A0 =C2=A0(XHCI_TD_PAGE_SIZE * (XHCI_TD_PAGE_NBUF - 1))= =0A+#if (USB_PAGE_SIZE < 4096)=0A+#error "The XHCI driver needs a pagesize= above 4K"=0A+#endif=0A=0AThis error string is misleading: it should read = "page size greater or equal to 4096 bytes".= From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 20:46: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 AD72FBC; Wed, 7 Jan 2015 20:46:37 +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 8C9BA1CF3; Wed, 7 Jan 2015 20:46:35 +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 t07KkWfb093150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 7 Jan 2015 23:46: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 t07KkVtB093149; Wed, 7 Jan 2015 23:46:31 +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, 7 Jan 2015 23:46:31 +0300 From: Gleb Smirnoff To: Craig Rodrigues , Nikos Vassiliadis Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150107204631.GG15484@FreeBSD.org> References: <201501060903.t06934qp081875@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501060903.t06934qp081875@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 20:46:37 -0000 On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: C> Author: rodrigc C> Date: Tue Jan 6 09:03:03 2015 C> New Revision: 276747 C> URL: https://svnweb.freebsd.org/changeset/base/276747 C> C> Log: C> Instead of creating a purge thread for every vnet, create C> a single purge thread and clean up all vnets from this thread. C> C> PR: 194515 C> Differential Revision: D1315 C> Submitted by: Nikos Vassiliadis I am not sure that this is a good idea. The core idea of VNETs is that they are isolated from each other. If we serialize purging, then vnets are strongly affecting each other. AFAIU, from the PR there is some panic fixed. What is the actual bug and why couldn't it be fixed with having per-vnet thread? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 20:48: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 BF147226; Wed, 7 Jan 2015 20:48:58 +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 2AA4B1D21; Wed, 7 Jan 2015 20:48:57 +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 t07Kmrw3093164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 7 Jan 2015 23:48:53 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t07Kmr6k093163; Wed, 7 Jan 2015 23:48:53 +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, 7 Jan 2015 23:48:53 +0300 From: Gleb Smirnoff To: Robert Watson Subject: Re: svn commit: r276750 - in head: share/man/man9 sys/contrib/ipfilter/netinet sys/dev/an sys/dev/bge sys/dev/ce sys/dev/cm sys/dev/cp sys/dev/cs sys/dev/ctau sys/dev/ed sys/dev/ex sys/dev/fe sys/dev/h... Message-ID: <20150107204853.GH15484@FreeBSD.org> References: <201501061259.t06CxcTc096488@svn.freebsd.org> <20150107174430.GQ1949@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, John-Mark Gurney , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 20:48:58 -0000 On Wed, Jan 07, 2015 at 06:16:15PM +0000, Robert Watson wrote: R> On Wed, 7 Jan 2015, John-Mark Gurney wrote: R> R> >> Log: R> >> In order to reduce use of M_EXT outside of the mbuf allocator and R> >> socket-buffer implementations, introduce a return value for MCLGET() R> >> (and m_cljget() that underlies it) to allow the caller to avoid testing R> >> M_EXT itself. Update all callers to use the return value. R> >> R> >> With this change, very few network device drivers remain aware of R> >> M_EXT; the primary exceptions lie in mbuf-chain pretty printers for R> >> debugging, and in a few cases, custom mbuf and cluster allocation R> >> implementations. R> >> R> >> NB: This is a difficult-to-test change as it touches many drivers for R> >> which I don't have physical devices. Instead we've gone for intensive R> >> review, but further post-commit review would definitely be appreciated R> >> to spot errors where changes could not easily be made mechanically, R> >> but were largely mechanical in nature. R> > R> > Shouldn't this come w/ a FreeBSD version bump for drivers to use? R> R> Yes, probably. Old drivers will continue to work fine in not checking the R> return value (for now), but drivers seeing backporting will probably want a R> __FreeBSD_version ifdef. I'll do a commit to bump the version number today. R> R> (In my local tree, M_EXT is renamed _M_EXT unless MBUF_PRIVATE is defined, R> which really is quite a significant KPI change -- I'm not yet sure if I'm R> going to push that into FreeBSD 11 or not.) IMO, you should do the push :) The faster we refactor the mbuf KPI, the better. Better do the surgery in one fast cut rather then do it in an endless serie of small but painful cuts. Note that I'm still hoping of pushing projects/ifnet to 11, which is a much bigger KPI change from drivers. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 20:52: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 D6F0C3D1; Wed, 7 Jan 2015 20:52:05 +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 5ED6C1DF1; Wed, 7 Jan 2015 20:52:05 +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 t07Kq3g4093193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 7 Jan 2015 23:52:03 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t07Kq3TF093192; Wed, 7 Jan 2015 23:52:03 +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, 7 Jan 2015 23:52:03 +0300 From: Gleb Smirnoff To: Luiz Otavio O Souza Subject: Re: svn commit: r276751 - head/sys/netinet Message-ID: <20150107205203.GI15484@FreeBSD.org> References: <201501061307.t06D7E0a001358@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501061307.t06D7E0a001358@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 20:52:06 -0000 On Tue, Jan 06, 2015 at 01:07:14PM +0000, Luiz Otavio O Souza wrote: L> Author: loos L> Date: Tue Jan 6 13:07:13 2015 L> New Revision: 276751 L> URL: https://svnweb.freebsd.org/changeset/base/276751 L> L> Log: L> Remove the check that prevent carp(4) advskew to be set to '0'. L> L> CARP devices are created with advskew set to '0' and once you set it to L> any other value in the valid range (0..254) you can't set it back to zero. L> L> The code in question is also used to prevent that zeroed values overwrite L> the CARP defaults when a new CARP device is created. Since advskew already L> defaults to '0' for newly created devices and the new value is guaranteed L> to be within the valid range, it is safe to overwrite it here. L> L> PR: 194672 L> Reported by: cmb@pfsense.org L> In collaboration with: garga L> Tested by: garga L> MFC after: 2 weeks Please correct me if I am wrong, but after this change any SIOCSVH will reset the advskew to 0. For example, please try to: ifconfig igb0 vhid 1 advskew 100 ifconfig igb0 vhid 1 pass foobar Now let's check the advskew: ifconfig igb0 -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 21:04: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 D3192700; Wed, 7 Jan 2015 21:04:31 +0000 (UTC) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id A9DB11F26; Wed, 7 Jan 2015 21:04:31 +0000 (UTC) Received: from [10.0.1.17] (host86-177-234-167.range86-177.btcentralplus.com [86.177.234.167]) by cyrus.watson.org (Postfix) with ESMTPSA id 4998946B39; Wed, 7 Jan 2015 16:04:30 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276750 - in head: share/man/man9 sys/contrib/ipfilter/netinet sys/dev/an sys/dev/bge sys/dev/ce sys/dev/cm sys/dev/cp sys/dev/cs sys/dev/ctau sys/dev/ed sys/dev/ex sys/dev/fe sys/dev/h... From: "Robert N. M. Watson" In-Reply-To: <20150107204853.GH15484@FreeBSD.org> Date: Wed, 7 Jan 2015 21:04:29 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501061259.t06CxcTc096488@svn.freebsd.org> <20150107174430.GQ1949@funkthat.com> <20150107204853.GH15484@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, John-Mark Gurney , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 21:04:32 -0000 On 7 Jan 2015, at 20:48, Gleb Smirnoff wrote: > R> > Shouldn't this come w/ a FreeBSD version bump for drivers to use? > R>=20 > R> Yes, probably. Old drivers will continue to work fine in not = checking the=20 > R> return value (for now), but drivers seeing backporting will = probably want a=20 > R> __FreeBSD_version ifdef. I'll do a commit to bump the version = number today. > R>=20 > R> (In my local tree, M_EXT is renamed _M_EXT unless MBUF_PRIVATE is = defined,=20 > R> which really is quite a significant KPI change -- I'm not yet sure = if I'm=20 > R> going to push that into FreeBSD 11 or not.) >=20 > IMO, you should do the push :) >=20 > The faster we refactor the mbuf KPI, the better. Better do the surgery = in > one fast cut rather then do it in an endless serie of small but = painful > cuts. >=20 > Note that I'm still hoping of pushing projects/ifnet to 11, which is > a much bigger KPI change from drivers. The problem is really in structuring the changes so that they can be = reviewed: they're very hard to test since they touch dozens (hundreds?) = of drivers making them almost impossible to test effectively. Instead, = I've been breaking them down into a series of less intrusive and easier = to review chunks. The MLEN/MHLEN/MCLBYTES change should go into = phabricator this evening, assuming a bunch of sanity tests run to = completion successfully over the next few hours. These changes are = really all just to facilitate underlying changes to the mbuf allocator = by hiding more of the implementation details from consumers, so I want = to get them done in as expedient a manner as I can -- after all, they = are a bit boring :-). Robert= From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 21:32: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 23D36EE7; Wed, 7 Jan 2015 21:32:24 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB38E2FE; Wed, 7 Jan 2015 21:32:23 +0000 (UTC) Received: from moby.local ([91.89.177.101]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MDQUP-1Y0yva1pEL-00GqJh; Wed, 07 Jan 2015 22:32:15 +0100 Message-ID: <54ADA5D8.8050504@gmx.com> Date: Wed, 07 Jan 2015 22:32:08 +0100 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Gleb Smirnoff , Craig Rodrigues Subject: Re: svn commit: r276747 - head/sys/netpfil/pf References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> In-Reply-To: <20150107204631.GG15484@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:V01vNAw4x6/48xtgagK5vgtDFZfP8867vLFVp+y1oLoKcgdqZKd lqXbuQ03IjWF4GJ8x6zKaxQSULWhYggTxWTj0whdJuljwPlqVQfP8lZPxZHI3xF2CRS2EVE GLaUbof7b0TngHl+kOwCcpM7HLAiUjCt/AvhgCfqkeiPh1ynjeMzIDn/u6jwBDHEC4QsTam IMHC5HHruQlRqA+SgrMTw== X-UI-Out-Filterresults: notjunk:1; Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 21:32:24 -0000 Hi, On 01/07/15 21:46, Gleb Smirnoff wrote: > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: > C> Author: rodrigc > C> Date: Tue Jan 6 09:03:03 2015 > C> New Revision: 276747 > C> URL: https://svnweb.freebsd.org/changeset/base/276747 > C> > C> Log: > C> Instead of creating a purge thread for every vnet, create > C> a single purge thread and clean up all vnets from this thread. > C> > C> PR: 194515 > C> Differential Revision: D1315 > C> Submitted by: Nikos Vassiliadis > > I am not sure that this is a good idea. The core idea of VNETs > is that they are isolated from each other. If we serialize purging, > then vnets are strongly affecting each other. That is true. > AFAIU, from the PR there is some panic fixed. What is the actual bug > and why couldn't it be fixed with having per-vnet thread? I don't remember the exact bug, this was written in summer of 2013, but the code that creates the threads seemed complex. The decision to use one thread was based on the fact that a lot of resources are used when a big number (100 let's say) of vnets is active. Purging already runs 10 times a second. Something between those two is better. Maybe, creating threads up to a certain number and above that map new vnets to existing threads? Nikos From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 21:40: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 D806B416; Wed, 7 Jan 2015 21:40: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 C46A2617; Wed, 7 Jan 2015 21:40: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 t07LeO7n025875; Wed, 7 Jan 2015 21:40:24 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07LeODQ025874; Wed, 7 Jan 2015 21:40:24 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501072140.t07LeODQ025874@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 7 Jan 2015 21:40:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276794 - 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.18-1 Precedence: list List-Id: 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, 07 Jan 2015 21:40:25 -0000 Author: gonzo Date: Wed Jan 7 21:40:23 2015 New Revision: 276794 URL: https://svnweb.freebsd.org/changeset/base/276794 Log: Add dev/mbox/mbox_if.m to MFILES list so we can use it in kernel modules Modified: head/sys/conf/kmod.mk Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Wed Jan 7 21:09:25 2015 (r276793) +++ head/sys/conf/kmod.mk Wed Jan 7 21:40:23 2015 (r276794) @@ -370,7 +370,7 @@ MFILES?= dev/acpica/acpi_if.m dev/acpi_s dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \ dev/fb/fb_if.m dev/gpio/gpio_if.m dev/gpio/gpiobus_if.m \ dev/iicbus/iicbb_if.m dev/iicbus/iicbus_if.m \ - dev/mmc/mmcbr_if.m dev/mmc/mmcbus_if.m \ + dev/mbox/mbox_if.m dev/mmc/mmcbr_if.m dev/mmc/mmcbus_if.m \ dev/mii/miibus_if.m dev/mvs/mvs_if.m dev/ofw/ofw_bus_if.m \ dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \ dev/pci/pcib_if.m dev/ppbus/ppbus_if.m \ From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 21:44: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 4F8375BC; Wed, 7 Jan 2015 21:44: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 3BB30656; Wed, 7 Jan 2015 21:44: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 t07LiwsL029587; Wed, 7 Jan 2015 21:44:58 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07LiwMm029586; Wed, 7 Jan 2015 21:44:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501072144.t07LiwMm029586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 7 Jan 2015 21:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276795 - head/sys/dev/syscons/daemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 21:44:58 -0000 Author: delphij Date: Wed Jan 7 21:44:57 2015 New Revision: 276795 URL: https://svnweb.freebsd.org/changeset/base/276795 Log: Fix sos@'s name. MFC after: 2 weeks Modified: head/sys/dev/syscons/daemon/daemon_saver.c Modified: head/sys/dev/syscons/daemon/daemon_saver.c ============================================================================== --- head/sys/dev/syscons/daemon/daemon_saver.c Wed Jan 7 21:40:23 2015 (r276794) +++ head/sys/dev/syscons/daemon/daemon_saver.c Wed Jan 7 21:44:57 2015 (r276795) @@ -1,7 +1,7 @@ /*- * Copyright (c) 1997 Sandro Sigala, Brescia, Italy. * Copyright (c) 1997 Chris Shenton - * Copyright (c) 1995 S ren Schmidt + * Copyright (c) 1995 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 22:02: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 0BE51A64; Wed, 7 Jan 2015 22:02: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 D2279889; Wed, 7 Jan 2015 22:02: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 t07M2cH6039002; Wed, 7 Jan 2015 22:02:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07M2c85038999; Wed, 7 Jan 2015 22:02:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501072202.t07M2c85038999@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 7 Jan 2015 22:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276796 - in head: . share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 22:02:39 -0000 Author: emaste Date: Wed Jan 7 22:02:37 2015 New Revision: 276796 URL: https://svnweb.freebsd.org/changeset/base/276796 Log: Use a set of ELF Tool Chain tools by default These tools are now from the ELF Tool Chain project: * addr2line * elfcopy (strip) * nm * size * strings The binutils versions are available by setting in src.conf: WITHOUT_ELFTOOLCHAIN_TOOLS=yes Thanks to antoine@ for multiple exp-runs and diagnosing many of the failures. PR: 195561 (ports exp-run) Sponsored by: The FreeBSD Foundation Added: head/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS - copied, changed from r276793, head/tools/build/options/WITH_ELFTOOLCHAIN_TOOLS Deleted: head/tools/build/options/WITH_ELFTOOLCHAIN_TOOLS Modified: head/UPDATING head/share/mk/src.opts.mk Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Jan 7 21:44:57 2015 (r276795) +++ head/UPDATING Wed Jan 7 22:02:37 2015 (r276796) @@ -31,6 +31,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150107: + ELF tools addr2line, elfcopy (strip), nm, size, and strings are now + taken from the ELF Tool Chain project rather than GNU binutils. They + should be drop-in replacements, with the addition of arm64 support. + The WITHOUT_ELFTOOLCHAIN_TOOLS= knob may be used to obtain the + binutils tools, if necessary. + 20150105: The default Unbound configuration now enables remote control using a local socket. Users who have already enabled the Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Jan 7 21:44:57 2015 (r276795) +++ head/share/mk/src.opts.mk Wed Jan 7 22:02:37 2015 (r276796) @@ -73,6 +73,7 @@ __DEFAULT_YES_OPTIONS = \ DMAGENT \ DYNAMICROOT \ ED_CRYPTO \ + ELFTOOLCHAIN_TOOLS \ EXAMPLES \ FDT \ FLOPPY \ @@ -159,7 +160,6 @@ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ CLANG_EXTRAS \ EISA \ - ELFTOOLCHAIN_TOOLS \ FMAKE \ HESIOD \ LLDB \ Copied and modified: head/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS (from r276793, head/tools/build/options/WITH_ELFTOOLCHAIN_TOOLS) ============================================================================== --- head/tools/build/options/WITH_ELFTOOLCHAIN_TOOLS Wed Jan 7 21:09:25 2015 (r276793, copy source) +++ head/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS Wed Jan 7 22:02:37 2015 (r276796) @@ -6,4 +6,4 @@ Set to use .Xr strings 1 , and .Xr strip 1 -from the elftoolchain project instead of GNU binutils. +from GNU binutils instead of the ELF Tool Chain project. From owner-svn-src-head@FreeBSD.ORG Wed Jan 7 22:08: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 A01B1C6B; Wed, 7 Jan 2015 22:08: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 8C5468C0; Wed, 7 Jan 2015 22:08: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 t07M8ARn039743; Wed, 7 Jan 2015 22:08:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t07M8ATo039742; Wed, 7 Jan 2015 22:08:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501072208.t07M8ATo039742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 7 Jan 2015 22:08:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276797 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 07 Jan 2015 22:08:10 -0000 Author: emaste Date: Wed Jan 7 22:08:09 2015 New Revision: 276797 URL: https://svnweb.freebsd.org/changeset/base/276797 Log: Regenerate after r276796 Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Jan 7 22:02:37 2015 (r276796) +++ head/share/man/man5/src.conf.5 Wed Jan 7 22:08:09 2015 (r276797) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd January 2, 2015 +.Dd January 7, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -383,8 +383,8 @@ without support for encryption/decryptio .It Va WITH_EISA .\" from FreeBSD: head/tools/build/options/WITH_EISA 264654 2014-04-18 16:53:06Z imp Set to build EISA kernel modules. -.It Va WITH_ELFTOOLCHAIN_TOOLS -.\" from FreeBSD: head/tools/build/options/WITH_ELFTOOLCHAIN_TOOLS 275373 2014-12-01 17:49:42Z emaste +.It Va WITHOUT_ELFTOOLCHAIN_TOOLS +.\" from FreeBSD: head/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS 276796 2015-01-07 22:02:37Z emaste Set to use .Xr addr2line 1 , .Xr nm 1 , @@ -392,7 +392,7 @@ Set to use .Xr strings 1 , and .Xr strip 1 -from the elftoolchain project instead of GNU binutils. +from GNU binutils instead of the ELF Tool Chain project. .It Va WITHOUT_EXAMPLES .\" from FreeBSD: head/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 00:11: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 8E04B71F; Thu, 8 Jan 2015 00:11: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 5FE1D76F; Thu, 8 Jan 2015 00:11: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 t080BCs8000457; Thu, 8 Jan 2015 00:11:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t080BCGg000456; Thu, 8 Jan 2015 00:11:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501080011.t080BCGg000456@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Jan 2015 00:11:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276798 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 00:11:12 -0000 Author: hselasky Date: Thu Jan 8 00:11:11 2015 New Revision: 276798 URL: https://svnweb.freebsd.org/changeset/base/276798 Log: Fix handling of an error case when the MUSB driver is operating in USB device side mode. MFC after: 1 week Reported by: br@ Modified: head/sys/dev/usb/controller/musb_otg.c Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Wed Jan 7 22:08:09 2015 (r276797) +++ head/sys/dev/usb/controller/musb_otg.c Thu Jan 8 00:11:11 2015 (r276798) @@ -412,7 +412,7 @@ musbotg_dev_ctrl_setup_rx(struct musbotg /* do not stall at this point */ td->did_stall = 1; /* wait for interrupt */ - DPRINTFN(0, "CSR0 DATAEND\n"); + DPRINTFN(1, "CSR0 DATAEND\n"); goto not_complete; } @@ -434,32 +434,37 @@ musbotg_dev_ctrl_setup_rx(struct musbotg sc->sc_ep0_busy = 0; } if (sc->sc_ep0_busy) { - DPRINTFN(0, "EP0 BUSY\n"); + DPRINTFN(1, "EP0 BUSY\n"); goto not_complete; } if (!(csr & MUSB2_MASK_CSR0L_RXPKTRDY)) { goto not_complete; } - /* clear did stall flag */ - td->did_stall = 0; /* get the packet byte count */ count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); /* verify data length */ if (count != td->remainder) { - DPRINTFN(0, "Invalid SETUP packet " + DPRINTFN(1, "Invalid SETUP packet " "length, %d bytes\n", count); MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, MUSB2_MASK_CSR0L_RXPKTRDY_CLR); + /* don't clear stall */ + td->did_stall = 1; goto not_complete; } if (count != sizeof(req)) { - DPRINTFN(0, "Unsupported SETUP packet " + DPRINTFN(1, "Unsupported SETUP packet " "length, %d bytes\n", count); MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, MUSB2_MASK_CSR0L_RXPKTRDY_CLR); + /* don't clear stall */ + td->did_stall = 1; goto not_complete; } + /* clear did stall flag */ + td->did_stall = 0; + /* receive data */ bus_space_read_multi_1(sc->sc_io_tag, sc->sc_io_hdl, MUSB2_REG_EPFIFO(0), (void *)&req, sizeof(req)); From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 00:12: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 3391FA30; Thu, 8 Jan 2015 00:12: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 1F6B4785; Thu, 8 Jan 2015 00:12: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 t080CsTU001195; Thu, 8 Jan 2015 00:12:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t080Cs1j001194; Thu, 8 Jan 2015 00:12:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501080012.t080Cs1j001194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Jan 2015 00:12:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276799 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 00:12:55 -0000 Author: hselasky Date: Thu Jan 8 00:12:54 2015 New Revision: 276799 URL: https://svnweb.freebsd.org/changeset/base/276799 Log: Fix misleading comment. MFC after: 1 week Reported by: rpaulo@ Modified: head/sys/dev/usb/controller/xhci.h Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Thu Jan 8 00:11:11 2015 (r276798) +++ head/sys/dev/usb/controller/xhci.h Thu Jan 8 00:12:54 2015 (r276799) @@ -321,7 +321,7 @@ struct xhci_dev_endpoint_trbs { }; #if (USB_PAGE_SIZE < 4096) -#error "The XHCI driver needs a pagesize above 4K" +#error "The XHCI driver needs a pagesize above or equal to 4K" #endif /* Define the maximum payload which we will handle in a single TRB */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 00:13: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 3D450B70; Thu, 8 Jan 2015 00:13:50 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF75E78B; Thu, 8 Jan 2015 00:13:49 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id C2E2E1FE022; Thu, 8 Jan 2015 01:13:40 +0100 (CET) Message-ID: <54ADCBE4.9060905@selasky.org> Date: Thu, 08 Jan 2015 01:14:28 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Rui Paulo Subject: Re: svn commit: r276407 - head/sys/dev/usb/controller References: <03ad1e28-01a1-476b-a0cb-fb827f18df81@me.com> In-Reply-To: <03ad1e28-01a1-476b-a0cb-fb827f18df81@me.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 00:13:50 -0000 > > This error string is misleading: it should read "page size greater or equal to > 4096 bytes". > Fixed in r276799. Thank you! --HPS From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 00:22: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 54593D3A; Thu, 8 Jan 2015 00:22:36 +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 06E81864; Thu, 8 Jan 2015 00:22:35 +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 8448225D37D1; Thu, 8 Jan 2015 00:22: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 404DBC76FDA; Thu, 8 Jan 2015 00:22: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 le-QMW-U3i4P; Thu, 8 Jan 2015 00:22:30 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:49fb:45e3:fe1f:48d4] (unknown [IPv6:fde9:577b:c1a9:4410:49fb:45e3:fe1f:48d4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 6A8BFC76FD6; Thu, 8 Jan 2015 00:22:29 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276747 - head/sys/netpfil/pf From: "Bjoern A. Zeeb" In-Reply-To: <20150107204631.GG15484@FreeBSD.org> Date: Thu, 8 Jan 2015 00:21:57 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1993) Cc: Craig Rodrigues , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 00:22:36 -0000 > On 07 Jan 2015, at 20:46 , Gleb Smirnoff wrote: >=20 > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: > C> Author: rodrigc > C> Date: Tue Jan 6 09:03:03 2015 > C> New Revision: 276747 > C> URL: https://svnweb.freebsd.org/changeset/base/276747 > C>=20 > C> Log: > C> Instead of creating a purge thread for every vnet, create > C> a single purge thread and clean up all vnets from this thread. > C> =20 > C> PR: 194515 > C> Differential Revision: D1315 > C> Submitted by: Nikos Vassiliadis >=20 > I am not sure that this is a good idea. The core idea of VNETs > is that they are isolated from each other. If we serialize purging, > then vnets are strongly affecting each other. >=20 > AFAIU, from the PR there is some panic fixed. What is the actual bug > and why couldn't it be fixed with having per-vnet thread? You don=E2=80=99t 30000 whatever pf purging threads on a system all = running, possibly competing for some resources, e.g., locks? =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 Jan 8 00:31: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 BD3DBF0C; Thu, 8 Jan 2015 00:31:50 +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 28697931; Thu, 8 Jan 2015 00:31:49 +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 t080VkpP094351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 8 Jan 2015 03:31:46 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t080VkXZ094350; Thu, 8 Jan 2015 03:31:46 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 8 Jan 2015 03:31:46 +0300 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150108003146.GL15484@FreeBSD.org> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Craig Rodrigues , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 00:31:50 -0000 On Thu, Jan 08, 2015 at 12:21:57AM +0000, Bjoern A. Zeeb wrote: B> B> > On 07 Jan 2015, at 20:46 , Gleb Smirnoff wrote: B> > B> > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: B> > C> Author: rodrigc B> > C> Date: Tue Jan 6 09:03:03 2015 B> > C> New Revision: 276747 B> > C> URL: https://svnweb.freebsd.org/changeset/base/276747 B> > C> B> > C> Log: B> > C> Instead of creating a purge thread for every vnet, create B> > C> a single purge thread and clean up all vnets from this thread. B> > C> B> > C> PR: 194515 B> > C> Differential Revision: D1315 B> > C> Submitted by: Nikos Vassiliadis B> > B> > I am not sure that this is a good idea. The core idea of VNETs B> > is that they are isolated from each other. If we serialize purging, B> > then vnets are strongly affecting each other. B> > B> > AFAIU, from the PR there is some panic fixed. What is the actual bug B> > and why couldn't it be fixed with having per-vnet thread? B> B> You don’t 30000 whatever pf purging threads on a system all running, possibly competing for some resources, e.g., locks? Isn't a vnet, which is a jail, already a set of a dozen of processes? So, if you are speaking of "30000 whatever pf purging threads", then you already mean "1 mln whatever processes". Speaking of pf purging threads competing for resources. If someone wants really independent pfs in vnets, then locks should be virtualized as well. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 00:39: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 DED54265; Thu, 8 Jan 2015 00:39: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 C619196E; Thu, 8 Jan 2015 00:39: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 t080dWVf011521; Thu, 8 Jan 2015 00:39:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t080dV6W011514; Thu, 8 Jan 2015 00:39:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501080039.t080dV6W011514@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 8 Jan 2015 00:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276800 - in head/tools/tools/nanobsd: gateworks pcengines X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 00:39:33 -0000 Author: imp Date: Thu Jan 8 00:39:30 2015 New Revision: 276800 URL: https://svnweb.freebsd.org/changeset/base/276800 Log: Move to new NFS client with NFSCL after old NFS clinet (NFSCLIENT) was removed. Modified: head/tools/tools/nanobsd/gateworks/G2348 head/tools/tools/nanobsd/gateworks/G2358 head/tools/tools/nanobsd/pcengines/ALIX_DSK head/tools/tools/nanobsd/pcengines/ALIX_NFS Modified: head/tools/tools/nanobsd/gateworks/G2348 ============================================================================== --- head/tools/tools/nanobsd/gateworks/G2348 Thu Jan 8 00:12:54 2015 (r276799) +++ head/tools/tools/nanobsd/gateworks/G2348 Thu Jan 8 00:39:30 2015 (r276800) @@ -41,7 +41,7 @@ options FFS #Berkeley Fast Filesystem #options SOFTUPDATES #Enable FFS soft updates support #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories -options NFSCLIENT #Network Filesystem Client +options NFSCL #New Network Filesystem Client options NFSLOCKD #Network Lock Manager options KTRACE #ktrace(1) support #options SYSVSHM #SYSV-style shared memory Modified: head/tools/tools/nanobsd/gateworks/G2358 ============================================================================== --- head/tools/tools/nanobsd/gateworks/G2358 Thu Jan 8 00:12:54 2015 (r276799) +++ head/tools/tools/nanobsd/gateworks/G2358 Thu Jan 8 00:39:30 2015 (r276800) @@ -41,7 +41,7 @@ options FFS #Berkeley Fast Filesystem #options SOFTUPDATES #Enable FFS soft updates support #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories -options NFSCLIENT #Network Filesystem Client +options NFSCL #New Network Filesystem Client options NFSLOCKD #Network Lock Manager options KTRACE #ktrace(1) support #options SYSVSHM #SYSV-style shared memory Modified: head/tools/tools/nanobsd/pcengines/ALIX_DSK ============================================================================== --- head/tools/tools/nanobsd/pcengines/ALIX_DSK Thu Jan 8 00:12:54 2015 (r276799) +++ head/tools/tools/nanobsd/pcengines/ALIX_DSK Thu Jan 8 00:39:30 2015 (r276800) @@ -14,7 +14,7 @@ options FFS options SOFTUPDATES options UFS_ACL options UFS_DIRHASH -options NFSCLIENT +options NFSCL # New Network Filesystem Client options NFSLOCKD options MSDOSFS options CD9660 @@ -26,7 +26,9 @@ options COMPAT_43TTY options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 +options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options COMPAT_FREEBSD9 # Compatible with FreeBSD9 +options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options SCSI_DELAY=5000 options SYSVSHM options SYSVMSG Modified: head/tools/tools/nanobsd/pcengines/ALIX_NFS ============================================================================== --- head/tools/tools/nanobsd/pcengines/ALIX_NFS Thu Jan 8 00:12:54 2015 (r276799) +++ head/tools/tools/nanobsd/pcengines/ALIX_NFS Thu Jan 8 00:39:30 2015 (r276800) @@ -14,7 +14,7 @@ options FFS options SOFTUPDATES options UFS_ACL options UFS_DIRHASH -options NFSCLIENT +options NFSCL # New Network Filesystem Client options NFSLOCKD options MSDOSFS options CD9660 @@ -23,7 +23,12 @@ options PSEUDOFS options GEOM_PART_GPT options GEOM_LABEL options COMPAT_43TTY -options COMPAT_FREEBSD7 +options COMPAT_FREEBSD4 # Compatible with FreeBSD4 +options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options COMPAT_FREEBSD9 # Compatible with FreeBSD9 +options COMPAT_FREEBSD10 # Compatible with FreeBSD10 options SCSI_DELAY=5000 options SYSVSHM options SYSVMSG From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 00:39: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 3EB1239F; Thu, 8 Jan 2015 00:39: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 2AA9C972; Thu, 8 Jan 2015 00:39: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 t080df9E011579; Thu, 8 Jan 2015 00:39:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t080df3O011578; Thu, 8 Jan 2015 00:39:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501080039.t080df3O011578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 8 Jan 2015 00:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276801 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 00:39:41 -0000 Author: imp Date: Thu Jan 8 00:39:40 2015 New Revision: 276801 URL: https://svnweb.freebsd.org/changeset/base/276801 Log: Don't call the SSE routines when they aren't enabled (or even compiled into the kernel). Modified: head/sys/i386/i386/elf_machdep.c Modified: head/sys/i386/i386/elf_machdep.c ============================================================================== --- head/sys/i386/i386/elf_machdep.c Thu Jan 8 00:39:30 2015 (r276800) +++ head/sys/i386/i386/elf_machdep.c Thu Jan 8 00:39:40 2015 (r276801) @@ -47,6 +47,10 @@ __FBSDID("$FreeBSD$"); #include #include +#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) +#define CPU_ENABLE_SSE +#endif + struct sysentvec elf32_freebsd_sysvec = { .sv_size = SYS_MAXSYSCALL, .sv_table = sysent, @@ -137,10 +141,13 @@ SYSINIT(kelf32, SI_SUB_EXEC, SI_ORDER_AN void elf32_dump_thread(struct thread *td, void *dst, size_t *off) { +#ifdef CPU_ENABLE_SSE void *buf; +#endif size_t len; len = 0; +#ifdef CPU_ENABLE_SSE if (use_xsave) { if (dst != NULL) { npxgetregs(td); @@ -153,6 +160,7 @@ elf32_dump_thread(struct thread *td, voi len += elf32_populate_note(NT_X86_XSTATE, NULL, NULL, cpu_max_ext_state_size, NULL); } +#endif *off = len; } From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 00:50: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 57835602; Thu, 8 Jan 2015 00:50:26 +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 DBC21A49; Thu, 8 Jan 2015 00:50:25 +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 6812B25D37C7; Thu, 8 Jan 2015 00:50:21 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 8E070C76FD9; Thu, 8 Jan 2015 00:50:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id hQCGhKv7oDMk; Thu, 8 Jan 2015 00:50:18 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:49fb:45e3:fe1f:48d4] (unknown [IPv6:fde9:577b:c1a9:4410:49fb:45e3:fe1f:48d4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B68A3C76FD6; Thu, 8 Jan 2015 00:50:17 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276747 - head/sys/netpfil/pf From: "Bjoern A. Zeeb" In-Reply-To: <20150108003146.GL15484@FreeBSD.org> Date: Thu, 8 Jan 2015 00:49:45 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <63857483-2879-4620-87EF-FE76197AB99B@lists.zabbadoz.net> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> <20150108003146.GL15484@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1993) Cc: Craig Rodrigues , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 00:50:26 -0000 > On 08 Jan 2015, at 00:31 , Gleb Smirnoff wrote: >=20 > On Thu, Jan 08, 2015 at 12:21:57AM +0000, Bjoern A. Zeeb wrote: > B>=20 > B> > On 07 Jan 2015, at 20:46 , Gleb Smirnoff = wrote: > B> >=20 > B> > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: > B> > C> Author: rodrigc > B> > C> Date: Tue Jan 6 09:03:03 2015 > B> > C> New Revision: 276747 > B> > C> URL: https://svnweb.freebsd.org/changeset/base/276747 > B> > C>=20 > B> > C> Log: > B> > C> Instead of creating a purge thread for every vnet, create > B> > C> a single purge thread and clean up all vnets from this = thread. > B> > C> =20 > B> > C> PR: 194515 > B> > C> Differential Revision: D1315 > B> > C> Submitted by: Nikos Vassiliadis > B> >=20 > B> > I am not sure that this is a good idea. The core idea of VNETs > B> > is that they are isolated from each other. If we serialize = purging, > B> > then vnets are strongly affecting each other. > B> >=20 > B> > AFAIU, from the PR there is some panic fixed. What is the actual = bug > B> > and why couldn't it be fixed with having per-vnet thread? > B>=20 > B> You don=E2=80=99t 30000 whatever pf purging threads on a system all = running, possibly competing for some resources, e.g., locks? >=20 > Isn't a vnet, which is a jail, already a set of a dozen of processes? = So, > if you are speaking of "30000 whatever pf purging threads", then you > already mean =E2=80=9C1 mln whatever processes". jail/VNETs can exist without a single process attached. But I guess the point is that there is only so much work we can do at = the same time and we should be very careful in what we try to = parallellellellize as with 5 vnets it might be fine, with a couple of = thousand you may keep a system busy with itself. > Speaking of pf purging threads competing for resources. If someone = wants > really independent pfs in vnets, then locks should be virtualized as = well. No please don=E2=80=99t. The only places where we =E2=80=9Cvirtualise=E2=80= =9D locks for VNETs is part of data structures which are vnet specific = (virtualised). =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 Jan 8 01:27: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 7012C3AE; Thu, 8 Jan 2015 01:27: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 5BA7BDFD; Thu, 8 Jan 2015 01:27: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 t081Riai035158; Thu, 8 Jan 2015 01:27:44 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t081Ri85035157; Thu, 8 Jan 2015 01:27:44 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201501080127.t081Ri85035157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 8 Jan 2015 01:27:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276802 - 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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 01:27:44 -0000 Author: rodrigc Date: Thu Jan 8 01:27:43 2015 New Revision: 276802 URL: https://svnweb.freebsd.org/changeset/base/276802 Log: Clarify text to be consistent with nanosleep(2), since sleep(3) is implemented in terms of nanosleep(2). This is similar to the sleep(3) man page for Darwin. Modified: head/lib/libc/gen/sleep.3 Modified: head/lib/libc/gen/sleep.3 ============================================================================== --- head/lib/libc/gen/sleep.3 Thu Jan 8 00:39:40 2015 (r276801) +++ head/lib/libc/gen/sleep.3 Thu Jan 8 01:27:43 2015 (r276802) @@ -33,7 +33,7 @@ .Os .Sh NAME .Nm sleep -.Nd suspend process execution for an interval measured in seconds +.Nd suspend thread execution for an interval measured in seconds .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -43,11 +43,11 @@ .Sh DESCRIPTION The .Fn sleep -function suspends execution of the calling process until either +function suspends execution of the calling thread until either .Fa seconds -seconds have elapsed or a signal is delivered to the process and its +seconds have elapsed or a signal is delivered to the thread and its action is to invoke a signal-catching function or to terminate the -process. +thread or process. System activity may lengthen the sleep by an indeterminate amount. .Pp This function is implemented using From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 01:28: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 F21AA507; Thu, 8 Jan 2015 01:28: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 DD519E13; Thu, 8 Jan 2015 01:28: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 t081Sldw035338; Thu, 8 Jan 2015 01:28:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t081SlBS035335; Thu, 8 Jan 2015 01:28:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501080128.t081SlBS035335@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 8 Jan 2015 01:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276803 - head/sys/arm/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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 01:28:48 -0000 Author: ian Date: Thu Jan 8 01:28:46 2015 New Revision: 276803 URL: https://svnweb.freebsd.org/changeset/base/276803 Log: Add accessors for the ARM CP15 performance monitor registers. Also ensure that some #ifdef SMP code is also conditional on __ARM_ARCH >= 7; we don't support SMP on armv6, but some drivers and modules are compiled with it forced on via the compiler command line. Modified: head/sys/arm/include/cpu-v6.h head/sys/arm/include/cpu.h head/sys/arm/include/sysreg.h Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Thu Jan 8 01:27:43 2015 (r276802) +++ head/sys/arm/include/cpu-v6.h Thu Jan 8 01:28:46 2015 (r276803) @@ -150,6 +150,35 @@ _RF0(cp15_id_isar4_get, CP15_ID_ISAR4(%0 _RF0(cp15_id_isar5_get, CP15_ID_ISAR5(%0)) _RF0(cp15_cbar_get, CP15_CBAR(%0)) +/* Performance Monitor registers */ + +#if __ARM_ARCH == 6 && defined(CPU_ARM1176) +_RF0(cp15_pmccntr_get, CP15_PMCCNTR(%0)) +_WF1(cp15_pmccntr_set, CP15_PMCCNTR(%0)) +#elif __ARM_ARCH > 6 +_RF0(cp15_pmcr_get, CP15_PMCR(%0)) +_WF1(cp15_pmcr_set, CP15_PMCR(%0)) +_RF0(cp15_pmcnten_get, CP15_PMCNTENSET(%0)) +_WF1(cp15_pmcnten_set, CP15_PMCNTENSET(%0)) +_WF1(cp15_pmcnten_clr, CP15_PMCNTENCLR(%0)) +_RF0(cp15_pmovsr_get, CP15_PMOVSR(%0)) +_WF1(cp15_pmovsr_set, CP15_PMOVSR(%0)) +_WF1(cp15_pmswinc_set, CP15_PMSWINC(%0)) +_RF0(cp15_pmselr_get, CP15_PMSELR(%0)) +_WF1(cp15_pmselr_set, CP15_PMSELR(%0)) +_RF0(cp15_pmccntr_get, CP15_PMCCNTR(%0)) +_WF1(cp15_pmccntr_set, CP15_PMCCNTR(%0)) +_RF0(cp15_pmxevtyper_get, CP15_PMXEVTYPER(%0)) +_WF1(cp15_pmxevtyper_set, CP15_PMXEVTYPER(%0)) +_RF0(cp15_pmxevcntr_get, CP15_PMXEVCNTRR(%0)) +_WF1(cp15_pmxevcntr_set, CP15_PMXEVCNTRR(%0)) +_RF0(cp15_pmuserenr_get, CP15_PMUSERENR(%0)) +_WF1(cp15_pmuserenr_set, CP15_PMUSERENR(%0)) +_RF0(cp15_pminten_get, CP15_PMINTENSET(%0)) +_WF1(cp15_pminten_set, CP15_PMINTENSET(%0)) +_WF1(cp15_pminten_clr, CP15_PMINTENCLR(%0)) +#endif + #undef _FX #undef _RF0 #undef _WF0 @@ -205,14 +234,7 @@ tlb_flush_range_local(vm_offset_t sva, v } /* Broadcasting operations. */ -#ifndef SMP - -#define tlb_flush_all() tlb_flush_all_local() -#define tlb_flush_all_ng() tlb_flush_all_ng_local() -#define tlb_flush(sva) tlb_flush_local(sva) -#define tlb_flush_range(sva, size) tlb_flush_range_local(sva, size) - -#else /* SMP */ +#if __ARM_ARCH >= 7 && defined SMP static __inline void tlb_flush_all(void) @@ -252,6 +274,13 @@ tlb_flush_range(vm_offset_t sva, vm_siz _CP15_TLBIMVAAIS(va); dsb(); } +#else /* SMP */ + +#define tlb_flush_all() tlb_flush_all_local() +#define tlb_flush_all_ng() tlb_flush_all_ng_local() +#define tlb_flush(sva) tlb_flush_local(sva) +#define tlb_flush_range(sva, size) tlb_flush_range_local(sva, size) + #endif /* SMP */ /* @@ -267,14 +296,14 @@ icache_sync(vm_offset_t sva, vm_size_t s dsb(); for (va = sva; va < eva; va += arm_dcache_align) { -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else _CP15_DCCMVAC(va); #endif } dsb(); -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_ICIALLUIS(); #else _CP15_ICIALLU(); @@ -287,7 +316,7 @@ icache_sync(vm_offset_t sva, vm_size_t s static __inline void icache_inv_all(void) { -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_ICIALLUIS(); #else _CP15_ICIALLU(); @@ -305,7 +334,7 @@ dcache_wb_pou(vm_offset_t sva, vm_size_t dsb(); for (va = sva; va < eva; va += arm_dcache_align) { -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else _CP15_DCCMVAC(va); Modified: head/sys/arm/include/cpu.h ============================================================================== --- head/sys/arm/include/cpu.h Thu Jan 8 01:27:43 2015 (r276802) +++ head/sys/arm/include/cpu.h Thu Jan 8 01:28:46 2015 (r276803) @@ -4,9 +4,14 @@ #ifndef MACHINE_CPU_H #define MACHINE_CPU_H +#include #include #include +#if __ARM_ARCH >= 6 +#include +#endif + void cpu_halt(void); void swi_vm(void *); @@ -14,29 +19,8 @@ void swi_vm(void *); static __inline uint64_t get_cyclecount(void) { -/* This '#if' asks the question 'Does CP15/SCC include performance counters?' */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) \ - || defined(CPU_MV_PJ4B) \ - || defined(CPU_CORTEXA) || defined(CPU_KRAIT) - uint32_t ccnt; - uint64_t ccnt64; - - /* - * Read PMCCNTR. Curses! Its only 32 bits. - * TODO: Fix this by catching overflow with interrupt? - */ -/* The ARMv6 vs ARMv7 divide is going to need a better way of - * distinguishing between them. - */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) - /* ARMv6 - Earlier model SCCs */ - __asm __volatile("mrc p15, 0, %0, c15, c12, 1": "=r" (ccnt)); -#else - /* ARMv7 - Later model SCCs */ - __asm __volatile("mrc p15, 0, %0, c9, c13, 0": "=r" (ccnt)); -#endif - ccnt64 = (uint64_t)ccnt; - return (ccnt64); +#if __ARM_ARCH >= 6 + return cp15_pmccntr_get(); #else /* No performance counters, so use binuptime(9). This is slooooow */ struct bintime bt; Modified: head/sys/arm/include/sysreg.h ============================================================================== --- head/sys/arm/include/sysreg.h Thu Jan 8 01:27:43 2015 (r276802) +++ head/sys/arm/include/sysreg.h Thu Jan 8 01:28:46 2015 (r276803) @@ -29,6 +29,11 @@ /* * Macros to make working with the System Control Registers simpler. + * + * Note that when register r0 is hard-coded in these definitions it means the + * cp15 operation neither reads nor writes the register, and r0 is used only + * because some syntatically-valid register name has to appear at that point to + * keep the asm parser happy. */ #ifndef MACHINE_SYSREG_H @@ -202,6 +207,26 @@ #endif /* + * CP15 C9 registers + */ +#if __ARM_ARCH == 6 && defined(CPU_ARM1176) +#define CP15_PMCCNTR(rr) p15, 0, rr, c15, c12, 1 /* PM Cycle Count Register */ +#elif __ARM_ARCH > 6 +#define CP15_PMCR(rr) p15, 0, rr, c9, c12, 0 /* Performance Monitor Control Register */ +#define CP15_PMCNTENSET(rr) p15, 0, rr, c9, c12, 1 /* PM Count Enable Set Register */ +#define CP15_PMCNTENCLR(rr) p15, 0, rr, c9, c12, 2 /* PM Count Enable Clear Register */ +#define CP15_PMOVSR(rr) p15, 0, rr, c9, c12, 3 /* PM Overflow Flag Status Register */ +#define CP15_PMSWINC(rr) p15, 0, rr, c9, c12, 4 /* PM Software Increment Register */ +#define CP15_PMSELR(rr) p15, 0, rr, c9, c12, 5 /* PM Event Counter Selection Register */ +#define CP15_PMCCNTR(rr) p15, 0, rr, c9, c13, 0 /* PM Cycle Count Register */ +#define CP15_PMXEVTYPER(rr) p15, 0, rr, c9, c13, 1 /* PM Event Type Select Register */ +#define CP15_PMXEVCNTRR(rr) p15, 0, rr, c9, c13, 2 /* PM Event Count Register */ +#define CP15_PMUSERENR(rr) p15, 0, rr, c9, c14, 0 /* PM User Enable Register */ +#define CP15_PMINTENSET(rr) p15, 0, rr, c9, c14, 1 /* PM Interrupt Enable Set Register */ +#define CP15_PMINTENCLR(rr) p15, 0, rr, c9, c14, 2 /* PM Interrupt Enable Clear Register */ +#endif + +/* * CP15 C10 registers */ /* Without LPAE this is PRRR, with LPAE it's MAIR0 */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 02:04: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 7AE40A93; Thu, 8 Jan 2015 02:04: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 668A51BE; Thu, 8 Jan 2015 02:04: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 t0824cRp053986; Thu, 8 Jan 2015 02:04:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0824c30053985; Thu, 8 Jan 2015 02:04:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501080204.t0824c30053985@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 8 Jan 2015 02:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276804 - head/contrib/ofed/usr.lib/libibcm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 02:04:38 -0000 Author: ngie Date: Thu Jan 8 02:04:37 2015 New Revision: 276804 URL: https://svnweb.freebsd.org/changeset/base/276804 Log: Fix 'make depend' before infiniband headers have been installed to build host by removing space between -I and the header directory MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/ofed/usr.lib/libibcm/Makefile Modified: head/contrib/ofed/usr.lib/libibcm/Makefile ============================================================================== --- head/contrib/ofed/usr.lib/libibcm/Makefile Thu Jan 8 01:28:46 2015 (r276803) +++ head/contrib/ofed/usr.lib/libibcm/Makefile Thu Jan 8 02:04:37 2015 (r276804) @@ -15,7 +15,7 @@ SHLIB_MAJOR= 1 MK_PROFILE= no SRCS= cm.c -CFLAGS+= -I ${IBCMDIR}/include +CFLAGS+= -I${IBCMDIR}/include MAN= VERSION_MAP= ${IBSRCDIR}/libibcm.map From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 02: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 1770AC6A; Thu, 8 Jan 2015 02: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 02D521FC; Thu, 8 Jan 2015 02: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 t082BEk7054954; Thu, 8 Jan 2015 02:11:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t082BESA054948; Thu, 8 Jan 2015 02:11:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501080211.t082BESA054948@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 8 Jan 2015 02:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276805 - in head/contrib/ofed: usr.bin usr.lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 02:11:15 -0000 Author: ngie Date: Thu Jan 8 02:11:13 2015 New Revision: 276805 URL: https://svnweb.freebsd.org/changeset/base/276805 Log: Build contrib/ofed/usr.{bin,lib} in parallel MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/ofed/usr.bin/Makefile head/contrib/ofed/usr.lib/Makefile Modified: head/contrib/ofed/usr.bin/Makefile ============================================================================== --- head/contrib/ofed/usr.bin/Makefile Thu Jan 8 02:04:37 2015 (r276804) +++ head/contrib/ofed/usr.bin/Makefile Thu Jan 8 02:11:13 2015 (r276805) @@ -1,7 +1,7 @@ -.include - SUBDIR = ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat SUBDIR += ibsysstat ibtracert opensm perfquery saquery SUBDIR += sminfo smpdump smpquery vendstat +SUBDIR_PARALLEL= + .include Modified: head/contrib/ofed/usr.lib/Makefile ============================================================================== --- head/contrib/ofed/usr.lib/Makefile Thu Jan 8 02:04:37 2015 (r276804) +++ head/contrib/ofed/usr.lib/Makefile Thu Jan 8 02:11:13 2015 (r276805) @@ -1,6 +1,6 @@ -.include - SUBDIR = libibcommon libibmad libibumad libibverbs libmlx4 libmthca SUBDIR += libopensm libosmcomp libosmvendor libibcm librdmacm libsdp libcxgb4 +SUBDIR_PARALLEL= + .include From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 02:36: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 03E98716; Thu, 8 Jan 2015 02:36: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 E3E28678; Thu, 8 Jan 2015 02:36: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 t082aiZH068421; Thu, 8 Jan 2015 02:36:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t082aiiP068420; Thu, 8 Jan 2015 02:36:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501080236.t082aiiP068420@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 8 Jan 2015 02:36:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276806 - head/contrib/ofed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 02:36:45 -0000 Author: ngie Date: Thu Jan 8 02:36:43 2015 New Revision: 276806 URL: https://svnweb.freebsd.org/changeset/base/276806 Log: Remove unnecessary .include of bsd.own.mk MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/ofed/Makefile Modified: head/contrib/ofed/Makefile ============================================================================== --- head/contrib/ofed/Makefile Thu Jan 8 02:11:13 2015 (r276805) +++ head/contrib/ofed/Makefile Thu Jan 8 02:36:43 2015 (r276806) @@ -1,5 +1,3 @@ -.include - SUBDIR = include usr.lib usr.bin .include From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 03:37: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 E147D71F; Thu, 8 Jan 2015 03:37:57 +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 AFB46D6A; Thu, 8 Jan 2015 03:37:57 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-233-252.lns20.per1.internode.on.net [121.45.233.252]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t083bnRW011471 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 7 Jan 2015 19:37:52 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <54ADFB88.1090705@freebsd.org> Date: Thu, 08 Jan 2015 11:37:44 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Gleb Smirnoff , "Bjoern A. Zeeb" Subject: Re: svn commit: r276747 - head/sys/netpfil/pf References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> <20150108003146.GL15484@FreeBSD.org> In-Reply-To: <20150108003146.GL15484@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: Craig Rodrigues , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 03:37:58 -0000 On 1/8/15 8:31 AM, Gleb Smirnoff wrote: > On Thu, Jan 08, 2015 at 12:21:57AM +0000, Bjoern A. Zeeb wrote: > B> > B> > On 07 Jan 2015, at 20:46 , Gleb Smirnoff wrote: > B> > > B> > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: > B> > C> Author: rodrigc > B> > C> Date: Tue Jan 6 09:03:03 2015 > B> > C> New Revision: 276747 > B> > C> URL: https://svnweb.freebsd.org/changeset/base/276747 > B> > C> > B> > C> Log: > B> > C> Instead of creating a purge thread for every vnet, create > B> > C> a single purge thread and clean up all vnets from this thread. > B> > C> > B> > C> PR: 194515 > B> > C> Differential Revision: D1315 > B> > C> Submitted by: Nikos Vassiliadis > B> > > B> > I am not sure that this is a good idea. The core idea of VNETs > B> > is that they are isolated from each other. If we serialize purging, > B> > then vnets are strongly affecting each other. > B> > > B> > AFAIU, from the PR there is some panic fixed. What is the actual bug > B> > and why couldn't it be fixed with having per-vnet thread? > B> > B> You don’t 30000 whatever pf purging threads on a system all running, possibly competing for some resources, e.g., locks? > > Isn't a vnet, which is a jail, already a set of a dozen of processes? So, > if you are speaking of "30000 whatever pf purging threads", then you > already mean "1 mln whatever processes". Actually, no. as we have presetned it, a vnet is part of a jail. But, it was originally an independnent thing, like FIBS, and a jail may exist with a single process. I think one should be enough.. or if that it is not sufficient, then at maximum, one per cpu > > Speaking of pf purging threads competing for resources. If someone wants > really independent pfs in vnets, then locks should be virtualized as well. > From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 03:59: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 AE6D2CEC; Thu, 8 Jan 2015 03:59: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 9AC30F2C; Thu, 8 Jan 2015 03:59: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 t083x4iv007092; Thu, 8 Jan 2015 03:59:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t083x4Hr007091; Thu, 8 Jan 2015 03:59:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501080359.t083x4Hr007091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 8 Jan 2015 03:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276808 - head/sys/arm/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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 03:59:04 -0000 Author: ian Date: Thu Jan 8 03:59:03 2015 New Revision: 276808 URL: https://svnweb.freebsd.org/changeset/base/276808 Log: Move the inclusion of cpu-v6.h inside the #ifdef _KERNEL block, so that userland programs (which probably don't actually need machine/cpu.h) compile. Modified: head/sys/arm/include/cpu.h Modified: head/sys/arm/include/cpu.h ============================================================================== --- head/sys/arm/include/cpu.h Thu Jan 8 03:44:54 2015 (r276807) +++ head/sys/arm/include/cpu.h Thu Jan 8 03:59:03 2015 (r276808) @@ -8,14 +8,13 @@ #include #include -#if __ARM_ARCH >= 6 -#include -#endif - void cpu_halt(void); void swi_vm(void *); #ifdef _KERNEL +#if __ARM_ARCH >= 6 +#include +#endif static __inline uint64_t get_cyclecount(void) { From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 05:46: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 9B151851; Thu, 8 Jan 2015 05:46: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 87BDFAD3; Thu, 8 Jan 2015 05:46: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 t085kHFs058097; Thu, 8 Jan 2015 05:46:17 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t085kHvg058096; Thu, 8 Jan 2015 05:46:17 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201501080546.t085kHvg058096@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 8 Jan 2015 05:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276809 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 05:46:17 -0000 Author: arybchik Date: Thu Jan 8 05:46:16 2015 New Revision: 276809 URL: https://svnweb.freebsd.org/changeset/base/276809 Log: Add myself (arybchik) to committers-src.dot Approved by: gnn (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu Jan 8 03:59:03 2015 (r276808) +++ head/share/misc/committers-src.dot Thu Jan 8 05:46:16 2015 (r276809) @@ -113,6 +113,7 @@ andrew [label="Andrew Turner\nandrew@Fre antoine [label="Antoine Brodin\nantoine@FreeBSD.org\n2008/02/03"] ariff [label="Ariff Abdullah\nariff@FreeBSD.org\n2005/11/14"] art [label="Artem Belevich\nart@FreeBSD.org\n2011/03/29"] +arybchik [label="Andrew Rybchenko\narybchik@FreeBSD.org\n2014/10/12"] asomers [label="Alan Somers\nasomers@FreeBSD.org\n2013/04/24"] avg [label="Andriy Gapon\navg@FreeBSD.org\n2009/02/18"] bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2011/12/23"] @@ -438,6 +439,7 @@ gnn -> vanhu gnn -> lstewart gnn -> np gnn -> davide +gnn -> arybchik grehan -> bryanv From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 07:06: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 4FBFEACE; Thu, 8 Jan 2015 07:06:07 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F4411F6; Thu, 8 Jan 2015 07:06:06 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t08760jv050801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Jan 2015 23:06:00 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t0875xVI050800; Wed, 7 Jan 2015 23:05:59 -0800 (PST) (envelope-from jmg) Date: Wed, 7 Jan 2015 23:05:59 -0800 From: John-Mark Gurney To: Julian Elischer Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150108070558.GA1949@funkthat.com> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> <20150108003146.GL15484@FreeBSD.org> <54ADFB88.1090705@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54ADFB88.1090705@freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Wed, 07 Jan 2015 23:06:00 -0800 (PST) Cc: Craig Rodrigues , src-committers@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , Gleb Smirnoff , svn-src-head@freebsd.org, "Bjoern A. Zeeb" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 07:06:07 -0000 Julian Elischer wrote this message on Thu, Jan 08, 2015 at 11:37 +0800: > On 1/8/15 8:31 AM, Gleb Smirnoff wrote: > > On Thu, Jan 08, 2015 at 12:21:57AM +0000, Bjoern A. Zeeb wrote: > > B> > > B> > On 07 Jan 2015, at 20:46 , Gleb Smirnoff wrote: > > B> > > > B> > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: > > B> > C> Author: rodrigc > > B> > C> Date: Tue Jan 6 09:03:03 2015 > > B> > C> New Revision: 276747 > > B> > C> URL: https://svnweb.freebsd.org/changeset/base/276747 > > B> > C> > > B> > C> Log: > > B> > C> Instead of creating a purge thread for every vnet, create > > B> > C> a single purge thread and clean up all vnets from this thread. > > B> > C> > > B> > C> PR: 194515 > > B> > C> Differential Revision: D1315 > > B> > C> Submitted by: Nikos Vassiliadis > > B> > > > B> > I am not sure that this is a good idea. The core idea of VNETs > > B> > is that they are isolated from each other. If we serialize purging, > > B> > then vnets are strongly affecting each other. > > B> > > > B> > AFAIU, from the PR there is some panic fixed. What is the actual bug > > B> > and why couldn't it be fixed with having per-vnet thread? > > B> > > B> You don???t 30000 whatever pf purging threads on a system all running, possibly competing for some resources, e.g., locks? > > > > Isn't a vnet, which is a jail, already a set of a dozen of processes? So, > > if you are speaking of "30000 whatever pf purging threads", then you > > already mean "1 mln whatever processes". > Actually, no. > as we have presetned it, a vnet is part of a jail. > But, it was originally an independnent > thing, like FIBS, and a jail may exist with a single process. > I think one should be enough.. or if that it is not sufficient, then > at maximum, one per cpu We really need to make a library that handles creating/scheduling things like these better so people aren't reinventing them over and over again.. We do this in geli for creating threads for each geli worker... Can't something like taskqueue_start_threads_pinned be used for this? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 07:47: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 98883285; Thu, 8 Jan 2015 07:47: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 862C07F9; Thu, 8 Jan 2015 07:47: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 t087lefh014621; Thu, 8 Jan 2015 07:47:40 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t087le51014620; Thu, 8 Jan 2015 07:47:40 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201501080747.t087le51014620@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Thu, 8 Jan 2015 07:47:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276814 - head/contrib/ntp/ntpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 07:47:40 -0000 Author: ume Date: Thu Jan 8 07:47:39 2015 New Revision: 276814 URL: https://svnweb.freebsd.org/changeset/base/276814 Log: Correct comparison of IPv6 wildcard address. MFC after: 3 days Modified: head/contrib/ntp/ntpd/ntp_io.c Modified: head/contrib/ntp/ntpd/ntp_io.c ============================================================================== --- head/contrib/ntp/ntpd/ntp_io.c Thu Jan 8 06:32:56 2015 (r276813) +++ head/contrib/ntp/ntpd/ntp_io.c Thu Jan 8 07:47:39 2015 (r276814) @@ -1124,7 +1124,7 @@ is_wildcard_addr(struct sockaddr_storage #ifdef INCLUDE_IPV6_SUPPORT if (sas->ss_family == AF_INET6 && memcmp(&((struct sockaddr_in6*)sas)->sin6_addr, &in6addr_any, - sizeof(in6addr_any) == 0)) + sizeof(in6addr_any)) == 0) return 1; #endif From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 08:13: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 AA3085CE; Thu, 8 Jan 2015 08:13:14 +0000 (UTC) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74C0BA9C; Thu, 8 Jan 2015 08:13:14 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id fp1so9792670pdb.10; Thu, 08 Jan 2015 00:13:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=SOyBD8itLUeEiHWiQS9T924nMqC4+XkdlaVbBzx5fO0=; b=t3lCP81pMy/b+OJJ3wxHeCK/R9spRPYNVt0uE63wWyD9pt2FPcA/xET1hsRIivStvz TFSCJaOi1giNl91o3ki/xHKbt19nZxdi17gQVA1/BfyHqAOT12fsJvXChhipzvFh3D0o zKwMOKnPDkFsG8NtlAkDt7LD3Rm8YR4bPWwanbrwh5uZ8jrJar38Nt9zui76AzPDyjrV ImJUeVBIFpuhBOLNZnnvQHlh1uahlFghEHXmuL99lrdJDAZHCqpjrJNDnV1+mFO75glD W4Ubs5t/HSm7p7Wr4/Kg2xFlCmMBhUva9frkOyW8G3IU9H95yAMTj4Rait63TwoJ2jqk vsQw== MIME-Version: 1.0 X-Received: by 10.70.35.109 with SMTP id g13mr2315795pdj.17.1420704793948; Thu, 08 Jan 2015 00:13:13 -0800 (PST) Sender: ermal.luci@gmail.com Received: by 10.70.91.232 with HTTP; Thu, 8 Jan 2015 00:13:13 -0800 (PST) In-Reply-To: References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> Date: Thu, 8 Jan 2015 09:13:13 +0100 X-Google-Sender-Auth: -frk1JuV_JeYCd2yC9-xu9hFjtI Message-ID: Subject: Re: svn commit: r276747 - head/sys/netpfil/pf From: =?UTF-8?Q?Ermal_Lu=C3=A7i?= To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Craig Rodrigues , src-committers@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , Gleb Smirnoff , svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 08:13:14 -0000 On Thu, Jan 8, 2015 at 1:21 AM, Bjoern A. Zeeb < bzeeb-lists@lists.zabbadoz.net> wrote: > > > On 07 Jan 2015, at 20:46 , Gleb Smirnoff wrote: > > > > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: > > C> Author: rodrigc > > C> Date: Tue Jan 6 09:03:03 2015 > > C> New Revision: 276747 > > C> URL: https://svnweb.freebsd.org/changeset/base/276747 > > C> > > C> Log: > > C> Instead of creating a purge thread for every vnet, create > > C> a single purge thread and clean up all vnets from this thread. > > C> > > C> PR: 194515 > > C> Differential Revision: D1315 > > C> Submitted by: Nikos Vassiliadis > > > > I am not sure that this is a good idea. The core idea of VNETs > > is that they are isolated from each other. If we serialize purging, > > then vnets are strongly affecting each other. > > > > AFAIU, from the PR there is some panic fixed. What is the actual bug > > and why couldn't it be fixed with having per-vnet thread? > > You don=E2=80=99t 30000 whatever pf purging threads on a system all runni= ng, > possibly competing for some resources, e.g., locks? > You can tune your system to your load! I do not agree with this change as well but just saw it! I would have agreed with this if a thread per CPU is created and some improvements in the locking strategy is performed! This is a potential issue since on busy system this thread gets very resource consuming! > > =E2=80=94 > 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 Ermal From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 10:13: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 8B9E8C8B; Thu, 8 Jan 2015 10:13: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 76F9499B; Thu, 8 Jan 2015 10:13: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 t08ADvWx083612; Thu, 8 Jan 2015 10:13:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08ADvB6083611; Thu, 8 Jan 2015 10:13:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501081013.t08ADvB6083611@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Jan 2015 10:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276815 - head/contrib/ofed/management/opensm/opensm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 10:13:57 -0000 Author: hselasky Date: Thu Jan 8 10:13:56 2015 New Revision: 276815 URL: https://svnweb.freebsd.org/changeset/base/276815 Log: Fix for compilation issue. Don't use the "abs()" function for unsigned computations. MFC after: 3 days PR: 196597 Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c Modified: head/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c ============================================================================== --- head/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c Thu Jan 8 07:47:39 2015 (r276814) +++ head/contrib/ofed/management/opensm/opensm/osm_ucast_ftree.c Thu Jan 8 10:13:56 2015 (r276815) @@ -2917,6 +2917,10 @@ Exit: /*************************************************** ***************************************************/ +static boolean_t __osm_invalid_link_rank_diff(const uint32_t val) +{ + return (val != 1U && val != -1U); +} static int __osm_ftree_fabric_construct_sw_ports(IN ftree_fabric_t * p_ftree, IN ftree_sw_t * p_sw) @@ -2993,7 +2997,7 @@ static int __osm_ftree_fabric_construct_ p_remote_hca_or_sw = (void *)p_remote_sw; - if (abs(p_sw->rank - p_remote_sw->rank) != 1) { + if (__osm_invalid_link_rank_diff(p_sw->rank - p_remote_sw->rank)) { OSM_LOG(&p_ftree->p_osm->log, OSM_LOG_ERROR, "ERR AB16: " "Illegal link between switches with ranks %u and %u:\n" From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 10:27: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 D85122E4; Thu, 8 Jan 2015 10:27:14 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 66775ABD; Thu, 8 Jan 2015 10:27:14 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t08AR8tN099411 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Jan 2015 12:27:08 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t08AR8tN099411 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t08AR8nm099410; Thu, 8 Jan 2015 12:27:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 8 Jan 2015 12:27:08 +0200 From: Konstantin Belousov To: Craig Rodrigues Subject: Re: svn commit: r276802 - head/lib/libc/gen Message-ID: <20150108102708.GP42409@kib.kiev.ua> References: <201501080127.t081Ri85035157@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501080127.t081Ri85035157@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 10:27:15 -0000 On Thu, Jan 08, 2015 at 01:27:44AM +0000, Craig Rodrigues wrote: > @@ -43,11 +43,11 @@ > .Sh DESCRIPTION > The > .Fn sleep > -function suspends execution of the calling process until either > +function suspends execution of the calling thread until either > .Fa seconds > -seconds have elapsed or a signal is delivered to the process and its > +seconds have elapsed or a signal is delivered to the thread and its > action is to invoke a signal-catching function or to terminate the > -process. > +thread or process. There is no signal action to terminate thread. > System activity may lengthen the sleep by an indeterminate amount. > .Pp > This function is implemented using From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 11:16: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 E89D228E; Thu, 8 Jan 2015 11:16: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 D4625FA1; Thu, 8 Jan 2015 11: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 t08BGMM9013276; Thu, 8 Jan 2015 11:16:22 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08BGMeC013275; Thu, 8 Jan 2015 11:16:22 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501081116.t08BGMeC013275@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Thu, 8 Jan 2015 11:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276818 - 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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 11:16:23 -0000 Author: rwatson Date: Thu Jan 8 11:16:21 2015 New Revision: 276818 URL: https://svnweb.freebsd.org/changeset/base/276818 Log: Replace hand-crafted versions of M_SIZE() and M_START() in uipc_mbuf.c with calls to the centralised macros, reducing direct use of MLEN and MHLEN. Differential Revision: https://reviews.freebsd.org/D1444 Reviewed by: bz Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Thu Jan 8 10:53:20 2015 (r276817) +++ head/sys/kern/uipc_mbuf.c Thu Jan 8 11:16:21 2015 (r276818) @@ -196,8 +196,7 @@ m_getm2(struct mbuf *m, int len, int how } /* Book keeping. */ - len -= (mb->m_flags & M_EXT) ? mb->m_ext.ext_size : - ((mb->m_flags & M_PKTHDR) ? MHLEN : MLEN); + len -= M_SIZE(mb); if (mtail != NULL) mtail->m_next = mb; else @@ -430,11 +429,8 @@ m_sanity(struct mbuf *m0, int sanitize) * unrelated kernel memory before or after us is trashed. * No way to recover from that. */ - a = ((m->m_flags & M_EXT) ? m->m_ext.ext_buf : - ((m->m_flags & M_PKTHDR) ? (caddr_t)(&m->m_pktdat) : - (caddr_t)(&m->m_dat)) ); - b = (caddr_t)(a + (m->m_flags & M_EXT ? m->m_ext.ext_size : - ((m->m_flags & M_PKTHDR) ? MHLEN : MLEN))); + a = M_START(m); + b = a + M_SIZE(m); if ((caddr_t)m->m_data < a) M_SANITY_ACTION("m_data outside mbuf data range left"); if ((caddr_t)m->m_data > b) From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 12:39: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 4C569C1A; Thu, 8 Jan 2015 12:39:29 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id E95DEA72; Thu, 8 Jan 2015 12:39:28 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id E14F11A4BCD; Thu, 8 Jan 2015 23:39:19 +1100 (AEDT) Date: Thu, 8 Jan 2015 23:39:19 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r276802 - head/lib/libc/gen In-Reply-To: <20150108102708.GP42409@kib.kiev.ua> Message-ID: <20150108225422.B1123@besplex.bde.org> References: <201501080127.t081Ri85035157@svn.freebsd.org> <20150108102708.GP42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Qdxf4Krv c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=92h_sIuzCw9tVE03OV8A:9 a=CjuIK1q_8ugA:10 Cc: Craig Rodrigues , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 12:39:29 -0000 On Thu, 8 Jan 2015, Konstantin Belousov wrote: > On Thu, Jan 08, 2015 at 01:27:44AM +0000, Craig Rodrigues wrote: >> @@ -43,11 +43,11 @@ >> .Sh DESCRIPTION >> The >> .Fn sleep >> -function suspends execution of the calling process until either >> +function suspends execution of the calling thread until either >> .Fa seconds >> -seconds have elapsed or a signal is delivered to the process and its >> +seconds have elapsed or a signal is delivered to the thread and its >> action is to invoke a signal-catching function or to terminate the >> -process. >> +thread or process. > There is no signal action to terminate thread. There is another bug: the process may be terminated by means other than a signal (usually just by exit() in another thread). This case is not mentioned. These bugs are missing in POSIX. It says: "or a signal is delivered to the calling thread and its action is to invoke a signal-catching function, or the process is terminated" The second clause (after the comma) seems hard to parse until you realise that it is intentionally separate from the signal case. When there was only 1 thread per process, the only way to terminate a process was via a signal. The FreeBSD description still covers only that case. Related bugs found by grepping for "process" and "thread" in sleep man pages (unless I missed other changes): - nanosleep(2) still says "process" in its NAME and ERRORS sections It has no other uses of "process" so no correct ones. - nanosleep(2) is missing the description of early returns for signals and terminations in the DESCRIPTION section. It has a little about this in the RETURN VALUES section. The latter has the only use of "thread". Many more are needed - usleep(3) is still almost identical to the old version of sleep(3) - clock_nanosleep(2) is broken (not supported). In POSIX, the above POSIX wording is used in these 3 functions and nowhere else. Both POSIX and FreeBSD are less verbose in describing when [p]select() and poll() return early due to a timeout. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 12:55: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 C7D8F9B for ; Thu, 8 Jan 2015 12:55:22 +0000 (UTC) Received: from mailrelay8.public.one.com (mailrelay8.public.one.com [91.198.169.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 298C9C2A for ; Thu, 8 Jan 2015 12:55:21 +0000 (UTC) X-HalOne-Cookie: 43cb4da6ee54ee312eec2a01bf851ccfdf1d6b4b X-HalOne-ID: 6fedaa58-9735-11e4-bf9a-b82a72cffc46 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cederstrand.dk; s=20140924; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=s28q9pqbRGUn+v3FCtF7tbTjvqioy6RtT8tAnDaeQWI=; b=nv6HLsWY69f3hJsog/GoyW+eCrI6LaCbuwlQZ8vrDW2otQFOxBf6pDwLxSvgmBoDxSBPNhIDX2FbY 4OTMn5kTBkJneXLhURrSb3ln8W9ZBMYrQEIUJWHgFRDS1dWmVgUMpCTw1T3k0aNRbZuWtFicCjgEn+ KB9+wuApRBu2/lb0= Received: from [192.168.1.65] (unknown [217.157.7.221]) by smtpfilter4.public.one.com (Halon Mail Gateway) with ESMTPSA; Thu, 8 Jan 2015 12:54:09 +0000 (GMT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r276796 - in head: . share/mk tools/build/options From: Erik Cederstrand In-Reply-To: <201501072202.t07M2c85038999@svn.freebsd.org> Date: Thu, 8 Jan 2015 13:54:08 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <2D0BE9D0-45C7-4800-95F7-78BA3272E7E0@cederstrand.dk> References: <201501072202.t07M2c85038999@svn.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 12:55:22 -0000 Thanks, Ed. That's really cool! Does anyone know what the status of replacing ld is? Erik > Den 07/01/2015 kl. 23.02 skrev Ed Maste : >=20 > Author: emaste > Date: Wed Jan 7 22:02:37 2015 > New Revision: 276796 > URL: https://svnweb.freebsd.org/changeset/base/276796 >=20 > Log: > Use a set of ELF Tool Chain tools by default >=20 > These tools are now from the ELF Tool Chain project: >=20 > * addr2line > * elfcopy (strip) > * nm > * size > * strings >=20 > The binutils versions are available by setting in src.conf: > WITHOUT_ELFTOOLCHAIN_TOOLS=3Dyes >=20 > Thanks to antoine@ for multiple exp-runs and diagnosing many of the > failures. >=20 > PR: 195561 (ports exp-run) > Sponsored by: The FreeBSD Foundation >=20 > Added: > head/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS > - copied, changed from r276793, = head/tools/build/options/WITH_ELFTOOLCHAIN_TOOLS > Deleted: > head/tools/build/options/WITH_ELFTOOLCHAIN_TOOLS > Modified: > head/UPDATING > head/share/mk/src.opts.mk >=20 > Modified: head/UPDATING > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/UPDATING Wed Jan 7 21:44:57 2015 (r276795) > +++ head/UPDATING Wed Jan 7 22:02:37 2015 (r276796) > @@ -31,6 +31,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >=20 > +20150107: > + ELF tools addr2line, elfcopy (strip), nm, size, and strings are = now > + taken from the ELF Tool Chain project rather than GNU binutils. = They > + should be drop-in replacements, with the addition of arm64 = support. > + The WITHOUT_ELFTOOLCHAIN_TOOLS=3D knob may be used to obtain the > + binutils tools, if necessary. > + > 20150105: > The default Unbound configuration now enables remote control > using a local socket. Users who have already enabled the >=20 > Modified: head/share/mk/src.opts.mk > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/mk/src.opts.mk Wed Jan 7 21:44:57 2015 = (r276795) > +++ head/share/mk/src.opts.mk Wed Jan 7 22:02:37 2015 = (r276796) > @@ -73,6 +73,7 @@ __DEFAULT_YES_OPTIONS =3D \ > DMAGENT \ > DYNAMICROOT \ > ED_CRYPTO \ > + ELFTOOLCHAIN_TOOLS \ > EXAMPLES \ > FDT \ > FLOPPY \ > @@ -159,7 +160,6 @@ __DEFAULT_NO_OPTIONS =3D \ > BSD_GREP \ > CLANG_EXTRAS \ > EISA \ > - ELFTOOLCHAIN_TOOLS \ > FMAKE \ > HESIOD \ > LLDB \ >=20 > Copied and modified: = head/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS (from r276793, = head/tools/build/options/WITH_ELFTOOLCHAIN_TOOLS) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/tools/build/options/WITH_ELFTOOLCHAIN_TOOLS Wed Jan 7 = 21:09:25 2015 (r276793, copy source) > +++ head/tools/build/options/WITHOUT_ELFTOOLCHAIN_TOOLS Wed Jan = 7 22:02:37 2015 (r276796) > @@ -6,4 +6,4 @@ Set to use > .Xr strings 1 , > and > .Xr strip 1 > -from the elftoolchain project instead of GNU binutils. > +from GNU binutils instead of the ELF Tool Chain project. > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to = "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 14:14: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 40300997; Thu, 8 Jan 2015 14:14:40 +0000 (UTC) Received: from sakura.ccs.furiru.org (sakura.ccs.furiru.org [IPv6:2001:2f0:104:8060::1]) (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 EB70B6A3; Thu, 8 Jan 2015 14:14:39 +0000 (UTC) Received: from localhost (authenticated bits=0) by sakura.ccs.furiru.org (unknown) with ESMTPA id t08EEZBu020864; Thu, 8 Jan 2015 23:14:37 +0900 (JST) (envelope-from nyan@FreeBSD.org) Date: Thu, 08 Jan 2015 23:14:35 +0900 (JST) Message-Id: <20150108.231435.1379700739664448165.nyan@FreeBSD.org> To: imp@freebsd.org Subject: Re: svn commit: r276801 - head/sys/i386/i386 From: TAKAHASHI Yoshihiro In-Reply-To: <201501080039.t080df3O011578@svn.freebsd.org> References: <201501080039.t080df3O011578@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 14:14:40 -0000 In article <201501080039.t080df3O011578@svn.freebsd.org> Warner Losh writes: > Author: imp > Date: Thu Jan 8 00:39:40 2015 > New Revision: 276801 > URL: https://svnweb.freebsd.org/changeset/base/276801 > > Log: > Don't call the SSE routines when they aren't enabled (or even compiled > into the kernel). > > +#if !defined(CPU_DISABLE_SSE) && defined(I686_CPU) > +#define CPU_ENABLE_SSE > +#endif % grep CPU_DISABLE_SSE options.* options.i386:CPU_DISABLE_SSE opt_cpu.h options.pc98:CPU_DISABLE_SSE opt_cpu.h So including opt_cpu.h is required. --- TAKAHASHI Yoshihiro From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 14:26: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 9F94CF49; Thu, 8 Jan 2015 14:26: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 8B5B480C; Thu, 8 Jan 2015 14:26: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 t08EQoR2003091; Thu, 8 Jan 2015 14:26:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08EQo1g003090; Thu, 8 Jan 2015 14:26:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501081426.t08EQo1g003090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 8 Jan 2015 14:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276819 - head/lib/clang/libllvmaarch64disassembler X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 14:26:50 -0000 Author: emaste Date: Thu Jan 8 14:26:49 2015 New Revision: 276819 URL: https://svnweb.freebsd.org/changeset/base/276819 Log: Fix WITH_LLDB build A build with WITH_LLDB and not WITH_CLANG_EXTRAS failed after r276783. Reported by: rodrigc Modified: head/lib/clang/libllvmaarch64disassembler/Makefile Modified: head/lib/clang/libllvmaarch64disassembler/Makefile ============================================================================== --- head/lib/clang/libllvmaarch64disassembler/Makefile Thu Jan 8 11:16:21 2015 (r276818) +++ head/lib/clang/libllvmaarch64disassembler/Makefile Thu Jan 8 14:26:49 2015 (r276819) @@ -8,7 +8,7 @@ SRCDIR= lib/Target/AArch64/Disassembler INCDIR= lib/Target/AArch64 SRCS= AArch64Disassembler.cpp -.if ${MK_CLANG_EXTRAS} != "no" +.if ${MK_CLANG_EXTRAS} != "no" || .${MK_LLDB} != "no" SRCS+= AArch64ExternalSymbolizer.cpp .endif From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 14:29: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 332E710E; Thu, 8 Jan 2015 14:29: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 1F9C5824; Thu, 8 Jan 2015 14:29: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 t08ET30e003395; Thu, 8 Jan 2015 14:29:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08ET3OW003394; Thu, 8 Jan 2015 14:29:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501081429.t08ET3OW003394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 8 Jan 2015 14:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276820 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 14:29:04 -0000 Author: gjb Date: Thu Jan 8 14:29:03 2015 New Revision: 276820 URL: https://svnweb.freebsd.org/changeset/base/276820 Log: Print informational output when NOPORTS is set, which would otherwise cause pkg-stage.sh to silently exit. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Thu Jan 8 14:26:49 2015 (r276819) +++ head/release/scripts/pkg-stage.sh Thu Jan 8 14:29:03 2015 (r276820) @@ -33,6 +33,9 @@ x11/xorg" # If NOPORTS is set for the release, do not attempt to build pkg(8). if [ ! -f /usr/ports/Makefile ]; then + echo "*** /usr/ports is missing! ***" + echo "*** Skipping pkg-stage.sh ***" + echo "*** Unset NOPORTS to fix this ***" exit 0 fi From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 14:35: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 7129E2A0; Thu, 8 Jan 2015 14:35: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 42CE98DD; Thu, 8 Jan 2015 14:35: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 t08EZHJT007784; Thu, 8 Jan 2015 14:35:17 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08EZG5Y007782; Thu, 8 Jan 2015 14:35:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501081435.t08EZG5Y007782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 8 Jan 2015 14:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276821 - head/contrib/elftoolchain/nm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 14:35:17 -0000 Author: emaste Date: Thu Jan 8 14:35:16 2015 New Revision: 276821 URL: https://svnweb.freebsd.org/changeset/base/276821 Log: nm: Accept long option --extern-only for -g Submitted by: jkim Modified: head/contrib/elftoolchain/nm/nm.1 head/contrib/elftoolchain/nm/nm.c Modified: head/contrib/elftoolchain/nm/nm.1 ============================================================================== --- head/contrib/elftoolchain/nm/nm.1 Thu Jan 8 14:29:03 2015 (r276820) +++ head/contrib/elftoolchain/nm/nm.1 Thu Jan 8 14:35:16 2015 (r276821) @@ -24,7 +24,7 @@ .\" .\" $Id: nm.1 2377 2012-01-03 07:10:59Z jkoshy $ .\" -.Dd January 3, 2012 +.Dd January 8, 2015 .Os .Dt NM 1 .Sh NAME @@ -36,6 +36,7 @@ .Op Fl -defined-only .Op Fl -demangle Ns Op = Ns style .Op Fl -dynamic +.Op Fl -extern-only .Op Fl -help .Op Fl -line-numbers .Op Fl -no-demangle @@ -107,6 +108,8 @@ is not specified, it is taken to be .It Fl -dynamic Only display dynamic symbols. This option is only meaningful for shared libraries. +.It Fl -extern-only +Only display information about global (external) symbols. .It Fl -help Display a help message and exit. .It Fl -format Ns = Ns Ar format @@ -200,7 +203,8 @@ Only display information for global and .It Fl f Produce full output (default). .It Fl g -Only display information about global (external) symbols. +Equivalent to specifying option +.Fl -extern-only . .It Fl h Equivalent to specifying option .Fl -help . Modified: head/contrib/elftoolchain/nm/nm.c ============================================================================== --- head/contrib/elftoolchain/nm/nm.c Thu Jan 8 14:29:03 2015 (r276820) +++ head/contrib/elftoolchain/nm/nm.c Thu Jan 8 14:35:16 2015 (r276821) @@ -248,6 +248,7 @@ static const struct option nm_longopts[] { "defined-only", no_argument, &nm_opts.def_only, 1}, { "demangle", optional_argument, NULL, 'C' }, { "dynamic", no_argument, NULL, 'D' }, + { "extern-only", no_argument, NULL, 'g' }, { "format", required_argument, NULL, 'F' }, { "help", no_argument, NULL, 'h' }, { "line-numbers", no_argument, NULL, 'l' }, @@ -2042,7 +2043,7 @@ usage(int exitcode) \n -f Produce full output (default).\ \n --format=format Display output in specific format. Allowed\ \n formats are: \"bsd\", \"posix\" and \"sysv\".\ -\n -g Display only global symbol information.\ +\n -g, --extern-only Display only global symbol information.\ \n -h, --help Show this help message.\ \n -l, --line-numbers Display filename and linenumber using\ \n debugging information.\ From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 14: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 B085759F; Thu, 8 Jan 2015 14:39: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 9CC2B91D; Thu, 8 Jan 2015 14:39: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 t08EdsD0008500; Thu, 8 Jan 2015 14:39:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08EdspQ008499; Thu, 8 Jan 2015 14:39:54 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501081439.t08EdspQ008499@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 8 Jan 2015 14:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276822 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 14:39:54 -0000 Author: gjb Date: Thu Jan 8 14:39:53 2015 New Revision: 276822 URL: https://svnweb.freebsd.org/changeset/base/276822 Log: Ensure /var/run/ld-elf.so.hints exists before building pkg(8). MFC after: 3 days X-MFC-With: r276820 Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Thu Jan 8 14:35:16 2015 (r276821) +++ head/release/scripts/pkg-stage.sh Thu Jan 8 14:39:53 2015 (r276822) @@ -40,6 +40,7 @@ if [ ! -f /usr/ports/Makefile ]; then fi if [ ! -x /usr/local/sbin/pkg ]; then + /etc/rc.d/ldconfig restart /usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean fi From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 14:42:11 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 95E717DB; Thu, 8 Jan 2015 14:42:11 +0000 (UTC) Received: from mail-ie0-x22d.google.com (mail-ie0-x22d.google.com [IPv6:2607:f8b0:4001:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66C6D9C6; Thu, 8 Jan 2015 14:42:11 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id y20so9712229ier.4; Thu, 08 Jan 2015 06:42:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=G0CUbsVudAo1EZQlUJELEN5LQITZJUNQRkA3Go4boo4=; b=Y0snNNyJ6I3OyK72rSYQX48HpDHy7JufTd90KqZ+FGkLsQCBU279DUW5MhljQib9mm YpEdHhVeVSNx7pyULjxZk7wqNur2M4IlbZlc9hz8r+DVsVk6tUbco50MMWI7mX+4NRWV sQaLbA8opjkUotnn01f2DAuY6Fog5BB6Fmyflopu1bxhmckAgV6rORhjGt4CG1pn7UhB SjBppGVXJ2nvRF3ORXFi7bFmPR8WATsYzCLHEiGjAR3Pb/P6NMubOn0nHPXckLVKHfZb /+OUJ0KaNMKl3EhAEEivf5BmM1zNak/rXlMwwob014R9ZKg32eopm60yROOkN3mprqem dMZA== X-Received: by 10.107.153.147 with SMTP id b141mr9400351ioe.49.1420728130780; Thu, 08 Jan 2015 06:42:10 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.0.85 with HTTP; Thu, 8 Jan 2015 06:41:50 -0800 (PST) In-Reply-To: <2D0BE9D0-45C7-4800-95F7-78BA3272E7E0@cederstrand.dk> References: <201501072202.t07M2c85038999@svn.freebsd.org> <2D0BE9D0-45C7-4800-95F7-78BA3272E7E0@cederstrand.dk> From: Ed Maste Date: Thu, 8 Jan 2015 09:41:50 -0500 X-Google-Sender-Auth: Y7nfC9-E24rPtq7Jd7-kZ4sz1jQ Message-ID: Subject: Re: svn commit: r276796 - in head: . share/mk tools/build/options To: Erik Cederstrand Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 14:42:11 -0000 On 8 January 2015 at 07:54, Erik Cederstrand wrote: > Thanks, Ed. That's really cool! > > Does anyone know what the status of replacing ld is? The plan is to use lld from the LLVM linker. Good progress is being made upstream on lld; it can self-host on FreeBSD. We're currently blocked on linker script support -- lld actually has a linker script parser, but doesn't use it yet. From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 14:45: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 46EE3B5B; Thu, 8 Jan 2015 14:45: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 30CC39FC; Thu, 8 Jan 2015 14:45: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 t08EjvNg013033; Thu, 8 Jan 2015 14:45:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08Ejtti013024; Thu, 8 Jan 2015 14:45:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501081445.t08Ejtti013024@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Jan 2015 14:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276823 - in head: contrib/ofed/management/opensm/osmtest contrib/ofed/usr.bin contrib/ofed/usr.bin/osmtest contrib/ofed/usr.lib etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 14:45:57 -0000 Author: hselasky Date: Thu Jan 8 14:45:54 2015 New Revision: 276823 URL: https://svnweb.freebsd.org/changeset/base/276823 Log: Add makefile for the "osmtest" utility. While at it: - Fix depend target by removing a space after an "-I" inclusion option. - Fix some minor compile issues in the "osmtest" utility. MFC after: 3 days PR: 196580 Sponsored by: Mellanox Technologies Added: head/contrib/ofed/usr.bin/osmtest/ head/contrib/ofed/usr.bin/osmtest/Makefile (contents, props changed) Modified: head/contrib/ofed/management/opensm/osmtest/osmt_multicast.c head/contrib/ofed/management/opensm/osmtest/osmtest.c head/contrib/ofed/usr.bin/Makefile head/contrib/ofed/usr.lib/Makefile head/etc/mtree/BSD.tests.dist Modified: head/contrib/ofed/management/opensm/osmtest/osmt_multicast.c ============================================================================== --- head/contrib/ofed/management/opensm/osmtest/osmt_multicast.c Thu Jan 8 14:39:53 2015 (r276822) +++ head/contrib/ofed/management/opensm/osmtest/osmt_multicast.c Thu Jan 8 14:45:54 2015 (r276823) @@ -42,6 +42,7 @@ #ifndef __WIN__ #include #endif +#include #include #include #include Modified: head/contrib/ofed/management/opensm/osmtest/osmtest.c ============================================================================== --- head/contrib/ofed/management/opensm/osmtest/osmtest.c Thu Jan 8 14:39:53 2015 (r276822) +++ head/contrib/ofed/management/opensm/osmtest/osmtest.c Thu Jan 8 14:45:54 2015 (r276823) @@ -3013,7 +3013,7 @@ Exit: /********************************************************************** **********************************************************************/ -inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec) +static inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec) { return (p_rec->dlid << 16 | p_rec->slid); } Modified: head/contrib/ofed/usr.bin/Makefile ============================================================================== --- head/contrib/ofed/usr.bin/Makefile Thu Jan 8 14:39:53 2015 (r276822) +++ head/contrib/ofed/usr.bin/Makefile Thu Jan 8 14:45:54 2015 (r276823) @@ -1,6 +1,12 @@ -SUBDIR = ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat -SUBDIR += ibsysstat ibtracert opensm perfquery saquery -SUBDIR += sminfo smpdump smpquery vendstat +.include + +SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat \ + ibsysstat ibtracert opensm perfquery saquery \ + sminfo smpdump smpquery vendstat + +.if ${MK_TESTS} != "no" +SUBDIR+= osmtest +.endif SUBDIR_PARALLEL= Added: head/contrib/ofed/usr.bin/osmtest/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/ofed/usr.bin/osmtest/Makefile Thu Jan 8 14:45:54 2015 (r276823) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +.include "../Makefile.inc" + +OPENSM= ${.CURDIR}/../../management/opensm +.PATH: ${OPENSM}/osmtest ${OPENSM}/man + +BINDIR= ${TESTSBASE}/usr.bin/opensm +PROG= osmtest + +SRCS= main.c \ + osmt_inform.c \ + osmt_mtl_regular_qp.c \ + osmt_multicast.c \ + osmt_service.c \ + osmt_slvl_vl_arb.c \ + osmtest.c + +LDADD= -libcommon \ + -libmad \ + -libumad \ + -losmvendor \ + -losmcomp \ + -lopensm \ + -lpthread + +CFLAGS= -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP \ + -I${OPENSM}/osmtest/include + +MAN= osmtest.8 + +WARNS?= 1 + +.include Modified: head/contrib/ofed/usr.lib/Makefile ============================================================================== --- head/contrib/ofed/usr.lib/Makefile Thu Jan 8 14:39:53 2015 (r276822) +++ head/contrib/ofed/usr.lib/Makefile Thu Jan 8 14:45:54 2015 (r276823) @@ -1,5 +1,5 @@ -SUBDIR = libibcommon libibmad libibumad libibverbs libmlx4 libmthca -SUBDIR += libopensm libosmcomp libosmvendor libibcm librdmacm libsdp libcxgb4 +SUBDIR= libibcommon libibmad libibumad libibverbs libmlx4 libmthca \ + libopensm libosmcomp libosmvendor libibcm librdmacm libsdp libcxgb4 SUBDIR_PARALLEL= Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Thu Jan 8 14:39:53 2015 (r276822) +++ head/etc/mtree/BSD.tests.dist Thu Jan 8 14:45:54 2015 (r276823) @@ -358,6 +358,8 @@ .. ncal .. + opensm + .. printf .. sed From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 14:58: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 E74F7EA; Thu, 8 Jan 2015 14:58: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 D3254B36; Thu, 8 Jan 2015 14:58: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 t08EwtbW018005; Thu, 8 Jan 2015 14:58:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08Ewt83018003; Thu, 8 Jan 2015 14:58:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501081458.t08Ewt83018003@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Jan 2015 14:58:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276824 - in head/sys/ofed/drivers/infiniband/ulp: ipoib sdp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 14:58:56 -0000 Author: hselasky Date: Thu Jan 8 14:58:54 2015 New Revision: 276824 URL: https://svnweb.freebsd.org/changeset/base/276824 Log: Use the M_SIZE() macro when possible. MFC after: 3 days Suggested by: rwatson@ Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Thu Jan 8 14:45:54 2015 (r276823) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c Thu Jan 8 14:58:54 2015 (r276824) @@ -117,8 +117,7 @@ ipoib_alloc_map_mb(struct ipoib_dev_priv if (mb == NULL) return (NULL); for (i = 0, m = mb; m != NULL; m = m->m_next, i++) { - m->m_len = (m->m_flags & M_EXT) ? m->m_ext.ext_size : - ((m->m_flags & M_PKTHDR) ? MHLEN : MLEN); + m->m_len = M_SIZE(m); mb->m_pkthdr.len += m->m_len; rx_req->mapping[i] = ib_dma_map_single(priv->ca, mtod(m, void *), m->m_len, DMA_FROM_DEVICE); Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Thu Jan 8 14:45:54 2015 (r276823) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_rx.c Thu Jan 8 14:58:54 2015 (r276824) @@ -116,8 +116,7 @@ sdp_post_recv(struct sdp_sock *ssk) return -1; } for (m = mb; m != NULL; m = m->m_next) { - m->m_len = (m->m_flags & M_EXT) ? m->m_ext.ext_size : - ((m->m_flags & M_PKTHDR) ? MHLEN : MLEN); + m->m_len = M_SIZE(m); mb->m_pkthdr.len += m->m_len; } h = mtod(mb, struct sdp_bsdh *); From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 15:10: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 0083A453; Thu, 8 Jan 2015 15:10: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 E10ADC4A; Thu, 8 Jan 2015 15:10: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 t08FAQhw023472; Thu, 8 Jan 2015 15:10:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08FAQad023471; Thu, 8 Jan 2015 15:10:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501081510.t08FAQad023471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 8 Jan 2015 15:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276825 - 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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 15:10:27 -0000 Author: hselasky Date: Thu Jan 8 15:10:25 2015 New Revision: 276825 URL: https://svnweb.freebsd.org/changeset/base/276825 Log: Allow a block size of zero to mean 512 bytes, which is the most common block size for USB disks. This fixes support for "Action Cam SJ4000". Reviewed by: mav @ MFC after: 1 week Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Jan 8 14:58:54 2015 (r276824) +++ head/sys/cam/scsi/scsi_da.c Thu Jan 8 15:10:25 2015 (r276825) @@ -3094,8 +3094,10 @@ dadone(struct cam_periph *periph, union if (block_size == 0 && maxsector == 0) { block_size = 512; maxsector = -1; + } else if (block_size == 0) { + block_size = 512; } - if (block_size >= MAXPHYS || block_size == 0) { + if (block_size >= MAXPHYS) { xpt_print(periph->path, "unsupportable block size %ju\n", (uintmax_t) block_size); From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 15:17: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 93619631; Thu, 8 Jan 2015 15:17:30 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50C5CD20; Thu, 8 Jan 2015 15:17:30 +0000 (UTC) Received: from [192.168.3.3] (unknown [77.243.161.229]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9B903B80A; Thu, 8 Jan 2015 16:17:24 +0100 (CET) Subject: Re: svn commit: r276819 - head/lib/clang/libllvmaarch64disassembler Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D8C8F3E8-058F-41F1-917F-865F8E3DA52D"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 From: Dimitry Andric In-Reply-To: <201501081426.t08EQo1g003090@svn.freebsd.org> Date: Thu, 8 Jan 2015 16:17:18 +0100 Message-Id: <8F976F41-B2B1-49C9-BD6A-A341D954EC7D@FreeBSD.org> References: <201501081426.t08EQo1g003090@svn.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 15:17:30 -0000 --Apple-Mail=_D8C8F3E8-058F-41F1-917F-865F8E3DA52D Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 08 Jan 2015, at 15:26, Ed Maste wrote: > > Author: emaste > Date: Thu Jan 8 14:26:49 2015 > New Revision: 276819 > URL: https://svnweb.freebsd.org/changeset/base/276819 > > Log: > Fix WITH_LLDB build > > A build with WITH_LLDB and not WITH_CLANG_EXTRAS failed after r276783. > > Reported by: rodrigc Thanks! This was the one combination I forgot to test... :) -Dimitry --Apple-Mail=_D8C8F3E8-058F-41F1-917F-865F8E3DA52D 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----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlSun4IACgkQsF6jCi4glqMcAACfX16nMV2jfT6oxxC0ZadfZoTR AngAoOozNwnQuugFktbf4RLsvbxLKmkI =78Ha -----END PGP SIGNATURE----- --Apple-Mail=_D8C8F3E8-058F-41F1-917F-865F8E3DA52D-- From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 15:20: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 E63E97B6; Thu, 8 Jan 2015 15:20: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 B88ECD3F; Thu, 8 Jan 2015 15:20: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 t08FKhjS029971; Thu, 8 Jan 2015 15:20:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08FKhXl029775; Thu, 8 Jan 2015 15:20:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501081520.t08FKhXl029775@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 8 Jan 2015 15:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276826 - in head/tools/tools/nanobsd: gateworks pcengines X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 15:20:44 -0000 Author: jhb Date: Thu Jan 8 15:20:42 2015 New Revision: 276826 URL: https://svnweb.freebsd.org/changeset/base/276826 Log: Drop 'new' from the description of NFSCL to match the recent change in HEAD kernel confs. Modified: head/tools/tools/nanobsd/gateworks/G2348 head/tools/tools/nanobsd/pcengines/ALIX_DSK head/tools/tools/nanobsd/pcengines/ALIX_NFS Modified: head/tools/tools/nanobsd/gateworks/G2348 ============================================================================== --- head/tools/tools/nanobsd/gateworks/G2348 Thu Jan 8 15:10:25 2015 (r276825) +++ head/tools/tools/nanobsd/gateworks/G2348 Thu Jan 8 15:20:42 2015 (r276826) @@ -41,7 +41,7 @@ options FFS #Berkeley Fast Filesystem #options SOFTUPDATES #Enable FFS soft updates support #options UFS_ACL #Support for access control lists #options UFS_DIRHASH #Improve performance on big directories -options NFSCL #New Network Filesystem Client +options NFSCL #Network Filesystem Client options NFSLOCKD #Network Lock Manager options KTRACE #ktrace(1) support #options SYSVSHM #SYSV-style shared memory Modified: head/tools/tools/nanobsd/pcengines/ALIX_DSK ============================================================================== --- head/tools/tools/nanobsd/pcengines/ALIX_DSK Thu Jan 8 15:10:25 2015 (r276825) +++ head/tools/tools/nanobsd/pcengines/ALIX_DSK Thu Jan 8 15:20:42 2015 (r276826) @@ -14,7 +14,7 @@ options FFS options SOFTUPDATES options UFS_ACL options UFS_DIRHASH -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD options MSDOSFS options CD9660 Modified: head/tools/tools/nanobsd/pcengines/ALIX_NFS ============================================================================== --- head/tools/tools/nanobsd/pcengines/ALIX_NFS Thu Jan 8 15:10:25 2015 (r276825) +++ head/tools/tools/nanobsd/pcengines/ALIX_NFS Thu Jan 8 15:20:42 2015 (r276826) @@ -14,7 +14,7 @@ options FFS options SOFTUPDATES options UFS_ACL options UFS_DIRHASH -options NFSCL # New Network Filesystem Client +options NFSCL # Network Filesystem Client options NFSLOCKD options MSDOSFS options CD9660 From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 15:42:11 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 C65B0F11; Thu, 8 Jan 2015 15:42: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 B28E4FBB; Thu, 8 Jan 2015 15:42: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 t08FgBcW040923; Thu, 8 Jan 2015 15:42:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08FgBoQ040922; Thu, 8 Jan 2015 15:42:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501081542.t08FgBoQ040922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 8 Jan 2015 15:42:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276827 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 15:42:11 -0000 Author: gjb Date: Thu Jan 8 15:42:10 2015 New Revision: 276827 URL: https://svnweb.freebsd.org/changeset/base/276827 Log: Ensure the ports directories exist for the list of packages intended to be included on the DVD, and remove any nonexistent ports from the final list. Print the list of missing paths, and ensure that DVD_PACKAGES is non-zero length (which should never happen). MFC after: 3 days X-MFC-With: r276820, r276822 Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Thu Jan 8 15:20:42 2015 (r276826) +++ head/release/scripts/pkg-stage.sh Thu Jan 8 15:42:10 2015 (r276827) @@ -11,7 +11,7 @@ export PERMISSIVE="YES" export REPO_AUTOUPDATE="NO" export PKGCMD="/usr/sbin/pkg -d" -DVD_PACKAGES="archivers/unzip +_DVD_PACKAGES="archivers/unzip devel/subversion devel/subversion-static emulators/linux_base-f10 @@ -54,6 +54,25 @@ if [ ! -z "${PKG_ALTABI}" ]; then (cd ${DVD_DIR} && ln -s ${PKG_ABI} ${PKG_ALTABI}) fi +# Ensure the ports listed in _DVD_PACKAGES exist to sanitize the +# final list. +for _P in ${_DVD_PACKAGES}; do + if [ -d "/usr/ports/${_P}" ]; then + DVD_PACKAGES="${DVD_PACKAGES} ${_P}" + else + echo "*** Skipping nonexistent port: ${_P}" + fi +done + +# Make sure the package list is not empty. +if [ -z "${DVD_PACKAGES}" ]; then + echo "*** The package list is empty." + echo "*** Something is very wrong." + # Exit '0' so the rest of the build process continues + # so other issues (if any) can be addressed as well. + exit 0 +fi + # Print pkg(8) information to make debugging easier. ${PKGCMD} -vv ${PKGCMD} update -f From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 15:50: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 D453C202; Thu, 8 Jan 2015 15:50: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 C0E0460; Thu, 8 Jan 2015 15:50: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 t08FoBKi043827; Thu, 8 Jan 2015 15:50:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08FoBVl043826; Thu, 8 Jan 2015 15:50:11 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501081550.t08FoBVl043826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 8 Jan 2015 15:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276828 - head/release/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 15:50:11 -0000 Author: gjb Date: Thu Jan 8 15:50:10 2015 New Revision: 276828 URL: https://svnweb.freebsd.org/changeset/base/276828 Log: Switch to x11/gnome3 now that x11/gnome2 no longer exists in the ports tree. MFC after: 3 days X-MFC-With: r276820, r276822, r276827 Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/pkg-stage.sh Modified: head/release/scripts/pkg-stage.sh ============================================================================== --- head/release/scripts/pkg-stage.sh Thu Jan 8 15:42:10 2015 (r276827) +++ head/release/scripts/pkg-stage.sh Thu Jan 8 15:50:10 2015 (r276828) @@ -27,7 +27,7 @@ sysutils/screen www/firefox www/links x11-drivers/xf86-video-vmware -x11/gnome2 +x11/gnome3 x11/kde4 x11/xorg" From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 15:53: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 A988D3D0; Thu, 8 Jan 2015 15:53: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 94029126; Thu, 8 Jan 2015 15:53: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 t08FrF08045759; Thu, 8 Jan 2015 15:53:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08FrEuP045752; Thu, 8 Jan 2015 15:53:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501081553.t08FrEuP045752@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 8 Jan 2015 15:53:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276829 - in head: sys/kern sys/sys sys/x86/acpica usr.bin/cpuset X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 15:53:15 -0000 Author: jhb Date: Thu Jan 8 15:53:13 2015 New Revision: 276829 URL: https://svnweb.freebsd.org/changeset/base/276829 Log: Create a cpuset mask for each NUMA domain that is available in the kernel via the global cpuset_domain[] array. To export these to userland, add a CPU_WHICH_DOMAIN level that can be used to fetch the mask for a specific domain. Add a -d flag to cpuset(1) that can be used to fetch the mask for a given domain. Differential Revision: https://reviews.freebsd.org/D1232 Submitted by: jeff (kernel bits) Reviewed by: adrian, jeff Modified: head/sys/kern/kern_cpuset.c head/sys/sys/cpuset.h head/sys/sys/smp.h head/sys/x86/acpica/srat.c head/usr.bin/cpuset/cpuset.1 head/usr.bin/cpuset/cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Thu Jan 8 15:50:10 2015 (r276828) +++ head/sys/kern/kern_cpuset.c Thu Jan 8 15:53:13 2015 (r276829) @@ -56,6 +56,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include +#include #ifdef DDB #include @@ -113,6 +117,7 @@ SYSCTL_INT(_kern_sched, OID_AUTO, cpuset SYSCTL_NULL_INT_PTR, sizeof(cpuset_t), "sizeof(cpuset_t)"); cpuset_t *cpuset_root; +cpuset_t cpuset_domain[MAXMEMDOM]; /* * Acquire a reference to a cpuset, all pointers must be tracked with refs. @@ -457,6 +462,7 @@ cpuset_which(cpuwhich_t which, id_t id, return (0); } case CPU_WHICH_IRQ: + case CPU_WHICH_DOMAIN: return (0); default: return (EINVAL); @@ -810,7 +816,8 @@ out: /* - * Creates the cpuset for thread0. We make two sets: + * Creates system-wide cpusets and the cpuset for thread0 including two + * sets: * * 0 - The root set which should represent all valid processors in the * system. It is initially created with a mask of all processors @@ -856,6 +863,10 @@ cpuset_thread0(void) */ cpuset_unr = new_unrhdr(2, INT_MAX, NULL); + /* MD Code is responsible for initializing sets if vm_ndomains > 1. */ + if (vm_ndomains == 1) + CPU_COPY(&all_cpus, &cpuset_domain[0]); + return (set); } @@ -1010,6 +1021,7 @@ sys_cpuset_getid(struct thread *td, stru case CPU_WHICH_JAIL: break; case CPU_WHICH_IRQ: + case CPU_WHICH_DOMAIN: return (EINVAL); } switch (uap->level) { @@ -1073,6 +1085,7 @@ sys_cpuset_getaffinity(struct thread *td case CPU_WHICH_JAIL: break; case CPU_WHICH_IRQ: + case CPU_WHICH_DOMAIN: error = EINVAL; goto out; } @@ -1104,6 +1117,12 @@ sys_cpuset_getaffinity(struct thread *td case CPU_WHICH_IRQ: error = intr_getaffinity(uap->id, mask); break; + case CPU_WHICH_DOMAIN: + if (uap->id >= vm_ndomains) + error = ESRCH; + else + CPU_COPY(&cpuset_domain[uap->id], mask); + break; } break; default: @@ -1182,6 +1201,7 @@ sys_cpuset_setaffinity(struct thread *td case CPU_WHICH_JAIL: break; case CPU_WHICH_IRQ: + case CPU_WHICH_DOMAIN: error = EINVAL; goto out; } Modified: head/sys/sys/cpuset.h ============================================================================== --- head/sys/sys/cpuset.h Thu Jan 8 15:50:10 2015 (r276828) +++ head/sys/sys/cpuset.h Thu Jan 8 15:53:13 2015 (r276829) @@ -76,6 +76,7 @@ #define CPU_WHICH_CPUSET 3 /* Specifies a set id. */ #define CPU_WHICH_IRQ 4 /* Specifies an irq #. */ #define CPU_WHICH_JAIL 5 /* Specifies a jail id. */ +#define CPU_WHICH_DOMAIN 6 /* Specifies a NUMA domain id. */ /* * Reserved cpuset identifiers. Modified: head/sys/sys/smp.h ============================================================================== --- head/sys/sys/smp.h Thu Jan 8 15:50:10 2015 (r276828) +++ head/sys/sys/smp.h Thu Jan 8 15:53:13 2015 (r276829) @@ -85,6 +85,7 @@ extern int mp_ncpus; extern volatile int smp_started; extern cpuset_t all_cpus; +extern cpuset_t cpuset_domain[MAXMEMDOM]; /* CPUs in each NUMA domain. */ /* * Macro allowing us to determine whether a CPU is absent at any given Modified: head/sys/x86/acpica/srat.c ============================================================================== --- head/sys/x86/acpica/srat.c Thu Jan 8 15:50:10 2015 (r276828) +++ head/sys/x86/acpica/srat.c Thu Jan 8 15:53:13 2015 (r276829) @@ -342,7 +342,7 @@ srat_walk_table(acpi_subtable_handler *h } /* - * Setup per-CPU ACPI IDs. + * Setup per-CPU domain IDs. */ static void srat_set_cpus(void *dummy) @@ -363,6 +363,7 @@ srat_set_cpus(void *dummy) panic("SRAT: CPU with APIC ID %u is not known", pc->pc_apic_id); pc->pc_domain = cpu->domain; + CPU_SET(i, &cpuset_domain[cpu->domain]); if (bootverbose) printf("SRAT: CPU %u has memory domain %d\n", i, cpu->domain); Modified: head/usr.bin/cpuset/cpuset.1 ============================================================================== --- head/usr.bin/cpuset/cpuset.1 Thu Jan 8 15:50:10 2015 (r276828) +++ head/usr.bin/cpuset/cpuset.1 Thu Jan 8 15:53:13 2015 (r276829) @@ -46,12 +46,13 @@ .Fl C .Fl p Ar pid .Nm -.Op Fl cr +.Op Fl c .Op Fl l Ar cpu-list .Op Fl j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq .Nm -.Op Fl cgir -.Op Fl j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq +.Fl g +.Op Fl cir +.Op Fl d Ar domain | j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq .Sh DESCRIPTION The .Nm @@ -62,7 +63,7 @@ about processor binding, sets, and avail .Nm requires a target to modify or query. The target may be specified as a command, process id, thread id, a -cpuset id, an irq or a jail id. +cpuset id, an irq, a jail id, or a NUMA domain. Using .Fl g the target's set id or mask may be queried. @@ -108,6 +109,8 @@ Create a new cpuset and assign the targe .It Fl c The requested operation should reference the cpuset available via the target specifier. +.It Fl d Ar domain +Specifies a NUMA domain id as the target of the operation. .It Fl g Causes .Nm Modified: head/usr.bin/cpuset/cpuset.c ============================================================================== --- head/usr.bin/cpuset/cpuset.c Thu Jan 8 15:50:10 2015 (r276828) +++ head/usr.bin/cpuset/cpuset.c Thu Jan 8 15:53:13 2015 (r276829) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); static int Cflag; static int cflag; +static int dflag; static int gflag; static int iflag; static int jflag; @@ -161,7 +162,8 @@ printset(cpuset_t *mask) printf("\n"); } -static const char *whichnames[] = { NULL, "tid", "pid", "cpuset", "irq", "jail" }; +static const char *whichnames[] = { NULL, "tid", "pid", "cpuset", "irq", "jail", + "domain" }; static const char *levelnames[] = { NULL, " root", " cpuset", "" }; static void @@ -206,17 +208,20 @@ main(int argc, char *argv[]) level = CPU_LEVEL_WHICH; which = CPU_WHICH_PID; id = pid = tid = setid = -1; - while ((ch = getopt(argc, argv, "Ccgij:l:p:rs:t:x:")) != -1) { + while ((ch = getopt(argc, argv, "Ccd:gij:l:p:rs:t:x:")) != -1) { switch (ch) { case 'C': Cflag = 1; break; case 'c': - if (rflag) - usage(); cflag = 1; level = CPU_LEVEL_CPUSET; break; + case 'd': + dflag = 1; + which = CPU_WHICH_DOMAIN; + id = atoi(optarg); + break; case 'g': gflag = 1; break; @@ -238,8 +243,6 @@ main(int argc, char *argv[]) id = pid = atoi(optarg); break; case 'r': - if (cflag) - usage(); level = CPU_LEVEL_ROOT; rflag = 1; break; @@ -268,7 +271,7 @@ main(int argc, char *argv[]) if (argc || Cflag || lflag) usage(); /* Only one identity specifier. */ - if (jflag + xflag + sflag + pflag + tflag > 1) + if (dflag + jflag + xflag + sflag + pflag + tflag > 1) usage(); if (iflag) printsetid(); @@ -276,13 +279,13 @@ main(int argc, char *argv[]) printaffinity(); exit(EXIT_SUCCESS); } - if (iflag) + if (dflag || iflag || rflag) usage(); /* * The user wants to run a command with a set and possibly cpumask. */ if (argc) { - if (Cflag | pflag | rflag | tflag | xflag | jflag) + if (Cflag || pflag || tflag || xflag || jflag) usage(); if (sflag) { if (cpuset_setid(CPU_WHICH_PID, -1, setid)) @@ -303,9 +306,9 @@ main(int argc, char *argv[]) /* * We're modifying something that presently exists. */ - if (Cflag && (sflag || rflag || !pflag || tflag || xflag || jflag)) + if (Cflag && (jflag || !pflag || sflag || tflag || xflag)) usage(); - if (!lflag && (cflag || rflag)) + if (!lflag && cflag) usage(); if (!lflag && !(Cflag || sflag)) usage(); @@ -354,8 +357,9 @@ usage(void) fprintf(stderr, " cpuset [-c] [-l cpu-list] -C -p pid\n"); fprintf(stderr, - " cpuset [-cr] [-l cpu-list] [-j jailid | -p pid | -t tid | -s setid | -x irq]\n"); + " cpuset [-c] [-l cpu-list] [-j jailid | -p pid | -t tid | -s setid | -x irq]\n"); fprintf(stderr, - " cpuset [-cgir] [-j jailid | -p pid | -t tid | -s setid | -x irq]\n"); + " cpuset -g [-cir] [-d domain | -j jailid | -p pid | -t tid | -s setid |\n" + " -x irq]\n"); exit(1); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 16:27: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 55BB0CF3; Thu, 8 Jan 2015 16:27: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 2899365A; Thu, 8 Jan 2015 16:27: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 t08GRvbC062050; Thu, 8 Jan 2015 16:27:57 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08GRvS7062049; Thu, 8 Jan 2015 16:27:57 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201501081627.t08GRvS7062049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 8 Jan 2015 16:27:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276831 - 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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 16:27:57 -0000 Author: ken Date: Thu Jan 8 16:27:56 2015 New Revision: 276831 URL: https://svnweb.freebsd.org/changeset/base/276831 Log: Fix a bug in the CAM SCSI probe code that caused changes in inquiry data to go undetected. The probe code does an MD5 checksum of the inquiry data (and page 0x80 serial number if available) before doing a reprobe of an existing device, and then compares a checksum after the probe to see whether the device has changed. This check was broken in January, 2000 by change 56146 when the extended inquiry probe code was added. In the extended inquiry probe case, it was calculating the checksum a second time. The second time it included the updated inquiry data from the short inquiry probe (first 36 bytes). So it wouldn't catch cases where the vendor, product, revision, etc. changed. This change will have the effect that when a device's inquiry data is updated and a rescan is issued, it will disappear and then reappear. This is the appropriate action, because if the inquiry data or serial number changes, it is either a different device or the device configuration may have changed significantly. (e.g. with updated firmware.) scsi_xpt.c: Don't calculate the initial MD5 checksum on standard inquiry data and the page 0x80 serial number if we have already calculated it. MFC after: 1 week Sponsored by: Spectra Logic Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Thu Jan 8 16:13:21 2015 (r276830) +++ head/sys/cam/scsi/scsi_xpt.c Thu Jan 8 16:27:56 2015 (r276831) @@ -755,7 +755,8 @@ again: * serial number check finish, we attempt to figure out * whether we still have the same device. */ - if ((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) { + if (((periph->path->device->flags & CAM_DEV_UNCONFIGURED) == 0) + && ((softc->flags & PROBE_INQUIRY_CKSUM) == 0)) { MD5Init(&softc->context); MD5Update(&softc->context, (unsigned char *)inq_buf, From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 16:33: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 8A88BFB9; Thu, 8 Jan 2015 16:33: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 5CB74782; Thu, 8 Jan 2015 16:33: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 t08GXHoO066216; Thu, 8 Jan 2015 16:33:17 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08GXGRb066212; Thu, 8 Jan 2015 16:33:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501081633.t08GXGRb066212@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 8 Jan 2015 16:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276832 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 16:33:17 -0000 Author: pfg Date: Thu Jan 8 16:33:15 2015 New Revision: 276832 URL: https://svnweb.freebsd.org/changeset/base/276832 Log: sed: Address warnings with clang and gcc48. MFC after: 2 weeks Modified: head/usr.bin/sed/Makefile head/usr.bin/sed/main.c head/usr.bin/sed/process.c Modified: head/usr.bin/sed/Makefile ============================================================================== --- head/usr.bin/sed/Makefile Thu Jan 8 16:27:56 2015 (r276831) +++ head/usr.bin/sed/Makefile Thu Jan 8 16:33:15 2015 (r276832) @@ -6,8 +6,6 @@ PROG= sed SRCS= compile.c main.c misc.c process.c -WARNS?= 2 - .if ${MK_TESTS} != "no" SUBDIR+= tests .endif Modified: head/usr.bin/sed/main.c ============================================================================== --- head/usr.bin/sed/main.c Thu Jan 8 16:27:56 2015 (r276831) +++ head/usr.bin/sed/main.c Thu Jan 8 16:33:15 2015 (r276832) @@ -400,13 +400,13 @@ mf_fgets(SPACE *sp, enum e_spflag spflag sizeof(oldfname)); len = strlcat(oldfname, inplace, sizeof(oldfname)); - if (len > sizeof(oldfname)) + if (len > (ssize_t)sizeof(oldfname)) errx(1, "%s: name too long", fname); } len = snprintf(tmpfname, sizeof(tmpfname), "%s/.!%ld!%s", dirname(fname), (long)getpid(), basename(fname)); - if (len >= sizeof(tmpfname)) + if (len >= (ssize_t)sizeof(tmpfname)) errx(1, "%s: name too long", fname); unlink(tmpfname); if ((outfile = fopen(tmpfname, "w")) == NULL) @@ -488,7 +488,7 @@ add_file(char *s) } static int -next_files_have_lines() +next_files_have_lines(void) { struct s_flist *file; FILE *file_fd; Modified: head/usr.bin/sed/process.c ============================================================================== --- head/usr.bin/sed/process.c Thu Jan 8 16:27:56 2015 (r276831) +++ head/usr.bin/sed/process.c Thu Jan 8 16:33:15 2015 (r276832) @@ -71,7 +71,7 @@ static __inline int applies(struct s_co static void do_tr(struct s_tr *); static void flush_appends(void); static void lputs(char *, size_t); -static __inline int regexec_e(regex_t *, const char *, int, int, size_t); +static int regexec_e(regex_t *, const char *, int, int, size_t); static void regsub(SPACE *, char *, char *); static int substitute(struct s_command *); @@ -656,7 +656,7 @@ lputs(char *s, size_t len) errx(1, "%s: %s", outfname, strerror(errno ? errno : EIO)); } -static __inline int +static int regexec_e(regex_t *preg, const char *string, int eflags, int nomatch, size_t slen) { From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 16:35: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 78C741B0; Thu, 8 Jan 2015 16: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 65325795; Thu, 8 Jan 2015 16: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 t08GZAQk066514; Thu, 8 Jan 2015 16:35:10 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08GZAmN066513; Thu, 8 Jan 2015 16:35:10 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501081635.t08GZAmN066513@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 8 Jan 2015 16:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276833 - 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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 16:35:10 -0000 Author: trasz Date: Thu Jan 8 16:35:09 2015 New Revision: 276833 URL: https://svnweb.freebsd.org/changeset/base/276833 Log: Make /net use -intr by default. Linux does that, and it seems a good idea. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/etc/auto_master Modified: head/etc/auto_master ============================================================================== --- head/etc/auto_master Thu Jan 8 16:33:15 2015 (r276832) +++ head/etc/auto_master Thu Jan 8 16:35:09 2015 (r276833) @@ -2,7 +2,7 @@ # # Automounter master map, see auto_master(5) for details. # -/net -hosts -nobrowse,nosuid +/net -hosts -nobrowse,nosuid,intr # When using the -media special map, make sure to edit devd.conf(5) # to move the call to "automount -c" out of the comments section. #/media -media -nosuid From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 16:50: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 342B5675; Thu, 8 Jan 2015 16:50: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 203A78E5; Thu, 8 Jan 2015 16:50: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 t08Goaad072941; Thu, 8 Jan 2015 16:50:36 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08Goa36072939; Thu, 8 Jan 2015 16:50:36 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201501081650.t08Goa36072939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 8 Jan 2015 16:50:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276834 - in head/sys/x86: include 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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 16:50:37 -0000 Author: sbruno Date: Thu Jan 8 16:50:35 2015 New Revision: 276834 URL: https://svnweb.freebsd.org/changeset/base/276834 Log: Update Features2 to display SDBG capability of processor. This is showing up on Haswell-class CPUs From the Intel SDM, "Table 3-20. Feature Information Returned in the ECX Register" 11 | SDBG | A value of 1 indicates the processor supports IA32_DEBUG_INTERFACE MSR for silicon debug. Submitted by: jiashiun@gmail.com Reviewed by: jhb neel MFC after: 2 weeks Modified: head/sys/x86/include/specialreg.h head/sys/x86/x86/identcpu.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Thu Jan 8 16:35:09 2015 (r276833) +++ head/sys/x86/include/specialreg.h Thu Jan 8 16:50:35 2015 (r276834) @@ -154,6 +154,7 @@ #define CPUID2_TM2 0x00000100 #define CPUID2_SSSE3 0x00000200 #define CPUID2_CNXTID 0x00000400 +#define CPUID2_SDBG 0x00000800 #define CPUID2_FMA 0x00001000 #define CPUID2_CX16 0x00002000 #define CPUID2_XTPR 0x00004000 Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Thu Jan 8 16:35:09 2015 (r276833) +++ head/sys/x86/x86/identcpu.c Thu Jan 8 16:50:35 2015 (r276834) @@ -781,7 +781,7 @@ printcpuinfo(void) "\011TM2" /* Thermal Monitor 2 */ "\012SSSE3" /* SSSE3 */ "\013CNXT-ID" /* L1 context ID available */ - "\014" + "\014SDBG" /* IA32 silicon debug */ "\015FMA" /* Fused Multiply Add */ "\016CX16" /* CMPXCHG16B Instruction */ "\017xTPR" /* Send Task Priority Messages*/ From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 16:58: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 9CF0B9F1; Thu, 8 Jan 2015 16:58: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 879539D4; Thu, 8 Jan 2015 16:58: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 t08GwgcH076231; Thu, 8 Jan 2015 16:58:42 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08GwfUU076220; Thu, 8 Jan 2015 16:58:41 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201501081658.t08GwfUU076220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 8 Jan 2015 16:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276835 - in head: sbin/camcontrol 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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 16:58:42 -0000 Author: ken Date: Thu Jan 8 16:58:40 2015 New Revision: 276835 URL: https://svnweb.freebsd.org/changeset/base/276835 Log: Improve camcontrol(8) handling of drive defect data. This includes a new summary mode (-s) for camcontrol defects that quickly tells the user the most important thing: how many defects are in the requested list. The actual location of the defects is less important. Modern drives frequently have more than the 8191 defects that can be reported by the READ DEFECT DATA (10) command. If they don't have that many grown defects, they certainly have more than 8191 defects in the primary (i.e. factory) defect list. The READ DEFECT DATA (12) command allows for longer parameter lists, as well as indexing into the list of defects, and so allows reporting many more defects. This has been tested with HGST drives and Seagate drives, but does not fully work with Seagate drives. Once I have a Seagate spec I may be able to determine whether it is possible to make it work with Seagate drives. scsi_da.h: Add a definition for the new long block defect format. Add bit and mask definitions for the new extended physical sector and bytes from index defect formats. Add a prototype for the new scsi_read_defects() CDB building function. scsi_da.c: Add a new scsi_read_defects() CDB building function. camcontrol(8) was previously composing CDBs manually. This is long overdue. camcontrol.c: Revamp the camcontrol defects subcommand. We now go through multiple stages in trying to get defect data off the drive while avoiding various drive firmware quirks. We start off by requesting the defect header with the 10 byte command. If we're in summary mode (-s) and the drive reports fewer defects than can be represented in the 10 byte header, we're done. Otherwise, we know that we need to issue the 12 byte command if the drive reports the maximum number of defects. If we're in summary mode, we're done if we get a good response back when asking for the 12 byte header. If the user has asked for the full list, then we use the address descriptor index field in the 12 byte CDB to step through the list in 64K chunks. 64K is small enough to work with most any ancient or modern SCSI controller. Add support for printing the new long block defect format, as well as the extended physical sector and bytes from index formats. I don't have any drives that support the new formats. Add a hexadecimal output format that can be turned on with -X. Add a quiet mode (-q) that can be turned on with the summary mode (-s) to just print out a number. Revamp the error detection and recovery code for the defects command to work with HGST drives. Call the new scsi_read_defects() CDB building function instead of rolling the CDB ourselves. Pay attention to the residual from the defect list request when printing it out, so we don't run off the end of the list. Use the new scsi_nv library routines to convert from strings to numbers and back. camcontrol.8: Document the new defect formats (longblock, extbfi, extphys) and command line options (-q, -s, -S and -X) for the defects subcommand. Explain a little more about what drives generally do and don't support. Sponsored by: Spectra Logic MFC after: 1 week Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_da.h Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Thu Jan 8 16:50:35 2015 (r276834) +++ head/sbin/camcontrol/camcontrol.8 Thu Jan 8 16:58:40 2015 (r276835) @@ -110,6 +110,10 @@ .Aq Fl f Ar format .Op Fl P .Op Fl G +.Op Fl q +.Op Fl s +.Op Fl S Ar offset +.Op Fl X .Nm .Ic modepage .Op device id @@ -513,18 +517,16 @@ connecting to that device. Note that this can have a destructive impact on the system. .It Ic defects -Send the SCSI READ DEFECT DATA (10) command (0x37) to the given device, and +Send the +.Tn SCSI +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 defect list (PLIST), and the grown defect list (GLIST). .Bl -tag -width 11n .It Fl f Ar format -The three format options are: -.Em block , -to print out the list as logical blocks, -.Em bfi , -to print out the list in bytes from index format, and -.Em phys , -to print out the list in physical sector format. +Specify the requested format of the defect list. The format argument is required. Most drives support the physical sector format. @@ -541,12 +543,52 @@ If the drive uses a non-standard sense c support the requested format, .Nm will probably see the error as a failure to complete the request. +.Pp +The format options are: +.Bl -tag -width 9n +.It block +Print out the list as logical blocks. +This is limited to 32-bit block sizes, and isn't supported by many modern +drives. +.It longblock +Print out the list as logical blocks. +This option uses a 64-bit block size. +.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 +Print out the list in physical sector format. +Most drives support this format. +.It extphys +Print out the list in extended physical sector format. +The extended format allows for ranges of blocks to be printed. +.El +.Pp .It Fl G Print out the grown defect list. This is a list of bad blocks that have been remapped since the disk left the factory. .It Fl P Print out the primary defect list. +This is the list of defects that were present in the factory. +.It Fl q +When printing status information with +.Fl s , +only print the number of defects. +.It Fl s +Just print the number of defects, not the list of defects. +.It Fl S Ar offset +Specify the starting offset into the defect list. +This implies using the +.Tn SCSI +READ DEFECT DATA (12) command, as the 10 byte version of the command +doesn't support the address descriptor index field. +Not all drives support the 12 byte command, and some drives that support +the 12 byte command don't support the address descriptor index field. +.It Fl X +Print out defects in hexadecimal (base 16) form instead of base 10 form. .El .Pp If neither Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Thu Jan 8 16:50:35 2015 (r276834) +++ head/sbin/camcontrol/camcontrol.c Thu Jan 8 16:58:40 2015 (r276835) @@ -167,7 +167,7 @@ struct ata_set_max_pwd }; static const char scsicmd_opts[] = "a:c:dfi:o:r"; -static const char readdefect_opts[] = "f:GP"; +static const char readdefect_opts[] = "f:GPqsS:X"; static const char negotiate_opts[] = "acD:M:O:qR:T:UW:"; static const char smprg_opts[] = "l"; static const char smppc_opts[] = "a:A:d:lm:M:o:p:s:S:T:"; @@ -3369,39 +3369,64 @@ scanlun_or_reset_dev(path_id_t bus, targ } #ifndef MINIMALISTIC + +static struct scsi_nv defect_list_type_map[] = { + { "block", SRDD10_BLOCK_FORMAT }, + { "extbfi", SRDD10_EXT_BFI_FORMAT }, + { "extphys", SRDD10_EXT_PHYS_FORMAT }, + { "longblock", SRDD10_LONG_BLOCK_FORMAT }, + { "bfi", SRDD10_BYTES_FROM_INDEX_FORMAT }, + { "phys", SRDD10_PHYSICAL_SECTOR_FORMAT } +}; + static int readdefects(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout) { union ccb *ccb = NULL; - struct scsi_read_defect_data_10 *rdd_cdb; + struct scsi_read_defect_data_hdr_10 *hdr10 = NULL; + struct scsi_read_defect_data_hdr_12 *hdr12 = NULL; + size_t hdr_size = 0, entry_size = 0; + int use_12byte = 0; + int hex_format = 0; u_int8_t *defect_list = NULL; - u_int32_t max_dlist_length = SRDD10_MAX_LENGTH, dlist_length = 0; - u_int32_t returned_length = 0; - u_int32_t num_returned = 0; - u_int8_t returned_format; + u_int8_t list_format = 0; + int list_type_set = 0; + u_int32_t dlist_length = 0; + u_int32_t returned_length = 0, valid_len = 0; + u_int32_t num_returned = 0, num_valid = 0; + u_int32_t max_possible_size = 0, hdr_max = 0; + u_int32_t starting_offset = 0; + u_int8_t returned_format, returned_type; unsigned int i; + int summary = 0, quiet = 0; int c, error = 0; - int lists_specified; - int get_length = 1; + int lists_specified = 0; + int get_length = 1, first_pass = 1; + int mads = 0; while ((c = getopt(argc, argv, combinedopt)) != -1) { switch(c){ case 'f': { - char *tstr; - tstr = optarg; - while (isspace(*tstr) && (*tstr != '\0')) - tstr++; - if (strcmp(tstr, "block") == 0) - arglist |= CAM_ARG_FORMAT_BLOCK; - else if (strcmp(tstr, "bfi") == 0) - arglist |= CAM_ARG_FORMAT_BFI; - else if (strcmp(tstr, "phys") == 0) - arglist |= CAM_ARG_FORMAT_PHYS; - else { + scsi_nv_status status; + int entry_num = 0; + + status = scsi_get_nv(defect_list_type_map, + sizeof(defect_list_type_map) / + sizeof(defect_list_type_map[0]), optarg, + &entry_num, SCSI_NV_FLAG_IG_CASE); + + if (status == SCSI_NV_FOUND) { + list_format = defect_list_type_map[ + entry_num].value; + list_type_set = 1; + } else { + warnx("%s: %s %s option %s", __func__, + (status == SCSI_NV_AMBIGUOUS) ? + "ambiguous" : "invalid", "defect list type", + optarg); error = 1; - warnx("invalid defect format %s", tstr); goto defect_bailout; } break; @@ -3412,40 +3437,82 @@ readdefects(struct cam_device *device, i case 'P': arglist |= CAM_ARG_PLIST; break; + case 'q': + quiet = 1; + break; + case 's': + summary = 1; + break; + case 'S': { + char *endptr; + + starting_offset = strtoul(optarg, &endptr, 0); + if (*endptr != '\0') { + error = 1; + warnx("invalid starting offset %s", optarg); + goto defect_bailout; + } + break; + } + case 'X': + hex_format = 1; + break; default: break; } } - ccb = cam_getccb(device); - - /* - * Eventually we should probably support the 12 byte READ DEFECT - * DATA command. It supports a longer parameter list, which may be - * necessary on newer drives with lots of defects. According to - * the SBC-3 spec, drives are supposed to return an illegal request - * if they have more defect data than will fit in 64K. - */ - defect_list = malloc(max_dlist_length); - if (defect_list == NULL) { - warnx("can't malloc memory for defect list"); + if (list_type_set == 0) { error = 1; + warnx("no defect list format specified"); goto defect_bailout; } + if (arglist & CAM_ARG_PLIST) { + list_format |= SRDD10_PLIST; + lists_specified++; + } + + if (arglist & CAM_ARG_GLIST) { + list_format |= SRDD10_GLIST; + lists_specified++; + } + + /* + * This implies a summary, and was the previous behavior. + */ + if (lists_specified == 0) + summary = 1; + + ccb = cam_getccb(device); + +retry_12byte: + /* * We start off asking for just the header to determine how much * defect data is available. Some Hitachi drives return an error * if you ask for more data than the drive has. Once we know the * length, we retry the command with the returned length. */ - dlist_length = sizeof(struct scsi_read_defect_data_hdr_10); - - rdd_cdb =(struct scsi_read_defect_data_10 *)&ccb->csio.cdb_io.cdb_bytes; + if (use_12byte == 0) + dlist_length = sizeof(*hdr10); + else + dlist_length = sizeof(*hdr12); retry: + if (defect_list != NULL) { + free(defect_list); + defect_list = NULL; + } + defect_list = malloc(dlist_length); + if (defect_list == NULL) { + warnx("can't malloc memory for defect list"); + error = 1; + goto defect_bailout; + } - lists_specified = 0; +next_batch: + bzero(defect_list, dlist_length); /* * cam_getccb() zeros the CCB header only. So we need to zero the @@ -3454,41 +3521,17 @@ retry: bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); - cam_fill_csio(&ccb->csio, - /*retries*/ retry_count, - /*cbfcnp*/ NULL, - /*flags*/ CAM_DIR_IN | ((arglist & CAM_ARG_ERR_RECOVER) ? - CAM_PASS_ERR_RECOVER : 0), - /*tag_action*/ MSG_SIMPLE_Q_TAG, - /*data_ptr*/ defect_list, - /*dxfer_len*/ dlist_length, - /*sense_len*/ SSD_FULL_SIZE, - /*cdb_len*/ sizeof(struct scsi_read_defect_data_10), - /*timeout*/ timeout ? timeout : 5000); - - rdd_cdb->opcode = READ_DEFECT_DATA_10; - if (arglist & CAM_ARG_FORMAT_BLOCK) - rdd_cdb->format = SRDD10_BLOCK_FORMAT; - else if (arglist & CAM_ARG_FORMAT_BFI) - rdd_cdb->format = SRDD10_BYTES_FROM_INDEX_FORMAT; - else if (arglist & CAM_ARG_FORMAT_PHYS) - rdd_cdb->format = SRDD10_PHYSICAL_SECTOR_FORMAT; - else { - error = 1; - warnx("no defect list format specified"); - goto defect_bailout; - } - if (arglist & CAM_ARG_PLIST) { - rdd_cdb->format |= SRDD10_PLIST; - lists_specified++; - } - - if (arglist & CAM_ARG_GLIST) { - rdd_cdb->format |= SRDD10_GLIST; - lists_specified++; - } - - scsi_ulto2b(dlist_length, rdd_cdb->alloc_length); + scsi_read_defects(&ccb->csio, + /*retries*/ retry_count, + /*cbfcnp*/ NULL, + /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*list_format*/ list_format, + /*addr_desc_index*/ starting_offset, + /*data_ptr*/ defect_list, + /*dxfer_len*/ dlist_length, + /*minimum_cmd_size*/ use_12byte ? 12 : 0, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ timeout ? timeout : 5000); /* Disable freezing the device queue */ ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; @@ -3505,8 +3548,61 @@ retry: goto defect_bailout; } - returned_length = scsi_2btoul(((struct - scsi_read_defect_data_hdr_10 *)defect_list)->length); + valid_len = ccb->csio.dxfer_len - ccb->csio.resid; + + if (use_12byte == 0) { + hdr10 = (struct scsi_read_defect_data_hdr_10 *)defect_list; + hdr_size = sizeof(*hdr10); + hdr_max = SRDDH10_MAX_LENGTH; + + if (valid_len >= hdr_size) { + returned_length = scsi_2btoul(hdr10->length); + returned_format = hdr10->format; + } else { + returned_length = 0; + returned_format = 0; + } + } else { + hdr12 = (struct scsi_read_defect_data_hdr_12 *)defect_list; + hdr_size = sizeof(*hdr12); + hdr_max = SRDDH12_MAX_LENGTH; + + if (valid_len >= hdr_size) { + returned_length = scsi_4btoul(hdr12->length); + returned_format = hdr12->format; + } else { + returned_length = 0; + returned_format = 0; + } + } + + returned_type = returned_format & SRDDH10_DLIST_FORMAT_MASK; + switch (returned_type) { + case SRDD10_BLOCK_FORMAT: + entry_size = sizeof(struct scsi_defect_desc_block); + break; + case SRDD10_LONG_BLOCK_FORMAT: + entry_size = sizeof(struct scsi_defect_desc_long_block); + break; + case SRDD10_EXT_PHYS_FORMAT: + case SRDD10_PHYSICAL_SECTOR_FORMAT: + entry_size = sizeof(struct scsi_defect_desc_phys_sector); + break; + case SRDD10_EXT_BFI_FORMAT: + case SRDD10_BYTES_FROM_INDEX_FORMAT: + entry_size = sizeof(struct scsi_defect_desc_bytes_from_index); + break; + default: + warnx("Unknown defect format 0x%x\n", returned_type); + error = 1; + goto defect_bailout; + break; + } + + max_possible_size = (hdr_max / entry_size) * entry_size; + num_returned = returned_length / entry_size; + num_valid = min(returned_length, valid_len - hdr_size); + num_valid /= entry_size; if (get_length != 0) { get_length = 0; @@ -3530,12 +3626,66 @@ retry: if ((sense_key == SSD_KEY_RECOVERED_ERROR) && (asc == 0x1c) && (ascq == 0x00) && (returned_length > 0)) { - dlist_length = returned_length + - sizeof(struct scsi_read_defect_data_hdr_10); - dlist_length = min(dlist_length, - SRDD10_MAX_LENGTH); - } else - dlist_length = max_dlist_length; + if ((use_12byte == 0) + && (returned_length >= max_possible_size)) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + hdr_size; + } else if ((sense_key == SSD_KEY_RECOVERED_ERROR) + && (asc == 0x1f) && (ascq == 0x00) + && (returned_length > 0)) { + /* Partial defect list transfer */ + /* + * Hitachi drives return this error + * along with a partial defect list if they + * have more defects than the 10 byte + * command can support. Retry with the 12 + * byte command. + */ + if (use_12byte == 0) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + hdr_size; + } else if ((sense_key == SSD_KEY_ILLEGAL_REQUEST) + && (asc == 0x24) && (ascq == 0x00)) { + /* Invalid field in CDB */ + /* + * SBC-3 says that if the drive has more + * defects than can be reported with the + * 10 byte command, it should return this + * error and no data. Retry with the 12 + * byte command. + */ + if (use_12byte == 0) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + hdr_size; + } else { + /* + * If we got a SCSI error and no valid length, + * just use the 10 byte maximum. The 12 + * byte maximum is too large. + */ + if (returned_length == 0) + dlist_length = SRDD10_MAX_LENGTH; + else { + if ((use_12byte == 0) + && (returned_length >= + max_possible_size)) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + + hdr_size; + } + } } else if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP){ error = 1; @@ -3545,16 +3695,40 @@ retry: CAM_EPF_ALL, stderr); goto defect_bailout; } else { - dlist_length = returned_length + - sizeof(struct scsi_read_defect_data_hdr_10); - dlist_length = min(dlist_length, SRDD10_MAX_LENGTH); + if ((use_12byte == 0) + && (returned_length >= max_possible_size)) { + get_length = 1; + use_12byte = 1; + goto retry_12byte; + } + dlist_length = returned_length + hdr_size; + } + if (summary != 0) { + fprintf(stdout, "%u", num_returned); + if (quiet == 0) { + fprintf(stdout, " defect%s", + (num_returned != 1) ? "s" : ""); + } + fprintf(stdout, "\n"); + + goto defect_bailout; } + /* + * We always limit the list length to the 10-byte maximum + * length (0xffff). The reason is that some controllers + * can't handle larger I/Os, and we can transfer the entire + * 10 byte list in one shot. For drives that support the 12 + * byte read defects command, we'll step through the list + * by specifying a starting offset. For drives that don't + * support the 12 byte command's starting offset, we'll + * just display the first 64K. + */ + dlist_length = min(dlist_length, SRDD10_MAX_LENGTH); + goto retry; } - returned_format = ((struct scsi_read_defect_data_hdr_10 *) - defect_list)->format; if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR) && (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) @@ -3571,32 +3745,32 @@ retry: * According to the SCSI spec, if the disk doesn't support * the requested format, it will generally return a sense * key of RECOVERED ERROR, and an additional sense code - * of "DEFECT LIST NOT FOUND". So, we check for that, and - * also check to make sure that the returned length is - * greater than 0, and then print out whatever format the - * disk gave us. + * of "DEFECT LIST NOT FOUND". HGST drives also return + * Primary/Grown defect list not found errors. So just + * check for an ASC of 0x1c. */ if ((sense_key == SSD_KEY_RECOVERED_ERROR) - && (asc == 0x1c) && (ascq == 0x00) - && (returned_length > 0)) { - warnx("requested defect format not available"); - switch(returned_format & SRDDH10_DLIST_FORMAT_MASK) { - case SRDD10_BLOCK_FORMAT: - warnx("Device returned block format"); - break; - case SRDD10_BYTES_FROM_INDEX_FORMAT: - warnx("Device returned bytes from index" - " format"); - break; - case SRDD10_PHYSICAL_SECTOR_FORMAT: - warnx("Device returned physical sector format"); - break; - default: + && (asc == 0x1c)) { + const char *format_str; + + format_str = scsi_nv_to_str(defect_list_type_map, + sizeof(defect_list_type_map) / + sizeof(defect_list_type_map[0]), + list_format & SRDD10_DLIST_FORMAT_MASK); + warnx("requested defect format %s not available", + format_str ? format_str : "unknown"); + + format_str = scsi_nv_to_str(defect_list_type_map, + sizeof(defect_list_type_map) / + sizeof(defect_list_type_map[0]), returned_type); + if (format_str != NULL) { + warnx("Device returned %s format", + format_str); + } else { error = 1; warnx("Device returned unknown defect" - " data format %#x", returned_format); + " data format %#x", returned_type); goto defect_bailout; - break; /* NOTREACHED */ } } else { error = 1; @@ -3615,99 +3789,151 @@ retry: goto defect_bailout; } + if (first_pass != 0) { + fprintf(stderr, "Got %d defect", num_returned); + + if ((lists_specified == 0) || (num_returned == 0)) { + fprintf(stderr, "s.\n"); + goto defect_bailout; + } else if (num_returned == 1) + fprintf(stderr, ":\n"); + else + fprintf(stderr, "s:\n"); + + first_pass = 0; + } + /* * XXX KDM I should probably clean up the printout format for the * disk defects. */ - switch (returned_format & SRDDH10_DLIST_FORMAT_MASK){ - case SRDDH10_PHYSICAL_SECTOR_FORMAT: - { - struct scsi_defect_desc_phys_sector *dlist; - - dlist = (struct scsi_defect_desc_phys_sector *) - (defect_list + - sizeof(struct scsi_read_defect_data_hdr_10)); - - num_returned = returned_length / - sizeof(struct scsi_defect_desc_phys_sector); - - fprintf(stderr, "Got %d defect", num_returned); - - if ((lists_specified == 0) || (num_returned == 0)) { - fprintf(stderr, "s.\n"); - break; - } else if (num_returned == 1) - fprintf(stderr, ":\n"); + switch (returned_type) { + case SRDD10_PHYSICAL_SECTOR_FORMAT: + case SRDD10_EXT_PHYS_FORMAT: + { + struct scsi_defect_desc_phys_sector *dlist; + + dlist = (struct scsi_defect_desc_phys_sector *) + (defect_list + hdr_size); + + for (i = 0; i < num_valid; i++) { + uint32_t sector; + + sector = scsi_4btoul(dlist[i].sector); + if (returned_type == SRDD10_EXT_PHYS_FORMAT) { + mads = (sector & SDD_EXT_PHYS_MADS) ? + 0 : 1; + sector &= ~SDD_EXT_PHYS_FLAG_MASK; + } + if (hex_format == 0) + fprintf(stdout, "%d:%d:%d%s", + scsi_3btoul(dlist[i].cylinder), + dlist[i].head, + scsi_4btoul(dlist[i].sector), + mads ? " - " : "\n"); else - fprintf(stderr, "s:\n"); - - for (i = 0; i < num_returned; i++) { - fprintf(stdout, "%d:%d:%d\n", + fprintf(stdout, "0x%x:0x%x:0x%x%s", scsi_3btoul(dlist[i].cylinder), dlist[i].head, - scsi_4btoul(dlist[i].sector)); - } - break; + scsi_4btoul(dlist[i].sector), + mads ? " - " : "\n"); + mads = 0; + } + if (num_valid < num_returned) { + starting_offset += num_valid; + goto next_batch; } - case SRDDH10_BYTES_FROM_INDEX_FORMAT: - { - struct scsi_defect_desc_bytes_from_index *dlist; - - dlist = (struct scsi_defect_desc_bytes_from_index *) - (defect_list + - sizeof(struct scsi_read_defect_data_hdr_10)); - - num_returned = returned_length / - sizeof(struct scsi_defect_desc_bytes_from_index); - - fprintf(stderr, "Got %d defect", num_returned); - - if ((lists_specified == 0) || (num_returned == 0)) { - fprintf(stderr, "s.\n"); - break; - } else if (num_returned == 1) - fprintf(stderr, ":\n"); + break; + } + case SRDD10_BYTES_FROM_INDEX_FORMAT: + case SRDD10_EXT_BFI_FORMAT: + { + struct scsi_defect_desc_bytes_from_index *dlist; + + dlist = (struct scsi_defect_desc_bytes_from_index *) + (defect_list + hdr_size); + + for (i = 0; i < num_valid; i++) { + uint32_t bfi; + + bfi = scsi_4btoul(dlist[i].bytes_from_index); + if (returned_type == SRDD10_EXT_BFI_FORMAT) { + mads = (bfi & SDD_EXT_BFI_MADS) ? 1 : 0; + bfi &= ~SDD_EXT_BFI_FLAG_MASK; + } + if (hex_format == 0) + fprintf(stdout, "%d:%d:%d%s", + scsi_3btoul(dlist[i].cylinder), + dlist[i].head, + scsi_4btoul(dlist[i].bytes_from_index), + mads ? " - " : "\n"); else - fprintf(stderr, "s:\n"); - - for (i = 0; i < num_returned; i++) { - fprintf(stdout, "%d:%d:%d\n", + fprintf(stdout, "0x%x:0x%x:0x%x%s", scsi_3btoul(dlist[i].cylinder), dlist[i].head, - scsi_4btoul(dlist[i].bytes_from_index)); - } - break; + scsi_4btoul(dlist[i].bytes_from_index), + mads ? " - " : "\n"); + + mads = 0; } - case SRDDH10_BLOCK_FORMAT: - { - struct scsi_defect_desc_block *dlist; + if (num_valid < num_returned) { + starting_offset += num_valid; + goto next_batch; + } + break; + } + case SRDDH10_BLOCK_FORMAT: + { + struct scsi_defect_desc_block *dlist; - dlist = (struct scsi_defect_desc_block *)(defect_list + - sizeof(struct scsi_read_defect_data_hdr_10)); + dlist = (struct scsi_defect_desc_block *) + (defect_list + hdr_size); - num_returned = returned_length / - sizeof(struct scsi_defect_desc_block); + for (i = 0; i < num_valid; i++) { + if (hex_format == 0) + fprintf(stdout, "%u\n", + scsi_4btoul(dlist[i].address)); + else + fprintf(stdout, "0x%x\n", + scsi_4btoul(dlist[i].address)); + } - fprintf(stderr, "Got %d defect", num_returned); + if (num_valid < num_returned) { + starting_offset += num_valid; + goto next_batch; + } - if ((lists_specified == 0) || (num_returned == 0)) { - fprintf(stderr, "s.\n"); - break; - } else if (num_returned == 1) - fprintf(stderr, ":\n"); + break; + } + case SRDD10_LONG_BLOCK_FORMAT: + { + struct scsi_defect_desc_long_block *dlist; + + dlist = (struct scsi_defect_desc_long_block *) + (defect_list + hdr_size); + + for (i = 0; i < num_valid; i++) { + if (hex_format == 0) + fprintf(stdout, "%ju\n", + (uintmax_t)scsi_8btou64( + dlist[i].address)); else - fprintf(stderr, "s:\n"); + fprintf(stdout, "0x%jx\n", + (uintmax_t)scsi_8btou64( + dlist[i].address)); + } - for (i = 0; i < num_returned; i++) - fprintf(stdout, "%u\n", - scsi_4btoul(dlist[i].address)); - break; + if (num_valid < num_returned) { + starting_offset += num_valid; + goto next_batch; } - default: - fprintf(stderr, "Unknown defect format %d\n", - returned_format & SRDDH10_DLIST_FORMAT_MASK); - error = 1; - break; + break; + } + default: + fprintf(stderr, "Unknown defect format 0x%x\n", + returned_type); + error = 1; + break; } defect_bailout: @@ -7801,6 +8027,7 @@ usage(int printlong) " camcontrol reset \n" #ifndef MINIMALISTIC " camcontrol defects [dev_id][generic args] <-f format> [-P][-G]\n" +" [-q][-s][-S offset][-X]\n" " camcontrol modepage [dev_id][generic args] <-m page | -l>\n" " [-P pagectl][-e | -b][-d]\n" " camcontrol cmd [dev_id][generic args]\n" Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Jan 8 16:50:35 2015 (r276834) +++ head/sys/cam/scsi/scsi_da.c Thu Jan 8 16:58:40 2015 (r276835) @@ -3872,9 +3872,9 @@ dashutdown(void * arg, int howto) #else /* !_KERNEL */ /* - * XXX This is only left out of the kernel build to silence warnings. If, - * for some reason this function is used in the kernel, the ifdefs should - * be moved so it is included both in the kernel and userland. + * XXX These are only left out of the kernel build to silence warnings. If, + * for some reason these functions are used in the kernel, the ifdefs should + * be moved so they are included both in the kernel and userland. */ void scsi_format_unit(struct ccb_scsiio *csio, u_int32_t retries, @@ -3903,6 +3903,59 @@ scsi_format_unit(struct ccb_scsiio *csio } void +scsi_read_defects(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + uint8_t tag_action, uint8_t list_format, + uint32_t addr_desc_index, uint8_t *data_ptr, + uint32_t dxfer_len, int minimum_cmd_size, + uint8_t sense_len, uint32_t timeout) +{ + uint8_t cdb_len; + + /* + * These conditions allow using the 10 byte command. Otherwise we + * need to use the 12 byte command. + */ + if ((minimum_cmd_size <= 10) + && (addr_desc_index == 0) + && (dxfer_len <= SRDD10_MAX_LENGTH)) { + struct scsi_read_defect_data_10 *cdb10; + + cdb10 = (struct scsi_read_defect_data_10 *) + &csio->cdb_io.cdb_bytes; + + cdb_len = sizeof(*cdb10); + bzero(cdb10, cdb_len); + cdb10->opcode = READ_DEFECT_DATA_10; + cdb10->format = list_format; + scsi_ulto2b(dxfer_len, cdb10->alloc_length); + } else { + struct scsi_read_defect_data_12 *cdb12; + + cdb12 = (struct scsi_read_defect_data_12 *) + &csio->cdb_io.cdb_bytes; + + cdb_len = sizeof(*cdb12); + bzero(cdb12, cdb_len); + cdb12->opcode = READ_DEFECT_DATA_12; + cdb12->format = list_format; + scsi_ulto4b(dxfer_len, cdb12->alloc_length); + scsi_ulto4b(addr_desc_index, cdb12->address_descriptor_index); + } + + cam_fill_csio(csio, + retries, + cbfcnp, + /*flags*/ CAM_DIR_IN, + tag_action, + data_ptr, + dxfer_len, + sense_len, + cdb_len, + timeout); +} + +void scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t byte2, u_int16_t control, Modified: head/sys/cam/scsi/scsi_da.h ============================================================================== --- head/sys/cam/scsi/scsi_da.h Thu Jan 8 16:50:35 2015 (r276834) +++ head/sys/cam/scsi/scsi_da.h Thu Jan 8 16:58:40 2015 (r276835) @@ -98,8 +98,12 @@ struct scsi_read_defect_data_10 #define SRDD10_PLIST 0x10 #define SRDD10_DLIST_FORMAT_MASK 0x07 #define SRDD10_BLOCK_FORMAT 0x00 +#define SRDD10_EXT_BFI_FORMAT 0x01 +#define SRDD10_EXT_PHYS_FORMAT 0x02 +#define SRDD10_LONG_BLOCK_FORMAT 0x03 #define SRDD10_BYTES_FROM_INDEX_FORMAT 0x04 #define SRDD10_PHYSICAL_SECTOR_FORMAT 0x05 +#define SRDD10_VENDOR_FORMAT 0x06 uint8_t format; uint8_t reserved[4]; uint8_t alloc_length[2]; @@ -138,12 +142,13 @@ struct scsi_read_defect_data_12 #define SRDD12_GLIST 0x08 #define SRDD12_PLIST 0x10 #define SRDD12_DLIST_FORMAT_MASK 0x07 -#define SRDD12_BLOCK_FORMAT 0x00 -#define SRDD12_BYTES_FROM_INDEX_FORMAT 0x04 -#define SRDD12_PHYSICAL_SECTOR_FORMAT 0x05 +#define SRDD12_BLOCK_FORMAT SRDD10_BLOCK_FORMAT +#define SRDD12_BYTES_FROM_INDEX_FORMAT SRDD10_BYTES_FROM_INDEX_FORMAT +#define SRDD12_PHYSICAL_SECTOR_FORMAT SRDD10_PHYSICAL_SECTOR_FORMAT uint8_t format; uint8_t address_descriptor_index[4]; uint8_t alloc_length[4]; +#define SRDD12_MAX_LENGTH 0xffffffff uint8_t reserved; uint8_t control; }; @@ -325,6 +330,8 @@ struct scsi_read_defect_data_hdr_10 #define SRDDH10_PHYSICAL_SECTOR_FORMAT 0x05 u_int8_t format; u_int8_t length[2]; +#define SRDDH10_MAX_LENGTH SRDD10_MAX_LENGTH - \ + sizeof(struct scsi_read_defect_data_hdr_10) }; struct scsi_defect_desc_block @@ -332,10 +339,18 @@ struct scsi_defect_desc_block u_int8_t address[4]; }; +struct scsi_defect_desc_long_block +{ + u_int8_t address[8]; +}; + struct scsi_defect_desc_bytes_from_index { u_int8_t cylinder[3]; u_int8_t head; +#define SDD_EXT_BFI_MADS 0x80000000 +#define SDD_EXT_BFI_FLAG_MASK 0xf0000000 +#define SDD_EXT_BFI_ENTIRE_TRACK 0x0fffffff u_int8_t bytes_from_index[4]; }; @@ -343,6 +358,9 @@ struct scsi_defect_desc_phys_sector { u_int8_t cylinder[3]; u_int8_t head; +#define SDD_EXT_PHYS_MADS 0x80000000 +#define SDD_EXT_PHYS_FLAG_MASK 0xf0000000 +#define SDD_EXT_PHYS_ENTIRE_TRACK 0x0fffffff u_int8_t sector[4]; }; @@ -358,6 +376,8 @@ struct scsi_read_defect_data_hdr_12 u_int8_t format; u_int8_t generation[2]; u_int8_t length[4]; +#define SRDDH12_MAX_LENGTH SRDD12_MAX_LENGTH - \ + sizeof(struct scsi_read_defect_data_hdr_12) }; union disk_pages /* this is the structure copied from osf */ @@ -536,9 +556,9 @@ struct scsi_da_rw_recovery_page { __BEGIN_DECLS /* - * XXX This is only left out of the kernel build to silence warnings. If, - * for some reason this function is used in the kernel, the ifdefs should - * be moved so it is included both in the kernel and userland. + * XXX These are only left out of the kernel build to silence warnings. If, + * for some reason these functions are used in the kernel, the ifdefs should + * be moved so they are included both in the kernel and userland. */ #ifndef _KERNEL void scsi_format_unit(struct ccb_scsiio *csio, u_int32_t retries, @@ -547,6 +567,13 @@ void scsi_format_unit(struct ccb_scsiio u_int8_t *data_ptr, u_int32_t dxfer_len, u_int8_t sense_len, u_int32_t timeout); +void scsi_read_defects(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + uint8_t tag_action, uint8_t list_format, + uint32_t addr_desc_index, uint8_t *data_ptr, + uint32_t dxfer_len, int minimum_cmd_size, + uint8_t sense_len, uint32_t timeout); + void scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t byte2, u_int16_t control, From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:24:00 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 16570115; Thu, 8 Jan 2015 17:24:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02F5FCA4; Thu, 8 Jan 2015 17:24:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t08HNx3f090761; Thu, 8 Jan 2015 17:23:59 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08HNxUR090759; Thu, 8 Jan 2015 17:23:59 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501081723.t08HNxUR090759@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 8 Jan 2015 17:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276837 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 17:24:00 -0000 Author: pfg Date: Thu Jan 8 17:23:59 2015 New Revision: 276837 URL: https://svnweb.freebsd.org/changeset/base/276837 Log: Partial revert of r276832: Do not bump the warns level as it still breaks the gcc build on sparc64 Reported by: jenkins Modified: head/usr.bin/sed/Makefile Modified: head/usr.bin/sed/Makefile ============================================================================== --- head/usr.bin/sed/Makefile Thu Jan 8 17:23:05 2015 (r276836) +++ head/usr.bin/sed/Makefile Thu Jan 8 17:23:59 2015 (r276837) @@ -6,6 +6,8 @@ PROG= sed SRCS= compile.c main.c misc.c process.c +WARNS?= 2 + .if ${MK_TESTS} != "no" SUBDIR+= tests .endif From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:41: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 45E3D5FA; Thu, 8 Jan 2015 17:41: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 314E5E38; Thu, 8 Jan 2015 17:41: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 t08HfUqm099486; Thu, 8 Jan 2015 17:41:30 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08HfTTh099483; Thu, 8 Jan 2015 17:41:29 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201501081741.t08HfTTh099483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 8 Jan 2015 17:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276839 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 17:41:30 -0000 Author: ken Date: Thu Jan 8 17:41:28 2015 New Revision: 276839 URL: https://svnweb.freebsd.org/changeset/base/276839 Log: Fix Fibre Channel Command Reference Number handling in the isp(4) driver. The Command Reference Number is used for precise delivery of commands, and is part of the FC-Tape functionality set. (This is only enabled for devices that support precise delivery of commands.) It is an 8-bit unsigned number that increments from 1 to 255. The commands sent by the initiator must be processed by the target in CRN order if the CRN is non-zero. There are certain scenarios where the Command Reference Number sequence needs to be reset. When the target is power cycled, for instance, the initiator needs to reset the CRN to 1. The initiator will know this because it will see a LIP (when directly connected) or get a logout/login event (when connected to a switch). The isp(4) driver was not resetting the CRN when a target went away and came back. When it saw the target again after a power cycle, it would continue the CRN sequence where it left off. The target would ignore the command because the CRN sequence is supposed to be reset to 1 after a power cycle or other similar event. The symptom that the user would see is that there would be lots of aborted INQUIRY commands after a tape library was power cycled, and the library would fail to probe. The INQUIRY commands were being ignored by the tape drive due to the CRN issue mentioned above. isp_freebsd.c: Add a new function, isp_fcp_reset_crn(). This will reset all of the CRNs for a given port, or the CRNs for all LUNs on a target. Reset the CRNs for all targets on a port when we get a LIP, loop reset, or loop down event. Reset the CRN for a particular target when it arrives, is changed or departs. This is less precise behavior than the clearing behavior specified in the FCP-4 spec (which says that it should be reset for PRLI, PRLO, PLOGI and LOGO), but this is the level of information we have here. If this is insufficient, then we will need to add more precise notification from the lower level isp(4) code. isp_freebsd.h: Add a prototype for isp_fcp_reset_crn(). Sponsored by: Spectra Logic MFC after: 1 week Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Thu Jan 8 17:38:03 2015 (r276838) +++ head/sys/dev/isp/isp_freebsd.c Thu Jan 8 17:41:28 2015 (r276839) @@ -5696,6 +5696,8 @@ isp_async(ispsoftc_t *isp, ispasync_t cm } } } + isp_fcp_reset_crn(fc, /*tgt*/0, /*tgt_set*/ 0); + isp_prt(isp, ISP_LOGINFO, "Chan %d: %s", bus, msg); break; } @@ -5747,6 +5749,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm if (lp->dev_map_idx) { tgt = lp->dev_map_idx - 1; isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "arrived at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); isp_make_here(isp, bus, tgt); } else { isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "arrived", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); @@ -5783,6 +5786,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm tgt = lp->dev_map_idx - 1; isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "changed at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); } else { isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "changed", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); } @@ -5795,6 +5799,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm va_end(ap); isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); if (lp->dev_map_idx) { + fc = ISP_FC_PC(isp, bus); tgt = lp->dev_map_idx - 1; isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "stayed at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); @@ -5829,6 +5834,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm } tgt = lp->dev_map_idx - 1; isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "gone zombie at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); } else if (lp->announced == 0) { isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "departed", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); } @@ -6377,6 +6383,33 @@ isp_common_dmateardown(ispsoftc_t *isp, bus_dmamap_unload(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap); } +/* + * Reset the command reference number for all LUNs on a specific target + * (needed when a target arrives again) or for all targets on a port + * (needed for events like a LIP). + */ +void +isp_fcp_reset_crn(struct isp_fc *fc, uint32_t tgt, int tgt_set) +{ + int i; + struct isp_nexus *nxp; + + if (tgt_set == 0) + isp_prt(fc->isp, ISP_LOG_SANCFG, "resetting CRN on all targets"); + else + isp_prt(fc->isp, ISP_LOG_SANCFG, "resetting CRN target %u", tgt); + + for (i = 0; i < NEXUS_HASH_WIDTH; i++) { + nxp = fc->nexus_hash[i]; + while (nxp) { + if ((tgt_set != 0) && (tgt == nxp->tgt)) + nxp->crnseed = 0; + + nxp = nxp->next; + } + } +} + int isp_fcp_next_crn(ispsoftc_t *isp, uint8_t *crnp, XS_T *cmd) { Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Thu Jan 8 17:38:03 2015 (r276838) +++ head/sys/dev/isp/isp_freebsd.h Thu Jan 8 17:41:28 2015 (r276839) @@ -754,6 +754,7 @@ int isp_fc_scratch_acquire(ispsoftc_t *, int isp_mstohz(int); void isp_platform_intr(void *); void isp_common_dmateardown(ispsoftc_t *, struct ccb_scsiio *, uint32_t); +void isp_fcp_reset_crn(struct isp_fc *, uint32_t, int); int isp_fcp_next_crn(ispsoftc_t *, uint8_t *, XS_T *); /* From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:46: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 33F9E7D6; Thu, 8 Jan 2015 17:46: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 20428F0F; Thu, 8 Jan 2015 17:46: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 t08HkgFB001389; Thu, 8 Jan 2015 17:46:42 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08HkgiL001388; Thu, 8 Jan 2015 17:46:42 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501081746.t08HkgiL001388@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 8 Jan 2015 17:46:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276840 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 17:46:43 -0000 Author: imp Date: Thu Jan 8 17:46:42 2015 New Revision: 276840 URL: https://svnweb.freebsd.org/changeset/base/276840 Log: Need to include opt_cpu.h to access CPU_DISABLE_SSE option. Thankfully, this only broke i686 configs that disabled SSE. Submitted by: nyan@ Modified: head/sys/i386/i386/elf_machdep.c Modified: head/sys/i386/i386/elf_machdep.c ============================================================================== --- head/sys/i386/i386/elf_machdep.c Thu Jan 8 17:41:28 2015 (r276839) +++ head/sys/i386/i386/elf_machdep.c Thu Jan 8 17:46:42 2015 (r276840) @@ -26,6 +26,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_cpu.h" + #include #include #include From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:49: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 99957A0E; Thu, 8 Jan 2015 17:49: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 85999F44; Thu, 8 Jan 2015 17:49: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 t08Hn8iL001726; Thu, 8 Jan 2015 17:49:08 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08Hn8DM001724; Thu, 8 Jan 2015 17:49:08 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201501081749.t08Hn8DM001724@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 8 Jan 2015 17:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276841 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 17:49:08 -0000 Author: rodrigc Date: Thu Jan 8 17:49:07 2015 New Revision: 276841 URL: https://svnweb.freebsd.org/changeset/base/276841 Log: Do not initialize pfi_unlnkdkifs_mtx and pf_frag_mtx. They are already initialized by MTX_SYSINIT. Submitted by: Nikos Vassiliadis Modified: head/sys/netpfil/pf/pf_if.c head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf_if.c ============================================================================== --- head/sys/netpfil/pf/pf_if.c Thu Jan 8 17:46:42 2015 (r276840) +++ head/sys/netpfil/pf/pf_if.c Thu Jan 8 17:49:07 2015 (r276841) @@ -117,10 +117,6 @@ pfi_vnet_initialize(void) V_pfi_buffer_max = 64; V_pfi_buffer = malloc(V_pfi_buffer_max * sizeof(*V_pfi_buffer), PFI_MTYPE, M_WAITOK); - - if (IS_DEFAULT_VNET(curvnet)) - mtx_init(&pfi_unlnkdkifs_mtx, "pf unlinked interfaces", NULL, MTX_DEF); - kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK); PF_RULES_WLOCK(); V_pfi_all = pfi_kif_attach(kif, IFG_ALL); Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Thu Jan 8 17:46:42 2015 (r276840) +++ head/sys/netpfil/pf/pf_norm.c Thu Jan 8 17:49:07 2015 (r276841) @@ -163,10 +163,6 @@ pf_vnet_normalize_init(void) V_pf_limits[PF_LIMIT_FRAGS].limit = PFFRAG_FRENT_HIWAT; uma_zone_set_max(V_pf_frent_z, PFFRAG_FRENT_HIWAT); uma_zone_set_warning(V_pf_frent_z, "PF frag entries limit reached"); - - if (IS_DEFAULT_VNET(curvnet)) - mtx_init(&pf_frag_mtx, "pf fragments", NULL, MTX_DEF); - TAILQ_INIT(&V_pf_fragqueue); TAILQ_INIT(&V_pf_cachequeue); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 17:51: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 BA8EDB8C; Thu, 8 Jan 2015 17: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 A6305FFC; Thu, 8 Jan 2015 17:51: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 t08HpD5m004988; Thu, 8 Jan 2015 17:51:13 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08HpDLL004986; Thu, 8 Jan 2015 17:51:13 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201501081751.t08HpDLL004986@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 8 Jan 2015 17:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276842 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 17:51:13 -0000 Author: ken Date: Thu Jan 8 17:51:12 2015 New Revision: 276842 URL: https://svnweb.freebsd.org/changeset/base/276842 Log: Close a race in the isp(4) driver that caused devices to disappear and not automatically come back if they were gone for a short period of time. The isp(4) driver has a 30 second gone device timer that gets activated whenever a device goes away. If the device comes back before the timer expires, we don't send a notification to CAM that it has gone away. If, however, there is a command sent to the device while it is gone and before it comes back, the isp(4) driver sends the command back with CAM_SEL_TIMEOUT status. CAM responds to the CAM_SEL_TIMEOUT status by removing the device. In the case where a device comes back within the 30 second gone device timer window, though, we weren't telling CAM the device came back. So, fix this by tracking whether we have told CAM the device is gone, and if we have, send a rescan if it comes back within the 30 second window. ispvar.h: In the fcportdb_t structure, add a new bitfield, reported_gone. This gets set whenever we return a command with CAM_SEL_TIMEOUT status on a Fibre Channel device. isp_freebsd.c: In isp_done(), if we're sending CAM_SEL_TIMEOUT for for a command sent to a FC device, set the reported_gone bit. In isp_async(), in the ISPASYNC_DEV_STAYED case, rescan the device in question if it is mapped to a target ID and has been reported gone. In isp_make_here(), take a port database entry argument, and clear the reported_gone bit when we send a rescan to CAM. In isp_make_gone(), take a port database entry as an argument, and set the reported_gone bit when we send an async event telling CAM consumers that the device is gone. Sponsored by: Spectra Logic MFC after: 1 week Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Thu Jan 8 17:49:07 2015 (r276841) +++ head/sys/dev/isp/isp_freebsd.c Thu Jan 8 17:51:12 2015 (r276842) @@ -4565,7 +4565,7 @@ isp_watchdog(void *arg) } static void -isp_make_here(ispsoftc_t *isp, int chan, int tgt) +isp_make_here(ispsoftc_t *isp, fcportdb_t *fcp, int chan, int tgt) { union ccb *ccb; struct isp_fc *fc = ISP_FC_PC(isp, chan); @@ -4588,11 +4588,18 @@ isp_make_here(ispsoftc_t *isp, int chan, xpt_free_ccb(ccb); return; } + + /* + * Since we're about to issue a rescan, mark this device as not + * reported gone. + */ + fcp->reported_gone = 0; + xpt_rescan(ccb); } static void -isp_make_gone(ispsoftc_t *isp, int chan, int tgt) +isp_make_gone(ispsoftc_t *isp, fcportdb_t *fcp, int chan, int tgt) { struct cam_path *tp; struct isp_fc *fc = ISP_FC_PC(isp, chan); @@ -4601,6 +4608,11 @@ isp_make_gone(ispsoftc_t *isp, int chan, return; } if (xpt_create_path(&tp, NULL, cam_sim_path(fc->sim), tgt, CAM_LUN_WILDCARD) == CAM_REQ_CMP) { + /* + * We're about to send out the lost device async + * notification, so indicate that we have reported it gone. + */ + fcp->reported_gone = 1; xpt_async(AC_LOST_DEVICE, tp, NULL); xpt_free_path(tp); } @@ -4654,7 +4666,7 @@ isp_gdt_task(void *arg, int pending) lp->dev_map_idx = 0; lp->state = FC_PORTDB_STATE_NIL; isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, tgt, "Gone Device Timeout"); - isp_make_gone(isp, chan, tgt); + isp_make_gone(isp, lp, chan, tgt); } if (fc->ready) { if (more_to_do) { @@ -4747,7 +4759,7 @@ isp_ldt_task(void *arg, int pending) lp->dev_map_idx = 0; lp->state = FC_PORTDB_STATE_NIL; isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, tgt, "Loop Down Timeout"); - isp_make_gone(isp, chan, tgt); + isp_make_gone(isp, lp, chan, tgt); } if (FCPARAM(isp, chan)->role & ISP_ROLE_INITIATOR) { @@ -5561,6 +5573,21 @@ isp_done(XS_T *sccb) if (status != CAM_REQ_CMP) { if (status != CAM_SEL_TIMEOUT) isp_prt(isp, ISP_LOGDEBUG0, "target %d lun %d CAM status 0x%x SCSI status 0x%x", XS_TGT(sccb), XS_LUN(sccb), sccb->ccb_h.status, sccb->scsi_status); + else if ((IS_FC(isp)) + && (XS_TGT(sccb) < MAX_FC_TARG)) { + fcparam *fcp; + int hdlidx; + + fcp = FCPARAM(isp, XS_CHANNEL(sccb)); + hdlidx = fcp->isp_dev_map[XS_TGT(sccb)] - 1; + /* + * Note that we have reported that this device is + * gone. If it reappears, we'll need to issue a + * rescan. + */ + if (hdlidx > 0 && hdlidx < MAX_FC_TARG) + fcp->portdb[hdlidx].reported_gone = 1; + } if ((sccb->ccb_h.status & CAM_DEV_QFRZN) == 0) { sccb->ccb_h.status |= CAM_DEV_QFRZN; xpt_freeze_devq(sccb->ccb_h.path, 1); @@ -5750,7 +5777,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm tgt = lp->dev_map_idx - 1; isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "arrived at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); - isp_make_here(isp, bus, tgt); + isp_make_here(isp, lp, bus, tgt); } else { isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "arrived", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); } @@ -5770,7 +5797,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm FCPARAM(isp, bus)->isp_dev_map[tgt] = 0; lp->dev_map_idx = 0; isp_prt(isp, ISP_LOGCONFIG, prom3, bus, lp->portid, tgt, "change is bad"); - isp_make_gone(isp, bus, tgt); + isp_make_gone(isp, lp, bus, tgt); } else { isp_gen_role_str(buf, sizeof (buf), lp->prli_word3); isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "changed and departed", @@ -5803,6 +5830,15 @@ isp_async(ispsoftc_t *isp, ispasync_t cm tgt = lp->dev_map_idx - 1; isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "stayed at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + /* + * Only issue a rescan if we've actually reported + * that this device is gone. + */ + if (lp->reported_gone != 0) { + isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, buf, "rescanned at", tgt, + (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); + isp_make_here(isp, lp, bus, tgt); + } } else { isp_prt(isp, ISP_LOGCONFIG, prom0, bus, lp->portid, lp->handle, buf, "stayed", (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn); Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Thu Jan 8 17:49:07 2015 (r276841) +++ head/sys/dev/isp/ispvar.h Thu Jan 8 17:51:12 2015 (r276842) @@ -421,7 +421,8 @@ typedef struct { target_mode : 1, portid : 24; uint32_t - : 6, + : 5, + reported_gone : 1, announced : 1, dirty : 1, /* commands have been run */ new_portid : 24; From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 18:00: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 1DDCBE29; Thu, 8 Jan 2015 18:00: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 0A6A8E8; Thu, 8 Jan 2015 18:00: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 t08I0cuu007822; Thu, 8 Jan 2015 18:00:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08I0cwF007821; Thu, 8 Jan 2015 18:00:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501081800.t08I0cwF007821@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 8 Jan 2015 18:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276843 - head/tools/tools/nanobsd/pcengines X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 18:00:39 -0000 Author: imp Date: Thu Jan 8 18:00:38 2015 New Revision: 276843 URL: https://svnweb.freebsd.org/changeset/base/276843 Log: We don't want tests on these embedded boxes. Modified: head/tools/tools/nanobsd/pcengines/common.conf Modified: head/tools/tools/nanobsd/pcengines/common.conf ============================================================================== --- head/tools/tools/nanobsd/pcengines/common.conf Thu Jan 8 17:51:12 2015 (r276842) +++ head/tools/tools/nanobsd/pcengines/common.conf Thu Jan 8 18:00:38 2015 (r276843) @@ -29,6 +29,7 @@ CONF_WORLD=' #TARGET_ARCH=i386 CFLAGS=-O -pipe WITHOUT_ACPI= +WITHOUT_TESTS= MODULES_OVERRIDE=netgraph rc4 BOOT_PXELDR_PROBE_KEYBOARD=1 BOOT_PXELDR_ALWAYS_SERIAL=1 From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 18:02: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 3130CF91; Thu, 8 Jan 2015 18:02: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 1C418192; Thu, 8 Jan 2015 18:02: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 t08I26DF010371; Thu, 8 Jan 2015 18:02:06 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08I26nA010368; Thu, 8 Jan 2015 18:02:06 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501081802.t08I26nA010368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 8 Jan 2015 18:02:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276844 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 18:02:07 -0000 Author: melifaro Date: Thu Jan 8 18:02:05 2015 New Revision: 276844 URL: https://svnweb.freebsd.org/changeset/base/276844 Log: * Use newly-created nd6_grab_holdchain() function to retrieve lle hold mbuf chain instead of calling full-blown nd6_output_lle() for each packet. This simplifies both callers and nd6_output_lle() implementation. * Make nd6_output_lle() static and remove now-unused lle and chain arguments. * Rename nd6_output_flush() -> nd6_flush_holdchain() to be consistent. * Move all pre-send transmit hooks to newly-created nd6_output_ifp(). Now nd6_output(), nd6_output_lle() and nd6_flush_holdchain() are using it to send mbufs to if_output. * Remove SeND hook from nd6_na_input() because it was implemented incorrectly since the beginning (r211501): - it tagged initial input mbuf (m) instead of m_hold - tagging _all_ mbufs in holdchain seems to be wrong anyway. Modified: head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Thu Jan 8 18:00:38 2015 (r276843) +++ head/sys/netinet6/nd6.c Thu Jan 8 18:02:05 2015 (r276844) @@ -134,6 +134,8 @@ static struct llentry *nd6_free(struct l static void nd6_llinfo_timer(void *); static void clear_llinfo_pqueue(struct llentry *); static void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); +static int nd6_output_lle(struct ifnet *, struct ifnet *, struct mbuf *, + struct sockaddr_in6 *); static VNET_DEFINE(struct callout, nd6_slowtimo_ch); #define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch) @@ -1646,42 +1648,8 @@ nd6_cache_lladdr(struct ifnet *ifp, stru ln->ln_state = newstate; if (ln->ln_state == ND6_LLINFO_STALE) { - /* - * XXX: since nd6_output() below will cause - * state tansition to DELAY and reset the timer, - * we must set the timer now, although it is actually - * meaningless. - */ - nd6_llinfo_settimer_locked(ln, (long)V_nd6_gctimer * hz); - - if (ln->la_hold) { - struct mbuf *m_hold, *m_hold_next; - - /* - * reset the la_hold in advance, to explicitly - * prevent a la_hold lookup in nd6_output() - * (wouldn't happen, though...) - */ - for (m_hold = ln->la_hold, ln->la_hold = NULL; - m_hold; m_hold = m_hold_next) { - m_hold_next = m_hold->m_nextpkt; - m_hold->m_nextpkt = NULL; - - /* - * we assume ifp is not a p2p here, so - * just set the 2nd argument as the - * 1st one. - */ - nd6_output_lle(ifp, ifp, m_hold, L3_ADDR_SIN6(ln), NULL, ln, &chain); - } - /* - * If we have mbufs in the chain we need to do - * deferred transmit. Copy the address from the - * llentry before dropping the lock down below. - */ - if (chain != NULL) - memcpy(&sin6, L3_ADDR_SIN6(ln), sizeof(sin6)); - } + if (ln->la_hold != NULL) + nd6_grab_holdchain(ln, &chain, &sin6); } else if (ln->ln_state == ND6_LLINFO_INCOMPLETE) { /* probe right away */ nd6_llinfo_settimer_locked((void *)ln, 0); @@ -1764,8 +1732,8 @@ nd6_cache_lladdr(struct ifnet *ifp, stru if (static_route) ln = NULL; } - if (chain) - nd6_output_flush(ifp, ifp, chain, &sin6); + if (chain != NULL) + nd6_flush_holdchain(ifp, ifp, chain, &sin6); /* * When the link-layer address of a router changes, select the @@ -1833,6 +1801,79 @@ nd6_slowtimo(void *arg) CURVNET_RESTORE(); } +void +nd6_grab_holdchain(struct llentry *ln, struct mbuf **chain, + struct sockaddr_in6 *sin6) +{ + + LLE_WLOCK_ASSERT(ln); + + *chain = ln->la_hold; + ln->la_hold = NULL; + memcpy(sin6, L3_ADDR_SIN6(ln), sizeof(*sin6)); + + if (ln->ln_state == ND6_LLINFO_STALE) { + + /* + * The first time we send a packet to a + * neighbor whose entry is STALE, we have + * to change the state to DELAY and a sets + * a timer to expire in DELAY_FIRST_PROBE_TIME + * seconds to ensure do neighbor unreachability + * detection on expiration. + * (RFC 2461 7.3.3) + */ + ln->la_asked = 0; + ln->ln_state = ND6_LLINFO_DELAY; + nd6_llinfo_settimer_locked(ln, (long)V_nd6_delay * hz); + } +} + +static int +nd6_output_ifp(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, + struct sockaddr_in6 *dst) +{ + int error; + int ip6len; + struct ip6_hdr *ip6; + struct m_tag *mtag; + +#ifdef MAC + mac_netinet6_nd6_send(ifp, m); +#endif + + /* + * If called from nd6_ns_output() (NS), nd6_na_output() (NA), + * icmp6_redirect_output() (REDIRECT) or from rip6_output() (RS, RA + * as handled by rtsol and rtadvd), mbufs will be tagged for SeND + * to be diverted to user space. When re-injected into the kernel, + * send_output() will directly dispatch them to the outgoing interface. + */ + if (send_sendso_input_hook != NULL) { + mtag = m_tag_find(m, PACKET_TAG_ND_OUTGOING, NULL); + if (mtag != NULL) { + ip6 = mtod(m, struct ip6_hdr *); + ip6len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen); + /* Use the SEND socket */ + error = send_sendso_input_hook(m, ifp, SND_OUT, + ip6len); + /* -1 == no app on SEND socket */ + if (error == 0 || error != -1) + return (error); + } + } + + m_clrprotoflags(m); /* Avoid confusing lower layers. */ + IP_PROBE(send, NULL, NULL, mtod(m, struct ip6_hdr *), ifp, NULL, + mtod(m, struct ip6_hdr *)); + + if ((ifp->if_flags & IFF_LOOPBACK) == 0) + origifp = ifp; + + error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, NULL); + return (error); +} + /* * IPv6 packet output - light version. * Checks if destination LLE exists and is in proper state @@ -1844,7 +1885,6 @@ nd6_output(struct ifnet *ifp, struct ifn struct sockaddr_in6 *dst, struct rtentry *rt0) { struct llentry *ln = NULL; - int error = 0; /* discard the packet if IPv6 operation is disabled on the interface */ if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { @@ -1875,50 +1915,14 @@ nd6_output(struct ifnet *ifp, struct ifn /* Fall back to slow processing path */ if (ln != NULL) LLE_RUNLOCK(ln); - return (nd6_output_lle(ifp, origifp, m, dst, rt0, NULL, NULL)); + return (nd6_output_lle(ifp, origifp, m, dst)); } sendpkt: if (ln != NULL) LLE_RUNLOCK(ln); -#ifdef MAC - mac_netinet6_nd6_send(ifp, m); -#endif - - /* - * If called from nd6_ns_output() (NS), nd6_na_output() (NA), - * icmp6_redirect_output() (REDIRECT) or from rip6_output() (RS, RA - * as handled by rtsol and rtadvd), mbufs will be tagged for SeND - * to be diverted to user space. When re-injected into the kernel, - * send_output() will directly dispatch them to the outgoing interface. - */ - if (send_sendso_input_hook != NULL) { - struct m_tag *mtag; - struct ip6_hdr *ip6; - int ip6len; - mtag = m_tag_find(m, PACKET_TAG_ND_OUTGOING, NULL); - if (mtag != NULL) { - ip6 = mtod(m, struct ip6_hdr *); - ip6len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen); - /* Use the SEND socket */ - error = send_sendso_input_hook(m, ifp, SND_OUT, - ip6len); - /* -1 == no app on SEND socket */ - if (error == 0 || error != -1) - return (error); - } - } - - m_clrprotoflags(m); /* Avoid confusing lower layers. */ - IP_PROBE(send, NULL, NULL, mtod(m, struct ip6_hdr *), ifp, NULL, - mtod(m, struct ip6_hdr *)); - - if ((ifp->if_flags & IFF_LOOPBACK) == 0) - origifp = ifp; - - error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, NULL); - return (error); + return (nd6_output_ifp(ifp, origifp, m, dst)); } @@ -1931,26 +1935,13 @@ sendpkt: * in that case packets are queued in &chain. * */ -int +static int nd6_output_lle(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m, - struct sockaddr_in6 *dst, struct rtentry *rt0, struct llentry *lle, - struct mbuf **chain) + struct sockaddr_in6 *dst) { - struct m_tag *mtag; - struct ip6_hdr *ip6; - int error = 0; + struct llentry *lle = NULL; int flags = 0; - int has_lle = 0; - int ip6len; - -#ifdef INVARIANTS - if (lle != NULL) { - - LLE_WLOCK_ASSERT(lle); - KASSERT(chain != NULL, (" lle locked but no mbuf chain pointer passed")); - } -#endif KASSERT(m != NULL, ("NULL mbuf, nothing to send")); /* discard the packet if IPv6 operation is disabled on the interface */ if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)) { @@ -1958,9 +1949,6 @@ nd6_output_lle(struct ifnet *ifp, struct return (ENETDOWN); /* better error? */ } - if (lle != NULL) - has_lle = 1; - if (IN6_IS_ADDR_MULTICAST(&dst->sin6_addr)) goto sendpkt; @@ -2076,88 +2064,23 @@ nd6_output_lle(struct ifnet *ifp, struct (long)ND_IFINFO(ifp)->retrans * hz / 1000); LLE_WUNLOCK(lle); nd6_ns_output(ifp, NULL, &dst->sin6_addr, lle, 0); - if (has_lle != 0) - LLE_WLOCK(lle); - } else if (has_lle == 0) { - /* - * We did the lookup (no lle arg) so we - * need to do the unlock here. - */ + } else { + /* We did the lookup so we need to do the unlock here. */ LLE_WUNLOCK(lle); } return (0); sendpkt: - /* - * ln is valid and the caller did not pass in - * an llentry - */ - if (lle != NULL && has_lle == 0) + if (lle != NULL) LLE_WUNLOCK(lle); -#ifdef MAC - mac_netinet6_nd6_send(ifp, m); -#endif - - /* - * If called from nd6_ns_output() (NS), nd6_na_output() (NA), - * icmp6_redirect_output() (REDIRECT) or from rip6_output() (RS, RA - * as handled by rtsol and rtadvd), mbufs will be tagged for SeND - * to be diverted to user space. When re-injected into the kernel, - * send_output() will directly dispatch them to the outgoing interface. - */ - if (send_sendso_input_hook != NULL) { - mtag = m_tag_find(m, PACKET_TAG_ND_OUTGOING, NULL); - if (mtag != NULL) { - ip6 = mtod(m, struct ip6_hdr *); - ip6len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen); - /* Use the SEND socket */ - error = send_sendso_input_hook(m, ifp, SND_OUT, - ip6len); - /* -1 == no app on SEND socket */ - if (error == 0 || error != -1) - return (error); - } - } - - /* - * We were passed in a pointer to an lle with the lock held - * this means that we can't call if_output as we will - * recurse on the lle lock - so what we do is we create - * a list of mbufs to send and transmit them in the caller - * after the lock is dropped - */ - if (has_lle != 0) { - if (*chain == NULL) - *chain = m; - else { - struct mbuf *mb; - - /* - * append mbuf to end of deferred chain - */ - mb = *chain; - while (mb->m_nextpkt != NULL) - mb = mb->m_nextpkt; - mb->m_nextpkt = m; - } - return (error); - } - m_clrprotoflags(m); /* Avoid confusing lower layers. */ - IP_PROBE(send, NULL, NULL, mtod(m, struct ip6_hdr *), ifp, NULL, - mtod(m, struct ip6_hdr *)); - - if ((ifp->if_flags & IFF_LOOPBACK) == 0) - origifp = ifp; - - error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, NULL); - return (error); + return (nd6_output_ifp(ifp, origifp, m, dst)); } int -nd6_output_flush(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *chain, +nd6_flush_holdchain(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *chain, struct sockaddr_in6 *dst) { struct mbuf *m, *m_head; @@ -2173,7 +2096,7 @@ nd6_output_flush(struct ifnet *ifp, stru while (m_head) { m = m_head; m_head = m_head->m_nextpkt; - error = (*ifp->if_output)(ifp, m, (struct sockaddr *)dst, NULL); + error = nd6_output_ifp(ifp, origifp, m, dst); } /* Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Thu Jan 8 18:00:38 2015 (r276843) +++ head/sys/netinet6/nd6.h Thu Jan 8 18:02:05 2015 (r276844) @@ -409,11 +409,10 @@ struct llentry *nd6_cache_lladdr(struct char *, int, int, int); int nd6_output(struct ifnet *, struct ifnet *, struct mbuf *, struct sockaddr_in6 *, struct rtentry *); -int nd6_output_lle(struct ifnet *, struct ifnet *, struct mbuf *, - struct sockaddr_in6 *, struct rtentry *, struct llentry *, - struct mbuf **); -int nd6_output_flush(struct ifnet *, struct ifnet *, struct mbuf *, - struct sockaddr_in6 *); +void nd6_grab_holdchain(struct llentry *, struct mbuf **, + struct sockaddr_in6 *); +int nd6_flush_holdchain(struct ifnet *, struct ifnet *, struct mbuf *, + struct sockaddr_in6 *); int nd6_need_cache(struct ifnet *); int nd6_add_ifa_lle(struct in6_ifaddr *); void nd6_rem_ifa_lle(struct in6_ifaddr *); Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Thu Jan 8 18:00:38 2015 (r276843) +++ head/sys/netinet6/nd6_nbr.c Thu Jan 8 18:02:05 2015 (r276844) @@ -626,7 +626,6 @@ nd6_na_input(struct mbuf *m, int off, in struct llentry *ln = NULL; union nd_opts ndopts; struct mbuf *chain = NULL; - struct m_tag *mtag; struct sockaddr_in6 sin6; char ip6bufs[INET6_ADDRSTRLEN], ip6bufd[INET6_ADDRSTRLEN]; @@ -653,6 +652,7 @@ nd6_na_input(struct mbuf *m, int off, in is_router = ((flags & ND_NA_FLAG_ROUTER) != 0); is_solicited = ((flags & ND_NA_FLAG_SOLICITED) != 0); is_override = ((flags & ND_NA_FLAG_OVERRIDE) != 0); + memset(&sin6, 0, sizeof(sin6)); taddr6 = nd_na->nd_na_target; if (in6_setscope(&taddr6, ifp, NULL)) @@ -891,43 +891,15 @@ nd6_na_input(struct mbuf *m, int off, in * rt->rt_flags &= ~RTF_REJECT; */ ln->la_asked = 0; - if (ln->la_hold) { - struct mbuf *m_hold, *m_hold_next; - - /* - * reset the la_hold in advance, to explicitly - * prevent a la_hold lookup in nd6_output() - * (wouldn't happen, though...) - */ - for (m_hold = ln->la_hold, ln->la_hold = NULL; - m_hold; m_hold = m_hold_next) { - m_hold_next = m_hold->m_nextpkt; - m_hold->m_nextpkt = NULL; - /* - * we assume ifp is not a loopback here, so just set - * the 2nd argument as the 1st one. - */ - - if (send_sendso_input_hook != NULL) { - mtag = m_tag_get(PACKET_TAG_ND_OUTGOING, - sizeof(unsigned short), M_NOWAIT); - if (mtag == NULL) - goto bad; - m_tag_prepend(m, mtag); - } - - nd6_output_lle(ifp, ifp, m_hold, L3_ADDR_SIN6(ln), NULL, ln, &chain); - } - } + if (ln->la_hold != NULL) + nd6_grab_holdchain(ln, &chain, &sin6); freeit: - if (ln != NULL) { - if (chain) - memcpy(&sin6, L3_ADDR_SIN6(ln), sizeof(sin6)); + if (ln != NULL) LLE_WUNLOCK(ln); - if (chain) - nd6_output_flush(ifp, ifp, chain, &sin6); - } + if (chain != NULL) + nd6_flush_holdchain(ifp, ifp, chain, &sin6); + if (checklink) pfxlist_onlink_check(); From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 18:28: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 637BF78F; Thu, 8 Jan 2015 18:28: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 4461C677; Thu, 8 Jan 2015 18:28: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 t08IS86V021751; Thu, 8 Jan 2015 18:28:08 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08IS6Kf021746; Thu, 8 Jan 2015 18:28:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501081828.t08IS6Kf021746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 8 Jan 2015 18:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276846 - in head: share/mk sys/arm/conf sys/conf sys/modules/dtb sys/modules/dtb/atmel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 18:28:08 -0000 Author: imp Date: Thu Jan 8 18:28:06 2015 New Revision: 276846 URL: https://svnweb.freebsd.org/changeset/base/276846 Log: Add infrastructure to build dtb files from dts files. Added: head/share/mk/bsd.dtb.mk (contents, props changed) head/sys/conf/dtb.mk (contents, props changed) head/sys/modules/dtb/ head/sys/modules/dtb/atmel/ head/sys/modules/dtb/atmel/Makefile (contents, props changed) Modified: head/share/mk/Makefile head/sys/arm/conf/ATMEL Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Thu Jan 8 18:09:36 2015 (r276845) +++ head/share/mk/Makefile Thu Jan 8 18:28:06 2015 (r276846) @@ -11,6 +11,7 @@ FILES= \ bsd.crunchgen.mk \ bsd.dep.mk \ bsd.doc.mk \ + bsd.dtb.mk \ bsd.endian.mk \ bsd.files.mk \ bsd.incs.mk \ Added: head/share/mk/bsd.dtb.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/bsd.dtb.mk Thu Jan 8 18:28:06 2015 (r276846) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ + ${.CURDIR}/../../../../.. /sys /usr/src/sys +.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +SYSDIR= ${_dir} +.endif +.endfor +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ + !exists(${SYSDIR}/conf/kmod.mk) +.error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif + +.include "${SYSDIR}/conf/dtb.mk" + +.include Modified: head/sys/arm/conf/ATMEL ============================================================================== --- head/sys/arm/conf/ATMEL Thu Jan 8 18:09:36 2015 (r276845) +++ head/sys/arm/conf/ATMEL Thu Jan 8 18:28:06 2015 (r276846) @@ -15,7 +15,7 @@ makeoptions KERNVIRTADDR=0xc0000000 options KERNPHYSADDR=0x20000000 options KERNVIRTADDR=0xc0000000 -makeoptions MODULES_OVERRIDE="" +makeoptions MODULES_OVERRIDE="dtb/atmel" # list all boards here, but not just yet (no multiboard in mainline). options ARM_MANY_BOARD Added: head/sys/conf/dtb.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/conf/dtb.mk Thu Jan 8 18:28:06 2015 (r276846) @@ -0,0 +1,75 @@ +# $FreeBSD$ +# +# The include file handles building and installing dtb files. +# +# +++ variables +++ +# +# DTS List of the dts files to build and install. +# +# DTBDIR Base path for dtb modules [/boot/dtb] +# +# DTBOWN .dtb file owner. [${BINOWN}] +# +# DTBGRP .dtb file group. [${BINGRP}] +# +# DTBMODE Module file mode. [${BINMODE}] +# +# DESTDIR The tree where the module gets installed. [not set] +# +# +++ targets +++ +# +# install: +# install the kernel module; if the Makefile +# does not itself define the target install, the targets +# beforeinstall and afterinstall may also be used to cause +# actions immediately before and after the install target +# is executed. +# + +.include +# Grab all the options for a kernel build. For backwards compat, we need to +# do this after bsd.own.mk. +.include "kern.opts.mk" + +# Search for kernel source tree in standard places. +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys +.if !defined(SYSDIR) && exists(${_dir}/kern/) +SYSDIR= ${_dir} +.endif +.endfor +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) +.error "can't find kernel source tree" +.endif + +.SUFFIXES: .dtb .dts + +.PATH: ${SYSDIR}/gnu/dts/${MACHINE} ${SYSDIR}/boot/fdt/dts/${MACHINE} + +DTBDIR?=/boot/dtb +DTB=${DTS:R:S/$/.dtb/} + +all: ${DTB} + +.if defined(DTS) +.for _dts in ${DTS} +${_dts:R:S/$/.dtb/}: ${_dts} + @echo Generating ${.TARGET} from ${_dts} + @${SYSDIR}/tools/fdt/make_dtb.sh ${SYSDIR} ${_dts} ${.OBJDIR} +CLEANFILES+=${_dts:R:S/$/.dtb/} +.endfor +.endif + +.if !target(install) +.if !target(realinstall) +realinstall: _dtbinstall +.ORDER: beforeinstall _kmodinstall +_dtbinstall: +.for _dtb in ${DTB} + ${INSTALL} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${_INSTALLFLAGS} ${_dtb} ${DESTDIR}${DTBDIR} +.endfor +.endif # !target(realinstall) +.endif # !target(install) + +.include +.include Added: head/sys/modules/dtb/atmel/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/dtb/atmel/Makefile Thu Jan 8 18:28:06 2015 (r276846) @@ -0,0 +1,9 @@ +# $FreeBSD$ +# All the dts files for the boards we might likely support made by Atmel, +# plus the SAMA5 offerings. +DTS=at91-sama5d3_xplained.dts at91sam9g20ek.dts ethernut5.dts \ + at91-qil_a9260.dts sama5d31ek.dts sama5d33ek.dts sama5d34ek.dts \ + sama5d35ek.dts sama5d36ek.dts tny_a9260.dts tny_a9g20.dts \ + usb_a9260.dts usb_a9g20.dts + +.include From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 18:29: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 5C853943; Thu, 8 Jan 2015 18:29: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 483D8697; Thu, 8 Jan 2015 18:29: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 t08ITtMr022002; Thu, 8 Jan 2015 18:29:55 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08ITtjs022001; Thu, 8 Jan 2015 18:29:55 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501081829.t08ITtjs022001@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 8 Jan 2015 18:29:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276847 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 18:29:55 -0000 Author: melifaro Date: Thu Jan 8 18:29:54 2015 New Revision: 276847 URL: https://svnweb.freebsd.org/changeset/base/276847 Log: Add forgotten definition for nd6_output_ifp(). Modified: head/sys/netinet6/nd6.c Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Thu Jan 8 18:28:06 2015 (r276846) +++ head/sys/netinet6/nd6.c Thu Jan 8 18:29:54 2015 (r276847) @@ -136,6 +136,8 @@ static void clear_llinfo_pqueue(struct l static void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); static int nd6_output_lle(struct ifnet *, struct ifnet *, struct mbuf *, struct sockaddr_in6 *); +static int nd6_output_ifp(struct ifnet *, struct ifnet *, struct mbuf *, + struct sockaddr_in6 *); static VNET_DEFINE(struct callout, nd6_slowtimo_ch); #define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch) From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 18:45: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 B0760165; Thu, 8 Jan 2015 18: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 9C4378CE; Thu, 8 Jan 2015 18: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 t08IjHae031463; Thu, 8 Jan 2015 18:45:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08IjHqS031462; Thu, 8 Jan 2015 18:45:17 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201501081845.t08IjHqS031462@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 8 Jan 2015 18:45:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276848 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 18:45:17 -0000 Author: markj Date: Thu Jan 8 18:45:16 2015 New Revision: 276848 URL: https://svnweb.freebsd.org/changeset/base/276848 Log: Revert r274569. It seems to be causing a crash when merging CTF data for recent i386 GENERIC kernels. Reported by: David Wolfskill Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Thu Jan 8 18:29:54 2015 (r276847) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c Thu Jan 8 18:45:16 2015 (r276848) @@ -349,7 +349,7 @@ equiv_node(tdesc_t *ctdp, tdesc_t *mtdp, int (*equiv)(tdesc_t *, tdesc_t *, equiv_data_t *); int mapping; - if (ctdp->t_emark > ed->ed_clear_mark && + if (ctdp->t_emark > ed->ed_clear_mark || mtdp->t_emark > ed->ed_clear_mark) return (ctdp->t_emark == mtdp->t_emark); From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 18:53: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 CB48F8A3; Thu, 8 Jan 2015 18:53: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 B6DE69D3; Thu, 8 Jan 2015 18:53: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 t08IrC9O036309; Thu, 8 Jan 2015 18:53:12 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08IrCQx036307; Thu, 8 Jan 2015 18:53:12 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501081853.t08IrCQx036307@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 8 Jan 2015 18:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276849 - in head: lib/libc/sys usr.bin/cpuset X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 18:53:12 -0000 Author: jhb Date: Thu Jan 8 18:53:11 2015 New Revision: 276849 URL: https://svnweb.freebsd.org/changeset/base/276849 Log: Document CPU_WHICH_DOMAIN and bump Dd for cpuset.1. Missed in: r276829 Modified: head/lib/libc/sys/cpuset.2 head/usr.bin/cpuset/cpuset.1 Modified: head/lib/libc/sys/cpuset.2 ============================================================================== --- head/lib/libc/sys/cpuset.2 Thu Jan 8 18:45:16 2015 (r276848) +++ head/lib/libc/sys/cpuset.2 Thu Jan 8 18:53:11 2015 (r276849) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2014 +.Dd January 8, 2015 .Dt CPUSET 2 .Os .Sh NAME @@ -101,6 +101,7 @@ argument may have the following values: .It Dv CPU_WHICH_JAIL Ta "id is jid (jail id)" .It Dv CPU_WHICH_CPUSET Ta "id is a cpusetid_t (cpuset id)" .It Dv CPU_WHICH_IRQ Ta "id is an irq number" +.It Dv CPU_WHICH_DOMAIN Ta "id is a NUMA domain" .El .Pp An Modified: head/usr.bin/cpuset/cpuset.1 ============================================================================== --- head/usr.bin/cpuset/cpuset.1 Thu Jan 8 18:45:16 2015 (r276848) +++ head/usr.bin/cpuset/cpuset.1 Thu Jan 8 18:53:11 2015 (r276849) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2011 +.Dd January 8, 2015 .Dt CPUSET 1 .Os .Sh NAME From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 19: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 C16FD64A; Thu, 8 Jan 2015 19: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 ADB57BCE; Thu, 8 Jan 2015 19: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 t08JBF1I045911; Thu, 8 Jan 2015 19:11:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08JBF28045910; Thu, 8 Jan 2015 19:11:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501081911.t08JBF28045910@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 8 Jan 2015 19:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276850 - 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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 19:11:15 -0000 Author: jhb Date: Thu Jan 8 19:11:14 2015 New Revision: 276850 URL: https://svnweb.freebsd.org/changeset/base/276850 Log: Reject attempts to read the cpuset mask of a negative domain ID. Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Thu Jan 8 18:53:11 2015 (r276849) +++ head/sys/kern/kern_cpuset.c Thu Jan 8 19:11:14 2015 (r276850) @@ -1118,7 +1118,7 @@ sys_cpuset_getaffinity(struct thread *td error = intr_getaffinity(uap->id, mask); break; case CPU_WHICH_DOMAIN: - if (uap->id >= vm_ndomains) + if (uap->id < 0 || uap->id >= vm_ndomains) error = ESRCH; else CPU_COPY(&cpuset_domain[uap->id], mask); From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 19:28: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 9C8ECC04; Thu, 8 Jan 2015 19:28:44 +0000 (UTC) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D309CEE; Thu, 8 Jan 2015 19:28:44 +0000 (UTC) Received: by mail-we0-f175.google.com with SMTP id k11so4270746wes.6; Thu, 08 Jan 2015 11:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=PeUJsXbosvzxU3eiCoUl9iB2ONVayvcGiY/zypeq77M=; b=n7rIlHq+EREvrY3li6PkuPM1aREbkv85K755bCtP259CXL0UhWG0mfvjHaxsOeBd6N VSa/n9bLQOHOPEtKt+lzJnUl53vTeh0v2XTDD95/3WulY2IOqh/v1Oqrh7lyqx2iNLBd pjZsaKGhIcFfIIQaWK6HHtE5W6z0QDD9LkkTwg33fR8d5Ccs+dhKmUqBm0zmd8dqcoqS +z9qrPAQopxaOfWPzj4jAYugHa9aNriibhjwE07alCxCKZlnikwidgVpHeRTg5Eko6Re HKqbuJZ83IIomZXcXT77PF3wMln7Sp/XxM5W4NdOE9v1I9nR9a94Knvh5PS5G9gCc2NI VGWg== MIME-Version: 1.0 X-Received: by 10.180.14.136 with SMTP id p8mr22854955wic.20.1420745322499; Thu, 08 Jan 2015 11:28:42 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Thu, 8 Jan 2015 11:28:42 -0800 (PST) In-Reply-To: References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> Date: Thu, 8 Jan 2015 11:28:42 -0800 X-Google-Sender-Auth: JjFerit7XvYIkqNjjvInmk4CUAw Message-ID: Subject: Re: svn commit: r276747 - head/sys/netpfil/pf From: Adrian Chadd To: =?UTF-8?Q?Ermal_Lu=C3=A7i?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Craig Rodrigues , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Nikos Vassiliadis , Gleb Smirnoff , "svn-src-head@freebsd.org" , "Bjoern A. Zeeb" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 19:28:44 -0000 On 8 January 2015 at 00:13, Ermal Lu=C3=A7i wrote: > > > On Thu, Jan 8, 2015 at 1:21 AM, Bjoern A. Zeeb > wrote: >> >> >> > On 07 Jan 2015, at 20:46 , Gleb Smirnoff wrote: >> > >> > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: >> > C> Author: rodrigc >> > C> Date: Tue Jan 6 09:03:03 2015 >> > C> New Revision: 276747 >> > C> URL: https://svnweb.freebsd.org/changeset/base/276747 >> > C> >> > C> Log: >> > C> Instead of creating a purge thread for every vnet, create >> > C> a single purge thread and clean up all vnets from this thread. >> > C> >> > C> PR: 194515 >> > C> Differential Revision: D1315 >> > C> Submitted by: Nikos Vassiliadis >> > >> > I am not sure that this is a good idea. The core idea of VNETs >> > is that they are isolated from each other. If we serialize purging, >> > then vnets are strongly affecting each other. >> > >> > AFAIU, from the PR there is some panic fixed. What is the actual bug >> > and why couldn't it be fixed with having per-vnet thread? >> >> You don=E2=80=99t 30000 whatever pf purging threads on a system all runn= ing, >> possibly competing for some resources, e.g., locks? > > > You can tune your system to your load! > > I do not agree with this change as well but just saw it! > > I would have agreed with this if a thread per CPU is created and some > improvements in the locking strategy is performed! > This is a potential issue since on busy system this thread gets very > resource consuming! So the tricksy bit here is once you have things being called via a taskqueue, they're effectively cooperative multitasking bits. A lot of things I've found aren't .. really designed for this. So I'm all for it, and I think it's a good idea in general, but then the pieces need to be reviewed for their suitability for this and may need some reworking so they don't hog CPU. (Yes, it's like writing WIN16 or MACOS code, or maybe network drivers in FreeBSD, but you get the idea.) -adrian From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 19:47: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 9BD0320E; Thu, 8 Jan 2015 19:47: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 838F7ECC; Thu, 8 Jan 2015 19:47: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 t08JlCrd062114; Thu, 8 Jan 2015 19:47:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08JlAhT062105; Thu, 8 Jan 2015 19:47:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501081947.t08JlAhT062105@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 8 Jan 2015 19:47:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276851 - in head: contrib/compiler-rt contrib/compiler-rt/BlocksRuntime contrib/compiler-rt/include contrib/compiler-rt/lib contrib/compiler-rt/lib/BlocksRuntime contrib/compiler-rt/li... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 19:47:12 -0000 Author: dim Date: Thu Jan 8 19:47:10 2015 New Revision: 276851 URL: https://svnweb.freebsd.org/changeset/base/276851 Log: Update compiler-rt to trunk r224034. This brings a number of new builtins, and also the various sanitizers. Support for these will be added in a later commit. Added: head/contrib/compiler-rt/include/ - copied from r276796, vendor/compiler-rt/dist/include/ head/contrib/compiler-rt/lib/BlocksRuntime/ - copied from r276795, vendor/compiler-rt/dist/lib/BlocksRuntime/ head/contrib/compiler-rt/lib/asan/ - copied from r276797, vendor/compiler-rt/dist/lib/asan/ head/contrib/compiler-rt/lib/builtins/ - copied from r276795, vendor/compiler-rt/dist/lib/builtins/ head/contrib/compiler-rt/lib/builtins/sparc64/ - copied from r276846, head/contrib/compiler-rt/lib/sparc64/ head/contrib/compiler-rt/lib/dfsan/ - copied from r276795, vendor/compiler-rt/dist/lib/dfsan/ head/contrib/compiler-rt/lib/interception/ - copied from r276797, vendor/compiler-rt/dist/lib/interception/ head/contrib/compiler-rt/lib/lsan/ - copied from r276795, vendor/compiler-rt/dist/lib/lsan/ head/contrib/compiler-rt/lib/msan/ - copied from r276797, vendor/compiler-rt/dist/lib/msan/ head/contrib/compiler-rt/lib/profile/ - copied from r276797, vendor/compiler-rt/dist/lib/profile/ head/contrib/compiler-rt/lib/sanitizer_common/ - copied from r276797, vendor/compiler-rt/dist/lib/sanitizer_common/ head/contrib/compiler-rt/lib/tsan/ - copied from r276797, vendor/compiler-rt/dist/lib/tsan/ head/contrib/compiler-rt/lib/ubsan/ - copied from r276797, vendor/compiler-rt/dist/lib/ubsan/ Deleted: head/contrib/compiler-rt/BlocksRuntime/ head/contrib/compiler-rt/include/CMakeLists.txt head/contrib/compiler-rt/lib/absvdi2.c head/contrib/compiler-rt/lib/absvsi2.c head/contrib/compiler-rt/lib/absvti2.c head/contrib/compiler-rt/lib/adddf3.c head/contrib/compiler-rt/lib/addsf3.c head/contrib/compiler-rt/lib/addvdi3.c head/contrib/compiler-rt/lib/addvsi3.c head/contrib/compiler-rt/lib/addvti3.c head/contrib/compiler-rt/lib/arm/ head/contrib/compiler-rt/lib/asan/CMakeLists.txt head/contrib/compiler-rt/lib/asan/Makefile.mk head/contrib/compiler-rt/lib/asan/scripts/CMakeLists.txt head/contrib/compiler-rt/lib/asan/tests/CMakeLists.txt head/contrib/compiler-rt/lib/ashldi3.c head/contrib/compiler-rt/lib/ashlti3.c head/contrib/compiler-rt/lib/ashrdi3.c head/contrib/compiler-rt/lib/ashrti3.c head/contrib/compiler-rt/lib/assembly.h head/contrib/compiler-rt/lib/atomic.c head/contrib/compiler-rt/lib/builtins/CMakeLists.txt head/contrib/compiler-rt/lib/builtins/Makefile.mk head/contrib/compiler-rt/lib/builtins/arm/Makefile.mk head/contrib/compiler-rt/lib/builtins/arm64/Makefile.mk head/contrib/compiler-rt/lib/builtins/armv6m/Makefile.mk head/contrib/compiler-rt/lib/builtins/i386/Makefile.mk head/contrib/compiler-rt/lib/builtins/ppc/Makefile.mk head/contrib/compiler-rt/lib/builtins/x86_64/Makefile.mk head/contrib/compiler-rt/lib/clear_cache.c head/contrib/compiler-rt/lib/clzdi2.c head/contrib/compiler-rt/lib/clzsi2.c head/contrib/compiler-rt/lib/clzti2.c head/contrib/compiler-rt/lib/cmpdi2.c head/contrib/compiler-rt/lib/cmpti2.c head/contrib/compiler-rt/lib/comparedf2.c head/contrib/compiler-rt/lib/comparesf2.c head/contrib/compiler-rt/lib/ctzdi2.c head/contrib/compiler-rt/lib/ctzsi2.c head/contrib/compiler-rt/lib/ctzti2.c head/contrib/compiler-rt/lib/dfsan/CMakeLists.txt head/contrib/compiler-rt/lib/dfsan/Makefile.mk head/contrib/compiler-rt/lib/divdc3.c head/contrib/compiler-rt/lib/divdf3.c head/contrib/compiler-rt/lib/divdi3.c head/contrib/compiler-rt/lib/divmoddi4.c head/contrib/compiler-rt/lib/divmodsi4.c head/contrib/compiler-rt/lib/divsc3.c head/contrib/compiler-rt/lib/divsf3.c head/contrib/compiler-rt/lib/divsi3.c head/contrib/compiler-rt/lib/divti3.c head/contrib/compiler-rt/lib/divxc3.c head/contrib/compiler-rt/lib/enable_execute_stack.c head/contrib/compiler-rt/lib/eprintf.c head/contrib/compiler-rt/lib/extendsfdf2.c head/contrib/compiler-rt/lib/ffsdi2.c head/contrib/compiler-rt/lib/ffsti2.c head/contrib/compiler-rt/lib/fixdfdi.c head/contrib/compiler-rt/lib/fixdfsi.c head/contrib/compiler-rt/lib/fixdfti.c head/contrib/compiler-rt/lib/fixsfdi.c head/contrib/compiler-rt/lib/fixsfsi.c head/contrib/compiler-rt/lib/fixsfti.c head/contrib/compiler-rt/lib/fixunsdfdi.c head/contrib/compiler-rt/lib/fixunsdfsi.c head/contrib/compiler-rt/lib/fixunsdfti.c head/contrib/compiler-rt/lib/fixunssfdi.c head/contrib/compiler-rt/lib/fixunssfsi.c head/contrib/compiler-rt/lib/fixunssfti.c head/contrib/compiler-rt/lib/fixunsxfdi.c head/contrib/compiler-rt/lib/fixunsxfsi.c head/contrib/compiler-rt/lib/fixunsxfti.c head/contrib/compiler-rt/lib/fixxfdi.c head/contrib/compiler-rt/lib/fixxfti.c head/contrib/compiler-rt/lib/floatdidf.c head/contrib/compiler-rt/lib/floatdisf.c head/contrib/compiler-rt/lib/floatdixf.c head/contrib/compiler-rt/lib/floatsidf.c head/contrib/compiler-rt/lib/floatsisf.c head/contrib/compiler-rt/lib/floattidf.c head/contrib/compiler-rt/lib/floattisf.c head/contrib/compiler-rt/lib/floattixf.c head/contrib/compiler-rt/lib/floatundidf.c head/contrib/compiler-rt/lib/floatundisf.c head/contrib/compiler-rt/lib/floatundixf.c head/contrib/compiler-rt/lib/floatunsidf.c head/contrib/compiler-rt/lib/floatunsisf.c head/contrib/compiler-rt/lib/floatuntidf.c head/contrib/compiler-rt/lib/floatuntisf.c head/contrib/compiler-rt/lib/floatuntixf.c head/contrib/compiler-rt/lib/fp_lib.h head/contrib/compiler-rt/lib/gcc_personality_v0.c head/contrib/compiler-rt/lib/i386/ head/contrib/compiler-rt/lib/int_endianness.h head/contrib/compiler-rt/lib/int_lib.h head/contrib/compiler-rt/lib/int_math.h head/contrib/compiler-rt/lib/int_types.h head/contrib/compiler-rt/lib/int_util.c head/contrib/compiler-rt/lib/int_util.h head/contrib/compiler-rt/lib/interception/CMakeLists.txt head/contrib/compiler-rt/lib/interception/Makefile.mk head/contrib/compiler-rt/lib/lsan/CMakeLists.txt head/contrib/compiler-rt/lib/lsan/Makefile.mk head/contrib/compiler-rt/lib/lshrdi3.c head/contrib/compiler-rt/lib/lshrti3.c head/contrib/compiler-rt/lib/moddi3.c head/contrib/compiler-rt/lib/modsi3.c head/contrib/compiler-rt/lib/modti3.c head/contrib/compiler-rt/lib/msan/CMakeLists.txt head/contrib/compiler-rt/lib/msan/Makefile.mk head/contrib/compiler-rt/lib/msan/tests/CMakeLists.txt head/contrib/compiler-rt/lib/muldc3.c head/contrib/compiler-rt/lib/muldf3.c head/contrib/compiler-rt/lib/muldi3.c head/contrib/compiler-rt/lib/mulodi4.c head/contrib/compiler-rt/lib/mulosi4.c head/contrib/compiler-rt/lib/muloti4.c head/contrib/compiler-rt/lib/mulsc3.c head/contrib/compiler-rt/lib/mulsf3.c head/contrib/compiler-rt/lib/multi3.c head/contrib/compiler-rt/lib/mulvdi3.c head/contrib/compiler-rt/lib/mulvsi3.c head/contrib/compiler-rt/lib/mulvti3.c head/contrib/compiler-rt/lib/mulxc3.c head/contrib/compiler-rt/lib/negdf2.c head/contrib/compiler-rt/lib/negdi2.c head/contrib/compiler-rt/lib/negsf2.c head/contrib/compiler-rt/lib/negti2.c head/contrib/compiler-rt/lib/negvdi2.c head/contrib/compiler-rt/lib/negvsi2.c head/contrib/compiler-rt/lib/negvti2.c head/contrib/compiler-rt/lib/paritydi2.c head/contrib/compiler-rt/lib/paritysi2.c head/contrib/compiler-rt/lib/parityti2.c head/contrib/compiler-rt/lib/popcountdi2.c head/contrib/compiler-rt/lib/popcountsi2.c head/contrib/compiler-rt/lib/popcountti2.c head/contrib/compiler-rt/lib/powidf2.c head/contrib/compiler-rt/lib/powisf2.c head/contrib/compiler-rt/lib/powitf2.c head/contrib/compiler-rt/lib/powixf2.c head/contrib/compiler-rt/lib/ppc/ head/contrib/compiler-rt/lib/profile/CMakeLists.txt head/contrib/compiler-rt/lib/profile/Makefile.mk head/contrib/compiler-rt/lib/sanitizer_common/CMakeLists.txt head/contrib/compiler-rt/lib/sanitizer_common/Makefile.mk head/contrib/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt head/contrib/compiler-rt/lib/sparc64/ head/contrib/compiler-rt/lib/subdf3.c head/contrib/compiler-rt/lib/subsf3.c head/contrib/compiler-rt/lib/subvdi3.c head/contrib/compiler-rt/lib/subvsi3.c head/contrib/compiler-rt/lib/subvti3.c head/contrib/compiler-rt/lib/trampoline_setup.c head/contrib/compiler-rt/lib/truncdfsf2.c head/contrib/compiler-rt/lib/tsan/CMakeLists.txt head/contrib/compiler-rt/lib/tsan/Makefile.mk head/contrib/compiler-rt/lib/tsan/dd/CMakeLists.txt head/contrib/compiler-rt/lib/tsan/rtl/Makefile.mk head/contrib/compiler-rt/lib/tsan/tests/CMakeLists.txt head/contrib/compiler-rt/lib/tsan/tests/rtl/CMakeLists.txt head/contrib/compiler-rt/lib/tsan/tests/unit/CMakeLists.txt head/contrib/compiler-rt/lib/ubsan/CMakeLists.txt head/contrib/compiler-rt/lib/ubsan/Makefile.mk head/contrib/compiler-rt/lib/ucmpdi2.c head/contrib/compiler-rt/lib/ucmpti2.c head/contrib/compiler-rt/lib/udivdi3.c head/contrib/compiler-rt/lib/udivmoddi4.c head/contrib/compiler-rt/lib/udivmodsi4.c head/contrib/compiler-rt/lib/udivmodti4.c head/contrib/compiler-rt/lib/udivsi3.c head/contrib/compiler-rt/lib/udivti3.c head/contrib/compiler-rt/lib/umoddi3.c head/contrib/compiler-rt/lib/umodsi3.c head/contrib/compiler-rt/lib/umodti3.c head/contrib/compiler-rt/lib/x86_64/ Modified: head/contrib/compiler-rt/CREDITS.TXT head/contrib/compiler-rt/LICENSE.TXT head/contrib/compiler-rt/README.txt head/contrib/compiler-rt/lib/builtins/int_lib.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc head/lib/libcompiler_rt/Makefile Directory Properties: head/contrib/compiler-rt/ (props changed) Modified: head/contrib/compiler-rt/CREDITS.TXT ============================================================================== --- head/contrib/compiler-rt/CREDITS.TXT Thu Jan 8 19:11:14 2015 (r276850) +++ head/contrib/compiler-rt/CREDITS.TXT Thu Jan 8 19:47:10 2015 (r276851) @@ -22,3 +22,15 @@ D: Maintain Solaris & AuroraUX ports of N: Howard Hinnant E: hhinnant@apple.com D: Architect and primary author of compiler-rt + +N: Guan-Hong Liu +E: koviankevin@hotmail.com +D: IEEE Quad-precision functions + +N: Joerg Sonnenberger +E: joerg@NetBSD.org +D: Maintains NetBSD port. + +N: Matt Thomas +E: matt@NetBSD.org +D: ARM improvements. Modified: head/contrib/compiler-rt/LICENSE.TXT ============================================================================== --- head/contrib/compiler-rt/LICENSE.TXT Thu Jan 8 19:11:14 2015 (r276850) +++ head/contrib/compiler-rt/LICENSE.TXT Thu Jan 8 19:47:10 2015 (r276851) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -89,9 +89,3 @@ other licenses gives permission to use t University of Illinois to endorse or promote products derived from this Software. -The following pieces of software have additional or alternate copyrights, -licenses, and/or restrictions: - -Program Directory -------- --------- -mach_override lib/interception/mach_override Modified: head/contrib/compiler-rt/README.txt ============================================================================== --- head/contrib/compiler-rt/README.txt Thu Jan 8 19:11:14 2015 (r276850) +++ head/contrib/compiler-rt/README.txt Thu Jan 8 19:47:10 2015 (r276851) @@ -9,335 +9,3 @@ terms of the license agreement found in ================================ -This is a replacement library for libgcc. Each function is contained -in its own file. Each function has a corresponding unit test under -test/Unit. - -A rudimentary script to test each file is in the file called -test/Unit/test. - -Here is the specification for this library: - -http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc - -Here is a synopsis of the contents of this library: - -typedef int si_int; -typedef unsigned su_int; - -typedef long long di_int; -typedef unsigned long long du_int; - -// Integral bit manipulation - -di_int __ashldi3(di_int a, si_int b); // a << b -ti_int __ashlti3(ti_int a, si_int b); // a << b - -di_int __ashrdi3(di_int a, si_int b); // a >> b arithmetic (sign fill) -ti_int __ashrti3(ti_int a, si_int b); // a >> b arithmetic (sign fill) -di_int __lshrdi3(di_int a, si_int b); // a >> b logical (zero fill) -ti_int __lshrti3(ti_int a, si_int b); // a >> b logical (zero fill) - -si_int __clzsi2(si_int a); // count leading zeros -si_int __clzdi2(di_int a); // count leading zeros -si_int __clzti2(ti_int a); // count leading zeros -si_int __ctzsi2(si_int a); // count trailing zeros -si_int __ctzdi2(di_int a); // count trailing zeros -si_int __ctzti2(ti_int a); // count trailing zeros - -si_int __ffsdi2(di_int a); // find least significant 1 bit -si_int __ffsti2(ti_int a); // find least significant 1 bit - -si_int __paritysi2(si_int a); // bit parity -si_int __paritydi2(di_int a); // bit parity -si_int __parityti2(ti_int a); // bit parity - -si_int __popcountsi2(si_int a); // bit population -si_int __popcountdi2(di_int a); // bit population -si_int __popcountti2(ti_int a); // bit population - -uint32_t __bswapsi2(uint32_t a); // a byteswapped, arm only -uint64_t __bswapdi2(uint64_t a); // a byteswapped, arm only - -// Integral arithmetic - -di_int __negdi2 (di_int a); // -a -ti_int __negti2 (ti_int a); // -a -di_int __muldi3 (di_int a, di_int b); // a * b -ti_int __multi3 (ti_int a, ti_int b); // a * b -si_int __divsi3 (si_int a, si_int b); // a / b signed -di_int __divdi3 (di_int a, di_int b); // a / b signed -ti_int __divti3 (ti_int a, ti_int b); // a / b signed -su_int __udivsi3 (su_int n, su_int d); // a / b unsigned -du_int __udivdi3 (du_int a, du_int b); // a / b unsigned -tu_int __udivti3 (tu_int a, tu_int b); // a / b unsigned -si_int __modsi3 (si_int a, si_int b); // a % b signed -di_int __moddi3 (di_int a, di_int b); // a % b signed -ti_int __modti3 (ti_int a, ti_int b); // a % b signed -su_int __umodsi3 (su_int a, su_int b); // a % b unsigned -du_int __umoddi3 (du_int a, du_int b); // a % b unsigned -tu_int __umodti3 (tu_int a, tu_int b); // a % b unsigned -du_int __udivmoddi4(du_int a, du_int b, du_int* rem); // a / b, *rem = a % b unsigned -tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); // a / b, *rem = a % b unsigned -su_int __udivmodsi4(su_int a, su_int b, su_int* rem); // a / b, *rem = a % b unsigned -si_int __divmodsi4(si_int a, si_int b, si_int* rem); // a / b, *rem = a % b signed - - - -// Integral arithmetic with trapping overflow - -si_int __absvsi2(si_int a); // abs(a) -di_int __absvdi2(di_int a); // abs(a) -ti_int __absvti2(ti_int a); // abs(a) - -si_int __negvsi2(si_int a); // -a -di_int __negvdi2(di_int a); // -a -ti_int __negvti2(ti_int a); // -a - -si_int __addvsi3(si_int a, si_int b); // a + b -di_int __addvdi3(di_int a, di_int b); // a + b -ti_int __addvti3(ti_int a, ti_int b); // a + b - -si_int __subvsi3(si_int a, si_int b); // a - b -di_int __subvdi3(di_int a, di_int b); // a - b -ti_int __subvti3(ti_int a, ti_int b); // a - b - -si_int __mulvsi3(si_int a, si_int b); // a * b -di_int __mulvdi3(di_int a, di_int b); // a * b -ti_int __mulvti3(ti_int a, ti_int b); // a * b - - -// Integral arithmetic which returns if overflow - -si_int __mulosi4(si_int a, si_int b, int* overflow); // a * b, overflow set to one if result not in signed range -di_int __mulodi4(di_int a, di_int b, int* overflow); // a * b, overflow set to one if result not in signed range -ti_int __muloti4(ti_int a, ti_int b, int* overflow); // a * b, overflow set to - one if result not in signed range - - -// Integral comparison: a < b -> 0 -// a == b -> 1 -// a > b -> 2 - -si_int __cmpdi2 (di_int a, di_int b); -si_int __cmpti2 (ti_int a, ti_int b); -si_int __ucmpdi2(du_int a, du_int b); -si_int __ucmpti2(tu_int a, tu_int b); - -// Integral / floating point conversion - -di_int __fixsfdi( float a); -di_int __fixdfdi( double a); -di_int __fixxfdi(long double a); - -ti_int __fixsfti( float a); -ti_int __fixdfti( double a); -ti_int __fixxfti(long double a); -uint64_t __fixtfdi(long double input); // ppc only, doesn't match documentation - -su_int __fixunssfsi( float a); -su_int __fixunsdfsi( double a); -su_int __fixunsxfsi(long double a); - -du_int __fixunssfdi( float a); -du_int __fixunsdfdi( double a); -du_int __fixunsxfdi(long double a); - -tu_int __fixunssfti( float a); -tu_int __fixunsdfti( double a); -tu_int __fixunsxfti(long double a); -uint64_t __fixunstfdi(long double input); // ppc only - -float __floatdisf(di_int a); -double __floatdidf(di_int a); -long double __floatdixf(di_int a); -long double __floatditf(int64_t a); // ppc only - -float __floattisf(ti_int a); -double __floattidf(ti_int a); -long double __floattixf(ti_int a); - -float __floatundisf(du_int a); -double __floatundidf(du_int a); -long double __floatundixf(du_int a); -long double __floatunditf(uint64_t a); // ppc only - -float __floatuntisf(tu_int a); -double __floatuntidf(tu_int a); -long double __floatuntixf(tu_int a); - -// Floating point raised to integer power - -float __powisf2( float a, si_int b); // a ^ b -double __powidf2( double a, si_int b); // a ^ b -long double __powixf2(long double a, si_int b); // a ^ b -long double __powitf2(long double a, si_int b); // ppc only, a ^ b - -// Complex arithmetic - -// (a + ib) * (c + id) - - float _Complex __mulsc3( float a, float b, float c, float d); - double _Complex __muldc3(double a, double b, double c, double d); -long double _Complex __mulxc3(long double a, long double b, - long double c, long double d); -long double _Complex __multc3(long double a, long double b, - long double c, long double d); // ppc only - -// (a + ib) / (c + id) - - float _Complex __divsc3( float a, float b, float c, float d); - double _Complex __divdc3(double a, double b, double c, double d); -long double _Complex __divxc3(long double a, long double b, - long double c, long double d); -long double _Complex __divtc3(long double a, long double b, - long double c, long double d); // ppc only - - -// Runtime support - -// __clear_cache() is used to tell process that new instructions have been -// written to an address range. Necessary on processors that do not have -// a unified instuction and data cache. -void __clear_cache(void* start, void* end); - -// __enable_execute_stack() is used with nested functions when a trampoline -// function is written onto the stack and that page range needs to be made -// executable. -void __enable_execute_stack(void* addr); - -// __gcc_personality_v0() is normally only called by the system unwinder. -// C code (as opposed to C++) normally does not need a personality function -// because there are no catch clauses or destructors to be run. But there -// is a C language extension __attribute__((cleanup(func))) which marks local -// variables as needing the cleanup function "func" to be run when the -// variable goes out of scope. That includes when an exception is thrown, -// so a personality handler is needed. -_Unwind_Reason_Code __gcc_personality_v0(int version, _Unwind_Action actions, - uint64_t exceptionClass, struct _Unwind_Exception* exceptionObject, - _Unwind_Context_t context); - -// for use with some implementations of assert() in -void __eprintf(const char* format, const char* assertion_expression, - const char* line, const char* file); - - - -// Power PC specific functions - -// There is no C interface to the saveFP/restFP functions. They are helper -// functions called by the prolog and epilog of functions that need to save -// a number of non-volatile float point registers. -saveFP -restFP - -// PowerPC has a standard template for trampoline functions. This function -// generates a custom trampoline function with the specific realFunc -// and localsPtr values. -void __trampoline_setup(uint32_t* trampOnStack, int trampSizeAllocated, - const void* realFunc, void* localsPtr); - -// adds two 128-bit double-double precision values ( x + y ) -long double __gcc_qadd(long double x, long double y); - -// subtracts two 128-bit double-double precision values ( x - y ) -long double __gcc_qsub(long double x, long double y); - -// multiples two 128-bit double-double precision values ( x * y ) -long double __gcc_qmul(long double x, long double y); - -// divides two 128-bit double-double precision values ( x / y ) -long double __gcc_qdiv(long double a, long double b); - - -// ARM specific functions - -// There is no C interface to the switch* functions. These helper functions -// are only needed by Thumb1 code for efficient switch table generation. -switch16 -switch32 -switch8 -switchu8 - -// There is no C interface to the *_vfp_d8_d15_regs functions. There are -// called in the prolog and epilog of Thumb1 functions. When the C++ ABI use -// SJLJ for exceptions, each function with a catch clause or destuctors needs -// to save and restore all registers in it prolog and epliog. But there is -// no way to access vector and high float registers from thumb1 code, so the -// compiler must add call outs to these helper functions in the prolog and -// epilog. -restore_vfp_d8_d15_regs -save_vfp_d8_d15_regs - - -// Note: long ago ARM processors did not have floating point hardware support. -// Floating point was done in software and floating point parameters were -// passed in integer registers. When hardware support was added for floating -// point, new *vfp functions were added to do the same operations but with -// floating point parameters in floating point registers. - -// Undocumented functions - -float __addsf3vfp(float a, float b); // Appears to return a + b -double __adddf3vfp(double a, double b); // Appears to return a + b -float __divsf3vfp(float a, float b); // Appears to return a / b -double __divdf3vfp(double a, double b); // Appears to return a / b -int __eqsf2vfp(float a, float b); // Appears to return one - // iff a == b and neither is NaN. -int __eqdf2vfp(double a, double b); // Appears to return one - // iff a == b and neither is NaN. -double __extendsfdf2vfp(float a); // Appears to convert from - // float to double. -int __fixdfsivfp(double a); // Appears to convert from - // double to int. -int __fixsfsivfp(float a); // Appears to convert from - // float to int. -unsigned int __fixunssfsivfp(float a); // Appears to convert from - // float to unsigned int. -unsigned int __fixunsdfsivfp(double a); // Appears to convert from - // double to unsigned int. -double __floatsidfvfp(int a); // Appears to convert from - // int to double. -float __floatsisfvfp(int a); // Appears to convert from - // int to float. -double __floatunssidfvfp(unsigned int a); // Appears to convert from - // unisgned int to double. -float __floatunssisfvfp(unsigned int a); // Appears to convert from - // unisgned int to float. -int __gedf2vfp(double a, double b); // Appears to return __gedf2 - // (a >= b) -int __gesf2vfp(float a, float b); // Appears to return __gesf2 - // (a >= b) -int __gtdf2vfp(double a, double b); // Appears to return __gtdf2 - // (a > b) -int __gtsf2vfp(float a, float b); // Appears to return __gtsf2 - // (a > b) -int __ledf2vfp(double a, double b); // Appears to return __ledf2 - // (a <= b) -int __lesf2vfp(float a, float b); // Appears to return __lesf2 - // (a <= b) -int __ltdf2vfp(double a, double b); // Appears to return __ltdf2 - // (a < b) -int __ltsf2vfp(float a, float b); // Appears to return __ltsf2 - // (a < b) -double __muldf3vfp(double a, double b); // Appears to return a * b -float __mulsf3vfp(float a, float b); // Appears to return a * b -int __nedf2vfp(double a, double b); // Appears to return __nedf2 - // (a != b) -double __negdf2vfp(double a); // Appears to return -a -float __negsf2vfp(float a); // Appears to return -a -float __negsf2vfp(float a); // Appears to return -a -double __subdf3vfp(double a, double b); // Appears to return a - b -float __subsf3vfp(float a, float b); // Appears to return a - b -float __truncdfsf2vfp(double a); // Appears to convert from - // double to float. -int __unorddf2vfp(double a, double b); // Appears to return __unorddf2 -int __unordsf2vfp(float a, float b); // Appears to return __unordsf2 - - -Preconditions are listed for each function at the definition when there are any. -Any preconditions reflect the specification at -http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html#Libgcc. - -Assumptions are listed in "int_lib.h", and in individual files. Where possible -assumptions are checked at compile time. Modified: head/contrib/compiler-rt/lib/builtins/int_lib.h ============================================================================== --- vendor/compiler-rt/dist/lib/builtins/int_lib.h Wed Jan 7 21:44:57 2015 (r276795) +++ head/contrib/compiler-rt/lib/builtins/int_lib.h Thu Jan 8 19:47:10 2015 (r276851) @@ -25,7 +25,15 @@ #if __ARM_EABI__ # define ARM_EABI_FNALIAS(aeabi_name, name) \ void __aeabi_##aeabi_name() __attribute__((alias("__" #name))); -# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) + +# if !defined(__clang__) && defined(__GNUC__) && \ + (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 5) +/* The pcs attribute was introduced in GCC 4.5.0 */ +# define COMPILER_RT_ABI +# else +# define COMPILER_RT_ABI __attribute__((pcs("aapcs"))) +# endif + #else # define ARM_EABI_FNALIAS(aeabi_name, name) # define COMPILER_RT_ABI @@ -53,6 +61,26 @@ /* Include internal utility function declarations. */ #include "int_util.h" +/* + * Workaround for LLVM bug 11663. Prevent endless recursion in + * __c?zdi2(), where calls to __builtin_c?z() are expanded to + * __c?zdi2() instead of __c?zsi2(). + * + * Instead of placing this workaround in c?zdi2.c, put it in this + * global header to prevent other C files from making the detour + * through __c?zdi2() as well. + * + * This problem has only been observed on FreeBSD for sparc64 and + * mips64 with GCC 4.2.1. + */ +#if defined(__FreeBSD__) && (defined(__sparc64__) || \ + defined(__mips_n64) || defined(__mips_o64)) +si_int __clzsi2(si_int); +si_int __ctzsi2(si_int); +#define __builtin_clz __clzsi2 +#define __builtin_ctz __ctzsi2 +#endif /* FreeBSD && (sparc64 || mips_n64 || mips_o64) */ + COMPILER_RT_ABI si_int __paritysi2(si_int a); COMPILER_RT_ABI si_int __paritydi2(di_int a); Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_internal_defs.h Wed Jan 7 22:08:09 2015 (r276797) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h Thu Jan 8 19:47:10 2015 (r276851) @@ -48,6 +48,11 @@ # define __has_feature(x) 0 #endif +// Enable sanitizer compilation for pre-C++11 +#if __cplusplus < 201103L +#define nullptr 0 +#endif + // For portability reasons we do not include stddef.h, stdint.h or any other // system header, but we do need some basic types that are not defined // in a portable way by the language itself. Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc ============================================================================== --- vendor/compiler-rt/dist/lib/sanitizer_common/sanitizer_posix.cc Wed Jan 7 22:08:09 2015 (r276797) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc Thu Jan 8 19:47:10 2015 (r276851) @@ -30,6 +30,13 @@ #include #endif +#if SANITIZER_FREEBSD +// The MAP_NORESERVE define has been removed in FreeBSD 11.x, and even before +// that, it was never implemented. So just define it to zero. +#undef MAP_NORESERVE +#define MAP_NORESERVE 0 +#endif + namespace __sanitizer { // ------------- sanitizer_common.h Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Thu Jan 8 19:11:14 2015 (r276850) +++ head/lib/libcompiler_rt/Makefile Thu Jan 8 19:47:10 2015 (r276851) @@ -14,16 +14,18 @@ CRTARCH=x86_64 CRTARCH=${MACHINE_CPUARCH} .endif -CRTSRC=${.CURDIR}/../../contrib/compiler-rt/lib +CRTSRC=${.CURDIR}/../../contrib/compiler-rt/lib/builtins .PATH: ${CRTSRC}/${CRTARCH} ${CRTSRC} SRCF= absvdi2 \ absvsi2 \ absvti2 \ + addtf3 \ addvdi3 \ addvsi3 \ addvti3 \ + apple_versioning \ ashldi3 \ ashlti3 \ ashrdi3 \ @@ -44,6 +46,7 @@ SRCF= absvdi2 \ divmoddi4 \ divmodsi4 \ divsc3 \ + divtf3 \ divti3 \ divxc3 \ enable_execute_stack \ @@ -79,6 +82,7 @@ SRCF= absvdi2 \ floatuntidf \ floatuntisf \ floatuntixf \ + gcc_personality_v0 \ int_util \ lshrdi3 \ lshrti3 \ @@ -90,6 +94,7 @@ SRCF= absvdi2 \ mulosi4 \ muloti4 \ mulsc3 \ + multf3 \ multi3 \ mulvdi3 \ mulvsi3 \ @@ -112,6 +117,7 @@ SRCF= absvdi2 \ powisf2 \ powitf2 \ powixf2 \ + subtf3 \ subvdi3 \ subvsi3 \ subvti3 \ @@ -174,14 +180,62 @@ SRCS+= ${file}.c .endfor .if ${MACHINE_CPUARCH} == "arm" -SRCS+= aeabi_idivmod.S \ +SRCS+= aeabi_dcmp.S \ + aeabi_div0.S \ + aeabi_fcmp.S \ + aeabi_idivmod.S \ aeabi_ldivmod.S \ aeabi_memcmp.S \ aeabi_memcpy.S \ aeabi_memmove.S \ aeabi_memset.S \ aeabi_uidivmod.S \ - aeabi_uldivmod.S + aeabi_uldivmod.S \ + bswapdi2.S \ + bswapsi2.S \ + eqdf2.S \ + eqsf2.S \ + floatunssidf.S \ + floatunssisf.S \ + gedf2.S \ + gesf2.S \ + gtdf2.S \ + gtsf2.S \ + ledf2.S \ + lesf2.S \ + ltdf2.S \ + ltsf2.S \ + nedf2.S \ + nesf2.S \ + restore_vfp_d8_d15_regs.S \ + save_vfp_d8_d15_regs.S \ + switch16.S \ + switch32.S \ + switch8.S \ + switchu8.S \ + sync_fetch_and_add_4.S \ + sync_fetch_and_add_8.S \ + sync_fetch_and_and_4.S \ + sync_fetch_and_and_8.S \ + sync_fetch_and_max_4.S \ + sync_fetch_and_max_8.S \ + sync_fetch_and_min_4.S \ + sync_fetch_and_min_8.S \ + sync_fetch_and_nand_4.S \ + sync_fetch_and_nand_8.S \ + sync_fetch_and_or_4.S \ + sync_fetch_and_or_8.S \ + sync_fetch_and_sub_4.S \ + sync_fetch_and_sub_8.S \ + sync_fetch_and_umax_4.S \ + sync_fetch_and_umax_8.S \ + sync_fetch_and_umin_4.S \ + sync_fetch_and_umin_8.S \ + sync_fetch_and_xor_4.S \ + sync_fetch_and_xor_8.S \ + sync_synchronize.S \ + unorddf2.S \ + unordsf2.S .endif .if ${MK_INSTALLLIB} != "no" From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 19:49: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 DB198360; Thu, 8 Jan 2015 19:49:40 +0000 (UTC) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1B8FED8; Thu, 8 Jan 2015 19:49:40 +0000 (UTC) Received: by mail-ig0-f178.google.com with SMTP id b16so4642899igk.5; Thu, 08 Jan 2015 11:49:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mKf4Tb3l3jlOIe3Hb8RFq8WTeci929jqL9mBO8MRBHw=; b=Gh7+7i62Np8cO5L30NV/mIZkYAMKERHa8Clmr8T+UD0KPxftFoV5hmbZeOdxMEebyG aFse6I8oJ5MTf6CUUpOfLvhEWbUOrCF/VzG/m09o5soxapxOfxr808FKTgVP0q04zqK7 sJO5GSzCRj95oYrD5jcPohqqaAFO2BFEMuxbyAyNbRwi367awjCeiBzHliT0W1UX/JsQ lzaheSIZSIIRXCT5VvjvIBpeTQQ1ZJ/5CwNSLJHqkfojTWVm9sh3XTuqSpxyinR0nitH G9YaNlbOtTRUTlEax8vpdTHsFBx9NoGqzReFWiY38OXNfWFzdECVS0I7DBGTq3Ly7l8X bAKg== MIME-Version: 1.0 X-Received: by 10.43.79.129 with SMTP id zq1mr9740918icb.28.1420746579970; Thu, 08 Jan 2015 11:49:39 -0800 (PST) Received: by 10.50.4.170 with HTTP; Thu, 8 Jan 2015 11:49:39 -0800 (PST) In-Reply-To: <201501081828.t08IS6Kf021746@svn.freebsd.org> References: <201501081828.t08IS6Kf021746@svn.freebsd.org> Date: Thu, 8 Jan 2015 11:49:39 -0800 Message-ID: Subject: Re: svn commit: r276846 - in head: share/mk sys/arm/conf sys/conf sys/modules/dtb sys/modules/dtb/atmel From: NGie Cooper To: Warner Losh Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 19:49:41 -0000 On Thu, Jan 8, 2015 at 10:28 AM, Warner Losh wrote: > Author: imp > Date: Thu Jan 8 18:28:06 2015 > New Revision: 276846 > URL: https://svnweb.freebsd.org/changeset/base/276846 > > Log: > Add infrastructure to build dtb files from dts files. ... > Added: head/share/mk/bsd.dtb.mk > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/mk/bsd.dtb.mk Thu Jan 8 18:28:06 2015 (r276846) > @@ -0,0 +1,17 @@ > +# $FreeBSD$ > + > +# Search for kernel source tree in standard places. > +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ > + ${.CURDIR}/../../../../.. /sys /usr/src/sys > +.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) > +SYSDIR= ${_dir} > +.endif > +.endfor > +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ > + !exists(${SYSDIR}/conf/kmod.mk) > +.error Unable to locate the kernel source tree. Set SYSDIR to override. > +.endif > + > +.include "${SYSDIR}/conf/dtb.mk" > + > +.include ... > +# Search for kernel source tree in standard places. > +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys > +.if !defined(SYSDIR) && exists(${_dir}/kern/) > +SYSDIR= ${_dir} > +.endif > +.endfor > +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) > +.error "can't find kernel source tree" > +.endif Why is ${SYSDIR} being checked for in bsd.dtb.mk and dtb.mk? From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 20:08: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 13553679; Thu, 8 Jan 2015 20:08: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 F3858116; Thu, 8 Jan 2015 20:08:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t08K80d4071860; Thu, 8 Jan 2015 20:08:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08K80Pm071859; Thu, 8 Jan 2015 20:08:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501082008.t08K80Pm071859@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 8 Jan 2015 20:08:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276852 - head/lib/libblocksruntime X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 20:08:01 -0000 Author: dim Date: Thu Jan 8 20:08:00 2015 New Revision: 276852 URL: https://svnweb.freebsd.org/changeset/base/276852 Log: Follow up to r276851 by also committing a necessary update to lib/libblocksruntime. Pointy hat to: dim Modified: head/lib/libblocksruntime/Makefile Modified: head/lib/libblocksruntime/Makefile ============================================================================== --- head/lib/libblocksruntime/Makefile Thu Jan 8 19:47:10 2015 (r276851) +++ head/lib/libblocksruntime/Makefile Thu Jan 8 20:08:00 2015 (r276852) @@ -5,7 +5,7 @@ SHLIB_MAJOR=0 CFLAGS+=-I${.CURDIR} WARNS?= 2 -.PATH: ${.CURDIR}/../../contrib/compiler-rt/BlocksRuntime +.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/BlocksRuntime INCS= Block.h Block_private.h SRCS= data.c runtime.c From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 20:11: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 8E2B1889; Thu, 8 Jan 2015 20:11: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 6EFBD1D2; Thu, 8 Jan 2015 20:11: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 t08KBeGB074830; Thu, 8 Jan 2015 20:11:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08KBdAx074825; Thu, 8 Jan 2015 20:11:39 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501082011.t08KBdAx074825@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 8 Jan 2015 20:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276853 - in head: lib/libc/arm/aeabi lib/libstand sys/boot/libstand32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 20:11:40 -0000 Author: dim Date: Thu Jan 8 20:11:38 2015 New Revision: 276853 URL: https://svnweb.freebsd.org/changeset/base/276853 Log: Apparently more Makefiles use stuff from compiler-rt, so fix them up too. (This did not show during a make universe, strangely.) Modified: head/lib/libc/arm/aeabi/Makefile.inc head/lib/libstand/Makefile head/sys/boot/libstand32/Makefile Modified: head/lib/libc/arm/aeabi/Makefile.inc ============================================================================== --- head/lib/libc/arm/aeabi/Makefile.inc Thu Jan 8 20:08:00 2015 (r276852) +++ head/lib/libc/arm/aeabi/Makefile.inc Thu Jan 8 20:11:38 2015 (r276853) @@ -20,7 +20,7 @@ SRCS+= aeabi_vfp_double.S \ # libc. This causes issues when other parts of libc call these functions. # We work around this by including these functions in libc but mark them as # hidden so users of libc will not pick up these versions. -.PATH: ${LIBC_SRCTOP}/../../contrib/compiler-rt/lib/arm +.PATH: ${LIBC_SRCTOP}/../../contrib/compiler-rt/lib/builtins/arm SRCS+= aeabi_memcmp.S \ aeabi_memcpy.S \ Modified: head/lib/libstand/Makefile ============================================================================== --- head/lib/libstand/Makefile Thu Jan 8 20:08:00 2015 (r276852) +++ head/lib/libstand/Makefile Thu Jan 8 20:11:38 2015 (r276853) @@ -65,14 +65,14 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memc .PATH: ${.CURDIR}/../libc/arm/gen # Compiler support functions -.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/ +.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/builtins/ # __clzsi2 and ctzsi2 for various builtin functions SRCS+= clzsi2.c ctzsi2.c # Divide and modulus functions called by the compiler SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c -.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm/ +.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/builtins/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S Modified: head/sys/boot/libstand32/Makefile ============================================================================== --- head/sys/boot/libstand32/Makefile Thu Jan 8 20:08:00 2015 (r276852) +++ head/sys/boot/libstand32/Makefile Thu Jan 8 20:11:38 2015 (r276853) @@ -68,14 +68,14 @@ SRCS+= bcmp.c bcopy.c bzero.c ffs.c memc .PATH: ${LIBC}/arm/gen # Compiler support functions -.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/ +.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/builtins/ # __clzsi2 and ctzsi2 for various builtin functions SRCS+= clzsi2.c ctzsi2.c # Divide and modulus functions called by the compiler SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c -.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/arm/ +.PATH: ${.CURDIR}/../../../contrib/compiler-rt/lib/builtins/arm/ SRCS+= aeabi_idivmod.S aeabi_ldivmod.S aeabi_uidivmod.S aeabi_uldivmod.S SRCS+= aeabi_memcmp.S aeabi_memcpy.S aeabi_memmove.S aeabi_memset.S From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 21:46: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 DADA7D6D; Thu, 8 Jan 2015 21:46: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 C7B9EDA1; Thu, 8 Jan 2015 21:46: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 t08LkTrU019279; Thu, 8 Jan 2015 21:46:29 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08LkTu1019278; Thu, 8 Jan 2015 21:46:29 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501082146.t08LkTu1019278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 8 Jan 2015 21:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276855 - 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.18-1 Precedence: list List-Id: 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, 08 Jan 2015 21:46:30 -0000 Author: jhb Date: Thu Jan 8 21:46:28 2015 New Revision: 276855 URL: https://svnweb.freebsd.org/changeset/base/276855 Log: Change the default method for device_quiesce() to return 0 instead of EOPNOTSUPP. The current behavior can mask real quiesce errors since devclass_quiesce_driver() stops iterating over drivers as soon as it gets an error (incluiding EOPNOTSUPP), but the caller it returns the error to explicitly ignores EOPNOTSUPP. Reviewed by: imp Modified: head/sys/kern/device_if.m Modified: head/sys/kern/device_if.m ============================================================================== --- head/sys/kern/device_if.m Thu Jan 8 21:17:35 2015 (r276854) +++ head/sys/kern/device_if.m Thu Jan 8 21:46:28 2015 (r276855) @@ -60,7 +60,7 @@ CODE { static int null_quiesce(device_t dev) { - return EOPNOTSUPP; + return 0; } }; From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 22:40: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 CE761A9D; Thu, 8 Jan 2015 22:40: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 AF7363A4; Thu, 8 Jan 2015 22:40: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 t08MexM0046901; Thu, 8 Jan 2015 22:40:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08MevTv046892; Thu, 8 Jan 2015 22:40:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501082240.t08MevTv046892@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 8 Jan 2015 22:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276857 - in head/lib/libclang_rt: . asan asan_cxx profile san ubsan ubsan_cxx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 22:40:59 -0000 Author: dim Date: Thu Jan 8 22:40:56 2015 New Revision: 276857 URL: https://svnweb.freebsd.org/changeset/base/276857 Log: Now compiler-rt has been updated in r276851, bring in the various sanitizer libraries that already work on FreeBSD: * asan: Address Sanitizer * ubsan: Undefined Behavior Sanitizer * profile: Profile Guided Optimization support Please note that these libraries are *experimental* at this stage, so the main Makefile is not yet connected to the build. Since I didn't want to needlessly edit BSD.usr.dist, you will also have to create the install directory /usr/lib/clang/3.5.0/lib/freebsd manually for now. Added: head/lib/libclang_rt/ head/lib/libclang_rt/Makefile (contents, props changed) head/lib/libclang_rt/Makefile.inc (contents, props changed) head/lib/libclang_rt/asan/ head/lib/libclang_rt/asan/Makefile (contents, props changed) head/lib/libclang_rt/asan_cxx/ head/lib/libclang_rt/asan_cxx/Makefile (contents, props changed) head/lib/libclang_rt/profile/ head/lib/libclang_rt/profile/Makefile (contents, props changed) head/lib/libclang_rt/san/ head/lib/libclang_rt/san/Makefile (contents, props changed) head/lib/libclang_rt/ubsan/ head/lib/libclang_rt/ubsan/Makefile (contents, props changed) head/lib/libclang_rt/ubsan_cxx/ head/lib/libclang_rt/ubsan_cxx/Makefile (contents, props changed) Added: head/lib/libclang_rt/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libclang_rt/Makefile Thu Jan 8 22:40:56 2015 (r276857) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +SUBDIR= asan\ + asan_cxx\ + profile\ + san\ + ubsan\ + ubsan_cxx + +.include Added: head/lib/libclang_rt/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libclang_rt/Makefile.inc Thu Jan 8 22:40:56 2015 (r276857) @@ -0,0 +1,25 @@ +# $FreeBSD$ + +.include + +CRTARCH=${MACHINE_CPUARCH:C/amd64/x86_64/} +CRTSRC=${.CURDIR}/../../../contrib/compiler-rt + +LIBDIR=/usr/lib/clang/3.5.0/lib/freebsd + +NO_PIC= +MK_PROFILE=no + +WARNS?=0 + +SSP_CFLAGS= +CFLAGS+=-DNDEBUG +CFLAGS+=${PICFLAG} +CFLAGS+=-fno-builtin +CFLAGS+=-fno-exceptions +CFLAGS+=-fno-rtti +CFLAGS+=-fno-stack-protector +CFLAGS+=-funwind-tables +CFLAGS+=-fvisibility-inlines-hidden +CFLAGS+=-fvisibility=hidden +CFLAGS+=-I${CRTSRC}/lib Added: head/lib/libclang_rt/asan/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libclang_rt/asan/Makefile Thu Jan 8 22:40:56 2015 (r276857) @@ -0,0 +1,78 @@ +# $FreeBSD$ + +.include + +LIB= clang_rt.asan-${CRTARCH} + +.PATH: ${CRTSRC}/lib/asan\ + ${CRTSRC}/lib/interception\ + ${CRTSRC}/lib/sanitizer_common\ + ${CRTSRC}/lib/lsan + +SRCS= asan_preinit.cc\ + asan_allocator2.cc\ + asan_activation.cc\ + asan_debugging.cc\ + asan_fake_stack.cc\ + asan_globals.cc\ + asan_interceptors.cc\ + asan_linux.cc\ + asan_mac.cc\ + asan_malloc_linux.cc\ + asan_malloc_mac.cc\ + asan_malloc_win.cc\ + asan_poisoning.cc\ + asan_posix.cc\ + asan_report.cc\ + asan_rtl.cc\ + asan_stack.cc\ + asan_stats.cc\ + asan_suppressions.cc\ + asan_thread.cc\ + asan_win.cc\ + interception_linux.cc\ + interception_mac.cc\ + interception_win.cc\ + interception_type_test.cc\ + sanitizer_allocator.cc\ + sanitizer_common.cc\ + sanitizer_deadlock_detector1.cc\ + sanitizer_deadlock_detector2.cc\ + sanitizer_flags.cc\ + sanitizer_libc.cc\ + sanitizer_libignore.cc\ + sanitizer_linux.cc\ + sanitizer_mac.cc\ + sanitizer_persistent_allocator.cc\ + sanitizer_platform_limits_linux.cc\ + sanitizer_platform_limits_posix.cc\ + sanitizer_posix.cc\ + sanitizer_printf.cc\ + sanitizer_procmaps_common.cc\ + sanitizer_procmaps_freebsd.cc\ + sanitizer_procmaps_linux.cc\ + sanitizer_procmaps_mac.cc\ + sanitizer_stackdepot.cc\ + sanitizer_stacktrace.cc\ + sanitizer_stacktrace_printer.cc\ + sanitizer_suppressions.cc\ + sanitizer_symbolizer.cc\ + sanitizer_symbolizer_libbacktrace.cc\ + sanitizer_symbolizer_win.cc\ + sanitizer_tls_get_addr.cc\ + sanitizer_thread_registry.cc\ + sanitizer_win.cc\ + sanitizer_common_libcdep.cc\ + sanitizer_coverage_libcdep.cc\ + sanitizer_coverage_mapping_libcdep.cc\ + sanitizer_linux_libcdep.cc\ + sanitizer_posix_libcdep.cc\ + sanitizer_stacktrace_libcdep.cc\ + sanitizer_stoptheworld_linux_libcdep.cc\ + sanitizer_symbolizer_libcdep.cc\ + sanitizer_symbolizer_posix_libcdep.cc\ + sanitizer_unwind_posix_libcdep.cc\ + lsan_common.cc\ + lsan_common_linux.cc + +.include Added: head/lib/libclang_rt/asan_cxx/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libclang_rt/asan_cxx/Makefile Thu Jan 8 22:40:56 2015 (r276857) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.include + +LIB= clang_rt.asan_cxx-${CRTARCH} + +.PATH: ${CRTSRC}/lib/asan + +SRCS= asan_new_delete.cc + +.include Added: head/lib/libclang_rt/profile/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libclang_rt/profile/Makefile Thu Jan 8 22:40:56 2015 (r276857) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +.include + +LIB= clang_rt.profile-${CRTARCH} + +.PATH: ${CRTSRC}/lib/profile + +SRCS= GCDAProfiling.c\ + InstrProfiling.c\ + InstrProfilingBuffer.c\ + InstrProfilingFile.c\ + InstrProfilingPlatformDarwin.c\ + InstrProfilingPlatformOther.c\ + InstrProfilingRuntime.cc\ + +.include Added: head/lib/libclang_rt/san/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libclang_rt/san/Makefile Thu Jan 8 22:40:56 2015 (r276857) @@ -0,0 +1,48 @@ +# $FreeBSD$ + +.include + +LIB= clang_rt.san-${CRTARCH} + +.PATH: ${CRTSRC}/lib/sanitizer_common\ + +SRCS= sanitizer_allocator.cc\ + sanitizer_common.cc\ + sanitizer_deadlock_detector1.cc\ + sanitizer_deadlock_detector2.cc\ + sanitizer_flags.cc\ + sanitizer_libc.cc\ + sanitizer_libignore.cc\ + sanitizer_linux.cc\ + sanitizer_mac.cc\ + sanitizer_persistent_allocator.cc\ + sanitizer_platform_limits_linux.cc\ + sanitizer_platform_limits_posix.cc\ + sanitizer_posix.cc\ + sanitizer_printf.cc\ + sanitizer_procmaps_common.cc\ + sanitizer_procmaps_freebsd.cc\ + sanitizer_procmaps_linux.cc\ + sanitizer_procmaps_mac.cc\ + sanitizer_stackdepot.cc\ + sanitizer_stacktrace.cc\ + sanitizer_stacktrace_printer.cc\ + sanitizer_suppressions.cc\ + sanitizer_symbolizer.cc\ + sanitizer_symbolizer_libbacktrace.cc\ + sanitizer_symbolizer_win.cc\ + sanitizer_tls_get_addr.cc\ + sanitizer_thread_registry.cc\ + sanitizer_win.cc\ + sanitizer_common_libcdep.cc\ + sanitizer_coverage_libcdep.cc\ + sanitizer_coverage_mapping_libcdep.cc\ + sanitizer_linux_libcdep.cc\ + sanitizer_posix_libcdep.cc\ + sanitizer_stacktrace_libcdep.cc\ + sanitizer_stoptheworld_linux_libcdep.cc\ + sanitizer_symbolizer_libcdep.cc\ + sanitizer_symbolizer_posix_libcdep.cc\ + sanitizer_unwind_posix_libcdep.cc + +.include Added: head/lib/libclang_rt/ubsan/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libclang_rt/ubsan/Makefile Thu Jan 8 22:40:56 2015 (r276857) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +.include + +LIB= clang_rt.ubsan-${CRTARCH} + +.PATH: ${CRTSRC}/lib/ubsan + +SRCS= ubsan_diag.cc\ + ubsan_init.cc\ + ubsan_flags.cc\ + ubsan_handlers.cc\ + ubsan_value.cc + +.include + + Added: head/lib/libclang_rt/ubsan_cxx/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libclang_rt/ubsan_cxx/Makefile Thu Jan 8 22:40:56 2015 (r276857) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.include + +LIB= clang_rt.ubsan_cxx-${CRTARCH} + +CXXFLAGS+=-frtti + +.PATH: ${CRTSRC}/lib/ubsan + +SRCS= ubsan_handlers_cxx.cc\ + ubsan_type_hash.cc + +.include From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 22:42: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 BA3F1DF1 for ; Thu, 8 Jan 2015 22:42:45 +0000 (UTC) Received: from mail-qg0-f49.google.com (mail-qg0-f49.google.com [209.85.192.49]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EE483DC for ; Thu, 8 Jan 2015 22:42:45 +0000 (UTC) Received: by mail-qg0-f49.google.com with SMTP id f51so5310835qge.8 for ; Thu, 08 Jan 2015 14:42:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=PbzR+yJNPSJD9UKZKED9c2l/LdnGnVD6m50ioLnMHsM=; b=lp+6NHpMvBjKBJpR8HoYP+dNfOOdssNa7GrWPcyy2D7N8ByaLVLyNjE4WkXG8MePeX Qz/SfhQeA4OzZ6effIcJKlqry+NqGqKv2oPQjg9Pe6j/FVS5WL7LrjulQpsPa9H+gAmp dAkn5s8B2di/knShH6OBOsPlD4m+YnvqDoGMvqsTGXp+r7wQ8B53BAMu8sxJIEAasB1v KPeeLw+9MyFSmEm88oSTX91IxAv9yLg/zOnLSFEbh+DsrBv0CO1iit6dfllsDEyLy6Zd LXlfIHWV7O7+JM8+YqDB/nvWsB1zfl08vf1CXaesBYPGe+iTdfFh2Iu9h2sttRa9zKRu Bbyw== X-Gm-Message-State: ALoCoQnF4K6rW/Xq8XaeqTZGCxiQ3EqeEuaAB0xbDXD84q6L0xWqOZguLsVcPuTQ/5xNt1Yl5FmD X-Received: by 10.229.197.129 with SMTP id ek1mr10962408qcb.8.1420756632509; Thu, 08 Jan 2015 14:37:12 -0800 (PST) Received: from [10.64.26.233] ([69.53.236.236]) by mx.google.com with ESMTPSA id n1sm5275497qag.21.2015.01.08.14.37.10 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Jan 2015 14:37:11 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r276846 - in head: share/mk sys/arm/conf sys/conf sys/modules/dtb sys/modules/dtb/atmel Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1659222A-38B4-4448-BBCF-406883015229"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: Date: Thu, 8 Jan 2015 15:37:08 -0700 Message-Id: <99E1581C-5B74-4BDD-88BD-5FC61A3FD30D@bsdimp.com> References: <201501081828.t08IS6Kf021746@svn.freebsd.org> To: NGie Cooper X-Mailer: Apple Mail (2.1993) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 22:42:45 -0000 --Apple-Mail=_1659222A-38B4-4448-BBCF-406883015229 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jan 8, 2015, at 12:49 PM, NGie Cooper = wrote: >=20 > On Thu, Jan 8, 2015 at 10:28 AM, Warner Losh wrote: >> Author: imp >> Date: Thu Jan 8 18:28:06 2015 >> New Revision: 276846 >> URL: https://svnweb.freebsd.org/changeset/base/276846 >>=20 >> Log: >> Add infrastructure to build dtb files from dts files. >=20 > ... >=20 >> Added: head/share/mk/bsd.dtb.mk >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/mk/bsd.dtb.mk Thu Jan 8 18:28:06 2015 = (r276846) >> @@ -0,0 +1,17 @@ >> +# $FreeBSD$ >> + >> +# Search for kernel source tree in standard places. >> +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. = ${.CURDIR}/../../../.. \ >> + ${.CURDIR}/../../../../.. /sys /usr/src/sys >> +.if !defined(SYSDIR) && exists(${_dir}/kern/) && = exists(${_dir}/conf/kmod.mk) >> +SYSDIR=3D ${_dir} >> +.endif >> +.endfor >> +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ >> + !exists(${SYSDIR}/conf/kmod.mk) >> +.error Unable to locate the kernel source tree. Set SYSDIR to = override. >> +.endif >> + >> +.include "${SYSDIR}/conf/dtb.mk" >> + >> +.include >=20 > ... >=20 >> +# Search for kernel source tree in standard places. >> +.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys >> +.if !defined(SYSDIR) && exists(${_dir}/kern/) >> +SYSDIR=3D ${_dir} >> +.endif >> +.endfor >> +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) >> +.error "can't find kernel source tree" >> +.endif >=20 > Why is ${SYSDIR} being checked for in bsd.dtb.mk and dtb.mk? SYSDIR may not exist if dtb.mk was included directly. Warner --Apple-Mail=_1659222A-38B4-4448-BBCF-406883015229 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 iQIcBAEBCgAGBQJUrwaVAAoJEGwc0Sh9sBEABxEP/icubbqxGB6fh+0xAld2YbKG Yj53jsKxVR1Wpmc+SvLDZmdGb8gIX5HwVzrKQbvucH8+pDLIRNe2ybd4p3/eLeOr +7ODDQTrO+B2McSSUEgKp9IkQbX3J8ZZT/OnMxZoNIOchR/iZaUfE2KlP1TvsVh+ 5kQ4OfUYwVvOZg+MIMIkx7ivhkGNvOtSId7kHVJg2N0QehNuyYpOcmJ8b5aVlktC 4OHFJVa453SzcEcKujowgXxSB7zdKXvB9tDIxzneQ0J8KxMnpC4+Rs1w13CeTlYM f2/5QtBxMUzl0mAvIElFhpBxBQ0/o19Eb4JLr/V4mCtGl4VCCTEtt6ts6OnlMuFz RHy930rhFKjkNRW9RbyZLmC5FtfXK/18lzsW6gzEUvWPQ8B8igxyJs0mQgZvoqKN hmPE6RawzlDaIV3qrIbaqa/1v6xgQFEUFt3CZwWDiXALjNf127ox6nBJtpnyOpbC tv/dkMKzItVlmKFmjxwp0Bwr61enC4XPp8mplSjQ4o4tPy48DzJQq68zLZONaK9t ogI4W5qf9Wg3iXbJlZQGPHnom50m14QHQwBf1ypisoHK/vdWM0ZHPTgKupmsIwKu 5OAMAMK5oe/f/5zm/zToql3zZb5e3pEHgQBuRuFX7lHhflx9+GCtJEpXiA/8u/dT N9iHY56u6msEKR10gH1H =QRBb -----END PGP SIGNATURE----- --Apple-Mail=_1659222A-38B4-4448-BBCF-406883015229-- From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 22:42: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 D8F1BEEC; Thu, 8 Jan 2015 22:42:55 +0000 (UTC) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FBF53E0; Thu, 8 Jan 2015 22:42:55 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id rd18so12145217iec.1; Thu, 08 Jan 2015 14:42:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=NrmWCEw6h3v9OTM/odei7w48o/0InX+Ws7IAxhuJUfw=; b=LWfkdyk0VQVvJ0zJI/KeLkFnZ2fzFTxMtxHpsBUkDfPJlNIBFQ2gG9rXghCxKJrIUH dHPZpugB8zwiuhIQtzRy8zC0KoOvKg6Y+eVKF2cWmIlcvDNtLjCpH6ojKikB2TeoZdFk +bJv/HDU2fVg1mM4s0UCOeJpK4j6AqQIjInMHjlNDfj8+bQDFjZCNH7KrSvSjX8YiseA NdlUA5d4T9Xc064D9oTANkr2zvxSAegaG8nQI5CFEcI/dQSK6/POg/ZadB/+MT8ULHXC CQMzMZ7jsdbq2ZluizL8Ss/ZzhxhYwjgPpAflq/8gg4ccEVmnWXf2XE6AYoyLJTZRgFB bIBw== MIME-Version: 1.0 X-Received: by 10.107.12.10 with SMTP id w10mr11924494ioi.71.1420756974938; Thu, 08 Jan 2015 14:42:54 -0800 (PST) Received: by 10.50.4.170 with HTTP; Thu, 8 Jan 2015 14:42:54 -0800 (PST) In-Reply-To: <201501082011.t08KBdAx074825@svn.freebsd.org> References: <201501082011.t08KBdAx074825@svn.freebsd.org> Date: Thu, 8 Jan 2015 14:42:54 -0800 Message-ID: Subject: Re: svn commit: r276853 - in head: lib/libc/arm/aeabi lib/libstand sys/boot/libstand32 From: NGie Cooper To: Dimitry Andric Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 22:42:56 -0000 On Thu, Jan 8, 2015 at 12:11 PM, Dimitry Andric wrote: > Author: dim > Date: Thu Jan 8 20:11:38 2015 > New Revision: 276853 > URL: https://svnweb.freebsd.org/changeset/base/276853 > > Log: > Apparently more Makefiles use stuff from compiler-rt, so fix them up > too. (This did not show during a make universe, strangely.) Have you tried "make tinderbox" instead of "make universe"? From owner-svn-src-head@FreeBSD.ORG Thu Jan 8 23:42: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 8425C23E; Thu, 8 Jan 2015 23:42: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 6B65DCC0; Thu, 8 Jan 2015 23:42: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 t08NgnJY076241; Thu, 8 Jan 2015 23:42:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t08NggCZ076201; Thu, 8 Jan 2015 23:42:42 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501082342.t08NggCZ076201@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 8 Jan 2015 23:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276861 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn c... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 08 Jan 2015 23:42:49 -0000 Author: jkim Date: Thu Jan 8 23:42:41 2015 New Revision: 276861 URL: https://svnweb.freebsd.org/changeset/base/276861 Log: Merge OpenSSL 1.0.1k. Added: head/crypto/openssl/util/mkbuildinf.pl - copied unchanged from r276856, vendor-crypto/openssl/dist/util/mkbuildinf.pl Deleted: head/crypto/openssl/crypto/bn/asm/mips3.s Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/ca.c head/crypto/openssl/apps/dgst.c head/crypto/openssl/apps/ocsp.c head/crypto/openssl/apps/openssl.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/s_server.c head/crypto/openssl/apps/s_time.c head/crypto/openssl/apps/speed.c head/crypto/openssl/crypto/Makefile head/crypto/openssl/crypto/aes/asm/aes-mips.pl head/crypto/openssl/crypto/asn1/a_bitstr.c head/crypto/openssl/crypto/asn1/a_type.c head/crypto/openssl/crypto/asn1/a_verify.c head/crypto/openssl/crypto/asn1/asn1.h head/crypto/openssl/crypto/asn1/asn1_err.c head/crypto/openssl/crypto/asn1/tasn_dec.c head/crypto/openssl/crypto/asn1/x_algor.c head/crypto/openssl/crypto/asn1/x_name.c head/crypto/openssl/crypto/bio/bio.h head/crypto/openssl/crypto/bio/bss_dgram.c head/crypto/openssl/crypto/bn/asm/mips.pl head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c head/crypto/openssl/crypto/bn/bn.h head/crypto/openssl/crypto/bn/bn_asm.c head/crypto/openssl/crypto/bn/bn_ctx.c head/crypto/openssl/crypto/bn/bn_div.c head/crypto/openssl/crypto/bn/bntest.c head/crypto/openssl/crypto/constant_time_locl.h head/crypto/openssl/crypto/cversion.c head/crypto/openssl/crypto/dsa/dsa_asn1.c head/crypto/openssl/crypto/dso/dso_dlfcn.c head/crypto/openssl/crypto/ec/ec_lib.c head/crypto/openssl/crypto/ec/ec_mult.c head/crypto/openssl/crypto/ec/ec_pmeth.c head/crypto/openssl/crypto/ec/ecp_nistp256.c head/crypto/openssl/crypto/ec/ectest.c head/crypto/openssl/crypto/ecdsa/Makefile head/crypto/openssl/crypto/ecdsa/ecs_vrf.c head/crypto/openssl/crypto/engine/eng_dyn.c head/crypto/openssl/crypto/evp/Makefile head/crypto/openssl/crypto/evp/e_des3.c head/crypto/openssl/crypto/evp/evp_enc.c head/crypto/openssl/crypto/md32_common.h head/crypto/openssl/crypto/mem.c head/crypto/openssl/crypto/objects/obj_xref.h head/crypto/openssl/crypto/objects/objxref.pl head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/sha/asm/sha1-mips.pl head/crypto/openssl/crypto/sha/asm/sha512-mips.pl head/crypto/openssl/crypto/ts/ts_rsp_sign.c head/crypto/openssl/crypto/x509/x509.h head/crypto/openssl/crypto/x509/x509_vpm.c head/crypto/openssl/crypto/x509/x_all.c head/crypto/openssl/doc/HOWTO/certificates.txt head/crypto/openssl/doc/HOWTO/proxy_certificates.txt head/crypto/openssl/doc/apps/dgst.pod head/crypto/openssl/doc/apps/ocsp.pod head/crypto/openssl/doc/crypto/EVP_EncryptInit.pod head/crypto/openssl/doc/crypto/EVP_PKEY_encrypt.pod head/crypto/openssl/doc/crypto/X509_NAME_add_entry_by_txt.pod head/crypto/openssl/doc/crypto/X509_NAME_get_index_by_NID.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_mode.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_options.pod head/crypto/openssl/doc/ssl/SSL_CTX_set_tmp_rsa_callback.pod head/crypto/openssl/e_os.h head/crypto/openssl/engines/e_padlock.c head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_clnt.c head/crypto/openssl/ssl/d1_enc.c head/crypto/openssl/ssl/d1_lib.c head/crypto/openssl/ssl/d1_pkt.c head/crypto/openssl/ssl/d1_srvr.c head/crypto/openssl/ssl/dtls1.h head/crypto/openssl/ssl/kssl.c head/crypto/openssl/ssl/s23_srvr.c head/crypto/openssl/ssl/s2_enc.c head/crypto/openssl/ssl/s2_pkt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_both.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_enc.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_meth.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/srtp.h head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssl3.h head/crypto/openssl/ssl/ssl_cert.c head/crypto/openssl/ssl/ssl_ciph.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/ssl_sess.c head/crypto/openssl/ssl/ssltest.c head/crypto/openssl/ssl/t1_enc.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/util/libeay.num head/crypto/openssl/util/mk1mf.pl head/crypto/openssl/util/mkdef.pl head/crypto/openssl/util/pl/netware.pl head/crypto/openssl/util/ssleay.num head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/CHANGES Thu Jan 8 23:42:41 2015 (r276861) @@ -2,6 +2,136 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1j and 1.0.1k [8 Jan 2015] + + *) Fix DTLS segmentation fault in dtls1_get_record. A carefully crafted DTLS + message can cause a segmentation fault in OpenSSL due to a NULL pointer + dereference. This could lead to a Denial Of Service attack. Thanks to + Markus Stenberg of Cisco Systems, Inc. for reporting this issue. + (CVE-2014-3571) + [Steve Henson] + + *) Fix DTLS memory leak in dtls1_buffer_record. A memory leak can occur in the + dtls1_buffer_record function under certain conditions. In particular this + could occur if an attacker sent repeated DTLS records with the same + sequence number but for the next epoch. The memory leak could be exploited + by an attacker in a Denial of Service attack through memory exhaustion. + Thanks to Chris Mueller for reporting this issue. + (CVE-2015-0206) + [Matt Caswell] + + *) Fix issue where no-ssl3 configuration sets method to NULL. When openssl is + built with the no-ssl3 option and a SSL v3 ClientHello is received the ssl + method would be set to NULL which could later result in a NULL pointer + dereference. Thanks to Frank Schmirler for reporting this issue. + (CVE-2014-3569) + [Kurt Roeckx] + + *) Abort handshake if server key exchange message is omitted for ephemeral + ECDH ciphersuites. + + Thanks to Karthikeyan Bhargavan of the PROSECCO team at INRIA for + reporting this issue. + (CVE-2014-3572) + [Steve Henson] + + *) Remove non-export ephemeral RSA code on client and server. This code + violated the TLS standard by allowing the use of temporary RSA keys in + non-export ciphersuites and could be used by a server to effectively + downgrade the RSA key length used to a value smaller than the server + certificate. Thanks for Karthikeyan Bhargavan of the PROSECCO team at + INRIA or reporting this issue. + (CVE-2015-0204) + [Steve Henson] + + *) Fixed issue where DH client certificates are accepted without verification. + An OpenSSL server will accept a DH certificate for client authentication + without the certificate verify message. This effectively allows a client to + authenticate without the use of a private key. This only affects servers + which trust a client certificate authority which issues certificates + containing DH keys: these are extremely rare and hardly ever encountered. + Thanks for Karthikeyan Bhargavan of the PROSECCO team at INRIA or reporting + this issue. + (CVE-2015-0205) + [Steve Henson] + + *) Ensure that the session ID context of an SSL is updated when its + SSL_CTX is updated via SSL_set_SSL_CTX. + + The session ID context is typically set from the parent SSL_CTX, + and can vary with the CTX. + [Adam Langley] + + *) Fix various certificate fingerprint issues. + + By using non-DER or invalid encodings outside the signed portion of a + certificate the fingerprint can be changed without breaking the signature. + Although no details of the signed portion of the certificate can be changed + this can cause problems with some applications: e.g. those using the + certificate fingerprint for blacklists. + + 1. Reject signatures with non zero unused bits. + + If the BIT STRING containing the signature has non zero unused bits reject + the signature. All current signature algorithms require zero unused bits. + + 2. Check certificate algorithm consistency. + + Check the AlgorithmIdentifier inside TBS matches the one in the + certificate signature. NB: this will result in signature failure + errors for some broken certificates. + + Thanks to Konrad Kraszewski from Google for reporting this issue. + + 3. Check DSA/ECDSA signatures use DER. + + Reencode DSA/ECDSA signatures and compare with the original received + signature. Return an error if there is a mismatch. + + This will reject various cases including garbage after signature + (thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS + program for discovering this case) and use of BER or invalid ASN.1 INTEGERs + (negative or with leading zeroes). + + Further analysis was conducted and fixes were developed by Stephen Henson + of the OpenSSL core team. + + (CVE-2014-8275) + [Steve Henson] + + *) Correct Bignum squaring. Bignum squaring (BN_sqr) may produce incorrect + results on some platforms, including x86_64. This bug occurs at random + with a very low probability, and is not known to be exploitable in any + way, though its exact impact is difficult to determine. Thanks to Pieter + Wuille (Blockstream) who reported this issue and also suggested an initial + fix. Further analysis was conducted by the OpenSSL development team and + Adam Langley of Google. The final fix was developed by Andy Polyakov of + the OpenSSL core team. + (CVE-2014-3570) + [Andy Polyakov] + + *) Do not resume sessions on the server if the negotiated protocol + version does not match the session's version. Resuming with a different + version, while not strictly forbidden by the RFC, is of questionable + sanity and breaks all known clients. + [David Benjamin, Emilia Käsper] + + *) Tighten handling of the ChangeCipherSpec (CCS) message: reject + early CCS messages during renegotiation. (Note that because + renegotiation is encrypted, this early CCS was not exploitable.) + [Emilia Käsper] + + *) Tighten client-side session ticket handling during renegotiation: + ensure that the client only accepts a session ticket if the server sends + the extension anew in the ServerHello. Previously, a TLS client would + reuse the old extension state and thus accept a session ticket if one was + announced in the initial ServerHello. + + Similarly, ensure that the client requires a session ticket if one + was advertised in the ServerHello. Previously, a TLS client would + ignore a missing NewSessionTicket message. + [Emilia Käsper] + Changes between 1.0.1i and 1.0.1j [15 Oct 2014] *) SRTP Memory Leak. Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/Configure Thu Jan 8 23:42:41 2015 (r276861) @@ -804,6 +804,11 @@ PROCESS_ARGS: { $disabled{"tls1"} = "option(tls)" } + elsif ($1 eq "ssl3-method") + { + $disabled{"ssl3-method"} = "option(ssl)"; + $disabled{"ssl3"} = "option(ssl)"; + } else { $disabled{$1} = "option"; Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/Makefile Thu Jan 8 23:42:41 2015 (r276861) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1j +VERSION=1.0.1k MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/NEWS Thu Jan 8 23:42:41 2015 (r276861) @@ -5,6 +5,17 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1j and OpenSSL 1.0.1k [8 Jan 2015] + + o Fix for CVE-2014-3571 + o Fix for CVE-2015-0206 + o Fix for CVE-2014-3569 + o Fix for CVE-2014-3572 + o Fix for CVE-2015-0204 + o Fix for CVE-2015-0205 + o Fix for CVE-2014-8275 + o Fix for CVE-2014-3570 + Major changes between OpenSSL 1.0.1i and OpenSSL 1.0.1j [15 Oct 2014] o Fix for CVE-2014-3513 Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/README Thu Jan 8 23:42:41 2015 (r276861) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1j 15 Oct 2014 + OpenSSL 1.0.1k 8 Jan 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/apps/ca.c ============================================================================== --- head/crypto/openssl/apps/ca.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/apps/ca.c Thu Jan 8 23:42:41 2015 (r276861) @@ -703,7 +703,7 @@ bad: ERR_clear_error(); #ifdef RL_DEBUG if (!p) - BIO_printf(bio_err, "DEBUG: unique_subject undefined\n", p); + BIO_printf(bio_err, "DEBUG: unique_subject undefined\n"); #endif #ifdef RL_DEBUG BIO_printf(bio_err, "DEBUG: configured unique_subject is %d\n", Modified: head/crypto/openssl/apps/dgst.c ============================================================================== --- head/crypto/openssl/apps/dgst.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/apps/dgst.c Thu Jan 8 23:42:41 2015 (r276861) @@ -273,6 +273,8 @@ int MAIN(int argc, char **argv) BIO_printf(bio_err,"-d to output debug info\n"); BIO_printf(bio_err,"-hex output as hex dump\n"); BIO_printf(bio_err,"-binary output in binary form\n"); + BIO_printf(bio_err,"-hmac arg set the HMAC key to arg\n"); + BIO_printf(bio_err,"-non-fips-allow allow use of non FIPS digest\n"); BIO_printf(bio_err,"-sign file sign digest using private key in file\n"); BIO_printf(bio_err,"-verify file verify a signature using public key in file\n"); BIO_printf(bio_err,"-prverify file verify a signature using private key in file\n"); Modified: head/crypto/openssl/apps/ocsp.c ============================================================================== --- head/crypto/openssl/apps/ocsp.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/apps/ocsp.c Thu Jan 8 23:42:41 2015 (r276861) @@ -583,51 +583,52 @@ int MAIN(int argc, char **argv) BIO_printf (bio_err, "OCSP utility\n"); BIO_printf (bio_err, "Usage ocsp [options]\n"); BIO_printf (bio_err, "where options are\n"); - BIO_printf (bio_err, "-out file output filename\n"); - BIO_printf (bio_err, "-issuer file issuer certificate\n"); - BIO_printf (bio_err, "-cert file certificate to check\n"); - BIO_printf (bio_err, "-serial n serial number to check\n"); - BIO_printf (bio_err, "-signer file certificate to sign OCSP request with\n"); - BIO_printf (bio_err, "-signkey file private key to sign OCSP request with\n"); - BIO_printf (bio_err, "-sign_other file additional certificates to include in signed request\n"); - BIO_printf (bio_err, "-no_certs don't include any certificates in signed request\n"); - BIO_printf (bio_err, "-req_text print text form of request\n"); - BIO_printf (bio_err, "-resp_text print text form of response\n"); - BIO_printf (bio_err, "-text print text form of request and response\n"); - BIO_printf (bio_err, "-reqout file write DER encoded OCSP request to \"file\"\n"); - BIO_printf (bio_err, "-respout file write DER encoded OCSP reponse to \"file\"\n"); - BIO_printf (bio_err, "-reqin file read DER encoded OCSP request from \"file\"\n"); - BIO_printf (bio_err, "-respin file read DER encoded OCSP reponse from \"file\"\n"); - BIO_printf (bio_err, "-nonce add OCSP nonce to request\n"); - BIO_printf (bio_err, "-no_nonce don't add OCSP nonce to request\n"); - BIO_printf (bio_err, "-url URL OCSP responder URL\n"); - BIO_printf (bio_err, "-host host:n send OCSP request to host on port n\n"); - BIO_printf (bio_err, "-path path to use in OCSP request\n"); - BIO_printf (bio_err, "-CApath dir trusted certificates directory\n"); - BIO_printf (bio_err, "-CAfile file trusted certificates file\n"); - BIO_printf (bio_err, "-VAfile file validator certificates file\n"); - BIO_printf (bio_err, "-validity_period n maximum validity discrepancy in seconds\n"); - BIO_printf (bio_err, "-status_age n maximum status age in seconds\n"); - BIO_printf (bio_err, "-noverify don't verify response at all\n"); - BIO_printf (bio_err, "-verify_other file additional certificates to search for signer\n"); - BIO_printf (bio_err, "-trust_other don't verify additional certificates\n"); - BIO_printf (bio_err, "-no_intern don't search certificates contained in response for signer\n"); + BIO_printf (bio_err, "-out file output filename\n"); + BIO_printf (bio_err, "-issuer file issuer certificate\n"); + BIO_printf (bio_err, "-cert file certificate to check\n"); + BIO_printf (bio_err, "-serial n serial number to check\n"); + BIO_printf (bio_err, "-signer file certificate to sign OCSP request with\n"); + BIO_printf (bio_err, "-signkey file private key to sign OCSP request with\n"); + BIO_printf (bio_err, "-sign_other file additional certificates to include in signed request\n"); + BIO_printf (bio_err, "-no_certs don't include any certificates in signed request\n"); + BIO_printf (bio_err, "-req_text print text form of request\n"); + BIO_printf (bio_err, "-resp_text print text form of response\n"); + BIO_printf (bio_err, "-text print text form of request and response\n"); + BIO_printf (bio_err, "-reqout file write DER encoded OCSP request to \"file\"\n"); + BIO_printf (bio_err, "-respout file write DER encoded OCSP reponse to \"file\"\n"); + BIO_printf (bio_err, "-reqin file read DER encoded OCSP request from \"file\"\n"); + BIO_printf (bio_err, "-respin file read DER encoded OCSP reponse from \"file\"\n"); + BIO_printf (bio_err, "-nonce add OCSP nonce to request\n"); + BIO_printf (bio_err, "-no_nonce don't add OCSP nonce to request\n"); + BIO_printf (bio_err, "-url URL OCSP responder URL\n"); + BIO_printf (bio_err, "-host host:n send OCSP request to host on port n\n"); + BIO_printf (bio_err, "-path path to use in OCSP request\n"); + BIO_printf (bio_err, "-CApath dir trusted certificates directory\n"); + BIO_printf (bio_err, "-CAfile file trusted certificates file\n"); + BIO_printf (bio_err, "-VAfile file validator certificates file\n"); + BIO_printf (bio_err, "-validity_period n maximum validity discrepancy in seconds\n"); + BIO_printf (bio_err, "-status_age n maximum status age in seconds\n"); + BIO_printf (bio_err, "-noverify don't verify response at all\n"); + BIO_printf (bio_err, "-verify_other file additional certificates to search for signer\n"); + BIO_printf (bio_err, "-trust_other don't verify additional certificates\n"); + BIO_printf (bio_err, "-no_intern don't search certificates contained in response for signer\n"); BIO_printf (bio_err, "-no_signature_verify don't check signature on response\n"); - BIO_printf (bio_err, "-no_cert_verify don't check signing certificate\n"); - BIO_printf (bio_err, "-no_chain don't chain verify response\n"); - BIO_printf (bio_err, "-no_cert_checks don't do additional checks on signing certificate\n"); - BIO_printf (bio_err, "-port num port to run responder on\n"); - BIO_printf (bio_err, "-index file certificate status index file\n"); - BIO_printf (bio_err, "-CA file CA certificate\n"); - BIO_printf (bio_err, "-rsigner file responder certificate to sign responses with\n"); - BIO_printf (bio_err, "-rkey file responder key to sign responses with\n"); - BIO_printf (bio_err, "-rother file other certificates to include in response\n"); - BIO_printf (bio_err, "-resp_no_certs don't include any certificates in response\n"); - BIO_printf (bio_err, "-nmin n number of minutes before next update\n"); - BIO_printf (bio_err, "-ndays n number of days before next update\n"); - BIO_printf (bio_err, "-resp_key_id identify reponse by signing certificate key ID\n"); - BIO_printf (bio_err, "-nrequest n number of requests to accept (default unlimited)\n"); - BIO_printf (bio_err, "- use specified digest in the request\n"); + BIO_printf (bio_err, "-no_cert_verify don't check signing certificate\n"); + BIO_printf (bio_err, "-no_chain don't chain verify response\n"); + BIO_printf (bio_err, "-no_cert_checks don't do additional checks on signing certificate\n"); + BIO_printf (bio_err, "-port num port to run responder on\n"); + BIO_printf (bio_err, "-index file certificate status index file\n"); + BIO_printf (bio_err, "-CA file CA certificate\n"); + BIO_printf (bio_err, "-rsigner file responder certificate to sign responses with\n"); + BIO_printf (bio_err, "-rkey file responder key to sign responses with\n"); + BIO_printf (bio_err, "-rother file other certificates to include in response\n"); + BIO_printf (bio_err, "-resp_no_certs don't include any certificates in response\n"); + BIO_printf (bio_err, "-nmin n number of minutes before next update\n"); + BIO_printf (bio_err, "-ndays n number of days before next update\n"); + BIO_printf (bio_err, "-resp_key_id identify reponse by signing certificate key ID\n"); + BIO_printf (bio_err, "-nrequest n number of requests to accept (default unlimited)\n"); + BIO_printf (bio_err, "- use specified digest in the request\n"); + BIO_printf (bio_err, "-timeout n timeout connection to OCSP responder after n seconds\n"); goto end; } @@ -1398,16 +1399,7 @@ OCSP_RESPONSE *process_responder(BIO *er if (use_ssl == 1) { BIO *sbio; -#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3) ctx = SSL_CTX_new(SSLv23_client_method()); -#elif !defined(OPENSSL_NO_SSL3) - ctx = SSL_CTX_new(SSLv3_client_method()); -#elif !defined(OPENSSL_NO_SSL2) - ctx = SSL_CTX_new(SSLv2_client_method()); -#else - BIO_printf(err, "SSL is disabled\n"); - goto end; -#endif if (ctx == NULL) { BIO_printf(err, "Error creating SSL context.\n"); Modified: head/crypto/openssl/apps/openssl.c ============================================================================== --- head/crypto/openssl/apps/openssl.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/apps/openssl.c Thu Jan 8 23:42:41 2015 (r276861) @@ -435,9 +435,7 @@ end: if (prog != NULL) lh_FUNCTION_free(prog); if (arg.data != NULL) OPENSSL_free(arg.data); - apps_shutdown(); - CRYPTO_mem_leaks(bio_err); if (bio_err != NULL) { BIO_free(bio_err); @@ -450,6 +448,9 @@ end: OPENSSL_free(Argv); } #endif + apps_shutdown(); + CRYPTO_mem_leaks(bio_err); + OPENSSL_EXIT(ret); } Modified: head/crypto/openssl/apps/s_client.c ============================================================================== --- head/crypto/openssl/apps/s_client.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/apps/s_client.c Thu Jan 8 23:42:41 2015 (r276861) @@ -329,10 +329,12 @@ static void sc_usage(void) BIO_printf(bio_err," -srppass arg - password for 'user'\n"); BIO_printf(bio_err," -srp_lateuser - SRP username into second ClientHello message\n"); BIO_printf(bio_err," -srp_moregroups - Tolerate other than the known g N values.\n"); - BIO_printf(bio_err," -srp_strength int - minimal mength in bits for N (default %d).\n",SRP_MINIMAL_N); + BIO_printf(bio_err," -srp_strength int - minimal length in bits for N (default %d).\n",SRP_MINIMAL_N); #endif BIO_printf(bio_err," -ssl2 - just use SSLv2\n"); +#ifndef OPENSSL_NO_SSL3_METHOD BIO_printf(bio_err," -ssl3 - just use SSLv3\n"); +#endif BIO_printf(bio_err," -tls1_2 - just use TLSv1.2\n"); BIO_printf(bio_err," -tls1_1 - just use TLSv1.1\n"); BIO_printf(bio_err," -tls1 - just use TLSv1\n"); @@ -807,7 +809,7 @@ int MAIN(int argc, char **argv) else if (strcmp(*argv,"-ssl2") == 0) meth=SSLv2_client_method(); #endif -#ifndef OPENSSL_NO_SSL3 +#ifndef OPENSSL_NO_SSL3_METHOD else if (strcmp(*argv,"-ssl3") == 0) meth=SSLv3_client_method(); #endif @@ -1319,10 +1321,22 @@ re_start: BIO_ctrl(sbio, BIO_CTRL_DGRAM_SET_SEND_TIMEOUT, 0, &timeout); } - if (socket_mtu > 28) + if (socket_mtu) { + if(socket_mtu < DTLS_get_link_min_mtu(con)) + { + BIO_printf(bio_err,"MTU too small. Must be at least %ld\n", + DTLS_get_link_min_mtu(con)); + BIO_free(sbio); + goto shut; + } SSL_set_options(con, SSL_OP_NO_QUERY_MTU); - SSL_set_mtu(con, socket_mtu - 28); + if(!DTLS_set_link_mtu(con, socket_mtu)) + { + BIO_printf(bio_err, "Failed to set MTU\n"); + BIO_free(sbio); + goto shut; + } } else /* want to do MTU discovery */ Modified: head/crypto/openssl/apps/s_server.c ============================================================================== --- head/crypto/openssl/apps/s_server.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/apps/s_server.c Thu Jan 8 23:42:41 2015 (r276861) @@ -515,7 +515,9 @@ static void sv_usage(void) BIO_printf(bio_err," -srpuserseed string - A seed string for a default user salt.\n"); #endif BIO_printf(bio_err," -ssl2 - Just talk SSLv2\n"); +#ifndef OPENSSL_NO_SSL3_METHOD BIO_printf(bio_err," -ssl3 - Just talk SSLv3\n"); +#endif BIO_printf(bio_err," -tls1_2 - Just talk TLSv1.2\n"); BIO_printf(bio_err," -tls1_1 - Just talk TLSv1.1\n"); BIO_printf(bio_err," -tls1 - Just talk TLSv1\n"); @@ -1251,7 +1253,7 @@ int MAIN(int argc, char *argv[]) else if (strcmp(*argv,"-ssl2") == 0) { meth=SSLv2_server_method(); } #endif -#ifndef OPENSSL_NO_SSL3 +#ifndef OPENSSL_NO_SSL3_METHOD else if (strcmp(*argv,"-ssl3") == 0) { meth=SSLv3_server_method(); } #endif @@ -2049,10 +2051,24 @@ static int sv_body(char *hostname, int s BIO_ctrl(sbio, BIO_CTRL_DGRAM_SET_SEND_TIMEOUT, 0, &timeout); } - if (socket_mtu > 28) + if (socket_mtu) { + if(socket_mtu < DTLS_get_link_min_mtu(con)) + { + BIO_printf(bio_err,"MTU too small. Must be at least %ld\n", + DTLS_get_link_min_mtu(con)); + ret = -1; + BIO_free(sbio); + goto err; + } SSL_set_options(con, SSL_OP_NO_QUERY_MTU); - SSL_set_mtu(con, socket_mtu - 28); + if(!DTLS_set_link_mtu(con, socket_mtu)) + { + BIO_printf(bio_err, "Failed to set MTU\n"); + ret = -1; + BIO_free(sbio); + goto err; + } } else /* want to do MTU discovery */ Modified: head/crypto/openssl/apps/s_time.c ============================================================================== --- head/crypto/openssl/apps/s_time.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/apps/s_time.c Thu Jan 8 23:42:41 2015 (r276861) @@ -349,13 +349,7 @@ int MAIN(int argc, char **argv) if (bio_err == NULL) bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); -#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3) s_time_meth=SSLv23_client_method(); -#elif !defined(OPENSSL_NO_SSL3) - s_time_meth=SSLv3_client_method(); -#elif !defined(OPENSSL_NO_SSL2) - s_time_meth=SSLv2_client_method(); -#endif /* parse the command line arguments */ if( parseArgs( argc, argv ) < 0 ) Modified: head/crypto/openssl/apps/speed.c ============================================================================== --- head/crypto/openssl/apps/speed.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/apps/speed.c Thu Jan 8 23:42:41 2015 (r276861) @@ -225,7 +225,7 @@ #undef BUFSIZE #define BUFSIZE ((long)1024*8+1) -int run=0; +static volatile int run=0; static int mr=0; static int usertime=1; @@ -2739,27 +2739,6 @@ static int do_multi(int multi) else rsa_results[k][1]=d; } - else if(!strncmp(buf,"+F2:",4)) - { - int k; - double d; - - p=buf+4; - k=atoi(sstrsep(&p,sep)); - sstrsep(&p,sep); - - d=atof(sstrsep(&p,sep)); - if(n) - rsa_results[k][0]=1/(1/rsa_results[k][0]+1/d); - else - rsa_results[k][0]=d; - - d=atof(sstrsep(&p,sep)); - if(n) - rsa_results[k][1]=1/(1/rsa_results[k][1]+1/d); - else - rsa_results[k][1]=d; - } #ifndef OPENSSL_NO_DSA else if(!strncmp(buf,"+F3:",4)) { Modified: head/crypto/openssl/crypto/Makefile ============================================================================== --- head/crypto/openssl/crypto/Makefile Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/Makefile Thu Jan 8 23:42:41 2015 (r276861) @@ -56,12 +56,7 @@ top: all: shared buildinf.h: ../Makefile - ( echo "#ifndef MK1MF_BUILD"; \ - echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \ - echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \ - echo ' #define PLATFORM "$(PLATFORM)"'; \ - echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \ - echo '#endif' ) >buildinf.h + $(PERL) $(TOP)/util/mkbuildinf.pl "$(CFLAGS)" "$(PLATFORM)" >buildinf.h x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ Modified: head/crypto/openssl/crypto/aes/asm/aes-mips.pl ============================================================================== --- head/crypto/openssl/crypto/aes/asm/aes-mips.pl Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/aes/asm/aes-mips.pl Thu Jan 8 23:42:41 2015 (r276861) @@ -70,7 +70,7 @@ $pf = ($flavour =~ /nubi/i) ? $t0 : $t2; # ###################################################################### -$big_endian=(`echo MIPSEL | $ENV{CC} -E -P -`=~/MIPSEL/)?1:0; +$big_endian=(`echo MIPSEL | $ENV{CC} -E -`=~/MIPSEL/)?1:0 if ($ENV{CC}); for (@ARGV) { $output=$_ if (/^\w[\w\-]*\.\w+$/); } open STDOUT,">$output"; Modified: head/crypto/openssl/crypto/asn1/a_bitstr.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_bitstr.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/asn1/a_bitstr.c Thu Jan 8 23:42:41 2015 (r276861) @@ -136,11 +136,16 @@ ASN1_BIT_STRING *c2i_ASN1_BIT_STRING(ASN p= *pp; i= *(p++); + if (i > 7) + { + i=ASN1_R_INVALID_BIT_STRING_BITS_LEFT; + goto err; + } /* We do this to preserve the settings. If we modify * the settings, via the _set_bit function, we will recalculate * on output */ ret->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); /* clear */ - ret->flags|=(ASN1_STRING_FLAG_BITS_LEFT|(i&0x07)); /* set */ + ret->flags|=(ASN1_STRING_FLAG_BITS_LEFT|i); /* set */ if (len-- > 1) /* using one because of the bits left byte */ { Modified: head/crypto/openssl/crypto/asn1/a_type.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_type.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/asn1/a_type.c Thu Jan 8 23:42:41 2015 (r276861) @@ -113,7 +113,7 @@ IMPLEMENT_STACK_OF(ASN1_TYPE) IMPLEMENT_ASN1_SET_OF(ASN1_TYPE) /* Returns 0 if they are equal, != 0 otherwise. */ -int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b) +int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b) { int result = -1; Modified: head/crypto/openssl/crypto/asn1/a_verify.c ============================================================================== --- head/crypto/openssl/crypto/asn1/a_verify.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/asn1/a_verify.c Thu Jan 8 23:42:41 2015 (r276861) @@ -90,6 +90,12 @@ int ASN1_verify(i2d_of_void *i2d, X509_A ASN1err(ASN1_F_ASN1_VERIFY,ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM); goto err; } + + if (signature->type == V_ASN1_BIT_STRING && signature->flags & 0x7) + { + ASN1err(ASN1_F_ASN1_VERIFY, ASN1_R_INVALID_BIT_STRING_BITS_LEFT); + goto err; + } inl=i2d(data,NULL); buf_in=OPENSSL_malloc((unsigned int)inl); @@ -146,6 +152,12 @@ int ASN1_item_verify(const ASN1_ITEM *it return -1; } + if (signature->type == V_ASN1_BIT_STRING && signature->flags & 0x7) + { + ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ASN1_R_INVALID_BIT_STRING_BITS_LEFT); + return -1; + } + EVP_MD_CTX_init(&ctx); /* Convert signature OID into digest and public key OIDs */ Modified: head/crypto/openssl/crypto/asn1/asn1.h ============================================================================== --- head/crypto/openssl/crypto/asn1/asn1.h Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/asn1/asn1.h Thu Jan 8 23:42:41 2015 (r276861) @@ -776,7 +776,7 @@ DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, int ASN1_TYPE_get(ASN1_TYPE *a); void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); -int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b); +int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b); ASN1_OBJECT * ASN1_OBJECT_new(void ); void ASN1_OBJECT_free(ASN1_OBJECT *a); @@ -1329,6 +1329,7 @@ void ERR_load_ASN1_strings(void); #define ASN1_R_ILLEGAL_TIME_VALUE 184 #define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185 #define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128 +#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220 #define ASN1_R_INVALID_BMPSTRING_LENGTH 129 #define ASN1_R_INVALID_DIGIT 130 #define ASN1_R_INVALID_MIME_TYPE 205 @@ -1378,6 +1379,7 @@ void ERR_load_ASN1_strings(void); #define ASN1_R_TIME_NOT_ASCII_FORMAT 193 #define ASN1_R_TOO_LONG 155 #define ASN1_R_TYPE_NOT_CONSTRUCTED 156 +#define ASN1_R_TYPE_NOT_PRIMITIVE 218 #define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 157 #define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 158 #define ASN1_R_UNEXPECTED_EOC 159 Modified: head/crypto/openssl/crypto/asn1/asn1_err.c ============================================================================== --- head/crypto/openssl/crypto/asn1/asn1_err.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/asn1/asn1_err.c Thu Jan 8 23:42:41 2015 (r276861) @@ -1,6 +1,6 @@ /* crypto/asn1/asn1_err.c */ /* ==================================================================== - * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2014 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -246,6 +246,7 @@ static ERR_STRING_DATA ASN1_str_reasons[ {ERR_REASON(ASN1_R_ILLEGAL_TIME_VALUE) ,"illegal time value"}, {ERR_REASON(ASN1_R_INTEGER_NOT_ASCII_FORMAT),"integer not ascii format"}, {ERR_REASON(ASN1_R_INTEGER_TOO_LARGE_FOR_LONG),"integer too large for long"}, +{ERR_REASON(ASN1_R_INVALID_BIT_STRING_BITS_LEFT),"invalid bit string bits left"}, {ERR_REASON(ASN1_R_INVALID_BMPSTRING_LENGTH),"invalid bmpstring length"}, {ERR_REASON(ASN1_R_INVALID_DIGIT) ,"invalid digit"}, {ERR_REASON(ASN1_R_INVALID_MIME_TYPE) ,"invalid mime type"}, @@ -295,6 +296,7 @@ static ERR_STRING_DATA ASN1_str_reasons[ {ERR_REASON(ASN1_R_TIME_NOT_ASCII_FORMAT),"time not ascii format"}, {ERR_REASON(ASN1_R_TOO_LONG) ,"too long"}, {ERR_REASON(ASN1_R_TYPE_NOT_CONSTRUCTED) ,"type not constructed"}, +{ERR_REASON(ASN1_R_TYPE_NOT_PRIMITIVE) ,"type not primitive"}, {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY),"unable to decode rsa key"}, {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY),"unable to decode rsa private key"}, {ERR_REASON(ASN1_R_UNEXPECTED_EOC) ,"unexpected eoc"}, Modified: head/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- head/crypto/openssl/crypto/asn1/tasn_dec.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/asn1/tasn_dec.c Thu Jan 8 23:42:41 2015 (r276861) @@ -870,6 +870,14 @@ static int asn1_d2i_ex_primitive(ASN1_VA } else if (cst) { + if (utype == V_ASN1_NULL || utype == V_ASN1_BOOLEAN + || utype == V_ASN1_OBJECT || utype == V_ASN1_INTEGER + || utype == V_ASN1_ENUMERATED) + { + ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, + ASN1_R_TYPE_NOT_PRIMITIVE); + return 0; + } buf.length = 0; buf.max = 0; buf.data = NULL; Modified: head/crypto/openssl/crypto/asn1/x_algor.c ============================================================================== --- head/crypto/openssl/crypto/asn1/x_algor.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/asn1/x_algor.c Thu Jan 8 23:42:41 2015 (r276861) @@ -142,3 +142,14 @@ void X509_ALGOR_set_md(X509_ALGOR *alg, X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL); } + +int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) + { + int rv; + rv = OBJ_cmp(a->algorithm, b->algorithm); + if (rv) + return rv; + if (!a->parameter && !b->parameter) + return 0; + return ASN1_TYPE_cmp(a->parameter, b->parameter); + } Modified: head/crypto/openssl/crypto/asn1/x_name.c ============================================================================== --- head/crypto/openssl/crypto/asn1/x_name.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/asn1/x_name.c Thu Jan 8 23:42:41 2015 (r276861) @@ -350,6 +350,8 @@ static int x509_name_canon(X509_NAME *a) set = entry->set; } tmpentry = X509_NAME_ENTRY_new(); + if (!tmpentry) + goto err; tmpentry->object = OBJ_dup(entry->object); if (!asn1_string_canon(tmpentry->value, entry->value)) goto err; Modified: head/crypto/openssl/crypto/bio/bio.h ============================================================================== --- head/crypto/openssl/crypto/bio/bio.h Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/bio/bio.h Thu Jan 8 23:42:41 2015 (r276861) @@ -175,6 +175,8 @@ extern "C" { #define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45 /* Next DTLS handshake timeout to * adjust socket timeouts */ +#define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49 + #ifndef OPENSSL_NO_SCTP /* SCTP stuff */ #define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50 @@ -607,6 +609,8 @@ int BIO_ctrl_reset_read_request(BIO *b); (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer) #define BIO_dgram_set_peer(b,peer) \ (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer) +#define BIO_dgram_get_mtu_overhead(b) \ + (unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL) /* These two aren't currently implemented */ /* int BIO_get_ex_num(BIO *bio); */ Modified: head/crypto/openssl/crypto/bio/bss_dgram.c ============================================================================== --- head/crypto/openssl/crypto/bio/bss_dgram.c Thu Jan 8 22:53:10 2015 (r276860) +++ head/crypto/openssl/crypto/bio/bss_dgram.c Thu Jan 8 23:42:41 2015 (r276861) @@ -454,6 +454,36 @@ static int dgram_write(BIO *b, const cha return(ret); } +static long dgram_get_mtu_overhead(bio_dgram_data *data) + { + long ret; + + switch (data->peer.sa.sa_family) + { + case AF_INET: + /* Assume this is UDP - 20 bytes for IP, 8 bytes for UDP */ + ret = 28; + break; +#if OPENSSL_USE_IPV6 + case AF_INET6: +#ifdef IN6_IS_ADDR_V4MAPPED + if (IN6_IS_ADDR_V4MAPPED(&data->peer.sa_in6.sin6_addr)) + /* Assume this is UDP - 20 bytes for IP, 8 bytes for UDP */ + ret = 28; + else +#endif + /* Assume this is UDP - 40 bytes for IP, 8 bytes for UDP */ + ret = 48; + break; +#endif + default: + /* We don't know. Go with the historical default */ + ret = 28; + break; + } + return ret; + } + static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) { long ret=1; @@ -630,23 +660,24 @@ static long dgram_ctrl(BIO *b, int cmd, #endif break; case BIO_CTRL_DGRAM_GET_FALLBACK_MTU: + ret = -dgram_get_mtu_overhead(data); switch (data->peer.sa.sa_family) { case AF_INET: - ret = 576 - 20 - 8; + ret += 576; break; #if OPENSSL_USE_IPV6 case AF_INET6: #ifdef IN6_IS_ADDR_V4MAPPED if (IN6_IS_ADDR_V4MAPPED(&data->peer.sa_in6.sin6_addr)) - ret = 576 - 20 - 8; + ret += 576; else #endif - ret = 1280 - 40 - 8; + ret += 1280; break; #endif default: - ret = 576 - 20 - 8; + ret += 576; break; } break; @@ -847,6 +878,9 @@ static long dgram_ctrl(BIO *b, int cmd, ret = 0; break; #endif + case BIO_CTRL_DGRAM_GET_MTU_OVERHEAD: + ret = dgram_get_mtu_overhead(data); + break; default: ret=0; break; @@ -893,10 +927,18 @@ BIO *BIO_new_dgram_sctp(int fd, int clos /* Activate SCTP-AUTH for DATA and FORWARD-TSN chunks */ auth.sauth_chunk = OPENSSL_SCTP_DATA_CHUNK_TYPE; ret = setsockopt(fd, IPPROTO_SCTP, SCTP_AUTH_CHUNK, &auth, sizeof(struct sctp_authchunk)); - OPENSSL_assert(ret >= 0); + if (ret < 0) + { + BIO_vfree(bio); + return(NULL); + } auth.sauth_chunk = OPENSSL_SCTP_FORWARD_CUM_TSN_CHUNK_TYPE; ret = setsockopt(fd, IPPROTO_SCTP, SCTP_AUTH_CHUNK, &auth, sizeof(struct sctp_authchunk)); - OPENSSL_assert(ret >= 0); + if (ret < 0) + { + BIO_vfree(bio); + return(NULL); + } /* Test if activation was successful. When using accept(), * SCTP-AUTH has to be activated for the listening socket @@ -905,7 +947,13 @@ BIO *BIO_new_dgram_sctp(int fd, int clos authchunks = OPENSSL_malloc(sockopt_len); memset(authchunks, 0, sizeof(sockopt_len)); ret = getsockopt(fd, IPPROTO_SCTP, SCTP_LOCAL_AUTH_CHUNKS, authchunks, &sockopt_len); - OPENSSL_assert(ret >= 0); + + if (ret < 0) + { + OPENSSL_free(authchunks); + BIO_vfree(bio); + return(NULL); + } for (p = (unsigned char*) authchunks->gauth_chunks; p < (unsigned char*) authchunks + sockopt_len; @@ -927,16 +975,28 @@ BIO *BIO_new_dgram_sctp(int fd, int clos event.se_type = SCTP_AUTHENTICATION_EVENT; event.se_on = 1; ret = setsockopt(fd, IPPROTO_SCTP, SCTP_EVENT, &event, sizeof(struct sctp_event)); - OPENSSL_assert(ret >= 0); + if (ret < 0) + { + BIO_vfree(bio); + return(NULL); + } #else sockopt_len = (socklen_t) sizeof(struct sctp_event_subscribe); ret = getsockopt(fd, IPPROTO_SCTP, SCTP_EVENTS, &event, &sockopt_len); - OPENSSL_assert(ret >= 0); + if (ret < 0) + { + BIO_vfree(bio); + return(NULL); + } event.sctp_authentication_event = 1; ret = setsockopt(fd, IPPROTO_SCTP, SCTP_EVENTS, &event, sizeof(struct sctp_event_subscribe)); - OPENSSL_assert(ret >= 0); + if (ret < 0) + { + BIO_vfree(bio); + return(NULL); + } #endif #endif @@ -944,7 +1004,11 @@ BIO *BIO_new_dgram_sctp(int fd, int clos * larger than the max record size of 2^14 + 2048 + 13 */ ret = setsockopt(fd, IPPROTO_SCTP, SCTP_PARTIAL_DELIVERY_POINT, &optval, sizeof(optval)); - OPENSSL_assert(ret >= 0); + if (ret < 0) + { + BIO_vfree(bio); + return(NULL); + } return(bio); } @@ -982,7 +1046,12 @@ static int dgram_sctp_free(BIO *a) return 0; data = (bio_dgram_sctp_data *)a->ptr; - if(data != NULL) OPENSSL_free(data); + if(data != NULL) + { + if(data->saved_message.data != NULL) + OPENSSL_free(data->saved_message.data); + OPENSSL_free(data); + } return(1); } @@ -1034,6 +1103,13 @@ static int dgram_sctp_read(BIO *b, char msg.msg_flags = 0; n = recvmsg(b->num, &msg, 0); + if (n <= 0) + { + if (n < 0) + ret = n; + break; + } + if (msg.msg_controllen > 0) { for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) @@ -1073,13 +1149,6 @@ static int dgram_sctp_read(BIO *b, char } } - if (n <= 0) - { - if (n < 0) - ret = n; - break; - } - if (msg.msg_flags & MSG_NOTIFICATION) { snp = (union sctp_notification*) out; @@ -1099,6 +1168,7 @@ static int dgram_sctp_read(BIO *b, char dgram_sctp_write(data->saved_message.bio, data->saved_message.data, data->saved_message.length); OPENSSL_free(data->saved_message.data); + data->saved_message.data = NULL; data->saved_message.length = 0; } @@ -1109,16 +1179,28 @@ static int dgram_sctp_read(BIO *b, char event.se_type = SCTP_SENDER_DRY_EVENT; event.se_on = 0; i = setsockopt(b->num, IPPROTO_SCTP, SCTP_EVENT, &event, sizeof(struct sctp_event)); - OPENSSL_assert(i >= 0); + if (i < 0) + { + ret = i; + break; + } #else eventsize = sizeof(struct sctp_event_subscribe); i = getsockopt(b->num, IPPROTO_SCTP, SCTP_EVENTS, &event, &eventsize); - OPENSSL_assert(i >= 0); + if (i < 0) + { + ret = i; + break; + } event.sctp_sender_dry_event = 0; i = setsockopt(b->num, IPPROTO_SCTP, SCTP_EVENTS, &event, sizeof(struct sctp_event_subscribe)); - OPENSSL_assert(i >= 0); + if (i < 0) + { + ret = i; + break; + } #endif } @@ -1151,8 +1233,8 @@ static int dgram_sctp_read(BIO *b, char */ optlen = (socklen_t) sizeof(int); ret = getsockopt(b->num, SOL_SOCKET, SO_RCVBUF, &optval, &optlen); - OPENSSL_assert(ret >= 0); - OPENSSL_assert(optval >= 18445); + if (ret >= 0) + OPENSSL_assert(optval >= 18445); /* Test if SCTP doesn't partially deliver below * max record size (2^14 + 2048 + 13) @@ -1160,8 +1242,8 @@ static int dgram_sctp_read(BIO *b, char optlen = (socklen_t) sizeof(int); ret = getsockopt(b->num, IPPROTO_SCTP, SCTP_PARTIAL_DELIVERY_POINT, &optval, &optlen); - OPENSSL_assert(ret >= 0); - OPENSSL_assert(optval >= 18445); + if (ret >= 0) + OPENSSL_assert(optval >= 18445); /* Partially delivered notification??? Probably a bug.... */ OPENSSL_assert(!(msg.msg_flags & MSG_NOTIFICATION)); @@ -1195,15 +1277,15 @@ static int dgram_sctp_read(BIO *b, char authchunks = OPENSSL_malloc(optlen); memset(authchunks, 0, sizeof(optlen)); ii = getsockopt(b->num, IPPROTO_SCTP, SCTP_PEER_AUTH_CHUNKS, authchunks, &optlen); - OPENSSL_assert(ii >= 0); - for (p = (unsigned char*) authchunks->gauth_chunks; - p < (unsigned char*) authchunks + optlen; - p += sizeof(uint8_t)) - { - if (*p == OPENSSL_SCTP_DATA_CHUNK_TYPE) auth_data = 1; - if (*p == OPENSSL_SCTP_FORWARD_CUM_TSN_CHUNK_TYPE) auth_forward = 1; - } + if (ii >= 0) + for (p = (unsigned char*) authchunks->gauth_chunks; + p < (unsigned char*) authchunks + optlen; + p += sizeof(uint8_t)) + { + if (*p == OPENSSL_SCTP_DATA_CHUNK_TYPE) auth_data = 1; + if (*p == OPENSSL_SCTP_FORWARD_CUM_TSN_CHUNK_TYPE) auth_forward = 1; + } OPENSSL_free(authchunks); @@ -1258,9 +1340,11 @@ static int dgram_sctp_write(BIO *b, cons if (data->save_shutdown && !BIO_dgram_sctp_wait_for_dry(b)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 00:42: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 98DFE1E3; Fri, 9 Jan 2015 00:42: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 848DA2ED; Fri, 9 Jan 2015 00:42: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 t090gBha006106; Fri, 9 Jan 2015 00:42:11 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t090gBTY006104; Fri, 9 Jan 2015 00:42:11 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501090042.t090gBTY006104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 9 Jan 2015 00:42:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276863 - in head/crypto/openssl: crypto util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 00:42:11 -0000 Author: jkim Date: Fri Jan 9 00:42:10 2015 New Revision: 276863 URL: https://svnweb.freebsd.org/changeset/base/276863 Log: MFV: r276862 Fix build. Modified: head/crypto/openssl/crypto/cversion.c head/crypto/openssl/util/mkbuildinf.pl Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/crypto/cversion.c ============================================================================== --- head/crypto/openssl/crypto/cversion.c Fri Jan 9 00:12:20 2015 (r276862) +++ head/crypto/openssl/crypto/cversion.c Fri Jan 9 00:42:10 2015 (r276863) @@ -77,7 +77,7 @@ const char *SSLeay_version(int t) if (t == SSLEAY_CFLAGS) { #ifdef CFLAGS - return(cflags); + return(CFLAGS); #else return("compiler: information not available"); #endif Modified: head/crypto/openssl/util/mkbuildinf.pl ============================================================================== --- head/crypto/openssl/util/mkbuildinf.pl Fri Jan 9 00:12:20 2015 (r276862) +++ head/crypto/openssl/util/mkbuildinf.pl Fri Jan 9 00:42:10 2015 (r276863) @@ -7,7 +7,7 @@ $date = localtime(); print <<"END_OUTPUT"; #ifndef MK1MF_BUILD /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */ - #define CFLAGS + #define CFLAGS cflags /* * Generate CFLAGS as an array of individual characters. This is a * workaround for the situation where CFLAGS gets too long for a C90 string From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 01:27: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 E8045C39; Fri, 9 Jan 2015 01:27:33 +0000 (UTC) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 660398F4; Fri, 9 Jan 2015 01:27:33 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id z11so5889598lbi.10; Thu, 08 Jan 2015 17:27:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=m8hm5ZppXYc4kUWYvNKbHzgj+BNkxSltOWobvx/oKRo=; b=dith9yp3lRXAlGo1RtbZ6NGespGWTb84oUsXM3OI/TrlGiLD8UJhrOd2vZWZRF37hM 6HRhkZS3YSFS0mickzKuDEgGmhG5RQmO4nas5+NJvH/V0ElLYTwwE9B8/DIeCXll4ErV cmbB+9VTFNs+8zSyhUZCPGkaiSlfPcwkpTB8N4QHrcCPscCsmwWrUYzO5yEbWNJae4Ql oWFPCHCvrYsd8vlCdYUSLBJVaKjBVgejF0xUZCehVl7GP98HMQtdyv3//XpelcF/Tm5M gS/bqXOCWK+UwQ1JZxgKJedcSq6GzgAv/enkLn+f0bYgAYA11HgqFZ7LaV/mrrAW3bwB izPg== MIME-Version: 1.0 X-Received: by 10.112.125.41 with SMTP id mn9mr18677473lbb.80.1420766851367; Thu, 08 Jan 2015 17:27:31 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.112.141.5 with HTTP; Thu, 8 Jan 2015 17:27:31 -0800 (PST) In-Reply-To: <201501081426.t08EQo1g003090@svn.freebsd.org> References: <201501081426.t08EQo1g003090@svn.freebsd.org> Date: Thu, 8 Jan 2015 17:27:31 -0800 X-Google-Sender-Auth: W56nLrxixC4yhyz7qYdRpC-Ei7I Message-ID: Subject: Re: svn commit: r276819 - head/lib/clang/libllvmaarch64disassembler From: Craig Rodrigues To: Ed Maste Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 01:27:34 -0000 On Thu, Jan 8, 2015 at 6:26 AM, Ed Maste wrote: > > +.if ${MK_CLANG_EXTRAS} != "no" || .${MK_LLDB} != "no" > ^^^^ > There is no need for a leading "." -- Craig From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 01:43: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 C0AEFF5F; Fri, 9 Jan 2015 01:43:00 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D475A7E; Fri, 9 Jan 2015 01:43:00 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id s18so12296745lam.2; Thu, 08 Jan 2015 17:42:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=UyTb408YGhDpNCtCfuzCmgr258FjceOyWBVmiwGcy20=; b=EyOiQmCgRP2WE1CC20P4Zx9FhnbV5lhuAi1ygwslbWYZXAN2wSOYzyGTpSIpqOzi7R tqF91bcLbfSVQg8iIG65vprGop1eMKKLTkKeCgS1TU6U7BV/U2FfcP05cl7jHBV0GWZ/ eTrR/wBEqwzzWdBU5x0UpBoZr7AeyCxg6RhHnpjVhziGiI5wiknoP2COE6l+SG+xwzsE QOhKzny7pTM3CVsIDeYJlpzweQVuY5P5stRiqRECq16wm7yrugz5LIFR8ZL0ZJ4w4n8a rarvTtxk/nukviIfh8MJyK1l00wqNuM1JMqd2CA1gCW4AAKc8y1fEUADOMVOCbSTYigc Q1hw== MIME-Version: 1.0 X-Received: by 10.112.222.135 with SMTP id qm7mr18580876lbc.19.1420767778273; Thu, 08 Jan 2015 17:42:58 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.112.141.5 with HTTP; Thu, 8 Jan 2015 17:42:58 -0800 (PST) In-Reply-To: <201501082342.t08NggCZ076201@svn.freebsd.org> References: <201501082342.t08NggCZ076201@svn.freebsd.org> Date: Thu, 8 Jan 2015 17:42:58 -0800 X-Google-Sender-Auth: KNeHyFteoiDGDT_PJ2Qftu5Su-U Message-ID: Subject: Re: svn commit: r276861 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn c... From: Craig Rodrigues To: Jung-uk Kim Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 01:43:00 -0000 On Thu, Jan 8, 2015 at 3:42 PM, Jung-uk Kim wrote: > Author: jkim > Date: Thu Jan 8 23:42:41 2015 > New Revision: 276861 > URL: https://svnweb.freebsd.org/changeset/base/276861 > > Log: > Merge OpenSSL 1.0.1k. > In future, please set Relnotes: flag in the commit message for this type of commit to make it easier for re@ to track items like this which should go into release notes. -- Craig From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 01:57: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 EB6D32C9; Fri, 9 Jan 2015 01:57: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 D7EF5B6F; Fri, 9 Jan 2015 01:57: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 t091vCDC039855; Fri, 9 Jan 2015 01:57:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t091vC0Q039854; Fri, 9 Jan 2015 01:57:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501090157.t091vC0Q039854@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 9 Jan 2015 01:57:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276866 - head/lib/clang/libllvmaarch64disassembler X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 01:57:13 -0000 Author: emaste Date: Fri Jan 9 01:57:11 2015 New Revision: 276866 URL: https://svnweb.freebsd.org/changeset/base/276866 Log: Remove extraneous period Reported by: rodrigc Modified: head/lib/clang/libllvmaarch64disassembler/Makefile Modified: head/lib/clang/libllvmaarch64disassembler/Makefile ============================================================================== --- head/lib/clang/libllvmaarch64disassembler/Makefile Fri Jan 9 01:11:43 2015 (r276865) +++ head/lib/clang/libllvmaarch64disassembler/Makefile Fri Jan 9 01:57:11 2015 (r276866) @@ -8,7 +8,7 @@ SRCDIR= lib/Target/AArch64/Disassembler INCDIR= lib/Target/AArch64 SRCS= AArch64Disassembler.cpp -.if ${MK_CLANG_EXTRAS} != "no" || .${MK_LLDB} != "no" +.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no" SRCS+= AArch64ExternalSymbolizer.cpp .endif From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 01:58:21 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 CB17746A; Fri, 9 Jan 2015 01:58:21 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90D42B7F; Fri, 9 Jan 2015 01:58:21 +0000 (UTC) Received: by mail-ig0-f170.google.com with SMTP id r2so5483453igi.1; Thu, 08 Jan 2015 17:58:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=XUNx5aPYv8EO9pIUD6Njr2s1QjRnXDN7K4qmbLHiAvc=; b=Dcr7dQElE5GezqqHdQFnyzNcTyx9HDd6EfsWN4ymLai4u5tfSdv+esq7KbK1J6dRi8 tZXGAdAjBOCQJt5m309YVasoQ/0OfceVHW6uAUeirHHo7NVIxkPiPB8xvuixuhh6gkFD Pzplb+HLxkwcDFRhsJPI4/PNgVtn21w8GVfUZ9iy+Yoc0aYH0yjKt8Ci8VIgAfOn4MAa w5MvaYkkZT8XlP0312AKKjn3DkxOhWyd1yEuwpEL8M+UX7sljCWWR8mrtERj+UwcNiM2 Dx9urCzF/UTPWv3XE6RhcgaFQ/zhVggR5rp696CvIvuJcqSrNttT9WYgd9mNuBXQBiEy vM0g== X-Received: by 10.42.145.5 with SMTP id d5mr11207671icv.8.1420768700934; Thu, 08 Jan 2015 17:58:20 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.0.85 with HTTP; Thu, 8 Jan 2015 17:58:00 -0800 (PST) In-Reply-To: References: <201501081426.t08EQo1g003090@svn.freebsd.org> From: Ed Maste Date: Thu, 8 Jan 2015 20:58:00 -0500 X-Google-Sender-Auth: vMxqTMMkv5jiIu4FMGyzCVQji60 Message-ID: Subject: Re: svn commit: r276819 - head/lib/clang/libllvmaarch64disassembler To: Craig Rodrigues Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 01:58:21 -0000 On 8 January 2015 at 20:27, Craig Rodrigues wrote: >> >> +.if ${MK_CLANG_EXTRAS} != "no" || .${MK_LLDB} != "no" >> ^^^^ > > > There is no need for a leading "." Oops, yes it was a cut-and-pasteo. Thanks for spotting it. From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 02:10: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 68DA96A4; Fri, 9 Jan 2015 02: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 54F83C84; Fri, 9 Jan 2015 02: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 t092AjBo045089; Fri, 9 Jan 2015 02:10:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t092AjM5045088; Fri, 9 Jan 2015 02:10:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501090210.t092AjM5045088@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 9 Jan 2015 02:10:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276867 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 02:10:45 -0000 Author: kib Date: Fri Jan 9 02:10:44 2015 New Revision: 276867 URL: https://svnweb.freebsd.org/changeset/base/276867 Log: Fix DMAR context allocations for the devices behind PCIe->PCI bridges after dmar driver was converted to use rids. The bus component to calculate context page must be taken from the requestor rid, which is a bridge, and not from the device bus number. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_ctx.c Modified: head/sys/x86/iommu/intel_ctx.c ============================================================================== --- head/sys/x86/iommu/intel_ctx.c Fri Jan 9 01:57:11 2015 (r276866) +++ head/sys/x86/iommu/intel_ctx.c Fri Jan 9 02:10:44 2015 (r276867) @@ -288,7 +288,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev * higher chance to succeed if the sleep is allowed. */ DMAR_UNLOCK(dmar); - dmar_ensure_ctx_page(dmar, bus); + dmar_ensure_ctx_page(dmar, PCI_RID2BUS(rid)); ctx1 = dmar_get_ctx_alloc(dmar, rid); if (id_mapped) { From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 06:39:09 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 687EB39F; Fri, 9 Jan 2015 06:39:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5529D8E4; Fri, 9 Jan 2015 06:39:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t096d8BE070312; Fri, 9 Jan 2015 06:39:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t096d8Ns070311; Fri, 9 Jan 2015 06:39:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501090639.t096d8Ns070311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 9 Jan 2015 06:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276879 - head/sys/ofed/include/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.18-1 Precedence: list List-Id: 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, 09 Jan 2015 06:39:09 -0000 Author: hselasky Date: Fri Jan 9 06:39:07 2015 New Revision: 276879 URL: https://svnweb.freebsd.org/changeset/base/276879 Log: Don't mask the IP-address when doing multicast IP over infiniband. PR: 196631 MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/net/ip.h Modified: head/sys/ofed/include/net/ip.h ============================================================================== --- head/sys/ofed/include/net/ip.h Fri Jan 9 03:35:19 2015 (r276878) +++ head/sys/ofed/include/net/ip.h Fri Jan 9 06:39:07 2015 (r276879) @@ -74,7 +74,7 @@ ip_ib_mc_map(uint32_t addr, const unsign buf[13] = 0; buf[14] = 0; buf[15] = 0; - buf[16] = (addr >> 24) & 0x0f; + buf[16] = (addr >> 24) & 0xff; buf[17] = (addr >> 16) & 0xff; buf[18] = (addr >> 8) & 0xff; buf[19] = addr & 0xff; From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 07:40: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 0B7BBBBD; Fri, 9 Jan 2015 07:40: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 EA6FCDE8; Fri, 9 Jan 2015 07:40: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 t097ewXN001518; Fri, 9 Jan 2015 07:40:58 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t097evlS001512; Fri, 9 Jan 2015 07:40:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501090740.t097evlS001512@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Jan 2015 07:40:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276881 - in head/lib/libedit: . TEST edit/readline X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 07:40:59 -0000 Author: bapt Date: Fri Jan 9 07:40:56 2015 New Revision: 276881 URL: https://svnweb.freebsd.org/changeset/base/276881 Log: Synchronize libedit with NetBSD and activate UTF-8 support [1] Differences with NetBSD Reapply our local patches on top of it Fix Unicode environement detection Fix reading a line in unicode environment. It allows /bin/sh to works in UTF-8 envs Differential Revision: https://reviews.freebsd.org/D1455 Reviewed by: jilles, pfg Obtained from: NetBSD [1] MFC after: 1 month Relnotes: yes Added: head/lib/libedit/TEST/rl1.c (contents, props changed) head/lib/libedit/TEST/wtc1.c (contents, props changed) head/lib/libedit/chartype.c (contents, props changed) head/lib/libedit/config.h (contents, props changed) head/lib/libedit/eln.c (contents, props changed) head/lib/libedit/keymacro.c - copied, changed from r276637, head/lib/libedit/key.c head/lib/libedit/keymacro.h - copied, changed from r276637, head/lib/libedit/key.h head/lib/libedit/terminal.c - copied, changed from r276637, head/lib/libedit/term.c head/lib/libedit/terminal.h - copied, changed from r276637, head/lib/libedit/term.h Deleted: head/lib/libedit/key.c head/lib/libedit/key.h head/lib/libedit/term.c head/lib/libedit/term.h Modified: head/lib/libedit/Makefile head/lib/libedit/TEST/tc1.c head/lib/libedit/chared.c head/lib/libedit/chared.h head/lib/libedit/chartype.h head/lib/libedit/common.c head/lib/libedit/edit/readline/readline.h head/lib/libedit/editline.3 head/lib/libedit/editrc.5 head/lib/libedit/el.c head/lib/libedit/el.h head/lib/libedit/emacs.c head/lib/libedit/filecomplete.c head/lib/libedit/filecomplete.h head/lib/libedit/hist.c head/lib/libedit/hist.h head/lib/libedit/histedit.h head/lib/libedit/history.c head/lib/libedit/makelist head/lib/libedit/map.c head/lib/libedit/map.h head/lib/libedit/parse.c head/lib/libedit/parse.h head/lib/libedit/prompt.c head/lib/libedit/prompt.h head/lib/libedit/read.c head/lib/libedit/read.h head/lib/libedit/readline.c head/lib/libedit/refresh.c head/lib/libedit/refresh.h head/lib/libedit/search.c head/lib/libedit/search.h head/lib/libedit/sig.c head/lib/libedit/sig.h head/lib/libedit/sys.h head/lib/libedit/tokenizer.c head/lib/libedit/tty.c head/lib/libedit/tty.h head/lib/libedit/vi.c Modified: head/lib/libedit/Makefile ============================================================================== --- head/lib/libedit/Makefile Fri Jan 9 07:32:43 2015 (r276880) +++ head/lib/libedit/Makefile Fri Jan 9 07:40:56 2015 (r276881) @@ -7,8 +7,8 @@ SHLIB_MAJOR= 7 SHLIBDIR?= /lib OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \ - hist.c key.c map.c \ - parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c + hist.c keymacro.c map.c chartype.c \ + parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c LIBADD= ncursesw @@ -34,7 +34,10 @@ CLEANFILES+= common.h editline.c emacs.h INCS= histedit.h -CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit +OSRCS+= eln.c +SRCS+= tokenizern.c historyn.c +CLEANFILES+= tokenizern.c historyn.c +CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/edit -DWIDECHAR CFLAGS+= #-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH CFLAGS+= #-DDEBUG_PASTE -DDEBUG_EDIT @@ -65,6 +68,12 @@ help.h: ${ASRC} makelist editline.c: ${OSRCS} sh ${.CURDIR}/makelist -e ${.ALLSRC:T} > ${.TARGET} +tokenizern.c: makelist Makefile + sh ${.CURDIR}/makelist -n tokenizer.c > ${.TARGET} + +historyn.c: makelist Makefile + sh ${.CURDIR}/makelist -n history.c > ${.TARGET} + # minimal dependency to make "make depend" optional editline.o editline.po editline.So editline.ln: \ common.h emacs.h fcns.c fcns.h help.c help.h vi.h Added: head/lib/libedit/TEST/rl1.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libedit/TEST/rl1.c Fri Jan 9 07:40:56 2015 (r276881) @@ -0,0 +1,53 @@ +/* $NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $ */ + +/*- + * Copyright (c) 2010 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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 +#if !defined(lint) +__RCSID("$NetBSD: rl1.c,v 1.1 2010/09/16 20:08:51 christos Exp $"); +#endif /* not lint */ +__FBSDID("$FreeBSD$"); + +/* + * test.c: A little test program + */ +#include +#include + +int +main(int argc, char *argv[]) +{ + char *p; + while ((p = readline("hi$")) != NULL) { + add_history(p); + printf("%d %s\n", history_length, p); + } + return 0; +} Modified: head/lib/libedit/TEST/tc1.c ============================================================================== --- head/lib/libedit/TEST/tc1.c Fri Jan 9 07:32:43 2015 (r276880) +++ head/lib/libedit/TEST/tc1.c Fri Jan 9 07:40:56 2015 (r276881) @@ -1,3 +1,5 @@ +/* $NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $ */ + /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -30,22 +32,24 @@ * SUCH DAMAGE. */ -#include +#include "config.h" #ifndef lint __COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n"); #endif /* not lint */ #if !defined(lint) && !defined(SCCSID) +#if 0 static char sccsid[] = "@(#)test.c 8.1 (Berkeley) 6/4/93"; +#else +__RCSID("$NetBSD: tc1.c,v 1.6 2014/06/18 20:12:15 christos Exp $"); +#endif #endif /* not lint && not SCCSID */ -__RCSID("$NetBSD: test.c,v 1.3 2009/07/17 12:25:52 christos Exp $"); __FBSDID("$FreeBSD$"); /* * test.c: A little test program */ -#include "sys.h" #include #include #include @@ -54,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "histedit.h" @@ -68,7 +73,7 @@ static void sig(int); static char * prompt(EditLine *el) { - static char a[] = "\1\e[7m\1Edit$\1\e[0m\1 "; + static char a[] = "\1\033[7m\1Edit$\1\033[0m\1 "; static char b[] = "Edit> "; return (continuation ? b : a); @@ -88,6 +93,7 @@ complete(EditLine *el, int ch) const char* ptr; const LineInfo *lf = el_line(el); int len; + int res = CC_ERROR; /* * Find the last word @@ -101,16 +107,16 @@ complete(EditLine *el, int ch) if (len > strlen(dp->d_name)) continue; if (strncmp(dp->d_name, ptr, len) == 0) { - closedir(dd); if (el_insertstr(el, &dp->d_name[len]) == -1) - return (CC_ERROR); + res = CC_ERROR; else - return (CC_REFRESH); + res = CC_REFRESH; + break; } } closedir(dd); - return (CC_ERROR); + return res; } int @@ -127,6 +133,7 @@ main(int argc, char *argv[]) History *hist; HistEvent ev; + (void) setlocale(LC_CTYPE, ""); (void) signal(SIGINT, sig); (void) signal(SIGQUIT, sig); (void) signal(SIGHUP, sig); Added: head/lib/libedit/TEST/wtc1.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libedit/TEST/wtc1.c Fri Jan 9 07:40:56 2015 (r276881) @@ -0,0 +1,281 @@ +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "../histedit.h" + + +static int continuation; +volatile sig_atomic_t gotsig; +static const char hfile[] = ".whistory"; + +static wchar_t * +prompt(EditLine *el) +{ + static wchar_t a[] = L"\1\033[7m\1Edit$\1\033[0m\1 "; + static wchar_t b[] = L"Edit> "; + + return continuation ? b : a; +} + + +static void +sig(int i) +{ + gotsig = i; +} + +const char * +my_wcstombs(const wchar_t *wstr) +{ + static struct { + char *str; + int len; + } buf; + + int needed = wcstombs(0, wstr, 0) + 1; + if (needed > buf.len) { + buf.str = malloc(needed); + buf.len = needed; + } + wcstombs(buf.str, wstr, needed); + buf.str[needed - 1] = 0; + + return buf.str; +} + + +static unsigned char +complete(EditLine *el, int ch) +{ + DIR *dd = opendir("."); + struct dirent *dp; + const wchar_t *ptr; + char *buf, *bptr; + const LineInfoW *lf = el_wline(el); + int len, mblen, i; + unsigned char res = 0; + wchar_t dir[1024]; + + /* Find the last word */ + for (ptr = lf->cursor -1; !iswspace(*ptr) && ptr > lf->buffer; --ptr) + continue; + len = lf->cursor - ++ptr; + + /* Convert last word to multibyte encoding, so we can compare to it */ + wctomb(NULL, 0); /* Reset shift state */ + mblen = MB_LEN_MAX * len + 1; + buf = bptr = malloc(mblen); + if (buf == NULL) + err(1, "malloc"); + for (i = 0; i < len; ++i) { + /* Note: really should test for -1 return from wctomb */ + bptr += wctomb(bptr, ptr[i]); + } + *bptr = 0; /* Terminate multibyte string */ + mblen = bptr - buf; + + /* Scan directory for matching name */ + for (dp = readdir(dd); dp != NULL; dp = readdir(dd)) { + if (mblen > strlen(dp->d_name)) + continue; + if (strncmp(dp->d_name, buf, mblen) == 0) { + mbstowcs(dir, &dp->d_name[mblen], + sizeof(dir) / sizeof(*dir)); + if (el_winsertstr(el, dir) == -1) + res = CC_ERROR; + else + res = CC_REFRESH; + break; + } + } + + closedir(dd); + free(buf); + return res; +} + + +int +main(int argc, char *argv[]) +{ + EditLine *el = NULL; + int numc, ncontinuation; + const wchar_t *line; + TokenizerW *tok; + HistoryW *hist; + HistEventW ev; +#ifdef DEBUG + int i; +#endif + + setlocale(LC_ALL, ""); + + (void)signal(SIGINT, sig); + (void)signal(SIGQUIT, sig); + (void)signal(SIGHUP, sig); + (void)signal(SIGTERM, sig); + + hist = history_winit(); /* Init built-in history */ + history_w(hist, &ev, H_SETSIZE, 100); /* Remember 100 events */ + history_w(hist, &ev, H_LOAD, hfile); + + tok = tok_winit(NULL); /* Init the tokenizer */ + + el = el_init(argv[0], stdin, stdout, stderr); + + el_wset(el, EL_EDITOR, L"vi"); /* Default editor is vi */ + el_wset(el, EL_SIGNAL, 1); /* Handle signals gracefully */ + el_wset(el, EL_PROMPT_ESC, prompt, '\1'); /* Set the prompt function */ + + el_wset(el, EL_HIST, history_w, hist); /* FIXME - history_w? */ + + /* Add a user-defined function */ + el_wset(el, EL_ADDFN, L"ed-complete", L"Complete argument", complete); + + /* Bind to it */ + el_wset(el, EL_BIND, L"^I", L"ed-complete", NULL); + + /* + * Bind j, k in vi command mode to previous and next line, instead + * of previous and next history. + */ + el_wset(el, EL_BIND, L"-a", L"k", L"ed-prev-line", NULL); + el_wset(el, EL_BIND, L"-a", L"j", L"ed-next-line", NULL); + + /* Source the user's defaults file. */ + el_source(el, NULL); + + while((line = el_wgets(el, &numc)) != NULL && numc != 0) { + int ac, cc, co, rc; + const wchar_t **av; + + const LineInfoW *li; + li = el_wline(el); + +#ifdef DEBUG + (void)fwprintf(stderr, L"==> got %d %ls", numc, line); + (void)fwprintf(stderr, L" > li `%.*ls_%.*ls'\n", + (li->cursor - li->buffer), li->buffer, + (li->lastchar - 1 - li->cursor), + (li->cursor >= li->lastchar) ? L"" : li->cursor); +#endif + + if (gotsig) { + (void)fprintf(stderr, "Got signal %d.\n", (int)gotsig); + gotsig = 0; + el_reset(el); + } + + if(!continuation && numc == 1) + continue; /* Only got a linefeed */ + + ac = cc = co = 0; + ncontinuation = tok_wline(tok, li, &ac, &av, &cc, &co); + if (ncontinuation < 0) { + (void) fprintf(stderr, "Internal error\n"); + continuation = 0; + continue; + } + +#ifdef DEBUG + (void)fprintf(stderr, " > nc %d ac %d cc %d co %d\n", + ncontinuation, ac, cc, co); +#endif + history_w(hist, &ev, continuation ? H_APPEND : H_ENTER, line); + + continuation = ncontinuation; + ncontinuation = 0; + if(continuation) + continue; + +#ifdef DEBUG + for (i = 0; i < ac; ++i) { + (void)fwprintf(stderr, L" > arg# %2d ", i); + if (i != cc) + (void)fwprintf(stderr, L"`%ls'\n", av[i]); + else + (void)fwprintf(stderr, L"`%.*ls_%ls'\n", + co, av[i], av[i] + co); + } +#endif + + if (wcscmp (av[0], L"history") == 0) { + switch(ac) { + case 1: + for(rc = history_w(hist, &ev, H_LAST); + rc != -1; + rc = history_w(hist, &ev, H_PREV)) + (void)fwprintf(stdout, L"%4d %ls", + ev.num, ev.str); + break; + case 2: + if (wcscmp(av[1], L"clear") == 0) + history_w(hist, &ev, H_CLEAR); + else + goto badhist; + break; + case 3: + if (wcscmp(av[1], L"load") == 0) + history_w(hist, &ev, H_LOAD, + my_wcstombs(av[2])); + else if (wcscmp(av[1], L"save") == 0) + history_w(hist, &ev, H_SAVE, + my_wcstombs(av[2])); + else + goto badhist; + break; + badhist: + default: + (void)fprintf(stderr, + "Bad history arguments\n"); + break; + } + } else if (el_wparse(el, ac, av) == -1) { + switch (fork()) { + case 0: { + Tokenizer *ntok = tok_init(NULL); + int nargc; + const char **nav; + tok_str(ntok, my_wcstombs(line), &nargc, &nav); + execvp(nav[0],(char **)nav); + perror(nav[0]); + _exit(1); + /* NOTREACHED */ + break; + } + case -1: + perror("fork"); + break; + default: + if (wait(&rc) == -1) + perror("wait"); + (void)fprintf(stderr, "Exit %x\n", rc); + break; + } + } + + tok_wreset(tok); + } + + el_end(el); + tok_wend(tok); + history_w(hist, &ev, H_SAVE, hfile); + history_wend(hist); + + fprintf(stdout, "\n"); + return 0; +} + + Modified: head/lib/libedit/chared.c ============================================================================== --- head/lib/libedit/chared.c Fri Jan 9 07:32:43 2015 (r276880) +++ head/lib/libedit/chared.c Fri Jan 9 07:40:56 2015 (r276881) @@ -1,3 +1,5 @@ +/* $NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $ */ + /*- * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -28,12 +30,15 @@ * 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. - * - * $NetBSD: chared.c,v 1.27 2009/02/15 21:55:23 christos Exp $ */ +#include "config.h" #if !defined(lint) && !defined(SCCSID) +#if 0 static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93"; +#else +__RCSID("$NetBSD: chared.c,v 1.40 2014/06/18 18:12:28 christos Exp $"); +#endif #endif /* not lint && not SCCSID */ #include __FBSDID("$FreeBSD$"); @@ -41,12 +46,10 @@ __FBSDID("$FreeBSD$"); /* * chared.c: Character editor utilities */ -#include "sys.h" - #include #include "el.h" -private void ch__clearmacro(EditLine *); +private void ch__clearmacro (EditLine *); /* value to leave unused in line buffer */ #define EL_LEAVE 2 @@ -62,10 +65,10 @@ cv_undo(EditLine *el) size_t size; /* Save entire line for undo */ - size = el->el_line.lastchar - el->el_line.buffer; - vu->len = size; + size = (size_t)(el->el_line.lastchar - el->el_line.buffer); + vu->len = (ssize_t)size; vu->cursor = (int)(el->el_line.cursor - el->el_line.buffer); - memcpy(vu->buf, el->el_line.buffer, size); + (void)memcpy(vu->buf, el->el_line.buffer, size * sizeof(*vu->buf)); /* save command info for redo */ r->count = el->el_state.doingarg ? el->el_state.argument : 0; @@ -79,11 +82,11 @@ cv_undo(EditLine *el) * Save yank/delete data for paste */ protected void -cv_yank(EditLine *el, const char *ptr, int size) +cv_yank(EditLine *el, const Char *ptr, int size) { c_kill_t *k = &el->el_chared.c_kill; - memcpy(k->buf, ptr, (size_t)size); + (void)memcpy(k->buf, ptr, (size_t)size * sizeof(*k->buf)); k->last = k->buf + size; } @@ -94,7 +97,7 @@ cv_yank(EditLine *el, const char *ptr, i protected void c_insert(EditLine *el, int num) { - char *cp; + Char *cp; if (el->el_line.lastchar + num >= el->el_line.limit) { if (!ch_enlargebufs(el, (size_t)num)) @@ -126,7 +129,7 @@ c_delafter(EditLine *el, int num) } if (num > 0) { - char *cp; + Char *cp; for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++) *cp = cp[num]; @@ -142,7 +145,7 @@ c_delafter(EditLine *el, int num) protected void c_delafter1(EditLine *el) { - char *cp; + Char *cp; for (cp = el->el_line.cursor; cp <= el->el_line.lastchar; cp++) *cp = cp[1]; @@ -167,7 +170,7 @@ c_delbefore(EditLine *el, int num) } if (num > 0) { - char *cp; + Char *cp; for (cp = el->el_line.cursor - num; cp <= el->el_line.lastchar; @@ -185,7 +188,7 @@ c_delbefore(EditLine *el, int num) protected void c_delbefore1(EditLine *el) { - char *cp; + Char *cp; for (cp = el->el_line.cursor - 1; cp <= el->el_line.lastchar; cp++) *cp = cp[1]; @@ -198,9 +201,9 @@ c_delbefore1(EditLine *el) * Return if p is part of a word according to emacs */ protected int -ce__isword(int p) +ce__isword(Int p) { - return (isalnum(p) || strchr("*?_-.[]~=", p) != NULL); + return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL; } @@ -208,11 +211,11 @@ ce__isword(int p) * Return if p is part of a word according to vi */ protected int -cv__isword(int p) +cv__isword(Int p) { - if (isalnum(p) || p == '_') + if (Isalnum(p) || p == '_') return 1; - if (isgraph(p)) + if (Isgraph(p)) return 2; return 0; } @@ -222,24 +225,24 @@ cv__isword(int p) * Return if p is part of a big word according to vi */ protected int -cv__isWord(int p) +cv__isWord(Int p) { - return (!isspace(p)); + return !Isspace(p); } /* c__prev_word(): * Find the previous word */ -protected char * -c__prev_word(char *p, char *low, int n, int (*wtest)(int)) +protected Char * +c__prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) { p--; while (n--) { - while ((p >= low) && !(*wtest)((unsigned char) *p)) + while ((p >= low) && !(*wtest)(*p)) p--; - while ((p >= low) && (*wtest)((unsigned char) *p)) + while ((p >= low) && (*wtest)(*p)) p--; } @@ -248,117 +251,83 @@ c__prev_word(char *p, char *low, int n, if (p < low) p = low; /* cp now points where we want it */ - return (p); + return p; } /* c__next_word(): * Find the next word */ -protected char * -c__next_word(char *p, char *high, int n, int (*wtest)(int)) +protected Char * +c__next_word(Char *p, Char *high, int n, int (*wtest)(Int)) { while (n--) { - while ((p < high) && !(*wtest)((unsigned char) *p)) + while ((p < high) && !(*wtest)(*p)) p++; - while ((p < high) && (*wtest)((unsigned char) *p)) + while ((p < high) && (*wtest)(*p)) p++; } if (p > high) p = high; /* p now points where we want it */ - return (p); + return p; } /* cv_next_word(): * Find the next word vi style */ -protected char * -cv_next_word(EditLine *el, char *p, char *high, int n, int (*wtest)(int)) +protected Char * +cv_next_word(EditLine *el, Char *p, Char *high, int n, int (*wtest)(Int)) { int test; while (n--) { - test = (*wtest)((unsigned char) *p); - while ((p < high) && (*wtest)((unsigned char) *p) == test) + test = (*wtest)(*p); + while ((p < high) && (*wtest)(*p) == test) p++; /* * vi historically deletes with cw only the word preserving the * trailing whitespace! This is not what 'w' does.. */ if (n || el->el_chared.c_vcmd.action != (DELETE|INSERT)) - while ((p < high) && isspace((unsigned char) *p)) + while ((p < high) && Isspace(*p)) p++; } /* p now points where we want it */ if (p > high) - return (high); + return high; else - return (p); + return p; } /* cv_prev_word(): * Find the previous word vi style */ -protected char * -cv_prev_word(char *p, char *low, int n, int (*wtest)(int)) +protected Char * +cv_prev_word(Char *p, Char *low, int n, int (*wtest)(Int)) { int test; p--; while (n--) { - while ((p > low) && isspace((unsigned char) *p)) + while ((p > low) && Isspace(*p)) p--; - test = (*wtest)((unsigned char) *p); - while ((p >= low) && (*wtest)((unsigned char) *p) == test) + test = (*wtest)(*p); + while ((p >= low) && (*wtest)(*p) == test) p--; } p++; /* p now points where we want it */ if (p < low) - return (low); + return low; else - return (p); + return p; } -#ifdef notdef -/* c__number(): - * Ignore character p points to, return number appearing after that. - * A '$' by itself means a big number; "$-" is for negative; '^' means 1. - * Return p pointing to last char used. - */ -protected char * -c__number( - char *p, /* character position */ - int *num, /* Return value */ - int dval) /* dval is the number to subtract from like $-3 */ -{ - int i; - int sign = 1; - - if (*++p == '^') { - *num = 1; - return (p); - } - if (*p == '$') { - if (*++p != '-') { - *num = 0x7fffffff; /* Handle $ */ - return (--p); - } - sign = -1; /* Handle $- */ - ++p; - } - for (i = 0; isdigit((unsigned char) *p); i = 10 * i + *p++ - '0') - continue; - *num = (sign < 0 ? dval - i : i); - return (--p); -} -#endif - /* cv_delfini(): * Finish vi delete action */ @@ -397,48 +366,26 @@ cv_delfini(EditLine *el) } -#ifdef notdef -/* ce__endword(): - * Go to the end of this word according to emacs - */ -protected char * -ce__endword(char *p, char *high, int n) -{ - p++; - - while (n--) { - while ((p < high) && isspace((unsigned char) *p)) - p++; - while ((p < high) && !isspace((unsigned char) *p)) - p++; - } - - p--; - return (p); -} -#endif - - /* cv__endword(): * Go to the end of this word according to vi */ -protected char * -cv__endword(char *p, char *high, int n, int (*wtest)(int)) +protected Char * +cv__endword(Char *p, Char *high, int n, int (*wtest)(Int)) { int test; p++; while (n--) { - while ((p < high) && isspace((unsigned char) *p)) + while ((p < high) && Isspace(*p)) p++; - test = (*wtest)((unsigned char) *p); - while ((p < high) && (*wtest)((unsigned char) *p) == test) + test = (*wtest)(*p); + while ((p < high) && (*wtest)(*p) == test) p++; } p--; - return (p); + return p; } /* ch_init(): @@ -449,24 +396,29 @@ ch_init(EditLine *el) { c_macro_t *ma = &el->el_chared.c_macro; - el->el_line.buffer = (char *) el_malloc(EL_BUFSIZ); + el->el_line.buffer = el_malloc(EL_BUFSIZ * + sizeof(*el->el_line.buffer)); if (el->el_line.buffer == NULL) - return (-1); + return -1; - (void) memset(el->el_line.buffer, 0, EL_BUFSIZ); + (void) memset(el->el_line.buffer, 0, EL_BUFSIZ * + sizeof(*el->el_line.buffer)); el->el_line.cursor = el->el_line.buffer; el->el_line.lastchar = el->el_line.buffer; el->el_line.limit = &el->el_line.buffer[EL_BUFSIZ - EL_LEAVE]; - el->el_chared.c_undo.buf = (char *) el_malloc(EL_BUFSIZ); + el->el_chared.c_undo.buf = el_malloc(EL_BUFSIZ * + sizeof(*el->el_chared.c_undo.buf)); if (el->el_chared.c_undo.buf == NULL) - return (-1); - (void) memset(el->el_chared.c_undo.buf, 0, EL_BUFSIZ); + return -1; + (void) memset(el->el_chared.c_undo.buf, 0, EL_BUFSIZ * + sizeof(*el->el_chared.c_undo.buf)); el->el_chared.c_undo.len = -1; el->el_chared.c_undo.cursor = 0; - el->el_chared.c_redo.buf = (char *) el_malloc(EL_BUFSIZ); + el->el_chared.c_redo.buf = el_malloc(EL_BUFSIZ * + sizeof(*el->el_chared.c_redo.buf)); if (el->el_chared.c_redo.buf == NULL) - return (-1); + return -1; el->el_chared.c_redo.pos = el->el_chared.c_redo.buf; el->el_chared.c_redo.lim = el->el_chared.c_redo.buf + EL_BUFSIZ; el->el_chared.c_redo.cmd = ED_UNASSIGNED; @@ -474,12 +426,18 @@ ch_init(EditLine *el) el->el_chared.c_vcmd.action = NOP; el->el_chared.c_vcmd.pos = el->el_line.buffer; - el->el_chared.c_kill.buf = (char *) el_malloc(EL_BUFSIZ); + el->el_chared.c_kill.buf = el_malloc(EL_BUFSIZ * + sizeof(*el->el_chared.c_kill.buf)); if (el->el_chared.c_kill.buf == NULL) - return (-1); - (void) memset(el->el_chared.c_kill.buf, 0, EL_BUFSIZ); + return -1; + (void) memset(el->el_chared.c_kill.buf, 0, EL_BUFSIZ * + sizeof(*el->el_chared.c_kill.buf)); el->el_chared.c_kill.mark = el->el_line.buffer; el->el_chared.c_kill.last = el->el_chared.c_kill.buf; + el->el_chared.c_resizefun = NULL; + el->el_chared.c_resizearg = NULL; + el->el_chared.c_aliasfun = NULL; + el->el_chared.c_aliasarg = NULL; el->el_map.current = el->el_map.key; @@ -491,10 +449,10 @@ ch_init(EditLine *el) ma->level = -1; ma->offset = 0; - ma->macro = (char **) el_malloc(EL_MAXMACRO * sizeof(char *)); + ma->macro = el_malloc(EL_MAXMACRO * sizeof(*ma->macro)); if (ma->macro == NULL) - return (-1); - return (0); + return -1; + return 0; } /* ch_reset(): @@ -533,7 +491,7 @@ ch__clearmacro(EditLine *el) { c_macro_t *ma = &el->el_chared.c_macro; while (ma->level >= 0) - el_free((ptr_t)ma->macro[ma->level--]); + el_free(ma->macro[ma->level--]); } /* ch_enlargebufs(): @@ -544,9 +502,9 @@ protected int ch_enlargebufs(EditLine *el, size_t addlen) { size_t sz, newsz; - char *newbuffer, *oldbuf, *oldkbuf; + Char *newbuffer, *oldbuf, *oldkbuf; - sz = el->el_line.limit - el->el_line.buffer + EL_LEAVE; + sz = (size_t)(el->el_line.limit - el->el_line.buffer + EL_LEAVE); newsz = sz * 2; /* * If newly required length is longer than current buffer, we need @@ -560,12 +518,12 @@ ch_enlargebufs(EditLine *el, size_t addl /* * Reallocate line buffer. */ - newbuffer = el_realloc(el->el_line.buffer, newsz); + newbuffer = el_realloc(el->el_line.buffer, newsz * sizeof(*newbuffer)); if (!newbuffer) return 0; /* zero the newly added memory, leave old data in */ - (void) memset(&newbuffer[sz], 0, newsz - sz); + (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); oldbuf = el->el_line.buffer; @@ -578,12 +536,13 @@ ch_enlargebufs(EditLine *el, size_t addl /* * Reallocate kill buffer. */ - newbuffer = el_realloc(el->el_chared.c_kill.buf, newsz); + newbuffer = el_realloc(el->el_chared.c_kill.buf, newsz * + sizeof(*newbuffer)); if (!newbuffer) return 0; /* zero the newly added memory, leave old data in */ - (void) memset(&newbuffer[sz], 0, newsz - sz); + (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); oldkbuf = el->el_chared.c_kill.buf; @@ -596,15 +555,17 @@ ch_enlargebufs(EditLine *el, size_t addl /* * Reallocate undo buffer. */ - newbuffer = el_realloc(el->el_chared.c_undo.buf, newsz); + newbuffer = el_realloc(el->el_chared.c_undo.buf, + newsz * sizeof(*newbuffer)); if (!newbuffer) return 0; /* zero the newly added memory, leave old data in */ - (void) memset(&newbuffer[sz], 0, newsz - sz); + (void) memset(&newbuffer[sz], 0, (newsz - sz) * sizeof(*newbuffer)); el->el_chared.c_undo.buf = newbuffer; - newbuffer = el_realloc(el->el_chared.c_redo.buf, newsz); + newbuffer = el_realloc(el->el_chared.c_redo.buf, + newsz * sizeof(*newbuffer)); if (!newbuffer) return 0; el->el_chared.c_redo.pos = newbuffer + @@ -618,6 +579,8 @@ ch_enlargebufs(EditLine *el, size_t addl /* Safe to set enlarged buffer size */ el->el_line.limit = &el->el_line.buffer[newsz - EL_LEAVE]; + if (el->el_chared.c_resizefun) + (*el->el_chared.c_resizefun)(el, el->el_chared.c_resizearg); return 1; } @@ -627,20 +590,20 @@ ch_enlargebufs(EditLine *el, size_t addl protected void ch_end(EditLine *el) { - el_free((ptr_t) el->el_line.buffer); + el_free(el->el_line.buffer); el->el_line.buffer = NULL; el->el_line.limit = NULL; - el_free((ptr_t) el->el_chared.c_undo.buf); + el_free(el->el_chared.c_undo.buf); el->el_chared.c_undo.buf = NULL; - el_free((ptr_t) el->el_chared.c_redo.buf); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 07:48: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 B96E2D64; Fri, 9 Jan 2015 07:48: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 A64DFEA2; Fri, 9 Jan 2015 07:48: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 t097mN7n003096; Fri, 9 Jan 2015 07:48:23 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t097mNOU003095; Fri, 9 Jan 2015 07:48:23 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501090748.t097mNOU003095@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 9 Jan 2015 07:48:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276882 - 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.18-1 Precedence: list List-Id: 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, 09 Jan 2015 07:48:23 -0000 Author: bapt Date: Fri Jan 9 07:48:22 2015 New Revision: 276882 URL: https://svnweb.freebsd.org/changeset/base/276882 Log: Remove junk added during testing phase Modified: head/lib/libedit/eln.c Modified: head/lib/libedit/eln.c ============================================================================== --- head/lib/libedit/eln.c Fri Jan 9 07:40:56 2015 (r276881) +++ head/lib/libedit/eln.c Fri Jan 9 07:48:22 2015 (r276882) @@ -77,7 +77,6 @@ public const char * el_gets(EditLine *el, int *nread) { const wchar_t *tmp; - const char *ret; int nwread; *nread = 0; From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 10:59: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 A0045B4; Fri, 9 Jan 2015 10:59: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 81D98391; Fri, 9 Jan 2015 10:59: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 t09Axooh091817; Fri, 9 Jan 2015 10:59:50 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09Axog3091816; Fri, 9 Jan 2015 10:59:50 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501091059.t09Axog3091816@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 9 Jan 2015 10:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276883 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 10:59:50 -0000 Author: trasz Date: Fri Jan 9 10:59:49 2015 New Revision: 276883 URL: https://svnweb.freebsd.org/changeset/base/276883 Log: Improve documentation for autofs variables and executable maps; also some markup fixes. Differential Revision: https://reviews.freebsd.org/D1447 MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/autofs/auto_master.5 Modified: head/usr.sbin/autofs/auto_master.5 ============================================================================== --- head/usr.sbin/autofs/auto_master.5 Fri Jan 9 07:48:22 2015 (r276882) +++ head/usr.sbin/autofs/auto_master.5 Fri Jan 9 10:59:49 2015 (r276883) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2014 +.Dd January 9, 2015 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -172,6 +172,42 @@ This is typically used with wildcards, l .Li * 192.168.1.1:/share/& .Ed .Pp +The +.Ar location +field may contain references to variables, like: +.Bd -literal -offset indent +.Li sys 192.168.1.1:/sys/${OSNAME} +.Ed +.Pp +Defined variables are: +.Pp +.Bl -tag -width "-OSNAME" -compact +.It Li ARCH +Expands to the output of +.Li "uname -p" . +.It Li CPU +Same as ARCH. +.It Li HOST +Expands to the output of +.Li "uname -n" . +.It Li OSNAME +Expands to the output of +.Li "uname -s" . +.It Li OSREL +Expands to the output of +.Li "uname -r" . +.It Li OSVERS +Expands to the output of +.Li "uname -v" . +.El +.Pp +Additional variables can be defined with the +.Fl D +option of +.Xr automount 8 +and +.Xr automountd 8 . +.Pp To pass a location that begins with .Li / , prefix it with a colon. @@ -217,8 +253,10 @@ Query the remote NFS server and map expo This map is traditionally mounted on .Pa /net . Access to files on a remote NFS server is provided through the -.Pa /net/nfs-server-ip/share-name/ +.Pf /net/ Ar nfs-server-ip Ns / Ns Ar share-name Ns/ directory without any additional configuration. +Directories for individual NFS servers are not present until the first access, +when they are automatically created. .It Li -media Query devices that are not yet mounted, but contain valid filesystems. Generally used to access files on removable media. @@ -227,13 +265,27 @@ Prevent .Xr automountd 8 from mounting anything on the mountpoint. .El +.Pp +It is possible to add custom special maps by adding them, as executable +maps named +.Pa special_foo , +to the +.Pa /etc/autofs/ +directory. .Sh EXECUTABLE MAPS If the map file specified in .Nm -has execute bit set, the +has the execute bit set, .Xr automountd 8 will execute it and parse the standard output instead of parsing the file contents. +When called without command line arguments, the executable is +expected to output a list of available map keys separated by +newline characters. +Otherwise, the executable will be called with a key name as +a command line argument. +Output from the executable is expected to be the entry for that key, +not including the key itself. .Sh INDIRECT VERSUS DIRECT MAPS Indirect maps are referred to in .Nm @@ -300,6 +352,9 @@ It can be symlinked to The default location of the .Pa auto_master file. +.It Pa /etc/autofs/ +Directory containing shell scripts to implement special maps and directory +services. .El .Sh SEE ALSO .Xr autofs 5 , From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 12:08: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 57E2DE38; Fri, 9 Jan 2015 12:08: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 43077C61; Fri, 9 Jan 2015 12:08: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 t09C8qu9025073; Fri, 9 Jan 2015 12:08:52 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09C8qJD025072; Fri, 9 Jan 2015 12:08:52 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501091208.t09C8qJD025072@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Fri, 9 Jan 2015 12:08:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276884 - 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.18-1 Precedence: list List-Id: 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, 09 Jan 2015 12:08:52 -0000 Author: rwatson Date: Fri Jan 9 12:08:51 2015 New Revision: 276884 URL: https://svnweb.freebsd.org/changeset/base/276884 Log: Remove a 'This is dumb' comment that has been incorrect for at least a decade: m_pulldown() is willing to consider ordinary mbufs writable. Retain another, related, and also outdated comment, but with a caveat that it is partially stale. Do not, for now, address the problem that it raises (that only EXT_CLUSTER external storage is considered writable, regardless of the results of M_WRITABLE() on the mbuf). MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/uipc_mbuf2.c Modified: head/sys/kern/uipc_mbuf2.c ============================================================================== --- head/sys/kern/uipc_mbuf2.c Fri Jan 9 10:59:49 2015 (r276883) +++ head/sys/kern/uipc_mbuf2.c Fri Jan 9 12:08:51 2015 (r276884) @@ -131,6 +131,8 @@ m_pulldown(struct mbuf *m, int off, int } /* + * The following comment is dated but still partially applies: + * * XXX: This code is flawed because it considers a "writable" mbuf * data region to require all of the following: * (i) mbuf _has_ to have M_EXT set; if it is just a regular @@ -148,10 +150,6 @@ m_pulldown(struct mbuf *m, int off, int * M_WRITABLE(). For now, we only evaluate once at the beginning and * live with this. */ - /* - * XXX: This is dumb. If we're just a regular mbuf with no M_EXT, - * then we're not "writable," according to this code. - */ writable = 0; if ((n->m_flags & M_EXT) == 0 || (n->m_ext.ext_type == EXT_CLUSTER && M_WRITABLE(n))) From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 12:26:09 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 76E42206; Fri, 9 Jan 2015 12:26:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62546E17; Fri, 9 Jan 2015 12:26:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t09CQ9jB034047; Fri, 9 Jan 2015 12:26:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09CQ9EL034046; Fri, 9 Jan 2015 12:26:09 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501091226.t09CQ9EL034046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 9 Jan 2015 12:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276885 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 12:26:09 -0000 Author: glebius Date: Fri Jan 9 12:26:08 2015 New Revision: 276885 URL: https://svnweb.freebsd.org/changeset/base/276885 Log: Use nitems(). Modified: head/sys/dev/mii/truephy.c Modified: head/sys/dev/mii/truephy.c ============================================================================== --- head/sys/dev/mii/truephy.c Fri Jan 9 12:08:51 2015 (r276884) +++ head/sys/dev/mii/truephy.c Fri Jan 9 12:26:08 2015 (r276885) @@ -244,9 +244,7 @@ truephy_reset(struct mii_softc *sc) PHY_WRITE(sc, TRUEPHY_CTRL, TRUEPHY_CTRL_DIAG | TRUEPHY_CTRL_RSV1 | TRUEPHY_CTRL_RSV0); -#define N(arr) (int)(sizeof(arr) / sizeof(arr[0])) - - for (i = 0; i < N(truephy_dspcode); ++i) { + for (i = 0; i < nitems(truephy_dspcode); ++i) { const struct truephy_dsp *dsp = &truephy_dspcode[i]; PHY_WRITE(sc, TRUEPHY_INDEX, dsp->index); @@ -256,8 +254,6 @@ truephy_reset(struct mii_softc *sc) PHY_READ(sc, TRUEPHY_DATA); } -#undef N - PHY_READ(sc, MII_BMCR); PHY_READ(sc, TRUEPHY_CTRL); PHY_WRITE(sc, MII_BMCR, BMCR_AUTOEN | BMCR_S1000); From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 12:56: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 A8DB5BC0; Fri, 9 Jan 2015 12:56: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 9388C12E; Fri, 9 Jan 2015 12:56: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 t09Cuqmf048766; Fri, 9 Jan 2015 12:56:52 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09Cup6f048763; Fri, 9 Jan 2015 12:56:51 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501091256.t09Cup6f048763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 9 Jan 2015 12:56:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276886 - in head/sys: net 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.18-1 Precedence: list List-Id: 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, 09 Jan 2015 12:56:52 -0000 Author: melifaro Date: Fri Jan 9 12:56:51 2015 New Revision: 276886 URL: https://svnweb.freebsd.org/changeset/base/276886 Log: * Deal with ARCNET L2 multicast mapping for IPv6 the same way as in IPv4: handle it in arc_output() instead of nd6_storelladdr(). * Remove IFT_ARCNET check from arpresolve() since arc_output() does not use arpresolve() to handle broadcast/multicast. This check was there since r84931. It looks like it was not used since r89099 (initial import of Arcnet support where multicast is handled separately). * Remove IFT_IEEE1394 case from nd6_storelladdr() since firewire_output() calles nd6_storelladdr() for unicast addresses only. * Remove IFT_ARCNET case from nd6_storelladdr() since arc_output() now handles multicast by itself. As a result, we have the following pattern: all non-ethernet-style media have their own multicast map handling inside their appropriate routines. On the other hand, arpresolve() (and nd6_storelladdr()) which meant to be 'generic' ones de-facto handles ethernet-only multicast maps. MFC after: 3 weeks Modified: head/sys/net/if_arcsubr.c head/sys/netinet/if_ether.c head/sys/netinet6/nd6.c Modified: head/sys/net/if_arcsubr.c ============================================================================== --- head/sys/net/if_arcsubr.c Fri Jan 9 12:26:08 2015 (r276885) +++ head/sys/net/if_arcsubr.c Fri Jan 9 12:56:51 2015 (r276886) @@ -167,7 +167,10 @@ arc_output(struct ifnet *ifp, struct mbu #endif #ifdef INET6 case AF_INET6: - error = nd6_storelladdr(ifp, m, dst, (u_char *)&adst, NULL); + if ((m->m_flags & M_MCAST) != NULL) + adst = arcbroadcastaddr; /* ARCnet broadcast address */ + else + error = nd6_storelladdr(ifp, m, dst, (u_char *)&adst, NULL); if (error) return (error); atype = ARCTYPE_INET6; Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Fri Jan 9 12:26:08 2015 (r276885) +++ head/sys/netinet/if_ether.c Fri Jan 9 12:56:51 2015 (r276886) @@ -317,7 +317,7 @@ arpresolve(struct ifnet *ifp, int is_gw, ifp->if_broadcastaddr, ifp->if_addrlen); return (0); } - if (m->m_flags & M_MCAST && ifp->if_type != IFT_ARCNET) { + if (m->m_flags & M_MCAST) { /* multicast */ ETHER_MAP_IP_MULTICAST(&SIN(dst)->sin_addr, desten); return (0); Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Fri Jan 9 12:26:08 2015 (r276885) +++ head/sys/netinet6/nd6.c Fri Jan 9 12:56:51 2015 (r276886) @@ -2213,8 +2213,6 @@ nd6_storelladdr(struct ifnet *ifp, struc *pflags = 0; IF_AFDATA_UNLOCK_ASSERT(ifp); if (m != NULL && m->m_flags & M_MCAST) { - int i; - switch (ifp->if_type) { case IFT_ETHER: case IFT_FDDI: @@ -2229,17 +2227,6 @@ nd6_storelladdr(struct ifnet *ifp, struc ETHER_MAP_IPV6_MULTICAST(&SIN6(dst)->sin6_addr, desten); return (0); - case IFT_IEEE1394: - /* - * netbsd can use if_broadcastaddr, but we don't do so - * to reduce # of ifdef. - */ - for (i = 0; i < ifp->if_addrlen; i++) - desten[i] = ~0; - return (0); - case IFT_ARCNET: - *desten = 0; - return (0); default: m_freem(m); return (EAFNOSUPPORT); From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 13:14: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 F27A03AC; Fri, 9 Jan 2015 13:14:55 +0000 (UTC) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 97D3033C; Fri, 9 Jan 2015 13:14:55 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id bs8so2178228wib.4; Fri, 09 Jan 2015 05:14:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mGHR+dgTgv6GYndhCp5vExLKmvtDJ+Ie6s05TzJAiMU=; b=ALkw0/eG5XwgkNZsecJP0rHHZioB0k5ndy3e8NzO06ZTkHyhEm/fMzkrEc54Z4ufSc ranKerCo1m1tkFoQTa6EDiwM7B2Lb90maFatVp1kpCBmg/Zfg2WUSMTzRvvjM4dqs7RT Spju+661EWqEsFsEX3IVqH9fFBQBqMC3ZWWicjq4tSRO7Ujli3mf6Cqnru3cVPoAwxX8 slHi7WTdpjIHRpjYxulFN6fFv7DBaDlja0ybbbDVwSFQ1xAPpAzq+JiiDmcNxaBBc/TN I0Qfu+LEFZf91+IjBdIVl192m4RsccPAY6jnpV12JmMFSkPYEk8PSteOwpR+7BJarTq+ onEg== MIME-Version: 1.0 X-Received: by 10.180.74.108 with SMTP id s12mr5202912wiv.28.1420809294033; Fri, 09 Jan 2015 05:14:54 -0800 (PST) Received: by 10.217.60.135 with HTTP; Fri, 9 Jan 2015 05:14:53 -0800 (PST) In-Reply-To: <20150107205203.GI15484@FreeBSD.org> References: <201501061307.t06D7E0a001358@svn.freebsd.org> <20150107205203.GI15484@FreeBSD.org> Date: Fri, 9 Jan 2015 11:14:53 -0200 Message-ID: Subject: Re: svn commit: r276751 - head/sys/netinet From: Luiz Otavio O Souza To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: Luiz Otavio O Souza , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 13:14:56 -0000 On Wed, Jan 7, 2015 at 6:52 PM, Gleb Smirnoff wrote: > On Tue, Jan 06, 2015 at 01:07:14PM +0000, Luiz Otavio O Souza wrote: > L> Author: loos > L> Date: Tue Jan 6 13:07:13 2015 > L> New Revision: 276751 > L> URL: https://svnweb.freebsd.org/changeset/base/276751 > L> > L> Log: > L> Remove the check that prevent carp(4) advskew to be set to '0'. > L> > L> CARP devices are created with advskew set to '0' and once you set it to > L> any other value in the valid range (0..254) you can't set it back to zero. > L> > L> The code in question is also used to prevent that zeroed values overwrite > L> the CARP defaults when a new CARP device is created. Since advskew already > L> defaults to '0' for newly created devices and the new value is guaranteed > L> to be within the valid range, it is safe to overwrite it here. > L> > L> PR: 194672 > L> Reported by: cmb@pfsense.org > L> In collaboration with: garga > L> Tested by: garga > L> MFC after: 2 weeks > > Please correct me if I am wrong, but after this change any SIOCSVH will reset > the advskew to 0. > > For example, please try to: > > ifconfig igb0 vhid 1 advskew 100 > ifconfig igb0 vhid 1 pass foobar > > Now let's check the advskew: > > ifconfig igb0 Only if the SIOCSVH request is not initialized with data from SIOCGVH. ifconfig (at setcarp_callback()) will always read the existing values before issuing the SIOCSVH with the new values and this is what makes my change safe: # ifconfig em0 vhid 1 advskew 100 192.168.100.1/24 alias # ifconfig em0 | grep carp carp: MASTER vhid 1 advbase 1 advskew 100 # ifconfig em0 vhid 1 pass foobar # ifconfig em0 | grep carp carp: MASTER vhid 1 advbase 1 advskew 100 # ifconfig em0 vhid 1 advbase 5 # ifconfig em0 | grep carp carp: MASTER vhid 1 advbase 5 advskew 100 # ifconfig em0 vhid 1 advskew 0 # ifconfig em0 | grep carp carp: MASTER vhid 1 advbase 5 advskew 0 Luiz From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 14:50: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 B5734704; Fri, 9 Jan 2015 14:50: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 A0412E6A; Fri, 9 Jan 2015 14:50: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 t09EoAAY003258; Fri, 9 Jan 2015 14:50:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09Eo9FK003250; Fri, 9 Jan 2015 14:50:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501091450.t09Eo9FK003250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 9 Jan 2015 14:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276887 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 14:50:10 -0000 Author: emaste Date: Fri Jan 9 14:50:08 2015 New Revision: 276887 URL: https://svnweb.freebsd.org/changeset/base/276887 Log: ANSIfy sys/fs/msdosfs There are a number of msdosfs improvements in NetBSD that may be worth bringing over, and this reduces noise in the comparison. Differential Revision: https://reviews.freebsd.org/D1466 Reviewed by: kib Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/msdosfs/msdosfs_conv.c head/sys/fs/msdosfs/msdosfs_denode.c head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_fileno.c head/sys/fs/msdosfs/msdosfs_lookup.c head/sys/fs/msdosfs/msdosfs_vnops.c Modified: head/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_conv.c Fri Jan 9 12:56:51 2015 (r276886) +++ head/sys/fs/msdosfs/msdosfs_conv.c Fri Jan 9 14:50:08 2015 (r276887) @@ -234,11 +234,7 @@ l2u[256] = { * null. */ int -dos2unixfn(dn, un, lower, pmp) - u_char dn[11]; - u_char *un; - int lower; - struct msdosfsmount *pmp; +dos2unixfn(u_char dn[11], u_char *un, int lower, struct msdosfsmount *pmp) { size_t i; int thislong = 0; Modified: head/sys/fs/msdosfs/msdosfs_denode.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_denode.c Fri Jan 9 12:56:51 2015 (r276886) +++ head/sys/fs/msdosfs/msdosfs_denode.c Fri Jan 9 14:50:08 2015 (r276887) @@ -92,11 +92,8 @@ de_vncmpf(struct vnode *vp, void *arg) * depp - returns the address of the gotten denode. */ int -deget(pmp, dirclust, diroffset, depp) - struct msdosfsmount *pmp; /* so we know the maj/min number */ - u_long dirclust; /* cluster this dir entry came from */ - u_long diroffset; /* index of entry within the cluster */ - struct denode **depp; /* returns the addr of the gotten denode */ +deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, + struct denode **depp) { int error; uint64_t inode; @@ -284,9 +281,7 @@ deget(pmp, dirclust, diroffset, depp) } int -deupdat(dep, waitfor) - struct denode *dep; - int waitfor; +deupdat(struct denode *dep, int waitfor) { struct direntry dir; struct timespec ts; @@ -334,11 +329,7 @@ deupdat(dep, waitfor) * Truncate the file described by dep to the length specified by length. */ int -detrunc(dep, length, flags, cred) - struct denode *dep; - u_long length; - int flags; - struct ucred *cred; +detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred) { int error; int allerror; @@ -477,10 +468,7 @@ detrunc(dep, length, flags, cred) * Extend the file described by dep to length specified by length. */ int -deextend(dep, length, cred) - struct denode *dep; - u_long length; - struct ucred *cred; +deextend(struct denode *dep, u_long length, struct ucred *cred) { struct msdosfsmount *pmp = dep->de_pmp; u_long count; @@ -525,8 +513,7 @@ deextend(dep, length, cred) * been moved to a new directory. */ void -reinsert(dep) - struct denode *dep; +reinsert(struct denode *dep) { struct vnode *vp; @@ -549,10 +536,7 @@ reinsert(dep) } int -msdosfs_reclaim(ap) - struct vop_reclaim_args /* { - struct vnode *a_vp; - } */ *ap; +msdosfs_reclaim(struct vop_reclaim_args *ap) { struct vnode *vp = ap->a_vp; struct denode *dep = VTODE(vp); @@ -583,11 +567,7 @@ msdosfs_reclaim(ap) } int -msdosfs_inactive(ap) - struct vop_inactive_args /* { - struct vnode *a_vp; - struct thread *a_td; - } */ *ap; +msdosfs_inactive(struct vop_inactive_args *ap) { struct vnode *vp = ap->a_vp; struct denode *dep = VTODE(vp); Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Fri Jan 9 12:56:51 2015 (r276886) +++ head/sys/fs/msdosfs/msdosfs_fat.c Fri Jan 9 14:50:08 2015 (r276887) @@ -82,12 +82,8 @@ static int clusteralloc1(struct msdosfsm u_long *got); static void -fatblock(pmp, ofs, bnp, sizep, bop) - struct msdosfsmount *pmp; - u_long ofs; - u_long *bnp; - u_long *sizep; - u_long *bop; +fatblock(struct msdosfsmount *pmp, u_long ofs, u_long *bnp, u_long *sizep, + u_long *bop) { u_long bn, size; @@ -123,12 +119,7 @@ fatblock(pmp, ofs, bnp, sizep, bop) * If cnp is null, nothing is returned. */ int -pcbmap(dep, findcn, bnp, cnp, sp) - struct denode *dep; - u_long findcn; /* file relative cluster to get */ - daddr_t *bnp; /* returned filesys relative blk number */ - u_long *cnp; /* returned cluster number */ - int *sp; /* returned block size */ +pcbmap(struct denode *dep, u_long findcn, daddr_t *bnp, u_long *cnp, int *sp) { int error; u_long i; @@ -260,11 +251,7 @@ hiteof:; * for. */ static void -fc_lookup(dep, findcn, frcnp, fsrcnp) - struct denode *dep; - u_long findcn; - u_long *frcnp; - u_long *fsrcnp; +fc_lookup(struct denode *dep, u_long findcn, u_long *frcnp, u_long *fsrcnp) { int i; u_long cn; @@ -290,9 +277,7 @@ fc_lookup(dep, findcn, frcnp, fsrcnp) * relative cluster frcn and beyond. */ void -fc_purge(dep, frcn) - struct denode *dep; - u_int frcn; +fc_purge(struct denode *dep, u_int frcn) { int i; struct fatcache *fcp; @@ -316,10 +301,7 @@ fc_purge(dep, frcn) * fatbn - block number relative to begin of filesystem of the modified fat block. */ static void -updatefats(pmp, bp, fatbn) - struct msdosfsmount *pmp; - struct buf *bp; - u_long fatbn; +updatefats(struct msdosfsmount *pmp, struct buf *bp, u_long fatbn) { struct buf *bpn; int cleanfat, i; @@ -392,9 +374,7 @@ updatefats(pmp, bp, fatbn) * */ static __inline void -usemap_alloc(pmp, cn) - struct msdosfsmount *pmp; - u_long cn; +usemap_alloc(struct msdosfsmount *pmp, u_long cn) { MSDOSFS_ASSERT_MP_LOCKED(pmp); @@ -409,9 +389,7 @@ usemap_alloc(pmp, cn) } static __inline void -usemap_free(pmp, cn) - struct msdosfsmount *pmp; - u_long cn; +usemap_free(struct msdosfsmount *pmp, u_long cn) { MSDOSFS_ASSERT_MP_LOCKED(pmp); @@ -424,10 +402,7 @@ usemap_free(pmp, cn) } int -clusterfree(pmp, cluster, oldcnp) - struct msdosfsmount *pmp; - u_long cluster; - u_long *oldcnp; +clusterfree(struct msdosfsmount *pmp, u_long cluster, u_long *oldcnp) { int error; u_long oldcn; @@ -468,12 +443,7 @@ clusterfree(pmp, cluster, oldcnp) * the msdosfsmount structure. This is left to the caller. */ int -fatentry(function, pmp, cn, oldcontents, newcontents) - int function; - struct msdosfsmount *pmp; - u_long cn; - u_long *oldcontents; - u_long newcontents; +fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents, u_long newcontents) { int error; u_long readcn; @@ -580,11 +550,7 @@ fatentry(function, pmp, cn, oldcontents, * fillwith - what to write into fat entry of last cluster */ static int -fatchain(pmp, start, count, fillwith) - struct msdosfsmount *pmp; - u_long start; - u_long count; - u_long fillwith; +fatchain(struct msdosfsmount *pmp, u_long start, u_long count, u_long fillwith) { int error; u_long bn, bo, bsize, byteoffset, readcn, newc; @@ -655,10 +621,7 @@ fatchain(pmp, start, count, fillwith) * count - maximum interesting length */ static int -chainlength(pmp, start, count) - struct msdosfsmount *pmp; - u_long start; - u_long count; +chainlength(struct msdosfsmount *pmp, u_long start, u_long count) { u_long idx, max_idx; u_int map; @@ -703,13 +666,8 @@ chainlength(pmp, start, count) * got - how many clusters were actually allocated. */ static int -chainalloc(pmp, start, count, fillwith, retcluster, got) - struct msdosfsmount *pmp; - u_long start; - u_long count; - u_long fillwith; - u_long *retcluster; - u_long *got; +chainalloc(struct msdosfsmount *pmp, u_long start, u_long count, + u_long fillwith, u_long *retcluster, u_long *got) { int error; u_long cl, n; @@ -836,9 +794,7 @@ clusteralloc1(struct msdosfsmount *pmp, * freed. */ int -freeclusterchain(pmp, cluster) - struct msdosfsmount *pmp; - u_long cluster; +freeclusterchain(struct msdosfsmount *pmp, u_long cluster) { int error; struct buf *bp = NULL; @@ -900,8 +856,7 @@ freeclusterchain(pmp, cluster) * found turn off its corresponding bit in the pm_inusemap. */ int -fillinusemap(pmp) - struct msdosfsmount *pmp; +fillinusemap(struct msdosfsmount *pmp) { struct buf *bp = NULL; u_long cn, readcn; @@ -969,12 +924,8 @@ fillinusemap(pmp) * field. This is left for the caller to do. */ int -extendfile(dep, count, bpp, ncp, flags) - struct denode *dep; - u_long count; - struct buf **bpp; - u_long *ncp; - int flags; +extendfile(struct denode *dep, u_long count, struct buf **bpp, u_long *ncp, + int flags) { int error; u_long frcn; Modified: head/sys/fs/msdosfs/msdosfs_fileno.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fileno.c Fri Jan 9 12:56:51 2015 (r276886) +++ head/sys/fs/msdosfs/msdosfs_fileno.c Fri Jan 9 14:50:08 2015 (r276887) @@ -68,8 +68,7 @@ static int msdosfs_fileno_compare(struct /* Initialize file number mapping structures. */ void -msdosfs_fileno_init(mp) - struct mount *mp; +msdosfs_fileno_init(struct mount *mp) { struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); @@ -82,8 +81,7 @@ msdosfs_fileno_init(mp) /* Free 32-bit file number generation structures. */ void -msdosfs_fileno_free(mp) - struct mount *mp; +msdosfs_fileno_free(struct mount *mp) { struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); struct msdosfs_fileno *mf, *next; @@ -98,9 +96,7 @@ msdosfs_fileno_free(mp) /* Map a 64-bit file number into a 32-bit one. */ uint32_t -msdosfs_fileno_map(mp, fileno) - struct mount *mp; - uint64_t fileno; +msdosfs_fileno_map(struct mount *mp, uint64_t fileno) { struct msdosfsmount *pmp = VFSTOMSDOSFS(mp); struct msdosfs_fileno key, *mf, *tmf; @@ -142,8 +138,7 @@ msdosfs_fileno_map(mp, fileno) /* Compare by 64-bit file number. */ static int -msdosfs_fileno_compare(fa, fb) - struct msdosfs_fileno *fa, *fb; +msdosfs_fileno_compare(struct msdosfs_fileno *fa, struct msdosfs_fileno *fb) { if (fa->mf_fileno64 > fb->mf_fileno64) Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Fri Jan 9 12:56:51 2015 (r276886) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Fri Jan 9 14:50:08 2015 (r276887) @@ -592,11 +592,8 @@ foundroot: * cnp - componentname needed for Win95 long filenames */ int -createde(dep, ddep, depp, cnp) - struct denode *dep; - struct denode *ddep; - struct denode **depp; - struct componentname *cnp; +createde(struct denode *dep, struct denode *ddep, struct denode **depp, + struct componentname *cnp) { int error; u_long dirclust, diroffset; @@ -725,8 +722,7 @@ createde(dep, ddep, depp, cnp) * return 0 if not empty or error. */ int -dosdirempty(dep) - struct denode *dep; +dosdirempty(struct denode *dep) { int blsize; int error; @@ -802,9 +798,7 @@ dosdirempty(dep) * The target inode is always unlocked on return. */ int -doscheckpath(source, target) - struct denode *source; - struct denode *target; +doscheckpath(struct denode *source, struct denode *target) { daddr_t scn; struct msdosfsmount *pmp; @@ -893,11 +887,8 @@ out:; * directory entry within the block. */ int -readep(pmp, dirclust, diroffset, bpp, epp) - struct msdosfsmount *pmp; - u_long dirclust, diroffset; - struct buf **bpp; - struct direntry **epp; +readep(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, + struct buf **bpp, struct direntry **epp) { int error; daddr_t bn; @@ -924,10 +915,7 @@ readep(pmp, dirclust, diroffset, bpp, ep * entry within the block. */ int -readde(dep, bpp, epp) - struct denode *dep; - struct buf **bpp; - struct direntry **epp; +readde(struct denode *dep, struct buf **bpp, struct direntry **epp) { return (readep(dep->de_pmp, dep->de_dirclust, dep->de_diroffset, @@ -943,9 +931,7 @@ readde(dep, bpp, epp) * msdosfs_reclaim() which will remove the denode from the denode cache. */ int -removede(pdep, dep) - struct denode *pdep; /* directory where the entry is removed */ - struct denode *dep; /* file to be removed */ +removede(struct denode *pdep, struct denode *dep) { int error; struct direntry *ep; @@ -1012,10 +998,7 @@ removede(pdep, dep) * Create a unique DOS name in dvp */ int -uniqdosname(dep, cnp, cp) - struct denode *dep; - struct componentname *cnp; - u_char *cp; +uniqdosname(struct denode *dep,struct componentname *cnp, u_char *cp) { struct msdosfsmount *pmp = dep->de_pmp; struct direntry *dentp; @@ -1081,8 +1064,7 @@ uniqdosname(dep, cnp, cp) * Find any Win'95 long filename entry in directory dep */ int -findwin95(dep) - struct denode *dep; +findwin95(struct denode *dep) { struct msdosfsmount *pmp = dep->de_pmp; struct direntry *dentp; Modified: head/sys/fs/msdosfs/msdosfs_vnops.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_vnops.c Fri Jan 9 12:56:51 2015 (r276886) +++ head/sys/fs/msdosfs/msdosfs_vnops.c Fri Jan 9 14:50:08 2015 (r276887) @@ -127,13 +127,7 @@ static vop_vptofh_t msdosfs_vptofh; * only if the SAVESTART bit in cn_flags is clear on success. */ static int -msdosfs_create(ap) - struct vop_create_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - } */ *ap; +msdosfs_create(struct vop_create_args *ap) { struct componentname *cnp = ap->a_cnp; struct denode ndirent; @@ -193,27 +187,14 @@ bad: } static int -msdosfs_mknod(ap) - struct vop_mknod_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - } */ *ap; +msdosfs_mknod(struct vop_mknod_args *ap) { return (EINVAL); } static int -msdosfs_open(ap) - struct vop_open_args /* { - struct vnode *a_vp; - int a_mode; - struct ucred *a_cred; - struct thread *a_td; - struct file *a_fp; - } */ *ap; +msdosfs_open(struct vop_open_args *ap) { struct denode *dep = VTODE(ap->a_vp); vnode_create_vobject(ap->a_vp, dep->de_FileSize, ap->a_td); @@ -221,13 +202,7 @@ msdosfs_open(ap) } static int -msdosfs_close(ap) - struct vop_close_args /* { - struct vnode *a_vp; - int a_fflag; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +msdosfs_close(struct vop_close_args *ap) { struct vnode *vp = ap->a_vp; struct denode *dep = VTODE(vp); @@ -243,13 +218,7 @@ msdosfs_close(ap) } static int -msdosfs_access(ap) - struct vop_access_args /* { - struct vnode *a_vp; - accmode_t a_accmode; - struct ucred *a_cred; - struct thread *a_td; - } */ *ap; +msdosfs_access(struct vop_access_args *ap) { struct vnode *vp = ap->a_vp; struct denode *dep = VTODE(ap->a_vp); @@ -281,12 +250,7 @@ msdosfs_access(ap) } static int -msdosfs_getattr(ap) - struct vop_getattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - } */ *ap; +msdosfs_getattr(struct vop_getattr_args *ap) { struct denode *dep = VTODE(ap->a_vp); struct msdosfsmount *pmp = dep->de_pmp; @@ -360,12 +324,7 @@ msdosfs_getattr(ap) } static int -msdosfs_setattr(ap) - struct vop_setattr_args /* { - struct vnode *a_vp; - struct vattr *a_vap; - struct ucred *a_cred; - } */ *ap; +msdosfs_setattr(struct vop_setattr_args *ap) { struct vnode *vp = ap->a_vp; struct denode *dep = VTODE(ap->a_vp); @@ -552,13 +511,7 @@ msdosfs_setattr(ap) } static int -msdosfs_read(ap) - struct vop_read_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +msdosfs_read(struct vop_read_args *ap) { int error = 0; int blsize; @@ -653,13 +606,7 @@ msdosfs_read(ap) * Write data to a file or directory. */ static int -msdosfs_write(ap) - struct vop_write_args /* { - struct vnode *a_vp; - struct uio *a_uio; - int a_ioflag; - struct ucred *a_cred; - } */ *ap; +msdosfs_write(struct vop_write_args *ap) { int n; int croffset; @@ -872,13 +819,7 @@ errexit: * Flush the blocks of a file to disk. */ static int -msdosfs_fsync(ap) - struct vop_fsync_args /* { - struct vnode *a_vp; - struct ucred *a_cred; - int a_waitfor; - struct thread *a_td; - } */ *ap; +msdosfs_fsync(struct vop_fsync_args *ap) { struct vnode *devvp; int allerror, error; @@ -912,12 +853,7 @@ msdosfs_fsync(ap) } static int -msdosfs_remove(ap) - struct vop_remove_args /* { - struct vnode *a_dvp; - struct vnode *a_vp; - struct componentname *a_cnp; - } */ *ap; +msdosfs_remove(struct vop_remove_args *ap) { struct denode *dep = VTODE(ap->a_vp); struct denode *ddep = VTODE(ap->a_dvp); @@ -937,12 +873,7 @@ msdosfs_remove(ap) * DOS filesystems don't know what links are. */ static int -msdosfs_link(ap) - struct vop_link_args /* { - struct vnode *a_tdvp; - struct vnode *a_vp; - struct componentname *a_cnp; - } */ *ap; +msdosfs_link(struct vop_link_args *ap) { return (EOPNOTSUPP); } @@ -994,15 +925,7 @@ msdosfs_link(ap) * all denodes should be released */ static int -msdosfs_rename(ap) - struct vop_rename_args /* { - struct vnode *a_fdvp; - struct vnode *a_fvp; - struct componentname *a_fcnp; - struct vnode *a_tdvp; - struct vnode *a_tvp; - struct componentname *a_tcnp; - } */ *ap; +msdosfs_rename(struct vop_rename_args *ap) { struct vnode *tdvp = ap->a_tdvp; struct vnode *fvp = ap->a_fvp; @@ -1363,13 +1286,7 @@ static struct { }; static int -msdosfs_mkdir(ap) - struct vop_mkdir_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struvt componentname *a_cnp; - struct vattr *a_vap; - } */ *ap; +msdosfs_mkdir(struct vop_mkdir_args *ap) { struct componentname *cnp = ap->a_cnp; struct denode *dep; @@ -1480,12 +1397,7 @@ bad2: } static int -msdosfs_rmdir(ap) - struct vop_rmdir_args /* { - struct vnode *a_dvp; - struct vnode *a_vp; - struct componentname *a_cnp; - } */ *ap; +msdosfs_rmdir(struct vop_rmdir_args *ap) { struct vnode *vp = ap->a_vp; struct vnode *dvp = ap->a_dvp; @@ -1539,28 +1451,13 @@ out: * DOS filesystems don't know what symlinks are. */ static int -msdosfs_symlink(ap) - struct vop_symlink_args /* { - struct vnode *a_dvp; - struct vnode **a_vpp; - struct componentname *a_cnp; - struct vattr *a_vap; - char *a_target; - } */ *ap; +msdosfs_symlink(struct vop_symlink_args *ap) { return (EOPNOTSUPP); } static int -msdosfs_readdir(ap) - struct vop_readdir_args /* { - struct vnode *a_vp; - struct uio *a_uio; - struct ucred *a_cred; - int *a_eofflag; - int *a_ncookies; - u_long **a_cookies; - } */ *ap; +msdosfs_readdir(struct vop_readdir_args *ap) { struct mbnambuf nb; int error = 0; @@ -1847,15 +1744,7 @@ out: * a_runb - where to return the "run before" a_bn. */ static int -msdosfs_bmap(ap) - struct vop_bmap_args /* { - struct vnode *a_vp; - daddr_t a_bn; - struct bufobj **a_bop; - daddr_t *a_bnp; - int *a_runp; - int *a_runb; - } */ *ap; +msdosfs_bmap(struct vop_bmap_args *ap) { struct denode *dep; struct mount *mp; @@ -1908,11 +1797,7 @@ msdosfs_bmap(ap) } static int -msdosfs_strategy(ap) - struct vop_strategy_args /* { - struct vnode *a_vp; - struct buf *a_bp; - } */ *ap; +msdosfs_strategy(struct vop_strategy_args *ap) { struct buf *bp = ap->a_bp; struct denode *dep = VTODE(ap->a_vp); @@ -1953,10 +1838,7 @@ msdosfs_strategy(ap) } static int -msdosfs_print(ap) - struct vop_print_args /* { - struct vnode *vp; - } */ *ap; +msdosfs_print(struct vop_print_args *ap) { struct denode *dep = VTODE(ap->a_vp); @@ -1967,12 +1849,7 @@ msdosfs_print(ap) } static int -msdosfs_pathconf(ap) - struct vop_pathconf_args /* { - struct vnode *a_vp; - int a_name; - int *a_retval; - } */ *ap; +msdosfs_pathconf(struct vop_pathconf_args *ap) { struct msdosfsmount *pmp = VTODE(ap->a_vp)->de_pmp; @@ -1999,11 +1876,7 @@ msdosfs_pathconf(ap) } static int -msdosfs_vptofh(ap) - struct vop_vptofh_args /* { - struct vnode *a_vp; - struct fid *a_fhp; - } */ *ap; +msdosfs_vptofh(struct vop_vptofh_args *ap) { struct denode *dep; struct defid *defhp; From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 15:21: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 92CDD14F; Fri, 9 Jan 2015 15:21: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 7EA9A2F5; Fri, 9 Jan 2015 15:21: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 t09FLsH4019833; Fri, 9 Jan 2015 15:21:54 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09FLsfj019832; Fri, 9 Jan 2015 15:21:54 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501091521.t09FLsfj019832@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Fri, 9 Jan 2015 15:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276888 - 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.18-1 Precedence: list List-Id: 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, 09 Jan 2015 15:21:54 -0000 Author: rwatson Date: Fri Jan 9 15:21:53 2015 New Revision: 276888 URL: https://svnweb.freebsd.org/changeset/base/276888 Log: Uninline M_SIZE() in m_align() to reduce direct use of MLEN and MHLEN. Differential Revision: https://reviews.freebsd.org/D1471 Reviewed by: glebius, bz, rpaulo Sponsored by: EMC / Isilon Storage Division Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Fri Jan 9 14:50:08 2015 (r276887) +++ head/sys/sys/mbuf.h Fri Jan 9 15:21:53 2015 (r276888) @@ -848,14 +848,7 @@ m_align(struct mbuf *m, int len) KASSERT(m->m_data == M_START(m), (msg, __func__)); - if (m->m_flags & M_EXT) { - adjust = m->m_ext.ext_size - len; - } else if (m->m_flags & M_PKTHDR) { - adjust = MHLEN - len; - } else { - adjust = MLEN - len; - } - + adjust = M_SIZE(m) - len; m->m_data += adjust &~ (sizeof(long)-1); } From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 18:05: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 A9CABD50; Fri, 9 Jan 2015 18:05: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 963D58E5; Fri, 9 Jan 2015 18:05: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 t09I5pfE096138; Fri, 9 Jan 2015 18:05:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09I5pqt096137; Fri, 9 Jan 2015 18:05:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501091805.t09I5pqt096137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 9 Jan 2015 18:05:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276889 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 18:05:51 -0000 Author: delphij Date: Fri Jan 9 18:05:50 2015 New Revision: 276889 URL: https://svnweb.freebsd.org/changeset/base/276889 Log: Properly remove ieee488, gpib and readline from mtree. Modified: head/etc/mtree/BSD.include.dist Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Fri Jan 9 15:21:53 2015 (r276888) +++ head/etc/mtree/BSD.include.dist Fri Jan 9 18:05:50 2015 (r276889) @@ -120,8 +120,6 @@ .. ic .. - ieee488 - .. iicbus .. io @@ -229,8 +227,6 @@ posix .. .. - gpib - .. gssapi .. infiniband @@ -311,8 +307,6 @@ .. rdma .. - readline - .. rpc .. rpcsvc From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 18:07:09 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 8D4DDEAC; Fri, 9 Jan 2015 18:07:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79E98905; Fri, 9 Jan 2015 18:07:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t09I79pD096440; Fri, 9 Jan 2015 18:07:09 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09I795S096432; Fri, 9 Jan 2015 18:07:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501091807.t09I795S096432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 9 Jan 2015 18:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276890 - 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.18-1 Precedence: list List-Id: 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, 09 Jan 2015 18:07:09 -0000 Author: delphij Date: Fri Jan 9 18:07:08 2015 New Revision: 276890 URL: https://svnweb.freebsd.org/changeset/base/276890 Log: Fixup r276668, /usr/tests/sbin/ifconfig/ shouldn't be removed. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jan 9 18:05:50 2015 (r276889) +++ head/ObsoleteFiles.inc Fri Jan 9 18:07:08 2015 (r276890) @@ -307,7 +307,6 @@ OLD_DIRS+=usr/include/clang/3.4 # 20140505: Bogusly installing src.opts.mk OLD_FILES+=usr/share/mk/src.opts.mk # 20140505: Reject PR kern/187551 -OLD_DIRS+=usr/tests/sbin/ifconfig OLD_FILES+=usr/tests/sbin/ifconfig/fibs_test # 20140502: Removal of lindev(4) OLD_FILES+=usr/share/man/man4/lindev.4.gz From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 18:09: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 0AF8E70A; Fri, 9 Jan 2015 18:09: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 EB5BD940; Fri, 9 Jan 2015 18:09: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 t09I9krm097489; Fri, 9 Jan 2015 18:09:46 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09I9kR8097488; Fri, 9 Jan 2015 18:09:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501091809.t09I9kR8097488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 9 Jan 2015 18:09:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276891 - 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.18-1 Precedence: list List-Id: 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, 09 Jan 2015 18:09:47 -0000 Author: delphij Date: Fri Jan 9 18:09:45 2015 New Revision: 276891 URL: https://svnweb.freebsd.org/changeset/base/276891 Log: var/named/etc/namedb/working should be removed as part of namedb. MFC after: 2 weeks Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jan 9 18:07:08 2015 (r276890) +++ head/ObsoleteFiles.inc Fri Jan 9 18:09:45 2015 (r276891) @@ -725,6 +725,7 @@ OLD_FILES+=var/named/etc/namedb/master/l OLD_FILES+=var/named/etc/namedb/master/localhost-reverse.db #OLD_FILES+=var/named/etc/namedb/named.conf # intentionally left out OLD_FILES+=var/named/etc/namedb/named.root +OLD_DIRS+=var/named/etc/namedb/working OLD_DIRS+=var/named/etc/namedb/slave OLD_DIRS+=var/named/var OLD_DIRS+=var/named/var/dump From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 18:40: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 AAB6DC08; Fri, 9 Jan 2015 18:40: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 8C127C0C; Fri, 9 Jan 2015 18:40: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 t09IeD5L011866; Fri, 9 Jan 2015 18:40:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09IeDge011865; Fri, 9 Jan 2015 18:40:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501091840.t09IeDge011865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 9 Jan 2015 18:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276892 - head/sys/dev/usb/serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 18:40:13 -0000 Author: hselasky Date: Fri Jan 9 18:40:12 2015 New Revision: 276892 URL: https://svnweb.freebsd.org/changeset/base/276892 Log: Add support for USB device side mode to the USB modem driver. MFC after: 1 week Submitted by: br@ Modified: head/sys/dev/usb/serial/umodem.c Modified: head/sys/dev/usb/serial/umodem.c ============================================================================== --- head/sys/dev/usb/serial/umodem.c Fri Jan 9 18:09:45 2015 (r276891) +++ head/sys/dev/usb/serial/umodem.c Fri Jan 9 18:40:12 2015 (r276892) @@ -98,6 +98,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "usbdevs.h" +#include "usb_if.h" #include @@ -116,7 +117,7 @@ SYSCTL_INT(_hw_usb_umodem, OID_AUTO, deb &umodem_debug, 0, "Debug level"); #endif -static const STRUCT_USB_HOST_ID umodem_devs[] = { +static const STRUCT_USB_DUAL_ID umodem_dual_devs[] = { /* Generic Modem class match */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), @@ -124,6 +125,9 @@ static const STRUCT_USB_HOST_ID umodem_d {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(UIPROTO_CDC_NONE)}, +}; + +static const STRUCT_USB_HOST_ID umodem_host_devs[] = { /* Huawei Modem class match */ {USB_VENDOR(USB_VENDOR_HUAWEI),USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), @@ -145,6 +149,7 @@ static const STRUCT_USB_HOST_ID umodem_d enum { UMODEM_BULK_WR, UMODEM_BULK_RD, + UMODEM_INTR_WR, UMODEM_INTR_RD, UMODEM_N_TRANSFER, }; @@ -169,14 +174,19 @@ struct umodem_softc { uint8_t sc_cm_over_data; uint8_t sc_cm_cap; /* CM capabilities */ uint8_t sc_acm_cap; /* ACM capabilities */ + uint8_t sc_line_coding[32]; /* used in USB device mode */ + uint8_t sc_abstract_state[32]; /* used in USB device mode */ }; static device_probe_t umodem_probe; static device_attach_t umodem_attach; static device_detach_t umodem_detach; +static usb_handle_request_t umodem_handle_request; + static void umodem_free_softc(struct umodem_softc *); -static usb_callback_t umodem_intr_callback; +static usb_callback_t umodem_intr_read_callback; +static usb_callback_t umodem_intr_write_callback; static usb_callback_t umodem_write_callback; static usb_callback_t umodem_read_callback; @@ -207,31 +217,45 @@ static const struct usb_config umodem_co [UMODEM_BULK_WR] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_OUT, + .direction = UE_DIR_TX, .if_index = 0, .bufsize = UMODEM_BUF_SIZE, .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, .callback = &umodem_write_callback, + .usb_mode = USB_MODE_DUAL, }, [UMODEM_BULK_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, + .direction = UE_DIR_RX, .if_index = 0, .bufsize = UMODEM_BUF_SIZE, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &umodem_read_callback, + .usb_mode = USB_MODE_DUAL, + }, + + [UMODEM_INTR_WR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_TX, + .if_index = 1, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &umodem_intr_write_callback, + .usb_mode = USB_MODE_DEVICE, }, [UMODEM_INTR_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, + .direction = UE_DIR_RX, .if_index = 1, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, .bufsize = 0, /* use wMaxPacketSize */ - .callback = &umodem_intr_callback, + .callback = &umodem_intr_read_callback, + .usb_mode = USB_MODE_HOST, }, }; @@ -252,6 +276,10 @@ static const struct ucom_callback umodem }; static device_method_t umodem_methods[] = { + /* USB interface */ + DEVMETHOD(usb_handle_request, umodem_handle_request), + + /* Device interface */ DEVMETHOD(device_probe, umodem_probe), DEVMETHOD(device_attach, umodem_attach), DEVMETHOD(device_detach, umodem_detach), @@ -279,13 +307,14 @@ umodem_probe(device_t dev) DPRINTFN(11, "\n"); - if (uaa->usb_mode != USB_MODE_HOST) - return (ENXIO); - - error = usbd_lookup_id_by_uaa(umodem_devs, sizeof(umodem_devs), uaa); - if (error) - return (error); - + error = usbd_lookup_id_by_uaa(umodem_host_devs, + sizeof(umodem_host_devs), uaa); + if (error) { + error = usbd_lookup_id_by_uaa(umodem_dual_devs, + sizeof(umodem_dual_devs), uaa); + if (error) + return (error); + } return (BUS_PROBE_GENERIC); } @@ -400,18 +429,22 @@ umodem_attach(device_t dev) umodem_config, UMODEM_N_TRANSFER, sc, &sc->sc_mtx); if (error) { + device_printf(dev, "Can't setup transfer\n"); goto detach; } - /* clear stall at first run */ - mtx_lock(&sc->sc_mtx); - usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_WR]); - usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_RD]); - mtx_unlock(&sc->sc_mtx); + /* clear stall at first run, if USB host mode */ + if (uaa->usb_mode == USB_MODE_HOST) { + mtx_lock(&sc->sc_mtx); + usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_WR]); + usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_RD]); + mtx_unlock(&sc->sc_mtx); + } error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, &umodem_callback, &sc->sc_mtx); if (error) { + device_printf(dev, "Can't attach com\n"); goto detach; } ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); @@ -482,6 +515,7 @@ umodem_start_write(struct ucom_softc *uc { struct umodem_softc *sc = ucom->sc_parent; + usbd_transfer_start(sc->sc_xfer[UMODEM_INTR_WR]); usbd_transfer_start(sc->sc_xfer[UMODEM_BULK_WR]); } @@ -490,6 +524,7 @@ umodem_stop_write(struct ucom_softc *uco { struct umodem_softc *sc = ucom->sc_parent; + usbd_transfer_stop(sc->sc_xfer[UMODEM_INTR_WR]); usbd_transfer_stop(sc->sc_xfer[UMODEM_BULK_WR]); } @@ -684,7 +719,34 @@ umodem_cfg_set_break(struct ucom_softc * } static void -umodem_intr_callback(struct usb_xfer *xfer, usb_error_t error) +umodem_intr_write_callback(struct usb_xfer *xfer, usb_error_t error) +{ + int actlen; + + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + + DPRINTF("Transferred %d bytes\n", actlen); + + /* FALLTHROUGH */ + case USB_ST_SETUP: +tr_setup: + break; + + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* start clear stall */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + break; + } +} + +static void +umodem_intr_read_callback(struct usb_xfer *xfer, usb_error_t error) { struct usb_cdc_notification pkt; struct umodem_softc *sc = usbd_xfer_softc(xfer); @@ -906,3 +968,56 @@ umodem_poll(struct ucom_softc *ucom) struct umodem_softc *sc = ucom->sc_parent; usbd_transfer_poll(sc->sc_xfer, UMODEM_N_TRANSFER); } + +static int +umodem_handle_request(device_t dev, + const void *preq, void **pptr, uint16_t *plen, + uint16_t offset, uint8_t *pstate) +{ + struct umodem_softc *sc = device_get_softc(dev); + const struct usb_device_request *req = preq; + uint8_t is_complete = *pstate; + + DPRINTF("sc=%p\n", sc); + + if (!is_complete) { + if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->bRequest == UCDC_SET_LINE_CODING) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->wValue[0] == 0x00) && + (req->wValue[1] == 0x00)) { + if (offset == 0) { + *plen = sizeof(sc->sc_line_coding); + *pptr = &sc->sc_line_coding; + } else { + *plen = 0; + } + return (0); + } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->bRequest == UCDC_SET_COMM_FEATURE)) { + if (offset == 0) { + *plen = sizeof(sc->sc_abstract_state); + *pptr = &sc->sc_abstract_state; + } else { + *plen = 0; + } + return (0); + } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->bRequest == UCDC_SET_CONTROL_LINE_STATE)) { + *plen = 0; + return (0); + } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->bRequest == UCDC_SEND_BREAK)) { + *plen = 0; + return (0); + } + } + return (ENXIO); /* use builtin handler */ +} From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 19:34: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 3B1CBD7E; Fri, 9 Jan 2015 19:34: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 271E7212; Fri, 9 Jan 2015 19:34: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 t09JYn4U040293; Fri, 9 Jan 2015 19:34:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09JYnJj040292; Fri, 9 Jan 2015 19:34:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501091934.t09JYnJj040292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 9 Jan 2015 19:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276893 - head/usr.bin/mkimg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 19:34:49 -0000 Author: emaste Date: Fri Jan 9 19:34:48 2015 New Revision: 276893 URL: https://svnweb.freebsd.org/changeset/base/276893 Log: mkimg: Add MBR EFI partition type Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/mkimg/mbr.c Modified: head/usr.bin/mkimg/mbr.c ============================================================================== --- head/usr.bin/mkimg/mbr.c Fri Jan 9 18:40:12 2015 (r276892) +++ head/usr.bin/mkimg/mbr.c Fri Jan 9 19:34:48 2015 (r276893) @@ -42,9 +42,13 @@ __FBSDID("$FreeBSD$"); #ifndef DOSPTYP_FAT32 #define DOSPTYP_FAT32 0x0b #endif +#ifndef DOSPTYP_EFI +#define DOSPTYP_EFI 0xef +#endif static struct mkimg_alias mbr_aliases[] = { { ALIAS_EBR, ALIAS_INT2TYPE(DOSPTYP_EXT) }, + { ALIAS_EFI, ALIAS_INT2TYPE(DOSPTYP_EFI) }, { ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) }, { ALIAS_FREEBSD, ALIAS_INT2TYPE(DOSPTYP_386BSD) }, { ALIAS_NONE, 0 } /* Keep last! */ From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 19:37: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 86D53EF2; Fri, 9 Jan 2015 19:37: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 7314A235; Fri, 9 Jan 2015 19:37: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 t09JbDto040669; Fri, 9 Jan 2015 19:37:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09JbDdS040668; Fri, 9 Jan 2015 19:37:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501091937.t09JbDdS040668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 9 Jan 2015 19:37:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276894 - 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.18-1 Precedence: list List-Id: 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, 09 Jan 2015 19:37:13 -0000 Author: emaste Date: Fri Jan 9 19:37:12 2015 New Revision: 276894 URL: https://svnweb.freebsd.org/changeset/base/276894 Log: Add MBR EFI partition type definition Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/diskmbr.h Modified: head/sys/sys/diskmbr.h ============================================================================== --- head/sys/sys/diskmbr.h Fri Jan 9 19:34:48 2015 (r276893) +++ head/sys/sys/diskmbr.h Fri Jan 9 19:37:12 2015 (r276894) @@ -57,6 +57,7 @@ #define DOSPTYP_LINUX 0x83 /* Linux partition */ #define DOSPTYP_LINLVM 0x8e /* Linux LVM partition */ #define DOSPTYP_PMBR 0xee /* GPT Protective MBR */ +#define DOSPTYP_EFI 0xef /* EFI FAT parition */ #define DOSPTYP_VMFS 0xfb /* VMware VMFS partition */ #define DOSPTYP_VMKDIAG 0xfc /* VMware vmkDiagnostic partition */ #define DOSPTYP_LINRAID 0xfd /* Linux raid partition */ From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 20:00: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 D5F8FA1A; Fri, 9 Jan 2015 20:00: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 A8B806A5; Fri, 9 Jan 2015 20:00: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 t09K0cJZ051392; Fri, 9 Jan 2015 20:00:38 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09K0cdb051391; Fri, 9 Jan 2015 20:00:38 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501092000.t09K0cdb051391@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 9 Jan 2015 20:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276895 - head/lib/libcompiler_rt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 20:00:38 -0000 Author: andrew Date: Fri Jan 9 20:00:37 2015 New Revision: 276895 URL: https://svnweb.freebsd.org/changeset/base/276895 Log: With the update of compiler-rt we try to build a number of files that don't build on some ARM platforms, provide symbols we already provide in libc, or don't exist. Remove these from the build. Some of these may return later on specific targets. Differential Revision: https://reviews.freebsd.org/D1468 Reviewed by: dim, imp Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Fri Jan 9 19:37:12 2015 (r276894) +++ head/lib/libcompiler_rt/Makefile Fri Jan 9 20:00:37 2015 (r276895) @@ -36,8 +36,6 @@ SRCF= absvdi2 \ clzti2 \ cmpdi2 \ cmpti2 \ - comparedf2 \ - comparesf2 \ ctzdi2 \ ctzsi2 \ ctzti2 \ @@ -150,6 +148,11 @@ SRCF+= adddf3 \ truncdfsf2 .endif +.if ${MACHINE_CPUARCH} != "arm" +SRCF+= comparedf2 \ + comparesf2 +.endif + .if ${MACHINE_CPUARCH} != "mips" SRCF+= divsi3 \ modsi3 \ @@ -180,9 +183,7 @@ SRCS+= ${file}.c .endfor .if ${MACHINE_CPUARCH} == "arm" -SRCS+= aeabi_dcmp.S \ - aeabi_div0.S \ - aeabi_fcmp.S \ +SRCS+= aeabi_div0.c \ aeabi_idivmod.S \ aeabi_ldivmod.S \ aeabi_memcmp.S \ @@ -193,49 +194,11 @@ SRCS+= aeabi_dcmp.S \ aeabi_uldivmod.S \ bswapdi2.S \ bswapsi2.S \ - eqdf2.S \ - eqsf2.S \ - floatunssidf.S \ - floatunssisf.S \ - gedf2.S \ - gesf2.S \ - gtdf2.S \ - gtsf2.S \ - ledf2.S \ - lesf2.S \ - ltdf2.S \ - ltsf2.S \ - nedf2.S \ - nesf2.S \ - restore_vfp_d8_d15_regs.S \ - save_vfp_d8_d15_regs.S \ switch16.S \ switch32.S \ switch8.S \ switchu8.S \ - sync_fetch_and_add_4.S \ - sync_fetch_and_add_8.S \ - sync_fetch_and_and_4.S \ - sync_fetch_and_and_8.S \ - sync_fetch_and_max_4.S \ - sync_fetch_and_max_8.S \ - sync_fetch_and_min_4.S \ - sync_fetch_and_min_8.S \ - sync_fetch_and_nand_4.S \ - sync_fetch_and_nand_8.S \ - sync_fetch_and_or_4.S \ - sync_fetch_and_or_8.S \ - sync_fetch_and_sub_4.S \ - sync_fetch_and_sub_8.S \ - sync_fetch_and_umax_4.S \ - sync_fetch_and_umax_8.S \ - sync_fetch_and_umin_4.S \ - sync_fetch_and_umin_8.S \ - sync_fetch_and_xor_4.S \ - sync_fetch_and_xor_8.S \ - sync_synchronize.S \ - unorddf2.S \ - unordsf2.S + sync_synchronize.S .endif .if ${MK_INSTALLLIB} != "no" From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 20:29: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 668E1109; Fri, 9 Jan 2015 20:29: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 527C1A0A; Fri, 9 Jan 2015 20:29: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 t09KTELP065157; Fri, 9 Jan 2015 20:29:14 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t09KTEXD065156; Fri, 9 Jan 2015 20:29:14 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501092029.t09KTEXD065156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 9 Jan 2015 20:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276896 - 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.18-1 Precedence: list List-Id: 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, 09 Jan 2015 20:29:14 -0000 Author: melifaro Date: Fri Jan 9 20:29:13 2015 New Revision: 276896 URL: https://svnweb.freebsd.org/changeset/base/276896 Log: Fix typo. Submitted by: Olivér Pintér Modified: head/sys/net/if_arcsubr.c Modified: head/sys/net/if_arcsubr.c ============================================================================== --- head/sys/net/if_arcsubr.c Fri Jan 9 20:00:37 2015 (r276895) +++ head/sys/net/if_arcsubr.c Fri Jan 9 20:29:13 2015 (r276896) @@ -167,7 +167,7 @@ arc_output(struct ifnet *ifp, struct mbu #endif #ifdef INET6 case AF_INET6: - if ((m->m_flags & M_MCAST) != NULL) + if ((m->m_flags & M_MCAST) != 0) adst = arcbroadcastaddr; /* ARCnet broadcast address */ else error = nd6_storelladdr(ifp, m, dst, (u_char *)&adst, NULL); From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 21:46:09 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 AB47D372; Fri, 9 Jan 2015 21:46:09 +0000 (UTC) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7291B225; Fri, 9 Jan 2015 21:46:09 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id y20so17381303ier.0; Fri, 09 Jan 2015 13:46:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=7yi0qGx/lQsdWSFqLEbbMYZMj3m5zgYR/M6Pv9cKPW8=; b=vaOanDi+7gepRXj0hzmy4txajzk3NEOQaKy7J2b3KIjjDHUxNnTw+GNOHaA22QIj5M WYKHHSFZOyKNHn/VTT05UaFTAeFg9oCcvjmk15/1UKQbBeo8Ae6VnULbiamx6qVnZ+5U oqsLu+BbyFtMtdorVS/MDUwtgZNQomFRVHGlk6X/2YHvrcJxAkEY9r2Tl/mL3GaA0qNe 3H+3JEQ7zz7zlToVG5uD+AY9L2QCYV9JsXenFqekBNHBlDLbKSLznQHbKKdePxmrlai7 pB/o3YQzWV3YCtvGRu9zezrxD24Xq4ydDT2pnXqYxU9JzecA3GgBP1hv5lX5tSR5Da5t 6igw== MIME-Version: 1.0 X-Received: by 10.43.131.5 with SMTP id ho5mr14631596icc.82.1420839968903; Fri, 09 Jan 2015 13:46:08 -0800 (PST) Received: by 10.50.4.170 with HTTP; Fri, 9 Jan 2015 13:46:08 -0800 (PST) In-Reply-To: <201501090639.t096d8Ns070311@svn.freebsd.org> References: <201501090639.t096d8Ns070311@svn.freebsd.org> Date: Fri, 9 Jan 2015 13:46:08 -0800 Message-ID: Subject: Re: svn commit: r276879 - head/sys/ofed/include/net From: NGie Cooper To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 21:46:09 -0000 On Thu, Jan 8, 2015 at 10:39 PM, Hans Petter Selasky wrote: > Author: hselasky > Date: Fri Jan 9 06:39:07 2015 > New Revision: 276879 > URL: https://svnweb.freebsd.org/changeset/base/276879 > > Log: > Don't mask the IP-address when doing multicast IP over infiniband. > > PR: 196631 > MFC after: 3 days > Sponsored by: Mellanox Technologies Submitted by: Jeffrey Meegan From owner-svn-src-head@FreeBSD.ORG Fri Jan 9 21:48: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 50AAF55F; Fri, 9 Jan 2015 21:48:10 +0000 (UTC) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 188E9255; Fri, 9 Jan 2015 21:48:10 +0000 (UTC) Received: by mail-ig0-f181.google.com with SMTP id a13so3929553igq.2; Fri, 09 Jan 2015 13:48:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eyRH64hS3QKqZBp+nNQtbQcupaQrSne5aIN3lzUvx28=; b=fqdoYsgXupKTooxdBnvO4LouLfLQ3AEzhd3bVCXR00Es6iOAGz3Km3LYSGceOMhLZB WXriqpc5jArDl35ktrF8u6609vq2YzD/maVdeH7d2EJtNaJVsaBegjdY0zDyJt8aK03S R918EvPhWImOejCEgVBdLT6nPLdO28wmEYGB8Q/9URkuDTrJMfdTHvR/vuw4RUy7Z/TF 1ZtTj3lfxUi7pSn3QtK8kcPYoaniNsVSErhcE+GAmzoJ9Rqs4XoLtssIWO2NkDDIePTd 7ZL8ROjOP5yRsE5F/1eu9guKvWHYN2CB0TNhGND43/qyvOjNvJc//t/rKcGo3Q/RaVVN nRaw== MIME-Version: 1.0 X-Received: by 10.50.66.131 with SMTP id f3mr4764221igt.7.1420840089432; Fri, 09 Jan 2015 13:48:09 -0800 (PST) Received: by 10.50.4.170 with HTTP; Fri, 9 Jan 2015 13:48:09 -0800 (PST) In-Reply-To: <201501091807.t09I795S096432@svn.freebsd.org> References: <201501091807.t09I795S096432@svn.freebsd.org> Date: Fri, 9 Jan 2015 13:48:09 -0800 Message-ID: Subject: Re: svn commit: r276890 - head From: NGie Cooper To: Xin LI Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 09 Jan 2015 21:48:10 -0000 On Fri, Jan 9, 2015 at 10:07 AM, Xin LI wrote: > Author: delphij > Date: Fri Jan 9 18:07:08 2015 > New Revision: 276890 > URL: https://svnweb.freebsd.org/changeset/base/276890 > > Log: > Fixup r276668, /usr/tests/sbin/ifconfig/ shouldn't be removed. > > Modified: > head/ObsoleteFiles.inc Thanks Xin! From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 00:11: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 5458CA3C; Sat, 10 Jan 2015 00:11: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 35B28271; Sat, 10 Jan 2015 00:11: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 t0A0BCHI072378; Sat, 10 Jan 2015 00:11:12 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0A0BBoj072372; Sat, 10 Jan 2015 00:11:11 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501100011.t0A0BBoj072372@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 10 Jan 2015 00:11:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276898 - in head: contrib/xz contrib/xz/src/liblzma lib/liblzma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 00:11:12 -0000 Author: bapt Date: Sat Jan 10 00:11:10 2015 New Revision: 276898 URL: https://svnweb.freebsd.org/changeset/base/276898 Log: Install the liblzma pkg-config file MFC after: 1 week Added: head/contrib/xz/src/liblzma/liblzma.pc.in - copied unchanged from r276897, vendor/xz/dist/src/liblzma/liblzma.pc.in Modified: head/contrib/xz/FREEBSD-Xlist head/lib/liblzma/Makefile Directory Properties: head/contrib/xz/ (props changed) Modified: head/contrib/xz/FREEBSD-Xlist ============================================================================== --- head/contrib/xz/FREEBSD-Xlist Sat Jan 10 00:07:34 2015 (r276897) +++ head/contrib/xz/FREEBSD-Xlist Sat Jan 10 00:11:10 2015 (r276898) @@ -32,7 +32,6 @@ macosx/ makefile.am po/ src/*/*.rc -src/liblzma/liblzma.pc.in src/scripts/ tests/ version.sh Copied: head/contrib/xz/src/liblzma/liblzma.pc.in (from r276897, vendor/xz/dist/src/liblzma/liblzma.pc.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/xz/src/liblzma/liblzma.pc.in Sat Jan 10 00:11:10 2015 (r276898, copy of r276897, vendor/xz/dist/src/liblzma/liblzma.pc.in) @@ -0,0 +1,19 @@ +# +# Author: Lasse Collin +# +# This file has been put into the public domain. +# You can do whatever you want with this file. +# + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: liblzma +Description: General purpose data compression library +URL: @PACKAGE_URL@ +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -llzma +Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Sat Jan 10 00:07:34 2015 (r276897) +++ head/lib/liblzma/Makefile Sat Jan 10 00:11:10 2015 (r276898) @@ -117,7 +117,16 @@ SRCS+= simple_coder.c \ arm.c \ armthumb.c \ sparc.c - + +.PATH: ${LZMADIR} + +VERSION_MAJOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MAJOR" {print $$3 } ' \ + ${LZMADIR}/api/lzma/version.h +VERSION_MINOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MINOR" {print $$3 } ' \ + ${LZMADIR}/api/lzma/version.h +VERSION_PATCH!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_PATCH" {print $$3 } ' \ + ${LZMADIR}/api/lzma/version.h + WARNS?= 3 CFLAGS+= -DHAVE_CONFIG_H \ @@ -137,4 +146,21 @@ VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map CFLAGS+= -DSYMBOL_VERSIONING +CLEANFILES+= liblzma.pc + +all: liblzma.pc +liblzma.pc: liblzma.pc.in + @sed -e 's,@prefix@,/usr,g ; \ + s,@exec_prefix@,/usr,g ; \ + s,@libdir@,${LIBDIR},g ; \ + s,@includedir@,${INCLUDEDIR},g ; \ + s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \ + s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \ + s,@PTHREAD_CFLAGS@,,g ; \ + s,@PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET} + +beforeinstall: + @${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ + liblzma.pc ${DESTDIR}${LIBDATADIR}/pkgconfig + .include From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 03:13: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 A36487EB; Sat, 10 Jan 2015 03:13: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 8FC17817; Sat, 10 Jan 2015 03:13: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 t0A3DH0E060089; Sat, 10 Jan 2015 03:13:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0A3DHIG060086; Sat, 10 Jan 2015 03:13:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501100313.t0A3DHIG060086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 10 Jan 2015 03:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276901 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 03:13:17 -0000 Author: ae Date: Sat Jan 10 03:13:16 2015 New Revision: 276901 URL: https://svnweb.freebsd.org/changeset/base/276901 Log: Move the recursion detection code into separate function gif_check_nesting(). Also make MTAG_GIF definition private to if_gif.c. MFC after: 1 week Modified: head/sys/net/if_gif.c head/sys/net/if_gif.h Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Sat Jan 10 01:05:12 2015 (r276900) +++ head/sys/net/if_gif.c Sat Jan 10 03:13:16 2015 (r276901) @@ -446,24 +446,12 @@ gif_qflush(struct ifnet *ifp __unused) } -int -gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, - struct route *ro) +#define MTAG_GIF 1080679712 +static int +gif_check_nesting(struct ifnet *ifp, struct mbuf *m) { struct m_tag *mtag; - uint32_t af; - int gif_called; - int error = 0; -#ifdef MAC - error = mac_ifnet_check_transmit(ifp, m); - if (error) - goto err; -#endif - if ((ifp->if_flags & IFF_MONITOR) != 0 || - (ifp->if_flags & IFF_UP) == 0) { - error = ENETDOWN; - goto err; - } + int count; /* * gif may cause infinite recursion calls when misconfigured. @@ -472,35 +460,49 @@ gif_output(struct ifnet *ifp, struct mbu * High nesting level may cause stack exhaustion. * We'll prevent this by introducing upper limit. */ - gif_called = 1; - mtag = m_tag_locate(m, MTAG_GIF, MTAG_GIF_CALLED, NULL); - while (mtag != NULL) { + count = 1; + mtag = NULL; + while ((mtag = m_tag_locate(m, MTAG_GIF, 0, mtag)) != NULL) { if (*(struct ifnet **)(mtag + 1) == ifp) { - log(LOG_NOTICE, - "gif_output: loop detected on %s\n", - (*(struct ifnet **)(mtag + 1))->if_xname); - error = EIO; /* is there better errno? */ - goto err; + log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname); + return (EIO); } - mtag = m_tag_locate(m, MTAG_GIF, MTAG_GIF_CALLED, mtag); - gif_called++; + count++; } - if (gif_called > V_max_gif_nesting) { + if (count > V_max_gif_nesting) { log(LOG_NOTICE, - "gif_output: recursively called too many times(%d)\n", - gif_called); - error = EIO; /* is there better errno? */ + "%s: if_output recursively called too many times(%d)\n", + if_name(ifp), count); + return (EIO); + } + mtag = m_tag_alloc(MTAG_GIF, 0, sizeof(struct ifnet *), M_NOWAIT); + if (mtag == NULL) + return (ENOMEM); + *(struct ifnet **)(mtag + 1) = ifp; + m_tag_prepend(m, mtag); + return (0); +} + +int +gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, + struct route *ro) +{ + uint32_t af; + int error = 0; +#ifdef MAC + error = mac_ifnet_check_transmit(ifp, m); + if (error) goto err; - } - mtag = m_tag_alloc(MTAG_GIF, MTAG_GIF_CALLED, sizeof(struct ifnet *), - M_NOWAIT); - if (mtag == NULL) { - error = ENOMEM; +#endif + if ((ifp->if_flags & IFF_MONITOR) != 0 || + (ifp->if_flags & IFF_UP) == 0) { + error = ENETDOWN; goto err; } - *(struct ifnet **)(mtag + 1) = ifp; - m_tag_prepend(m, mtag); + error = gif_check_nesting(ifp, m); + if (error != 0) + goto err; m->m_flags &= ~(M_BCAST|M_MCAST); if (dst->sa_family == AF_UNSPEC) bcopy(dst->sa_data, &af, sizeof(af)); Modified: head/sys/net/if_gif.h ============================================================================== --- head/sys/net/if_gif.h Sat Jan 10 01:05:12 2015 (r276900) +++ head/sys/net/if_gif.h Sat Jan 10 03:13:16 2015 (r276901) @@ -90,9 +90,6 @@ struct gif_softc { #define GIF_MTU_MIN (1280) /* Minimum MTU */ #define GIF_MTU_MAX (8192) /* Maximum MTU */ -#define MTAG_GIF 1080679712 -#define MTAG_GIF_CALLED 0 - struct etherip_header { #if BYTE_ORDER == LITTLE_ENDIAN u_int eip_resvl:4, /* reserved */ From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 03:26: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 E784CA53; Sat, 10 Jan 2015 03:26: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 D417C8FA; Sat, 10 Jan 2015 03:26: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 t0A3Qlie065244; Sat, 10 Jan 2015 03:26:47 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0A3Qlxw065243; Sat, 10 Jan 2015 03:26:47 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501100326.t0A3Qlxw065243@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 10 Jan 2015 03:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276902 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 03:26:48 -0000 Author: ae Date: Sat Jan 10 03:26:46 2015 New Revision: 276902 URL: https://svnweb.freebsd.org/changeset/base/276902 Log: Fix an error introduced in r274246. Pass mtag argument into m_tag_locate() to continue the search from the last found mtag. X-MFC after: r274246 Modified: head/sys/net/if_gre.c Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Sat Jan 10 03:13:16 2015 (r276901) +++ head/sys/net/if_gre.c Sat Jan 10 03:26:46 2015 (r276902) @@ -752,7 +752,7 @@ gre_check_nesting(struct ifnet *ifp, str count = 1; mtag = NULL; - while ((mtag = m_tag_locate(m, MTAG_GRE, 0, NULL)) != NULL) { + while ((mtag = m_tag_locate(m, MTAG_GRE, 0, mtag)) != NULL) { if (*(struct ifnet **)(mtag + 1) == ifp) { log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname); return (EIO); From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 03:29: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 23E8EBD8; Sat, 10 Jan 2015 03:29: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 109FD909; Sat, 10 Jan 2015 03:29: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 t0A3THRp065603; Sat, 10 Jan 2015 03:29:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0A3THL5065602; Sat, 10 Jan 2015 03:29:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501100329.t0A3THL5065602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 10 Jan 2015 03:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276903 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 03:29:18 -0000 Author: ae Date: Sat Jan 10 03:29:17 2015 New Revision: 276903 URL: https://svnweb.freebsd.org/changeset/base/276903 Log: Use if_name() macro instead of ifp->if_xname. MFH: 1 week Modified: head/sys/net/if_gif.c Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Sat Jan 10 03:26:46 2015 (r276902) +++ head/sys/net/if_gif.c Sat Jan 10 03:29:17 2015 (r276903) @@ -464,7 +464,7 @@ gif_check_nesting(struct ifnet *ifp, str mtag = NULL; while ((mtag = m_tag_locate(m, MTAG_GIF, 0, mtag)) != NULL) { if (*(struct ifnet **)(mtag + 1) == ifp) { - log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname); + log(LOG_NOTICE, "%s: loop detected\n", if_name(ifp)); return (EIO); } count++; From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 06:48: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 EA048DEA; Sat, 10 Jan 2015 06:48: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 D63E4B8D; Sat, 10 Jan 2015 06:48: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 t0A6matb055038; Sat, 10 Jan 2015 06:48:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0A6ma3T055037; Sat, 10 Jan 2015 06:48:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501100648.t0A6ma3T055037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 10 Jan 2015 06:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276904 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 06:48:37 -0000 Author: delphij Date: Sat Jan 10 06:48:35 2015 New Revision: 276904 URL: https://svnweb.freebsd.org/changeset/base/276904 Log: Improve style and fix a possible use-after-free case introduced in r268384 by reinitializing the 'freestate' pointer after freeing the memory. Obtained from: HardenedBSD (71fab80c5dd3034b71a29a61064625018671bbeb) PR: 194525 Submitted by: Oliver Pinter MFC after: 2 weeks Modified: head/sys/kern/kern_lockf.c Modified: head/sys/kern/kern_lockf.c ============================================================================== --- head/sys/kern/kern_lockf.c Sat Jan 10 03:29:17 2015 (r276903) +++ head/sys/kern/kern_lockf.c Sat Jan 10 06:48:35 2015 (r276904) @@ -740,12 +740,13 @@ retry_setlock: VI_UNLOCK(vp); - if (freestate) { + if (freestate != NULL) { sx_xlock(&lf_lock_states_lock); LIST_REMOVE(freestate, ls_link); sx_xunlock(&lf_lock_states_lock); sx_destroy(&freestate->ls_lock); free(freestate, M_LOCKF); + freestate = NULL; } if (error == EDOOFUS) { From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 06: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 CAC0CBC; Sat, 10 Jan 2015 06: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 B70EDC5E; Sat, 10 Jan 2015 06:54: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 t0A6sBQ3059082; Sat, 10 Jan 2015 06:54:11 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0A6sBmI059081; Sat, 10 Jan 2015 06:54:11 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501100654.t0A6sBmI059081@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 10 Jan 2015 06:54:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276905 - head/sys/powerpc/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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 06:54:11 -0000 Author: jhibbits Date: Sat Jan 10 06:54:10 2015 New Revision: 276905 URL: https://svnweb.freebsd.org/changeset/base/276905 Log: Increase default MAXTSIZ to allow execution of larger binaries. This allows executing static clang built with -O0. The value is configurable by a sysctl, so if one needs to clamp it down, they still can. Discussed with: nwhitehorn,emaste Modified: head/sys/powerpc/include/vmparam.h Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Sat Jan 10 06:48:35 2015 (r276904) +++ head/sys/powerpc/include/vmparam.h Sat Jan 10 06:54:10 2015 (r276905) @@ -38,7 +38,7 @@ #define USRSTACK SHAREDPAGE #ifndef MAXTSIZ -#define MAXTSIZ (64*1024*1024) /* max text size */ +#define MAXTSIZ (1*1024*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 07:22: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 A74224B2; Sat, 10 Jan 2015 07:22: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 92FC1ED8; Sat, 10 Jan 2015 07:22: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 t0A7MdaD072748; Sat, 10 Jan 2015 07:22:39 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0A7MdCv072747; Sat, 10 Jan 2015 07:22:39 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201501100722.t0A7MdCv072747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 10 Jan 2015 07:22:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276906 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 07:22:39 -0000 Author: dchagin Date: Sat Jan 10 07:22:38 2015 New Revision: 276906 URL: https://svnweb.freebsd.org/changeset/base/276906 Log: Allow clock_getcpuclockid() on the CPU-time clock for zombie process. Posix does not prohibit this. Differential Revision: https://reviews.freebsd.org/D1470 Reviewed by: kib MFC after: 1 week Modified: head/sys/kern/kern_time.c Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Sat Jan 10 06:54:10 2015 (r276905) +++ head/sys/kern/kern_time.c Sat Jan 10 07:22:38 2015 (r276906) @@ -200,13 +200,10 @@ kern_clock_getcpuclockid2(struct thread switch (which) { case CPUCLOCK_WHICH_PID: if (id != 0) { - p = pfind(id); - if (p == NULL) - return (ESRCH); - error = p_cansee(td, p); - PROC_UNLOCK(p); + error = pget(id, PGET_CANSEE | PGET_NOTID, &p); if (error != 0) return (error); + PROC_UNLOCK(p); pid = id; } else { pid = td->td_proc->p_pid; From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 08: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 BA634BFF; Sat, 10 Jan 2015 08:28: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 9B04B69B; Sat, 10 Jan 2015 08:28: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 t0A8Spsa001365; Sat, 10 Jan 2015 08:28:51 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0A8SpW2001364; Sat, 10 Jan 2015 08:28:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501100828.t0A8SpW2001364@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 10 Jan 2015 08:28:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276907 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 08:28:51 -0000 Author: ae Date: Sat Jan 10 08:28:50 2015 New Revision: 276907 URL: https://svnweb.freebsd.org/changeset/base/276907 Log: Restore Ethernet-within-IP Encapsulation support that was broken after r273087. Move all checks from gif_output() into gif_transmit(). Previously they were checked always, because if_start always called gif_output. Now gif_transmit() can be called directly from if_bridge() code and we need do checks here. PR: 196646 MFC after: 1 week Modified: head/sys/net/if_gif.c Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Sat Jan 10 07:22:38 2015 (r276906) +++ head/sys/net/if_gif.c Sat Jan 10 08:28:50 2015 (r276907) @@ -118,6 +118,7 @@ void (*ng_gif_input_orphan_p)(struct ifn void (*ng_gif_attach_p)(struct ifnet *ifp); void (*ng_gif_detach_p)(struct ifnet *ifp); +static int gif_check_nesting(struct ifnet *, struct mbuf *); static int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *); static void gif_delete_tunnel(struct ifnet *); @@ -351,18 +352,32 @@ gif_transmit(struct ifnet *ifp, struct m uint8_t proto, ecn; int error; +#ifdef MAC + error = mac_ifnet_check_transmit(ifp, m); + if (error) { + m_freem(m); + goto err; + } +#endif error = ENETDOWN; sc = ifp->if_softc; - if (sc->gif_family == 0) { + if ((ifp->if_flags & IFF_MONITOR) != 0 || + (ifp->if_flags & IFF_UP) == 0 || + sc->gif_family == 0 || + (error = gif_check_nesting(ifp, m)) != 0) { m_freem(m); goto err; } /* Now pull back the af that we stashed in the csum_data. */ - af = m->m_pkthdr.csum_data; + if (ifp->if_bridge) + af = AF_LINK; + else + af = m->m_pkthdr.csum_data; + m->m_flags &= ~(M_BCAST|M_MCAST); + M_SETFIB(m, sc->gif_fibnum); BPF_MTAP2(ifp, &af, sizeof(af), m); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); - M_SETFIB(m, sc->gif_fibnum); /* inner AF-specific encapsulation */ ecn = 0; switch (af) { @@ -488,28 +503,11 @@ gif_output(struct ifnet *ifp, struct mbu struct route *ro) { uint32_t af; - int error = 0; -#ifdef MAC - error = mac_ifnet_check_transmit(ifp, m); - if (error) - goto err; -#endif - if ((ifp->if_flags & IFF_MONITOR) != 0 || - (ifp->if_flags & IFF_UP) == 0) { - error = ENETDOWN; - goto err; - } - error = gif_check_nesting(ifp, m); - if (error != 0) - goto err; - m->m_flags &= ~(M_BCAST|M_MCAST); if (dst->sa_family == AF_UNSPEC) bcopy(dst->sa_data, &af, sizeof(af)); else af = dst->sa_family; - if (ifp->if_bridge) - af = AF_LINK; /* * Now save the af in the inbound pkt csum data, this is a cheat since * we are using the inbound csum_data field to carry the af over to @@ -517,10 +515,6 @@ gif_output(struct ifnet *ifp, struct mbu */ m->m_pkthdr.csum_data = af; return (ifp->if_transmit(ifp, m)); -err: - if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - m_freem(m); - return (error); } void From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 10: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 584F6E17; Sat, 10 Jan 2015 10: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 4308EFB9; Sat, 10 Jan 2015 10:16: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 t0AAGNDu053420; Sat, 10 Jan 2015 10:16:23 GMT (envelope-from jlh@FreeBSD.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AAGMMd053418; Sat, 10 Jan 2015 10:16:22 GMT (envelope-from jlh@FreeBSD.org) Message-Id: <201501101016.t0AAGMMd053418@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jlh set sender to jlh@FreeBSD.org using -f From: Jeremie Le Hen Date: Sat, 10 Jan 2015 10:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276909 - in head/usr.bin/sed/tests: . regress.multitest.out X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 10:16:23 -0000 Author: jlh Date: Sat Jan 10 10:16:22 2015 New Revision: 276909 URL: https://svnweb.freebsd.org/changeset/base/276909 Log: Add a regression test for PR 192108. I won't go through the hassle of MFCing it since I expect all changes to go first through HEAD anyway. PR: 192108 Added: head/usr.bin/sed/tests/regress.multitest.out/2.23 (contents, props changed) Modified: head/usr.bin/sed/tests/multi_test.sh Modified: head/usr.bin/sed/tests/multi_test.sh ============================================================================== --- head/usr.bin/sed/tests/multi_test.sh Sat Jan 10 09:22:17 2015 (r276908) +++ head/usr.bin/sed/tests/multi_test.sh Sat Jan 10 10:16:22 2015 (r276909) @@ -51,7 +51,7 @@ main() awk 'END { for (i = 1; i < 15; i++) print "l1_" i}' lines1 awk 'END { for (i = 1; i < 10; i++) print "l2_" i}' lines2 - echo "1..129" + echo "1..130" exec 4>&1 5>&2 tests @@ -181,6 +181,8 @@ hello' /dev/null mark '2.20' ; $SED -n '/l1_7/,3p' lines1 lines2 mark '2.21' ; $SED -n '13,+4p' lines1 lines2 mark '2.22' ; $SED -n '/l1_6/,+2p' lines1 lines2 + # For PR bin/192108 + mark '2.23'; $SED -n '12,+1p' lines1 } test_group() Added: head/usr.bin/sed/tests/regress.multitest.out/2.23 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sed/tests/regress.multitest.out/2.23 Sat Jan 10 10:16:22 2015 (r276909) @@ -0,0 +1,2 @@ +l1_12 +l1_13 From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 10:41: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 44BE78ED; Sat, 10 Jan 2015 10:41: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 257443E6; Sat, 10 Jan 2015 10:41: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 t0AAfPtI063891; Sat, 10 Jan 2015 10:41:25 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AAfO3v063888; Sat, 10 Jan 2015 10:41:24 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501101041.t0AAfO3v063888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Sat, 10 Jan 2015 10:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276910 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 10:41:25 -0000 Author: rwatson Date: Sat Jan 10 10:41:23 2015 New Revision: 276910 URL: https://svnweb.freebsd.org/changeset/base/276910 Log: Garbage collect m_copymdata(), an mbuf utility routine introduced in FreeBSD 7 that has not been used since. It contains a number of unresolved bugs including an inverted bcopy() and incorrect handling of read-only mbufs using internal storage. Removing this unused code is substantially essier than fixing it in order to update it to the coming mbuf world order -- but it can always be restored from revision history if it turns out to prove useful for future work. Pointed out by: jmallett Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/uipc_mbuf.c head/sys/sys/mbuf.h Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Sat Jan 10 10:16:22 2015 (r276909) +++ head/sys/kern/uipc_mbuf.c Sat Jan 10 10:41:23 2015 (r276910) @@ -648,152 +648,6 @@ nospace: } /* - * Returns mbuf chain with new head for the prepending case. - * Copies from mbuf (chain) n from off for len to mbuf (chain) m - * either prepending or appending the data. - * The resulting mbuf (chain) m is fully writeable. - * m is destination (is made writeable) - * n is source, off is offset in source, len is len from offset - * dir, 0 append, 1 prepend - * how, wait or nowait - */ - -static int -m_bcopyxxx(void *s, void *t, u_int len) -{ - bcopy(s, t, (size_t)len); - return 0; -} - -struct mbuf * -m_copymdata(struct mbuf *m, struct mbuf *n, int off, int len, - int prep, int how) -{ - struct mbuf *mm, *x, *z, *prev = NULL; - caddr_t p; - int i, nlen = 0; - caddr_t buf[MLEN]; - - KASSERT(m != NULL && n != NULL, ("m_copymdata, no target or source")); - KASSERT(off >= 0, ("m_copymdata, negative off %d", off)); - KASSERT(len >= 0, ("m_copymdata, negative len %d", len)); - KASSERT(prep == 0 || prep == 1, ("m_copymdata, unknown direction %d", prep)); - - mm = m; - if (!prep) { - while(mm->m_next) { - prev = mm; - mm = mm->m_next; - } - } - for (z = n; z != NULL; z = z->m_next) - nlen += z->m_len; - if (len == M_COPYALL) - len = nlen - off; - if (off + len > nlen || len < 1) - return NULL; - - if (!M_WRITABLE(mm)) { - /* XXX: Use proper m_xxx function instead. */ - x = m_getcl(how, MT_DATA, mm->m_flags); - if (x == NULL) - return NULL; - bcopy(mm->m_ext.ext_buf, x->m_ext.ext_buf, x->m_ext.ext_size); - p = x->m_ext.ext_buf + (mm->m_data - mm->m_ext.ext_buf); - x->m_data = p; - mm->m_next = NULL; - if (mm != m) - prev->m_next = x; - m_free(mm); - mm = x; - } - - /* - * Append/prepend the data. Allocating mbufs as necessary. - */ - /* Shortcut if enough free space in first/last mbuf. */ - if (!prep && M_TRAILINGSPACE(mm) >= len) { - m_apply(n, off, len, m_bcopyxxx, mtod(mm, caddr_t) + - mm->m_len); - mm->m_len += len; - mm->m_pkthdr.len += len; - return m; - } - if (prep && M_LEADINGSPACE(mm) >= len) { - mm->m_data = mtod(mm, caddr_t) - len; - m_apply(n, off, len, m_bcopyxxx, mtod(mm, caddr_t)); - mm->m_len += len; - mm->m_pkthdr.len += len; - return mm; - } - - /* Expand first/last mbuf to cluster if possible. */ - if (!prep && !(mm->m_flags & M_EXT) && len > M_TRAILINGSPACE(mm)) { - bcopy(mm->m_data, &buf, mm->m_len); - m_clget(mm, how); - if (!(mm->m_flags & M_EXT)) - return NULL; - bcopy(&buf, mm->m_ext.ext_buf, mm->m_len); - mm->m_data = mm->m_ext.ext_buf; - } - if (prep && !(mm->m_flags & M_EXT) && len > M_LEADINGSPACE(mm)) { - bcopy(mm->m_data, &buf, mm->m_len); - m_clget(mm, how); - if (!(mm->m_flags & M_EXT)) - return NULL; - bcopy(&buf, (caddr_t *)mm->m_ext.ext_buf + - mm->m_ext.ext_size - mm->m_len, mm->m_len); - mm->m_data = (caddr_t)mm->m_ext.ext_buf + - mm->m_ext.ext_size - mm->m_len; - } - - /* Append/prepend as many mbuf (clusters) as necessary to fit len. */ - if (!prep && len > M_TRAILINGSPACE(mm)) { - if (!m_getm(mm, len - M_TRAILINGSPACE(mm), how, MT_DATA)) - return NULL; - } - if (prep && len > M_LEADINGSPACE(mm)) { - if (!(z = m_getm(NULL, len - M_LEADINGSPACE(mm), how, MT_DATA))) - return NULL; - i = 0; - for (x = z; x != NULL; x = x->m_next) { - i += x->m_flags & M_EXT ? x->m_ext.ext_size : - (x->m_flags & M_PKTHDR ? MHLEN : MLEN); - if (!x->m_next) - break; - } - z->m_data += i - len; - m_move_pkthdr(mm, z); - x->m_next = mm; - mm = z; - } - - /* Seek to start position in source mbuf. Optimization for long chains. */ - while (off > 0) { - if (off < n->m_len) - break; - off -= n->m_len; - n = n->m_next; - } - - /* Copy data into target mbuf. */ - z = mm; - while (len > 0) { - KASSERT(z != NULL, ("m_copymdata, falling off target edge")); - i = M_TRAILINGSPACE(z); - m_apply(n, off, i, m_bcopyxxx, mtod(z, caddr_t) + z->m_len); - z->m_len += i; - /* fixup pkthdr.len if necessary */ - if ((prep ? mm : m)->m_flags & M_PKTHDR) - (prep ? mm : m)->m_pkthdr.len += i; - off += i; - len -= i; - z = z->m_next; - } - return (prep ? mm : m); -} - -/* * Copy an entire packet, including header (which must be present). * An optimization of the common case `m_copym(m, 0, M_COPYALL, how)'. * Note that the copy is read-only, because clusters are not copied, Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sat Jan 10 10:16:22 2015 (r276909) +++ head/sys/sys/mbuf.h Sat Jan 10 10:41:23 2015 (r276910) @@ -939,8 +939,6 @@ struct mbuf *m_collapse(struct mbuf *, i void m_copyback(struct mbuf *, int, int, c_caddr_t); void m_copydata(const struct mbuf *, int, int, caddr_t); struct mbuf *m_copym(struct mbuf *, int, int, int); -struct mbuf *m_copymdata(struct mbuf *, struct mbuf *, - int, int, int, int); struct mbuf *m_copypacket(struct mbuf *, int); void m_copy_pkthdr(struct mbuf *, struct mbuf *); struct mbuf *m_copyup(struct mbuf *, int, int); From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 10:46: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 AF9E2C2E; Sat, 10 Jan 2015 10:46:54 +0000 (UTC) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50B98681; Sat, 10 Jan 2015 10:46:54 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id ms9so18107576lab.10; Sat, 10 Jan 2015 02:46:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=4Zulv4rWwl7XwVASZjpwkhY3D4Yvdpi6J4cYyvorvfc=; b=xo2Z7M2LpolKcPkemZsaO/QG+sMguqMo5br0mLalK/qZItd9M3YCo2eZ058ajWKuNw KXkykefLNfSfULoJwl5cR3qkmPn96MDDBXhxMPf8SK94wtgI0qP2fdI5C60htdq1NlZI q0nNTLad2mAItb/g0iGcMEMOhbhm4T8Rvm/n8Yr400YeqNxADU17H3uGgKKhFkjP/IST hf91PsPI+1c0H4aYKtGNaWSNNrjxbVooc3QGd42OaXMDjF8OVjfiK+Y+ulNjEW6NcX8g EI58tJkxicbjwhqR/3+FsCTqMdLnnOiIG8nuyDS8uGSKq3Vssg3+iddPmOTutptYW6Nd S1hQ== MIME-Version: 1.0 X-Received: by 10.152.7.180 with SMTP id k20mr26926627laa.4.1420886812266; Sat, 10 Jan 2015 02:46:52 -0800 (PST) Sender: jlehen@gmail.com Received: by 10.114.80.4 with HTTP; Sat, 10 Jan 2015 02:46:52 -0800 (PST) In-Reply-To: <201501100648.t0A6ma3T055037@svn.freebsd.org> References: <201501100648.t0A6ma3T055037@svn.freebsd.org> Date: Sat, 10 Jan 2015 11:46:52 +0100 X-Google-Sender-Auth: KQpabvG2EENOsWQiDz3K_-z2ZK8 Message-ID: Subject: Re: svn commit: r276904 - head/sys/kern From: Jeremie Le Hen To: Xin LI Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 10:46:54 -0000 On Sat, Jan 10, 2015 at 7:48 AM, Xin LI wrote: > Author: delphij > Date: Sat Jan 10 06:48:35 2015 > New Revision: 276904 > URL: https://svnweb.freebsd.org/changeset/base/276904 > > Log: > Improve style and fix a possible use-after-free case introduced in r268384 > by reinitializing the 'freestate' pointer after freeing the memory. > > Obtained from: HardenedBSD (71fab80c5dd3034b71a29a61064625018671bbeb) > PR: 194525 > Submitted by: Oliver Pinter > MFC after: 2 weeks > > Modified: > head/sys/kern/kern_lockf.c Shouldn't there be a security advisory for this one? -- Jeremie Le Hen jlh@FreeBSD.org From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 13:56: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 C3931CB; Sat, 10 Jan 2015 13:56: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 95981907; Sat, 10 Jan 2015 13:56: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 t0ADuRIV057539; Sat, 10 Jan 2015 13:56:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ADuQXk057536; Sat, 10 Jan 2015 13:56:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501101356.t0ADuQXk057536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 10 Jan 2015 13:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276911 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 13:56:27 -0000 Author: tuexen Date: Sat Jan 10 13:56:26 2015 New Revision: 276911 URL: https://svnweb.freebsd.org/changeset/base/276911 Log: Retire SCTP_BUF_EXTEND_SIZE. This patch was suggested by Robert Watson. Modified: head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_os_bsd.h Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Sat Jan 10 10:41:23 2015 (r276910) +++ head/sys/netinet/sctp_bsd_addr.c Sat Jan 10 13:56:26 2015 (r276911) @@ -381,17 +381,7 @@ sctp_get_mbuf_for_msg(unsigned int space return (m); } if (allonebuf) { - int siz; - - if (SCTP_BUF_IS_EXTENDED(m)) { - siz = SCTP_BUF_EXTEND_SIZE(m); - } else { - if (want_header) - siz = MHLEN; - else - siz = MLEN; - } - if (siz < space_needed) { + if (SCTP_BUF_SIZE(m) < space_needed) { m_freem(m); return (NULL); } Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Jan 10 10:41:23 2015 (r276910) +++ head/sys/netinet/sctp_input.c Sat Jan 10 13:56:26 2015 (r276911) @@ -5967,19 +5967,6 @@ out: return; } -#if 0 -static void -sctp_print_mbuf_chain(struct mbuf *m) -{ - for (; m; m = SCTP_BUF_NEXT(m)) { - SCTP_PRINTF("%p: m_len = %ld\n", (void *)m, SCTP_BUF_LEN(m)); - if (SCTP_BUF_IS_EXTENDED(m)) - SCTP_PRINTF("%p: extend_size = %d\n", (void *)m, SCTP_BUF_EXTEND_SIZE(m)); - } -} - -#endif - #ifdef INET void sctp_input_with_port(struct mbuf *i_pak, int off, uint16_t port) Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Sat Jan 10 10:41:23 2015 (r276910) +++ head/sys/netinet/sctp_os_bsd.h Sat Jan 10 13:56:26 2015 (r276911) @@ -299,7 +299,7 @@ typedef struct callout sctp_os_timer_t; #define SCTP_BUF_RESV_UF(m, size) m->m_data += size #define SCTP_BUF_AT(m, size) m->m_data + size #define SCTP_BUF_IS_EXTENDED(m) (m->m_flags & M_EXT) -#define SCTP_BUF_EXTEND_SIZE(m) (m->m_ext.ext_size) +#define SCTP_BUF_SIZE M_SIZE #define SCTP_BUF_TYPE(m) (m->m_type) #define SCTP_BUF_RECVIF(m) (m->m_pkthdr.rcvif) #define SCTP_BUF_PREPEND M_PREPEND From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 18:28: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 AA4B3EEE; Sat, 10 Jan 2015 18:28: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 95B4C1F1; Sat, 10 Jan 2015 18:28: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 t0AISx8J084160; Sat, 10 Jan 2015 18:28:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AISx3v084159; Sat, 10 Jan 2015 18:28:59 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501101828.t0AISx3v084159@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 10 Jan 2015 18:28:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276913 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 18:28:59 -0000 Author: mav Date: Sat Jan 10 18:28:58 2015 New Revision: 276913 URL: https://svnweb.freebsd.org/changeset/base/276913 Log: Use new optimized dmu_read_uio_dbuf() for ZVOLs in device mode. This slightly reduces overhead by avoiding dnode_hold()/dnode_rele() calls. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Jan 10 16:55:28 2015 (r276912) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Jan 10 18:28:58 2015 (r276913) @@ -1818,7 +1818,7 @@ zvol_read(struct cdev *dev, struct uio * if (bytes > volsize - uio->uio_loffset) bytes = volsize - uio->uio_loffset; - error = dmu_read_uio(zv->zv_objset, ZVOL_OBJ, uio, bytes); + error = dmu_read_uio_dbuf(zv->zv_dbuf, uio, bytes); if (error) { /* convert checksum errors into IO errors */ if (error == ECKSUM) From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 20:50:00 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 BCEC350A; Sat, 10 Jan 2015 20:50:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DF29AF; Sat, 10 Jan 2015 20:50:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0AKo0Zk049801; Sat, 10 Jan 2015 20:50:00 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AKnwt6049741; Sat, 10 Jan 2015 20:49:58 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501102049.t0AKnwt6049741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 10 Jan 2015 20:49:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276914 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 20:50:00 -0000 Author: tuexen Date: Sat Jan 10 20:49:57 2015 New Revision: 276914 URL: https://svnweb.freebsd.org/changeset/base/276914 Log: Minimize the usage of SCTP_BUF_IS_EXTENDED. This should help Robert... Modified: head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_bsd_addr.c ============================================================================== --- head/sys/netinet/sctp_bsd_addr.c Sat Jan 10 18:28:58 2015 (r276913) +++ head/sys/netinet/sctp_bsd_addr.c Sat Jan 10 20:49:57 2015 (r276914) @@ -392,9 +392,7 @@ sctp_get_mbuf_for_msg(unsigned int space } #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - if (SCTP_BUF_IS_EXTENDED(m)) { - sctp_log_mb(m, SCTP_MBUF_IALLOC); - } + sctp_log_mb(m, SCTP_MBUF_IALLOC); } #endif return (m); Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Sat Jan 10 18:28:58 2015 (r276913) +++ head/sys/netinet/sctp_indata.c Sat Jan 10 20:49:57 2015 (r276914) @@ -1493,13 +1493,7 @@ sctp_process_a_data_chunk(struct sctp_tc the_len, M_NOWAIT); #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = dmbuf; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(dmbuf, SCTP_MBUF_ICOPY); } #endif } else { Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sat Jan 10 18:28:58 2015 (r276913) +++ head/sys/netinet/sctp_input.c Sat Jan 10 20:49:57 2015 (r276914) @@ -2443,13 +2443,7 @@ sctp_handle_cookie_echo(struct mbuf *m, } #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = m_sig; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_SPLIT); - } - } + sctp_log_mbc(m_sig, SCTP_MBUF_SPLIT); } #endif @@ -5501,13 +5495,7 @@ process_control_chunks: } else { #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = SCTP_BUF_NEXT(mm); mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(SCTP_BUF_NEXT(mm), SCTP_MBUF_ICOPY); } #endif sctp_queue_op_err(stcb, mm); @@ -5997,13 +5985,7 @@ sctp_input_with_port(struct mbuf *i_pak, #ifdef SCTP_MBUF_LOGGING /* Log in any input mbufs */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_INPUT); - } - } + sctp_log_mbc(m, SCTP_MBUF_INPUT); } #endif #ifdef SCTP_PACKET_LOGGING Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sat Jan 10 18:28:58 2015 (r276913) +++ head/sys/netinet/sctp_output.c Sat Jan 10 20:49:57 2015 (r276914) @@ -3846,13 +3846,7 @@ sctp_add_cookie(struct mbuf *init, int i } #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = copy_init; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(copy_init, SCTP_MBUF_ICOPY); } #endif copy_initack = SCTP_M_COPYM(initack, initack_offset, M_COPYALL, @@ -3864,13 +3858,7 @@ sctp_add_cookie(struct mbuf *init, int i } #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = copy_initack; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(copy_initack, SCTP_MBUF_ICOPY); } #endif /* easy side we just drop it on the end */ @@ -6482,13 +6470,7 @@ error_out: appendchain = SCTP_M_COPYM(clonechain, 0, M_COPYALL, M_NOWAIT); #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = appendchain; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(appendchain, SCTP_MBUF_ICOPY); } #endif } @@ -6581,13 +6563,7 @@ sctp_sendall_iterator(struct sctp_inpcb } #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(m, SCTP_MBUF_ICOPY); } #endif } else { @@ -7371,13 +7347,7 @@ dont_do_it: } #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = chk->data; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(chk->data, SCTP_MBUF_ICOPY); } #endif /* Pull off the data */ @@ -8973,13 +8943,7 @@ sctp_send_cookie_echo(struct mbuf *m, } #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = cookie; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(cookie, SCTP_MBUF_ICOPY); } #endif break; @@ -9045,13 +9009,7 @@ sctp_send_heartbeat_ack(struct sctp_tcb } #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = outchain; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(outchain, SCTP_MBUF_ICOPY); } #endif chdr = mtod(outchain, struct sctp_chunkhdr *); @@ -9330,13 +9288,7 @@ sctp_send_asconf_ack(struct sctp_tcb *st } #ifdef SCTP_MBUF_LOGGING if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = m_ack; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_ICOPY); - } - } + sctp_log_mbc(m_ack, SCTP_MBUF_ICOPY); } #endif Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Sat Jan 10 18:28:58 2015 (r276913) +++ head/sys/netinet/sctputil.c Sat Jan 10 20:49:57 2015 (r276914) @@ -217,6 +217,7 @@ sctp_log_fr(uint32_t biggest_tsn, uint32 sctp_clog.x.misc.log4); } +#ifdef SCTP_MBUF_LOGGING void sctp_log_mb(struct mbuf *m, int from) { @@ -243,6 +244,18 @@ sctp_log_mb(struct mbuf *m, int from) } void +sctp_log_mbc(struct mbuf *m, int from) +{ + struct mbuf *mat; + + for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { + sctp_log_mb(mat, from); + } +} + +#endif + +void sctp_log_strm_del(struct sctp_queued_to_read *control, struct sctp_queued_to_read *poschk, int from) { struct sctp_cwnd_log sctp_clog; @@ -413,7 +426,8 @@ sctp_log_rwnd_set(uint8_t from, uint32_t sctp_clog.x.misc.log4); } -void +#ifdef SCTP_MBCNT_LOGGING +static void sctp_log_mbcnt(uint8_t from, uint32_t total_oq, uint32_t book, uint32_t total_mbcnt_q, uint32_t mbcnt) { struct sctp_cwnd_log sctp_clog; @@ -431,6 +445,8 @@ sctp_log_mbcnt(uint8_t from, uint32_t to sctp_clog.x.misc.log4); } +#endif + void sctp_misc_ints(uint8_t from, uint32_t a, uint32_t b, uint32_t c, uint32_t d) { @@ -6157,9 +6173,7 @@ struct mbuf * sctp_m_free(struct mbuf *m) { if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - if (SCTP_BUF_IS_EXTENDED(m)) { - sctp_log_mb(m, SCTP_MBUF_IFREE); - } + sctp_log_mb(m, SCTP_MBUF_IFREE); } return (m_free(m)); } Modified: head/sys/netinet/sctputil.h ============================================================================== --- head/sys/netinet/sctputil.h Sat Jan 10 18:28:58 2015 (r276913) +++ head/sys/netinet/sctputil.h Sat Jan 10 20:49:57 2015 (r276914) @@ -349,10 +349,16 @@ void sctp_log_strm_del_alt(struct sctp_t void sctp_log_nagle_event(struct sctp_tcb *stcb, int action); +#ifdef SCTP_MBUF_LOGGING void sctp_log_mb(struct mbuf *m, int from); void + sctp_log_mbc(struct mbuf *m, int from); + +#endif + +void sctp_sblog(struct sockbuf *sb, struct sctp_tcb *stcb, int from, int incr); @@ -369,7 +375,6 @@ void sctp_log_lock(struct sctp_inpcb *in void sctp_log_maxburst(struct sctp_tcb *stcb, struct sctp_nets *, int, int, uint8_t); void sctp_log_block(uint8_t, struct sctp_association *, int); void sctp_log_rwnd(uint8_t, uint32_t, uint32_t, uint32_t); -void sctp_log_mbcnt(uint8_t, uint32_t, uint32_t, uint32_t, uint32_t); void sctp_log_rwnd_set(uint8_t, uint32_t, uint32_t, uint32_t, uint32_t); int sctp_fill_stat_log(void *, size_t *); void sctp_log_fr(uint32_t, uint32_t, uint32_t, int); Modified: head/sys/netinet6/sctp6_usrreq.c ============================================================================== --- head/sys/netinet6/sctp6_usrreq.c Sat Jan 10 18:28:58 2015 (r276913) +++ head/sys/netinet6/sctp6_usrreq.c Sat Jan 10 20:49:57 2015 (r276914) @@ -94,13 +94,7 @@ sctp6_input_with_port(struct mbuf **i_pa #ifdef SCTP_MBUF_LOGGING /* Log in any input mbufs */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - struct mbuf *mat; - - for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { - if (SCTP_BUF_IS_EXTENDED(mat)) { - sctp_log_mb(mat, SCTP_MBUF_INPUT); - } - } + sctp_log_mbc(m, SCTP_MBUF_INPUT); } #endif #ifdef SCTP_PACKET_LOGGING From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 21:44: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 6580FCCD; Sat, 10 Jan 2015 21:44: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 4DD577CB; Sat, 10 Jan 2015 21:44: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 t0ALiZ0V077239; Sat, 10 Jan 2015 21:44:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ALiVsZ077223; Sat, 10 Jan 2015 21:44:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501102144.t0ALiVsZ077223@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 10 Jan 2015 21:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276915 - in head/usr.bin/clang: bugpoint llc lli llvm-ar llvm-as llvm-bcanalyzer llvm-diff llvm-dis llvm-extract llvm-link llvm-nm opt tblgen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 21:44:35 -0000 Author: dim Date: Sat Jan 10 21:44:31 2015 New Revision: 276915 URL: https://svnweb.freebsd.org/changeset/base/276915 Log: Regenerate the manpages for the additional llvm/clang tools. This contains only very minor updates. Modified: head/usr.bin/clang/bugpoint/bugpoint.1 head/usr.bin/clang/llc/llc.1 head/usr.bin/clang/lli/lli.1 head/usr.bin/clang/llvm-ar/llvm-ar.1 head/usr.bin/clang/llvm-as/llvm-as.1 head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 head/usr.bin/clang/llvm-diff/llvm-diff.1 head/usr.bin/clang/llvm-dis/llvm-dis.1 head/usr.bin/clang/llvm-extract/llvm-extract.1 head/usr.bin/clang/llvm-link/llvm-link.1 head/usr.bin/clang/llvm-nm/llvm-nm.1 head/usr.bin/clang/opt/opt.1 head/usr.bin/clang/tblgen/tblgen.1 Modified: head/usr.bin/clang/bugpoint/bugpoint.1 ============================================================================== --- head/usr.bin/clang/bugpoint/bugpoint.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/bugpoint/bugpoint.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "BUGPOINT" "1" "2014-01-01" "3.4" "LLVM" +.TH "BUGPOINT" "1" "2015-01-10" "3.5" "LLVM" .SH NAME bugpoint \- automatic test case reduction tool . @@ -211,13 +211,6 @@ by compiling the program with the "safe" .UNINDENT .UNINDENT .sp -\fB\-\-profile\-info\-file\fP \fIfilename\fP -.INDENT 0.0 -.INDENT 3.5 -Profile file loaded by \fB\-\-profile\-loader\fP\&. -.UNINDENT -.UNINDENT -.sp \fB\-\-run\-{int,jit,llc,custom}\fP .INDENT 0.0 .INDENT 3.5 @@ -295,6 +288,6 @@ opt|opt .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llc/llc.1 ============================================================================== --- head/usr.bin/clang/llc/llc.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/llc/llc.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLC" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLC" "1" "2015-01-10" "3.5" "LLVM" .SH NAME llc \- LLVM static compiler . @@ -69,7 +69,7 @@ Print a summary of command line options. .B \-O=uint Generate code at different optimization levels. These correspond to the \fB\-O0\fP, \fB\-O1\fP, \fB\-O2\fP, and \fB\-O3\fP optimization levels used by -\fBllvm\-gcc\fP and \fBclang\fP\&. +\fBclang\fP\&. .UNINDENT .INDENT 0.0 .TP @@ -160,12 +160,6 @@ would otherwise not be usable (such as \ .UNINDENT .INDENT 0.0 .TP -.B \-\-enable\-correct\-eh\-support -Instruct the \fBlowerinvoke\fP pass to insert code for correct exception -handling support. This is expensive and is by default omitted for efficiency. -.UNINDENT -.INDENT 0.0 -.TP .B \-\-stats Print statistics recorded by code\-generation passes. .UNINDENT @@ -260,6 +254,6 @@ lli .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/lli/lli.1 ============================================================================== --- head/usr.bin/clang/lli/lli.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/lli/lli.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLI" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLI" "1" "2015-01-10" "3.5" "LLVM" .SH NAME lli \- directly execute programs from LLVM bitcode . @@ -216,13 +216,6 @@ Disable fusing of spill code into instru .UNINDENT .UNINDENT .sp -\fB\-enable\-correct\-eh\-support\fP -.INDENT 0.0 -.INDENT 3.5 -Make the \-lowerinvoke pass insert expensive, but correct, EH code. -.UNINDENT -.UNINDENT -.sp \fB\-jit\-enable\-eh\fP .INDENT 0.0 .INDENT 3.5 @@ -345,6 +338,6 @@ llc|llc .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llvm-ar/llvm-ar.1 ============================================================================== --- head/usr.bin/clang/llvm-ar/llvm-ar.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/llvm-ar/llvm-ar.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-AR" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLVM-AR" "1" "2015-01-10" "3.5" "LLVM" .SH NAME llvm-ar \- LLVM archiver . @@ -385,6 +385,6 @@ ar(1) .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llvm-as/llvm-as.1 ============================================================================== --- head/usr.bin/clang/llvm-as/llvm-as.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/llvm-as/llvm-as.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-AS" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLVM-AS" "1" "2015-01-10" "3.5" "LLVM" .SH NAME llvm-as \- LLVM assembler . @@ -82,6 +82,6 @@ llvm\-dis|llvm\-dis, gccas|gccas .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 ============================================================================== --- head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-BCANALYZER" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLVM-BCANALYZER" "1" "2015-01-10" "3.5" "LLVM" .SH NAME llvm-bcanalyzer \- LLVM bitcode analyzer . @@ -471,6 +471,6 @@ Rate encoding scheme. The percentage is .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llvm-diff/llvm-diff.1 ============================================================================== --- head/usr.bin/clang/llvm-diff/llvm-diff.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/llvm-diff/llvm-diff.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-DIFF" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLVM-DIFF" "1" "2015-01-10" "3.5" "LLVM" .SH NAME llvm-diff \- LLVM structural 'diff' . @@ -72,6 +72,6 @@ massive detected differences in blocks. .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llvm-dis/llvm-dis.1 ============================================================================== --- head/usr.bin/clang/llvm-dis/llvm-dis.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/llvm-dis/llvm-dis.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-DIS" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLVM-DIS" "1" "2015-01-10" "3.5" "LLVM" .SH NAME llvm-dis \- LLVM disassembler . @@ -83,6 +83,6 @@ llvm\-as|llvm\-as .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llvm-extract/llvm-extract.1 ============================================================================== --- head/usr.bin/clang/llvm-extract/llvm-extract.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/llvm-extract/llvm-extract.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-EXTRACT" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLVM-EXTRACT" "1" "2015-01-10" "3.5" "LLVM" .SH NAME llvm-extract \- extract a function from an LLVM module . @@ -124,6 +124,6 @@ bugpoint .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llvm-link/llvm-link.1 ============================================================================== --- head/usr.bin/clang/llvm-link/llvm-link.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/llvm-link/llvm-link.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-LINK" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLVM-LINK" "1" "2015-01-10" "3.5" "LLVM" .SH NAME llvm-link \- LLVM bitcode linker . @@ -84,6 +84,6 @@ occurs, it will exit with a non\-zero va .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/llvm-nm/llvm-nm.1 ============================================================================== --- head/usr.bin/clang/llvm-nm/llvm-nm.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/llvm-nm/llvm-nm.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-NM" "1" "2014-01-01" "3.4" "LLVM" +.TH "LLVM-NM" "1" "2015-01-10" "3.5" "LLVM" .SH NAME llvm-nm \- list LLVM bitcode and object file's symbol table . @@ -208,6 +208,6 @@ llvm\-dis, ar(1), nm(1) .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/opt/opt.1 ============================================================================== --- head/usr.bin/clang/opt/opt.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/opt/opt.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "OPT" "1" "2014-01-01" "3.4" "LLVM" +.TH "OPT" "1" "2015-01-10" "3.5" "LLVM" .SH NAME opt \- LLVM optimizer . @@ -95,9 +95,8 @@ order in which they are executed (within .TP .B \-std\-compile\-opts This is short hand for a standard list of \fIcompile time optimization\fP passes. -This is typically used to optimize the output from the llvm\-gcc front end. It -might be useful for other front end compilers as well. To discover the full -set of options available, use the following command: +It might be useful for other front end compilers as well. To discover the +full set of options available, use the following command: .INDENT 7.0 .INDENT 3.5 .sp @@ -142,11 +141,6 @@ this kind of problem. .UNINDENT .INDENT 0.0 .TP -.B \-profile\-info\-file -Specify the name of the file loaded by the \fB\-profile\-loader\fP option. -.UNINDENT -.INDENT 0.0 -.TP .B \-stats Print statistics. .UNINDENT @@ -193,6 +187,6 @@ occurs, it will exit with a non\-zero va .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . Modified: head/usr.bin/clang/tblgen/tblgen.1 ============================================================================== --- head/usr.bin/clang/tblgen/tblgen.1 Sat Jan 10 20:49:57 2015 (r276914) +++ head/usr.bin/clang/tblgen/tblgen.1 Sat Jan 10 21:44:31 2015 (r276915) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "TBLGEN" "1" "2014-01-01" "3.4" "LLVM" +.TH "TBLGEN" "1" "2015-01-10" "3.5" "LLVM" .SH NAME tblgen \- Target Description To C++ Code Generator . @@ -42,7 +42,7 @@ users of LLVM will not need to use this writing an LLVM target backend. .sp The input and output of \fBtblgen\fP is beyond the scope of this short -introduction. Please see \fB\&../TableGenFundamentals\fP\&. +introduction; please see the \fBintroduction to TableGen\fP\&. .sp The \fIfilename\fP argument specifies the name of a Target Description (\fB\&.td\fP) file to read as input. @@ -177,6 +177,6 @@ occurs, it will exit with a non\-zero va .SH AUTHOR Maintained by The LLVM Team (http://llvm.org/). .SH COPYRIGHT -2003-2013, LLVM Project +2003-2014, LLVM Project .\" Generated by docutils manpage writer. . From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 932E71BF; Sat, 10 Jan 2015 22:03: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 7F290958; Sat, 10 Jan 2015 22:03: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 t0AM3VbZ086579; Sat, 10 Jan 2015 22:03:31 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3V86086578; Sat, 10 Jan 2015 22:03:31 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3V86086578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276916 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:31 -0000 Author: gjb Date: Sat Jan 10 22:03:30 2015 New Revision: 276916 URL: https://svnweb.freebsd.org/changeset/base/276916 Log: Document r270096, autofs(5). 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 Sat Jan 10 21:44:31 2015 (r276915) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:30 2015 (r276916) @@ -291,7 +291,15 @@ File Systems -   + The + new filesystem automount facility, &man.autofs.5;, has been + added. The new &man.autofs.5; facility is similar to that + found in other &unix;-like operating systems, such as + OS X™ and Solaris™. The &man.autofs.5; + facility uses a &sun;-compatible &man.auto.master.5; + configuration file, and is administered with the + &man.automount.8; userland utility, and the + &man.automountd.8; and &man.autounmountd.8; daemons. ZFS From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 84BA5293; Sat, 10 Jan 2015 22:03: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 71300959; Sat, 10 Jan 2015 22:03: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 t0AM3YM5086630; Sat, 10 Jan 2015 22:03:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3Yll086629; Sat, 10 Jan 2015 22:03:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3Yll086629@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276917 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:34 -0000 Author: gjb Date: Sat Jan 10 22:03:33 2015 New Revision: 276917 URL: https://svnweb.freebsd.org/changeset/base/276917 Log: Document r270675, mailwrapper(8) supports mailer.conf(5) in LOCALBASE. 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 Sat Jan 10 22:03:30 2015 (r276916) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:33 2015 (r276917) @@ -376,6 +376,12 @@ shared library is no longer installed, allowing the Ports Collection to use a modern version of the library. + The &man.mailwrapper.8; utility has been + updated to use &man.mailer.conf.5; from the + LOCALBASE environment variable, which + defaults to /usr/local + if unset. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 6EDBB3D9; Sat, 10 Jan 2015 22:03: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 5A74995B; Sat, 10 Jan 2015 22:03: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 t0AM3bcC086674; Sat, 10 Jan 2015 22:03:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3bwC086673; Sat, 10 Jan 2015 22:03:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3bwC086673@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276918 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:37 -0000 Author: gjb Date: Sat Jan 10 22:03:36 2015 New Revision: 276918 URL: https://svnweb.freebsd.org/changeset/base/276918 Log: Document r270676, support for ${LOCALBASE}/etc/rc.conf.d in rc(8). 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 Sat Jan 10 22:03:33 2015 (r276917) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:36 2015 (r276918) @@ -385,7 +385,11 @@ <filename>/etc/rc.d</filename> Scripts -   + The &man.rc.8; subsystem has been + updated to allow configuring services in ${LOCALBASE}/etc/rc.conf.d/. + If LOCALBASE is unset, it defaults to + /usr/local. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 5BEF5517; Sat, 10 Jan 2015 22:03: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 48ABB95D; Sat, 10 Jan 2015 22:03: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 t0AM3eu6086724; Sat, 10 Jan 2015 22:03:40 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3eFX086723; Sat, 10 Jan 2015 22:03:40 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3eFX086723@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276919 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:40 -0000 Author: gjb Date: Sat Jan 10 22:03:39 2015 New Revision: 276919 URL: https://svnweb.freebsd.org/changeset/base/276919 Log: Document r270745, ps(1) 'tracer' keyword addition. 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 Sat Jan 10 22:03:36 2015 (r276918) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:39 2015 (r276919) @@ -382,6 +382,10 @@ defaults to /usr/local if unset. + The &man.ps.1; utility has been updated + to include a new keyword, tracer, which displays + the parent PID of a child process. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 17E2D63F; Sat, 10 Jan 2015 22:03: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 0423D95E; Sat, 10 Jan 2015 22:03: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 t0AM3gJ7086777; Sat, 10 Jan 2015 22:03:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3gaQ086776; Sat, 10 Jan 2015 22:03:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3gaQ086776@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276920 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:43 -0000 Author: gjb Date: Sat Jan 10 22:03:42 2015 New Revision: 276920 URL: https://svnweb.freebsd.org/changeset/base/276920 Log: Add a 'periodic-scripts' subsection to the 'userland' section. Document r271321, don't cross mount boundaries when cleaning tmp files. 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 Sat Jan 10 22:03:39 2015 (r276919) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:42 2015 (r276920) @@ -395,6 +395,15 @@ If LOCALBASE is unset, it defaults to /usr/local. + + + <filename>/etc/periodic</filename> Scripts + + The daily &man.periodic.8; script + 110.clean-tmps has been updated to + avoid crossing filesystem mount boundaries when cleaning + files in /tmp. + From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 BDDB7765; Sat, 10 Jan 2015 22:03: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 AA593964; Sat, 10 Jan 2015 22:03: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 t0AM3jUd086826; Sat, 10 Jan 2015 22:03:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3jZk086825; Sat, 10 Jan 2015 22:03:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3jZk086825@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276921 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:45 -0000 Author: gjb Date: Sat Jan 10 22:03:44 2015 New Revision: 276921 URL: https://svnweb.freebsd.org/changeset/base/276921 Log: Document r271482, mkimg(1) support for empty partition entries. 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 Sat Jan 10 22:03:42 2015 (r276920) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:44 2015 (r276921) @@ -386,6 +386,9 @@ to include a new keyword, tracer, which displays the parent PID of a child process. + Support for adding empty partitions has + been added to the &man.mkimg.1; utility. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 8A071895; Sat, 10 Jan 2015 22: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 76FE5966; Sat, 10 Jan 2015 22: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 t0AM3mPX086873; Sat, 10 Jan 2015 22:03:48 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3mXs086872; Sat, 10 Jan 2015 22:03:48 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3mXs086872@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276922 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:48 -0000 Author: gjb Date: Sat Jan 10 22:03:47 2015 New Revision: 276922 URL: https://svnweb.freebsd.org/changeset/base/276922 Log: Document r271697, dtrace fixes for FreeBSD/powerpc. 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 Sat Jan 10 22:03:44 2015 (r276921) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:47 2015 (r276922) @@ -173,6 +173,12 @@ kern.vty=vt to &man.loader.conf.5; and reboot the system. + Support for &man.dtrace.1; + stack tracing has been fixed for &os;/&arch.powerpc;, using the + trapexit() and + asttrapexit() functions instead of checking + within addressed kernel space. + Virtualization support From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 66B86A48; Sat, 10 Jan 2015 22:03: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 5300C96B; Sat, 10 Jan 2015 22:03: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 t0AM3pBR086931; Sat, 10 Jan 2015 22:03:51 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3pm9086930; Sat, 10 Jan 2015 22:03:51 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3pm9086930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276923 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:51 -0000 Author: gjb Date: Sat Jan 10 22:03:50 2015 New Revision: 276923 URL: https://svnweb.freebsd.org/changeset/base/276923 Log: Document r271705, hardware context support added to drm/i915. 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 Sat Jan 10 22:03:47 2015 (r276922) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:50 2015 (r276923) @@ -179,6 +179,11 @@ asttrapexit() functions instead of checking within addressed kernel space. + Hardware context support has been + added to the drm/i915 driver, adding + support for Mesa 9.2 and + later. + Virtualization support From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 32A0FB39; Sat, 10 Jan 2015 22:03: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 1F9E696E; Sat, 10 Jan 2015 22:03: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 t0AM3s5n086979; Sat, 10 Jan 2015 22:03:54 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3r7u086978; Sat, 10 Jan 2015 22:03:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3r7u086978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276924 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:54 -0000 Author: gjb Date: Sat Jan 10 22:03:53 2015 New Revision: 276924 URL: https://svnweb.freebsd.org/changeset/base/276924 Log: Bump copyright year, following past few commits. 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 Sat Jan 10 22:03:50 2015 (r276923) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:53 2015 (r276924) @@ -16,7 +16,7 @@ $FreeBSD$ - 2014 + 2015 The &os; Documentation Project From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 B8783DC9; Sat, 10 Jan 2015 22:03: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 A49C3974; Sat, 10 Jan 2015 22:03: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 t0AM3xeY087098; Sat, 10 Jan 2015 22:03:59 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3xHD087097; Sat, 10 Jan 2015 22:03:59 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3xHD087097@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276926 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:59 -0000 Author: gjb Date: Sat Jan 10 22:03:58 2015 New Revision: 276926 URL: https://svnweb.freebsd.org/changeset/base/276926 Log: Document r272089, ipfw(4) fix when using dummynet(4) at layer 2 leading to possible kernel panic. 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 Sat Jan 10 22:03:56 2015 (r276925) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:58 2015 (r276926) @@ -277,6 +277,10 @@ Support for the &intel; Centrino™ Wireless-N 105 chipset has been added. + + 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. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 BBADBF23; Sat, 10 Jan 2015 22:04: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 A8822979; Sat, 10 Jan 2015 22:04: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 t0AM42Ll087157; Sat, 10 Jan 2015 22:04:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM42c6087156; Sat, 10 Jan 2015 22:04:02 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM42c6087156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276927 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:02 -0000 Author: gjb Date: Sat Jan 10 22:04:01 2015 New Revision: 276927 URL: https://svnweb.freebsd.org/changeset/base/276927 Log: Document r272166, primes(6) fix for incorrectly-returned values. 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 Sat Jan 10 22:03:58 2015 (r276926) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:01 2015 (r276927) @@ -404,6 +404,13 @@ Support for adding empty partitions has been added to the &man.mkimg.1; utility. + The &man.primes.6; utility has been + updated to correctly enumerate prime numbers between + 4295098369 and + 3825123056546413050, which prior to this + change, it would be possible for returned values to be + incorrectly identified as prime numbers. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:03: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 E7535C56; Sat, 10 Jan 2015 22:03: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 D3C43970; Sat, 10 Jan 2015 22:03: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 t0AM3ubi087030; Sat, 10 Jan 2015 22:03:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM3uvA087029; Sat, 10 Jan 2015 22:03:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102203.t0AM3uvA087029@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276925 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:03:57 -0000 Author: gjb Date: Sat Jan 10 22:03:56 2015 New Revision: 276925 URL: https://svnweb.freebsd.org/changeset/base/276925 Log: Add an 'abi-compat' subsection to the 'userland' section. Document r271982, compat.linux.osrelease updated after support for CentOS 6 ports has been added. 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 Sat Jan 10 22:03:53 2015 (r276924) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:56 2015 (r276925) @@ -400,6 +400,17 @@ Support for adding empty partitions has been added to the &man.mkimg.1; utility. + + <acronym>ABI</acronym> Compatibility + + The &linux; compatiblity version has + been updated to 2.6.18. The + compat.linux.osrelease &man.sysctl.8; is + evaluated when building the emulators/linux-c6 and related + ports. + + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 8253D75; Sat, 10 Jan 2015 22:04: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 6F2C097C; Sat, 10 Jan 2015 22:04: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 t0AM45Cm087208; Sat, 10 Jan 2015 22:04:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM45uM087207; Sat, 10 Jan 2015 22:04:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM45uM087207@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276928 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:05 -0000 Author: gjb Date: Sat Jan 10 22:04:04 2015 New Revision: 276928 URL: https://svnweb.freebsd.org/changeset/base/276928 Log: Document r272198, mkimg(1) longopts to obtain information about the utility itself. 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 Sat Jan 10 22:04:01 2015 (r276927) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:04 2015 (r276928) @@ -411,6 +411,43 @@ change, it would be possible for returned values to be incorrectly identified as prime numbers. + The &man.mkimg.1; utility has been + updated to include three options used to print information + about &man.mkimg.1; itself: + + + + + + + + Option + Output + + + + + + --version + The current version of the &man.mkimg.1; + utility + + + + --formats + The disk image file formats supported by + &man.mkimg.1; + + + + --schemes + The partition schemes supported by + &man.mkimg.1; + + + + + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 B18B63F2; Sat, 10 Jan 2015 22:04: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 9E453986; Sat, 10 Jan 2015 22:04: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 t0AM4Dx5087363; Sat, 10 Jan 2015 22:04:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4DO6087361; Sat, 10 Jan 2015 22:04:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4DO6087361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276931 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:13 -0000 Author: gjb Date: Sat Jan 10 22:04:12 2015 New Revision: 276931 URL: https://svnweb.freebsd.org/changeset/base/276931 Log: Document r272350, MK_ARM_EABI removal. 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 Sat Jan 10 22:04:10 2015 (r276930) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:12 2015 (r276931) @@ -462,6 +462,9 @@ multiple boot environments, such as that provided by sysutils/beadm. + The MK_ARM_EABI + &man.src.conf.5; option has been removed. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 820AF52A; Sat, 10 Jan 2015 22:04: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 6EA1A98A; Sat, 10 Jan 2015 22: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 t0AM4Gi8087430; Sat, 10 Jan 2015 22:04:16 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4G1E087429; Sat, 10 Jan 2015 22:04:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4G1E087429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276932 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:16 -0000 Author: gjb Date: Sat Jan 10 22:04:15 2015 New Revision: 276932 URL: https://svnweb.freebsd.org/changeset/base/276932 Log: Document r272488, userland CTF support in DTrace. 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 Sat Jan 10 22:04:12 2015 (r276931) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:15 2015 (r276932) @@ -465,6 +465,12 @@ The MK_ARM_EABI &man.src.conf.5; option has been removed. + Userland &man.ctf.5; support in + &man.dtrace.1; has been added. With this change, &man.dtrace.1; + is able to resolve type info for function and + USDT probe arguments, and function return + values. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 59CE41A0; Sat, 10 Jan 2015 22:04: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 46722981; Sat, 10 Jan 2015 22:04: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 t0AM488X087253; Sat, 10 Jan 2015 22:04:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM48xJ087252; Sat, 10 Jan 2015 22:04:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM48xJ087252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276929 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:08 -0000 Author: gjb Date: Sat Jan 10 22:04:07 2015 New Revision: 276929 URL: https://svnweb.freebsd.org/changeset/base/276929 Log: Document r272273, '%U' and '%W' support added to strptime(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 Sat Jan 10 22:04:04 2015 (r276928) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:07 2015 (r276929) @@ -448,6 +448,10 @@ + The &man.strptime.3; library has been + updated to add support for POSIX-2001 + features %U and %W. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 0E9372D4; Sat, 10 Jan 2015 22:04: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 EF0A4983; Sat, 10 Jan 2015 22:04: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 t0AM4AVE087306; Sat, 10 Jan 2015 22:04:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4AbS087305; Sat, 10 Jan 2015 22:04:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4AbS087305@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276930 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:11 -0000 Author: gjb Date: Sat Jan 10 22:04:10 2015 New Revision: 276930 URL: https://svnweb.freebsd.org/changeset/base/276930 Log: Document r272274, canmount=off set on /var when installing on ZFS. 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 Sat Jan 10 22:04:07 2015 (r276929) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:10 2015 (r276930) @@ -452,6 +452,16 @@ updated to add support for POSIX-2001 features %U and %W. + The &os; installation utility, + &man.bsdinstall.8;, has been updated to set the + canmount &man.zfs.8; property to + off for the + /var dataset, preventing + the contents of directories within /var from conflicting when using + multiple boot environments, such as that provided by sysutils/beadm. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 D6059665; Sat, 10 Jan 2015 22:04: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 C1F0F98F; Sat, 10 Jan 2015 22:04: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 t0AM4JY8087481; Sat, 10 Jan 2015 22:04:19 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4JRI087479; Sat, 10 Jan 2015 22:04:19 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4JRI087479@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276933 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:20 -0000 Author: gjb Date: Sat Jan 10 22:04:18 2015 New Revision: 276933 URL: https://svnweb.freebsd.org/changeset/base/276933 Log: Document r272720, PLPMTUD blackhole detection (RFC 4821). Add Limelight 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 Sat Jan 10 22:04:15 2015 (r276932) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:18 2015 (r276933) @@ -290,6 +290,81 @@ Support for the IPX network transport protocol has been removed, and will not be supported in &os; 11 and later releases. + + Support for PLPMTUD + blackhole detection (RFC 4821) has been + added to the &man.tcp.4; stack, disabled by default. New + control tunables have been added: + + + + + + + + Tunable + Description + + + + + + net.inet.tcp.pmtud_blackhole_detection + Enables or disables PLPMTUD + blackhole detection + + + + net.inet.tcp.pmtud_blackhole_mss + MSS to try for IPv4 + + + + net.inet.tcp.v6pmtud_blackhole_mss + MSS to try for IPv6 + + + + + + New monitoring &man.sysctl.8;s haven been added: + + + + + + + + Tunable + Description + + + + + + net.inet.tcp.pmtud_blackhole_activated + Number of times the code was activated to attempt + downshifting the MSS + + + + net.inet.tcp.pmtud_blackhole_min_activated + Number of times the blackhole + MSS was used in an attempt to + downshift + + + + net.inet.tcp.pmtud_blackhole_failed + Number of times that the blackhole failed to + connect after downshifting the + MSS + + + + + Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Sat Jan 10 22:04:15 2015 (r276932) +++ head/release/doc/share/xml/sponsor.ent Sat Jan 10 22:04:18 2015 (r276933) @@ -23,6 +23,7 @@ + From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 899BD8F0; Sat, 10 Jan 2015 22:04: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 7572C994; Sat, 10 Jan 2015 22:04: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 t0AM4PeR087586; Sat, 10 Jan 2015 22:04:25 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4PSA087585; Sat, 10 Jan 2015 22:04:25 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4PSA087585@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276935 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:25 -0000 Author: gjb Date: Sat Jan 10 22:04:24 2015 New Revision: 276935 URL: https://svnweb.freebsd.org/changeset/base/276935 Log: Document r272842, r272848, dl_iterate_pthr(3) always returns the path of the dlpi_name ELF object. 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 Sat Jan 10 22:04:21 2015 (r276934) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:24 2015 (r276935) @@ -550,6 +550,12 @@ USDT probe arguments, and function return values. + The &man.dl.iterate.phdr.3; library has been + changed to always return the path name of the + ELF object in the + dlpi_name structure member. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 BC30E774; Sat, 10 Jan 2015 22:04: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 A88A8991; Sat, 10 Jan 2015 22:04: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 t0AM4MdL087538; Sat, 10 Jan 2015 22:04:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4MNJ087537; Sat, 10 Jan 2015 22:04:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4MNJ087537@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276934 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:22 -0000 Author: gjb Date: Sat Jan 10 22:04:21 2015 New Revision: 276934 URL: https://svnweb.freebsd.org/changeset/base/276934 Log: Document r272730, support for AR816x/AR817x in alc(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 Sat Jan 10 22:04:18 2015 (r276933) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:21 2015 (r276934) @@ -281,6 +281,10 @@ 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 &man.alc.4; driver has been + updated to support AR816x and AR817x ethernet + controllers. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 18811B39; Sat, 10 Jan 2015 22:04: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 050CE99A; Sat, 10 Jan 2015 22:04: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 t0AM4UG3087706; Sat, 10 Jan 2015 22:04:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4UGJ087705; Sat, 10 Jan 2015 22:04:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4UGJ087705@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276937 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:31 -0000 Author: gjb Date: Sat Jan 10 22:04:30 2015 New Revision: 276937 URL: https://svnweb.freebsd.org/changeset/base/276937 Log: Document r273178, kern.vt.spclkeys replaced with individual kern.vt.kbd_* variants. 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 Sat Jan 10 22:04:27 2015 (r276936) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:30 2015 (r276937) @@ -184,6 +184,11 @@ support for Mesa 9.2 and later. + The &man.vt.4; driver has been updated, + replacing the bitmapped kern.vt.spclkeys + &man.sysctl.8; with individual kern.vt.kbd_* + variants. + Virtualization support From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 4BA1DA19; Sat, 10 Jan 2015 22: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 38080998; Sat, 10 Jan 2015 22: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 t0AM4SgS087641; Sat, 10 Jan 2015 22:04:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4SJY087640; Sat, 10 Jan 2015 22:04:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4SJY087640@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276936 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:28 -0000 Author: gjb Date: Sat Jan 10 22:04:27 2015 New Revision: 276936 URL: https://svnweb.freebsd.org/changeset/base/276936 Log: Document r273146, OpenSSL updated to 1.0.1j. 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 Sat Jan 10 22:04:24 2015 (r276935) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:27 2015 (r276936) @@ -600,9 +600,6 @@ &man.byacc.1; has been updated to version 20140101. - OpenSSL has - been updated to version 1.0.1.f. - &man.jemalloc.3; has been updated to version 3.5.0. @@ -630,6 +627,9 @@ file has been updated to version 5.22. + + OpenSSL has + been updated to version 1.0.1j. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04:33 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 E361FC92; Sat, 10 Jan 2015 22:04: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 D054399E; Sat, 10 Jan 2015 22:04: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 t0AM4XhN087756; Sat, 10 Jan 2015 22:04:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4Xu6087755; Sat, 10 Jan 2015 22:04:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4Xu6087755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276938 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:34 -0000 Author: gjb Date: Sat Jan 10 22:04:32 2015 New Revision: 276938 URL: https://svnweb.freebsd.org/changeset/base/276938 Log: Document r273264, SD card detection instability fix for RPI. 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 Sat Jan 10 22:04:30 2015 (r276937) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:32 2015 (r276938) @@ -232,6 +232,10 @@ The &man.nand.4; device is enabled for ARM devices by default. + + An issue that could cause + instability when detecting SD cards on the + Raspberry Pi SOC has been fixed. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 8A5F8F14; Sat, 10 Jan 2015 22:04: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 57E989A3; Sat, 10 Jan 2015 22:04: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 t0AM4d0j087853; Sat, 10 Jan 2015 22:04:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4dfV087852; Sat, 10 Jan 2015 22:04:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4dfV087852@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276940 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:39 -0000 Author: gjb Date: Sat Jan 10 22:04:38 2015 New Revision: 276940 URL: https://svnweb.freebsd.org/changeset/base/276940 Log: Document r273515, virtio_console(4) addition. 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 Sat Jan 10 22:04:35 2015 (r276939) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:38 2015 (r276940) @@ -225,6 +225,10 @@ Hardware, uses para-virtualized drivers for boot and I/O, and uses hardware virtualization extensions for all other tasks, without the need for emulation. + + The &man.virtio.console.4; driver has + been added, which provides an interface to VirtIO console + devices through a &man.tty.4; device. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 A620BD9C; Sat, 10 Jan 2015 22:04: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 927D79A0; Sat, 10 Jan 2015 22:04: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 t0AM4a1x087804; Sat, 10 Jan 2015 22:04:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4atX087803; Sat, 10 Jan 2015 22:04:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4atX087803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276939 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:36 -0000 Author: gjb Date: Sat Jan 10 22:04:35 2015 New Revision: 276939 URL: https://svnweb.freebsd.org/changeset/base/276939 Log: Document r273331, vxlan(4) addition. 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 Sat Jan 10 22:04:32 2015 (r276938) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:35 2015 (r276939) @@ -294,6 +294,13 @@ The &man.alc.4; driver has been updated to support AR816x and AR817x ethernet controllers. + + The &man.vxlan.4; driver has been + added, which creates a virtual Layer 2 (Ethernet) network + overlaid in a Layer 3 (IP/UDP) network. The &man.vxlan.4; + driver is analogous to &man.vlan.4;, but is designed to be + better suited for large, multiple-tenant datacenter + environments. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 1D83415; Sat, 10 Jan 2015 22:04: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 09AC49A5; Sat, 10 Jan 2015 22:04: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 t0AM4fdL087900; Sat, 10 Jan 2015 22:04:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4fJe087899; Sat, 10 Jan 2015 22:04:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4fJe087899@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276941 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:42 -0000 Author: gjb Date: Sat Jan 10 22:04:41 2015 New Revision: 276941 URL: https://svnweb.freebsd.org/changeset/base/276941 Log: Document r273598, /dev/heptN devices for HPET access from userland. 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 Sat Jan 10 22:04:38 2015 (r276940) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:41 2015 (r276941) @@ -189,6 +189,12 @@ &man.sysctl.8; with individual kern.vt.kbd_* variants. + The &man.hpet.4; driver has been updated + to create a + /dev/heptN + device, providing access to HPET from + userspace. + Virtualization support From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 9C101323; Sat, 10 Jan 2015 22:04: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 88A019AC; Sat, 10 Jan 2015 22:04: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 t0AM4lv5088023; Sat, 10 Jan 2015 22:04:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4lDh088022; Sat, 10 Jan 2015 22:04:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4lDh088022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276943 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:47 -0000 Author: gjb Date: Sat Jan 10 22:04:46 2015 New Revision: 276943 URL: https://svnweb.freebsd.org/changeset/base/276943 Log: Minor fixes: - Capitalize titles - Typo fix. 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 Sat Jan 10 22:04:43 2015 (r276942) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:46 2015 (r276943) @@ -196,7 +196,7 @@ userspace. - Virtualization support + Virtualization Support Support for the Virtual Interrupt Delivery feature of &intel; VT-x is enabled if @@ -238,7 +238,7 @@ - ARM support + ARM Support The &man.nand.4; device is enabled for ARM devices by default. @@ -591,7 +591,7 @@ <acronym>ABI</acronym> Compatibility - The &linux; compatiblity version has + The &linux; compatibility version has been updated to 2.6.18. The compat.linux.osrelease &man.sysctl.8; is evaluated when building the - Upgrading from previous releases of &os; + Upgrading from Previous Releases of &os; Binary upgrades between RELEASE versions (and snapshots of the various security branches) are supported From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:04: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 E31ED1AD; Sat, 10 Jan 2015 22:04: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 CFF469A9; Sat, 10 Jan 2015 22:04: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 t0AM4iNb087957; Sat, 10 Jan 2015 22:04:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AM4i3J087956; Sat, 10 Jan 2015 22:04:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102204.t0AM4i3J087956@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276942 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:04:45 -0000 Author: gjb Date: Sat Jan 10 22:04:43 2015 New Revision: 276942 URL: https://svnweb.freebsd.org/changeset/base/276942 Log: Document r273806, Chelsio T5 userspace library. 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 Sat Jan 10 22:04:41 2015 (r276941) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:04:43 2015 (r276942) @@ -582,6 +582,12 @@ ELF object in the dlpi_name structure member. + A + userland library for Chelsio Terminator 5 based iWARP cards + has been added, allowing userland RDMA + applications to work over compatible + NICs. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:11: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 E31345B8; Sat, 10 Jan 2015 22:11: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 CEBC2AC1; Sat, 10 Jan 2015 22:11: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 t0AMBowE092475; Sat, 10 Jan 2015 22:11:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AMBo5H092470; Sat, 10 Jan 2015 22:11:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501102211.t0AMBo5H092470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 10 Jan 2015 22:11:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276944 - in head/usr.bin/clang: llvm-objdump llvm-rtdyld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:11:51 -0000 Author: dim Date: Sat Jan 10 22:11:49 2015 New Revision: 276944 URL: https://svnweb.freebsd.org/changeset/base/276944 Log: Remove a few redundant DPADD/LDADD pairs in llvm utilities. Modified: head/usr.bin/clang/llvm-objdump/Makefile head/usr.bin/clang/llvm-rtdyld/Makefile Modified: head/usr.bin/clang/llvm-objdump/Makefile ============================================================================== --- head/usr.bin/clang/llvm-objdump/Makefile Sat Jan 10 22:04:46 2015 (r276943) +++ head/usr.bin/clang/llvm-objdump/Makefile Sat Jan 10 22:11:49 2015 (r276944) @@ -4,8 +4,6 @@ MAN= .include PROG_CXX=llvm-objdump -DPADD= ${LIBZ} -LDADD= -lz SRCDIR= tools/llvm-objdump SRCS= llvm-objdump.cpp \ Modified: head/usr.bin/clang/llvm-rtdyld/Makefile ============================================================================== --- head/usr.bin/clang/llvm-rtdyld/Makefile Sat Jan 10 22:04:46 2015 (r276943) +++ head/usr.bin/clang/llvm-rtdyld/Makefile Sat Jan 10 22:11:49 2015 (r276944) @@ -4,8 +4,6 @@ MAN= .include PROG_CXX=llvm-rtdyld -DPADD= ${LIBZ} -LDADD= -lz SRCDIR= tools/llvm-rtdyld SRCS= llvm-rtdyld.cpp From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:15: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 BEFC7949; Sat, 10 Jan 2015 22:15:15 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FE62B13; Sat, 10 Jan 2015 22:15:15 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id ex7so8437306wid.0; Sat, 10 Jan 2015 14:15:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=EdzgRYHrjEmA26fVRhaWRcIoLiRdisa5d19L42FUP7A=; b=c7UFGGv5abwAqdE5cXHNijC0ToDTeT3afQHir7c0kDSD2Hqk1YRIH6POslzGoKIowl yH23hTZLOfuZT6A9aeqXCvIrgjgaN+3oEaua99OVoEL48uELiJHqOjsulmIeDKliAhEs 0fXoML9WhrOcr8fSwCSCvR6FbjLDMwBOjA4J+h55cUtcztAaefZlX8HZrroWIQDfMk7w O9BatpZfs5EpJOkjvIr4hyk4mkBiSW+lbV90rpfJWYGAYh7hY+RXO5m4vjRmj75Q6eKS 5YgWc5UtAaJf0rUfB3YmQ885o6vWAmcPEaqhG5BavxAHoh/wcEoj8gdNLZ5CFRW8yQ53 3Plg== X-Received: by 10.180.88.33 with SMTP id bd1mr17223772wib.10.1420928112182; Sat, 10 Jan 2015 14:15:12 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id wz5sm15192066wjc.29.2015.01.10.14.15.10 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 10 Jan 2015 14:15:11 -0800 (PST) Date: Sat, 10 Jan 2015 23:15:08 +0100 From: Mateusz Guzik To: Glen Barber Subject: Re: svn commit: r276919 - head/release/doc/en_US.ISO8859-1/relnotes Message-ID: <20150110221508.GA22115@dft-labs.eu> References: <201501102203.t0AM3eFX086723@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201501102203.t0AM3eFX086723@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:15:15 -0000 On Sat, Jan 10, 2015 at 10:03:40PM +0000, Glen Barber wrote: > Author: gjb > Date: Sat Jan 10 22:03:39 2015 > New Revision: 276919 > URL: https://svnweb.freebsd.org/changeset/base/276919 > > Log: > Document r270745, ps(1) 'tracer' keyword addition. > > 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 Sat Jan 10 22:03:36 2015 (r276918) > +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:03:39 2015 (r276919) > @@ -382,6 +382,10 @@ > defaults to /usr/local > if unset. > > + The &man.ps.1; utility has been updated > + to include a new keyword, tracer, which displays > + the parent PID of a child process. > + 'tracer' contains pid of the process doing the tracing. The kernel used to always replace parent pid with the tracer and then ps -o ppid would report the tracer instead of the real parent. This was changed and additional field was added to report the tracer. -- Mateusz Guzik From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:16: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 5DDC3AC1 for ; Sat, 10 Jan 2015 22:16:15 +0000 (UTC) Received: from vfemail.net (nine.vfemail.net [108.76.175.9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D62E7B62 for ; Sat, 10 Jan 2015 22:16:14 +0000 (UTC) Received: (qmail 79093 invoked by uid 89); 10 Jan 2015 22:09:21 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 10 Jan 2015 22:09:21 -0000 Received: (qmail 79072 invoked by uid 89); 10 Jan 2015 22:09:03 -0000 Received: by simscan 1.3.1 ppid: 79064, pid: 79068, t: 0.1007s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 10 Jan 2015 22:09:03 -0000 Received: (qmail 22750 invoked by uid 89); 10 Jan 2015 22:09:03 -0000 Received: by simscan 1.4.0 ppid: 22725, pid: 22742, t: 0.8902s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by 172.16.100.62 with ESMTPA; 10 Jan 2015 22:09:02 -0000 From: Jan Beich To: Glen Barber Subject: Re: svn commit: r276941 - head/release/doc/en_US.ISO8859-1/relnotes References: <201501102204.t0AM4fJe087899@svn.freebsd.org> Date: Sat, 10 Jan 2015 23:08:54 +0100 In-Reply-To: <201501102204.t0AM4fJe087899@svn.freebsd.org> (Glen Barber's message of "Sat, 10 Jan 2015 22:04:41 +0000 (UTC)") Message-ID: <4mry-gufd-wny@vfemail.net> MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:16:15 -0000 Glen Barber writes: > Log: > Document r273598, /dev/heptN devices for HPET access from > userland. [...] > + The &man.hpet.4; driver has been updated > + to create a > + /dev/heptN Typo: /dev/hpetN vs /dev/heptN ------------------------------------------------- VFEmail.net - http://www.vfemail.net ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options! From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:22: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 81528CD7; Sat, 10 Jan 2015 22:22: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 6CC92CB2; Sat, 10 Jan 2015 22:22: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 t0AMMiZn097535; Sat, 10 Jan 2015 22:22:44 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AMMhjf097530; Sat, 10 Jan 2015 22:22:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501102222.t0AMMhjf097530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 10 Jan 2015 22:22:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276945 - in head: tools/build/mk usr.bin/clang usr.bin/clang/llvm-symbolizer X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:22:44 -0000 Author: dim Date: Sat Jan 10 22:22:42 2015 New Revision: 276945 URL: https://svnweb.freebsd.org/changeset/base/276945 Log: Add the llvm-symbolizer tool, which enables the sanitizers to report more complete debugging information. This tools is only enabled when WITH_CLANG_EXTRAS is on. Submitted by: Dan McGregor Added: head/usr.bin/clang/llvm-symbolizer/ head/usr.bin/clang/llvm-symbolizer/Makefile (contents, props changed) head/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 (contents, props changed) Modified: head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/Makefile Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 10 22:11:49 2015 (r276944) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 10 22:22:42 2015 (r276945) @@ -548,13 +548,12 @@ OLD_FILES+=usr/bin/llvm-bcanalyzer OLD_FILES+=usr/bin/llvm-diff OLD_FILES+=usr/bin/llvm-dis OLD_FILES+=usr/bin/llvm-extract -OLD_FILES+=usr/bin/llvm-ld OLD_FILES+=usr/bin/llvm-link OLD_FILES+=usr/bin/llvm-mc OLD_FILES+=usr/bin/llvm-nm OLD_FILES+=usr/bin/llvm-objdump OLD_FILES+=usr/bin/llvm-rtdyld -OLD_FILES+=usr/bin/llvm-stub +OLD_FILES+=usr/bin/llvm-symbolizer OLD_FILES+=usr/bin/macho-dump OLD_FILES+=usr/bin/opt OLD_FILES+=usr/share/man/man1/bugpoint.1.gz @@ -566,9 +565,9 @@ OLD_FILES+=usr/share/man/man1/llvm-bcana OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz -OLD_FILES+=usr/share/man/man1/llvm-ld.1.gz OLD_FILES+=usr/share/man/man1/llvm-link.1.gz OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz +OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz OLD_FILES+=usr/share/man/man1/opt.1.gz .endif Modified: head/usr.bin/clang/Makefile ============================================================================== --- head/usr.bin/clang/Makefile Sat Jan 10 22:11:49 2015 (r276944) +++ head/usr.bin/clang/Makefile Sat Jan 10 22:22:42 2015 (r276945) @@ -20,6 +20,7 @@ SUBDIR+=bugpoint \ llvm-nm \ llvm-objdump \ llvm-rtdyld \ + llvm-symbolizer \ macho-dump \ opt .endif Added: head/usr.bin/clang/llvm-symbolizer/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-symbolizer/Makefile Sat Jan 10 22:22:42 2015 (r276945) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +.include + +PROG_CXX=llvm-symbolizer + +SRCDIR= tools/llvm-symbolizer +SRCS= llvm-symbolizer.cpp \ + LLVMSymbolize.cpp + +LIBDEPS=llvmdebuginfo \ + llvmobject \ + llvmmcparser \ + llvmmc \ + llvmbitreader \ + llvmcore \ + llvmsupport + +.include "../clang.prog.mk" + +DPADD+= ${LIBZ} +LDADD+= -lz Added: head/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 Sat Jan 10 22:22:42 2015 (r276945) @@ -0,0 +1,137 @@ +.\" $FreeBSD$ +.\" Man page generated from reStructuredText. +. +.TH "LLVM-SYMBOLIZER" "1" "2015-01-10" "3.5" "LLVM" +.SH NAME +llvm-symbolizer \- convert addresses into source code locations +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +\fBllvm\-symbolizer\fP [options] +.SH DESCRIPTION +.sp +\fBllvm\-symbolizer\fP reads object file names and addresses from standard +input and prints corresponding source code locations to standard output. +If object file is specified in command line, \fBllvm\-symbolizer\fP reads +only addresses from standard input. This +program uses debug info sections and symbol table in the object files. +.SH EXAMPLE +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ cat addr.txt +a.out 0x4004f4 +/tmp/b.out 0x400528 +/tmp/c.so 0x710 +/tmp/mach_universal_binary:i386 0x1f84 +/tmp/mach_universal_binary:x86_64 0x100000f24 +$ llvm\-symbolizer < addr.txt +main +/tmp/a.cc:4 + +f(int, int) +/tmp/b.cc:11 + +h_inlined_into_g +/tmp/header.h:2 +g_inlined_into_f +/tmp/header.h:7 +f_inlined_into_main +/tmp/source.cc:3 +main +/tmp/source.cc:8 + +_main +/tmp/source_i386.cc:8 + +_main +/tmp/source_x86_64.cc:8 +$ cat addr2.txt +0x4004f4 +0x401000 +$ llvm\-symbolizer \-obj=a.out < addr2.txt +main +/tmp/a.cc:4 + +foo(int) +/tmp/a.cc:12 +.ft P +.fi +.UNINDENT +.UNINDENT +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-obj +Path to object file to be symbolized. +.UNINDENT +.INDENT 0.0 +.TP +.B \-functions=[none|short|linkage] +Specify the way function names are printed (omit function name, +print short function name, or print full linkage name, respectively). +Defaults to \fBlinkage\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-use\-symbol\-table +Prefer function names stored in symbol table to function names +in debug info sections. Defaults to true. +.UNINDENT +.INDENT 0.0 +.TP +.B \-demangle +Print demangled function names. Defaults to true. +.UNINDENT +.INDENT 0.0 +.TP +.B \-inlining +If a source code location is in an inlined function, prints all the +inlnied frames. Defaults to true. +.UNINDENT +.INDENT 0.0 +.TP +.B \-default\-arch +If a binary contains object files for multiple architectures (e.g. it is a +Mach\-O universal binary), symbolize the object file for a given architecture. +You can also specify architecture by writing \fBbinary_name:arch_name\fP in the +input (see example above). If architecture is not specified in either way, +address will not be symbolized. Defaults to empty string. +.UNINDENT +.SH EXIT STATUS +.sp +\fBllvm\-symbolizer\fP returns 0. Other exit codes imply internal program error. +.SH AUTHOR +Maintained by The LLVM Team (http://llvm.org/). +.SH COPYRIGHT +2003-2014, LLVM Project +.\" Generated by docutils manpage writer. +. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:23: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 8E775E1E; Sat, 10 Jan 2015 22:23: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 7A870CC5; Sat, 10 Jan 2015 22:23: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 t0AMNdHv097707; Sat, 10 Jan 2015 22:23:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AMNdrw097706; Sat, 10 Jan 2015 22:23:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102223.t0AMNdrw097706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276946 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:23:39 -0000 Author: gjb Date: Sat Jan 10 22:23:38 2015 New Revision: 276946 URL: https://svnweb.freebsd.org/changeset/base/276946 Log: Reword entry for r270745: 'tracer' keyword displays the tracing process, not the child<->parent mapping. Submitted by: mjg 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 Sat Jan 10 22:22:42 2015 (r276945) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:23:38 2015 (r276946) @@ -504,7 +504,7 @@ The &man.ps.1; utility has been updated to include a new keyword, tracer, which displays - the parent PID of a child process. + the PID of the tracing process. Support for adding empty partitions has been added to the &man.mkimg.1; utility. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:23: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 5BA75F34; Sat, 10 Jan 2015 22:23: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 47B5DCC6; Sat, 10 Jan 2015 22:23: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 t0AMNgS3097755; Sat, 10 Jan 2015 22:23:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AMNgfP097754; Sat, 10 Jan 2015 22:23:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501102223.t0AMNgfP097754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 10 Jan 2015 22:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276947 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:23:42 -0000 Author: gjb Date: Sat Jan 10 22:23:41 2015 New Revision: 276947 URL: https://svnweb.freebsd.org/changeset/base/276947 Log: Fix typo in hpet(4) device name in r273598 entry. Submitted by: Jan Beich 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 Sat Jan 10 22:23:38 2015 (r276946) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22:23:41 2015 (r276947) @@ -191,7 +191,7 @@ The &man.hpet.4; driver has been updated to create a - /dev/heptN + /dev/hpetN device, providing access to HPET from userspace. From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:24:55 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 10696133; Sat, 10 Jan 2015 22:24:54 +0000 (UTC) Date: Sat, 10 Jan 2015 22:24:49 +0000 From: Glen Barber To: Mateusz Guzik Subject: Re: svn commit: r276919 - head/release/doc/en_US.ISO8859-1/relnotes Message-ID: <20150110222449.GA35811@hub.FreeBSD.org> References: <201501102203.t0AM3eFX086723@svn.freebsd.org> <20150110221508.GA22115@dft-labs.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline In-Reply-To: <20150110221508.GA22115@dft-labs.eu> 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) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:24:56 -0000 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 10, 2015 at 11:15:08PM +0100, Mateusz Guzik wrote: > On Sat, Jan 10, 2015 at 10:03:40PM +0000, Glen Barber wrote: > > Author: gjb > > Date: Sat Jan 10 22:03:39 2015 > > New Revision: 276919 > > URL: https://svnweb.freebsd.org/changeset/base/276919 > >=20 > > Log: > > Document r270745, ps(1) 'tracer' keyword addition. > > =20 > > Sponsored by: The FreeBSD Foundation > >=20 > > Modified: > > head/release/doc/en_US.ISO8859-1/relnotes/article.xml > >=20 > > Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22= :03:36 2015 (r276918) > > +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sat Jan 10 22= :03:39 2015 (r276919) > > @@ -382,6 +382,10 @@ > > defaults to /usr/local > > if unset. > > =20 > > + The &man.ps.1; utility has been updated > > + to include a new keyword, tracer, which displays > > + the parent PID of a child process. > > + >=20 > 'tracer' contains pid of the process doing the tracing. >=20 > The kernel used to always replace parent pid with the tracer and then ps > -o ppid would report the tracer instead of the real parent. This was > changed and additional field was added to report the tracer. >=20 Reworded in r276946. Thanks. Glen --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJUsaaoAAoJEAMUWKVHj+KT+T4QAIkOXo4j00FjC2L0Il7mOVtD OaN4bmYI1C/4Mpnh6MwBF2zS4LHeOvHJ2QrAOCXc9t+ojtgQubvUhB2gyQ+q7OlX mz+7MEjhpC8OeTQ3uwlpNLS5pbUmeOUHSvfrRLkOlSn11DPpwtaAbenA0HgTSeBd 4kmQywAcjwHP9glDw6S8XEK6Q/PVjF2W5U6xZZZNc1b15rBMOjYgBj/uEYzOLa6q CbqnLxN60349LzcF4bcygJpLQUhMZFEa2wIfn0cxzz+eV7vMuaTJum+27vZ2TMQH QVJ67G9IyGXKGPAINkeobGpkjVJssLl+eGYAu9IUruoq7FoELEFY77IYz10FfG0w kklq4EmdUxFPblPYg2Prfp75/6r3TK6LgczWpFvdCu6KJSAwl60u5vlNgHieHTyH mwZxs0KyboWGIzTulsuKpism1J3RHlXpaHFr4ydDb2O4Thm5aA/Wq9+KyWtxK1sR 4F2lzfx50/SK2EaGWlO8ztRhDIqkzwRks31sov4k9pJGBMLMveXCQo8s/prGzm2i W0Y/CaofS1IvTGKsNG6fxcwdj6F/3ibVOEn+scKGlCx3f+/TcaZJN2drY9eE3BYO CdJXwFwhVjR5iRuFNffz4XBQiFuK6srzPRW1cXZTV1KQOgv1Rn4BqNshYPt9RCdr y9vComjl3nFAlT8oWA92 =155X -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn-- From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:25:16 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 E74B626D; Sat, 10 Jan 2015 22:25:15 +0000 (UTC) Date: Sat, 10 Jan 2015 22:25:12 +0000 From: Glen Barber To: Jan Beich Subject: Re: svn commit: r276941 - head/release/doc/en_US.ISO8859-1/relnotes Message-ID: <20150110222512.GB35811@hub.FreeBSD.org> References: <201501102204.t0AM4fJe087899@svn.freebsd.org> <4mry-gufd-wny@vfemail.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wq9mPyueHGvFACwf" Content-Disposition: inline In-Reply-To: <4mry-gufd-wny@vfemail.net> 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) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:25:16 -0000 --wq9mPyueHGvFACwf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 10, 2015 at 11:08:54PM +0100, Jan Beich wrote: > Glen Barber writes: >=20 > > Log: > > Document r273598, /dev/heptN devices for HPET access from > > userland. > [...] > > + The &man.hpet.4; driver has been updated > > + to create a > > + /dev/heptN >=20 > Typo: /dev/hpetN vs /dev/heptN >=20 Fixed in r276947. Thanks. Glen --wq9mPyueHGvFACwf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJUsabIAAoJEAMUWKVHj+KTd7sQAIs2CBU1Z/xSK0lnOUTgHJe8 btxN6TKxQdb8FVh0AKKfVVJC4IOPAzswl6fZcdFKlAhSg2gL5q4Jg58Uszvz4gm7 etK+S1jk2bh0vXJlEAlQa8g3JYTicv41IMQYY670PmVN8gT2cFhQwmgPlJ4hczcU Y0Zyn/rM7TmVzCDKUKHwCGQkqkknJHG2PlepyKXxw57aUJcINbtHbwa0X+SniJL9 6pMKJelRMmnSixBJXjvkuBhBial5yk8HWpwPKpyTRV9pnkU3MjViF7ZaPtrCgRzD EopXOVaXbZr2QTnZjMABZV2Uq9x4pA4sN2gE1/0YJl/KMyW8Lz6uyiDW6eT5Oz5f ThbPrhtvS6k7pQcIuru77PrHjDT++abQ5gR3uuY/99UuslmluBwUurvcSy6tzerU iB4z8DDoRf4S2LbHHLSucTqgdQ6nYjeY5AtksTCfyCFYQZctVg74ApTZLhmRQqzI 0K1fibxQvaIVNErHd4iX0M/q945U08HUa0QtpIicUL0tkEiov8xRChaVktcQWVXV PdzpOVs9Boy14iYtUkkd8CzDVJAk8wIfMTY9Wkm+sKt+AFxyRLS/QCtryUx5wxfN YKmhsudkuQZOTk4J0FOHQRfyQPkyHvoHP1rCurzLJ5S6uykH64jFfHg2NCxQ+MJi JTIe+gU6T8MLnxO5+9xH =zuxo -----END PGP SIGNATURE----- --wq9mPyueHGvFACwf-- From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 22:57: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 16921511; Sat, 10 Jan 2015 22:57: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 DD2F9F3C; Sat, 10 Jan 2015 22:57:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0AMv9Vt012492; Sat, 10 Jan 2015 22:57:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0AMv95R012490; Sat, 10 Jan 2015 22:57:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501102257.t0AMv95R012490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 10 Jan 2015 22:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276948 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 22:57:10 -0000 Author: kib Date: Sat Jan 10 22:57:08 2015 New Revision: 276948 URL: https://svnweb.freebsd.org/changeset/base/276948 Log: Print rid when announcing DMAR context creation. Print sid when fault occurs. This allows to connect dots in case the requester is calculated erronously. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_ctx.c head/sys/x86/iommu/intel_fault.c Modified: head/sys/x86/iommu/intel_ctx.c ============================================================================== --- head/sys/x86/iommu/intel_ctx.c Sat Jan 10 22:23:41 2015 (r276947) +++ head/sys/x86/iommu/intel_ctx.c Sat Jan 10 22:57:08 2015 (r276948) @@ -381,10 +381,10 @@ dmar_get_ctx(struct dmar_unit *dmar, dev LIST_INSERT_HEAD(&dmar->contexts, ctx, link); ctx_id_entry_init(ctx, ctxp); device_printf(dev, - "dmar%d pci%d:%d:%d:%d domain %d mgaw %d " + "dmar%d pci%d:%d:%d:%d rid %x domain %d mgaw %d " "agaw %d %s-mapped\n", dmar->unit, dmar->segment, bus, slot, - func, ctx->domain, ctx->mgaw, ctx->agaw, + func, rid, ctx->domain, ctx->mgaw, ctx->agaw, id_mapped ? "id" : "re"); } else { dmar_ctx_dtr(ctx1, true, true); Modified: head/sys/x86/iommu/intel_fault.c ============================================================================== --- head/sys/x86/iommu/intel_fault.c Sat Jan 10 22:23:41 2015 (r276947) +++ head/sys/x86/iommu/intel_fault.c Sat Jan 10 22:57:08 2015 (r276948) @@ -230,8 +230,9 @@ dmar_fault_task(void *arg, int pending _ } DMAR_UNLOCK(unit); printf( - "pci%d:%d:%d fault acc %x adt 0x%x reason 0x%x addr %jx\n", - bus, slot, func, DMAR_FRCD2_T(fault_rec[1]), + "pci%d:%d:%d sid %x fault acc %x adt 0x%x reason 0x%x " + "addr %jx\n", + bus, slot, func, sid, DMAR_FRCD2_T(fault_rec[1]), DMAR_FRCD2_AT(fault_rec[1]), DMAR_FRCD2_FR(fault_rec[1]), (uintmax_t)fault_rec[0]); DMAR_FAULT_LOCK(unit); From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 23:12: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 9974D6DF; Sat, 10 Jan 2015 23:12: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 85FA412F; Sat, 10 Jan 2015 23:12: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 t0ANCob4021435; Sat, 10 Jan 2015 23:12:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ANCoi9021434; Sat, 10 Jan 2015 23:12:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501102312.t0ANCoi9021434@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 10 Jan 2015 23:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276949 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 23:12:50 -0000 Author: kib Date: Sat Jan 10 23:12:49 2015 New Revision: 276949 URL: https://svnweb.freebsd.org/changeset/base/276949 Log: Fix calculation of requester for PCI device behind PCIe/PCI bridge. In my case on the test machine, I have hierarchy of pcib2 (PCIe port on host bridge with PCIe capability) -> pci2 -> pcib3 (ITE PCIe/PCI bridge) -> pci3 -> em1 The device to check PCIe capability is pcib2 and not pcib3, as it is currently done in the code. Also, in case of the bridge, we shall step to pcib2 for the loop iteration, since pcib3 does not carry PCIe capability info and would force wrong recalculation of rid. Also change the returned requester to the PCIe bus which provides port for the bridge. This only results in changing hw.busdma.pciX.X.X.X.bounce tunable to force identity-mapped context for the device. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/busdma_dmar.c Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Sat Jan 10 22:57:08 2015 (r276948) +++ head/sys/x86/iommu/busdma_dmar.c Sat Jan 10 23:12:49 2015 (r276949) @@ -96,11 +96,11 @@ static device_t dmar_get_requester(device_t dev, uint16_t *rid) { devclass_t pci_class; - device_t pci, pcib, requester; + device_t l, pci, pcib, pcip, pcibp, requester; int cap_offset; pci_class = devclass_find("pci"); - requester = dev; + l = requester = dev; *rid = pci_get_rid(dev); @@ -110,19 +110,17 @@ dmar_get_requester(device_t dev, uint16_ * unit. */ for (;;) { - pci = device_get_parent(dev); - KASSERT(pci != NULL, ("NULL parent for pci%d:%d:%d:%d", - pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev))); + pci = device_get_parent(l); + KASSERT(pci != NULL, ("dmar_get_requester(%s): NULL parent " + "for %s", device_get_name(dev), device_get_name(l))); KASSERT(device_get_devclass(pci) == pci_class, - ("Non-pci parent for pci%d:%d:%d:%d", - pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev))); + ("dmar_get_requester(%s): non-pci parent %s for %s", + device_get_name(dev), device_get_name(pci), + device_get_name(l))); pcib = device_get_parent(pci); - KASSERT(pcib != NULL, ("NULL bridge for pci%d:%d:%d:%d", - pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), - pci_get_function(dev))); + KASSERT(pcib != NULL, ("dmar_get_requester(%s): NULL bridge " + "for %s", device_get_name(dev), device_get_name(pci))); /* * The parent of our "bridge" isn't another PCI bus, @@ -130,18 +128,28 @@ dmar_get_requester(device_t dev, uint16_ * port, and the requester ID won't be translated * further. */ - if (device_get_devclass(device_get_parent(pcib)) != pci_class) + pcip = device_get_parent(pcib); + if (device_get_devclass(pcip) != pci_class) break; + pcibp = device_get_parent(pcip); - if (pci_find_cap(dev, PCIY_EXPRESS, &cap_offset) != 0) { + if (pci_find_cap(l, PCIY_EXPRESS, &cap_offset) == 0) { + /* + * Do not stop the loop even if the target + * device is PCIe, because it is possible (but + * unlikely) to have a PCI->PCIe bridge + * somewhere in the hierarchy. + */ + l = pcib; + } else { /* * Device is not PCIe, it cannot be seen as a * requester by DMAR unit. */ - requester = pcib; + requester = pcibp; - /* Check whether the bus above is PCIe. */ - if (pci_find_cap(pcib, PCIY_EXPRESS, + /* Check whether the bus above the bridge is PCIe. */ + if (pci_find_cap(pcibp, PCIY_EXPRESS, &cap_offset) == 0) { /* * The current device is not PCIe, but @@ -159,7 +167,7 @@ dmar_get_requester(device_t dev, uint16_ * same page tables for taken and * non-taken transactions. */ - *rid = PCI_RID(pci_get_bus(dev), 0, 0); + *rid = PCI_RID(pci_get_bus(l), 0, 0); } else { /* * Neither the device nor the bridge @@ -170,14 +178,8 @@ dmar_get_requester(device_t dev, uint16_ */ *rid = pci_get_rid(pcib); } + l = pcibp; } - /* - * Do not stop the loop even if the target device is - * PCIe, because it is possible (but unlikely) to have - * a PCI->PCIe bridge somewhere in the hierarchy. - */ - - dev = pcib; } return (requester); } From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 23: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 6E722A90; Sat, 10 Jan 2015 23: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 5ADD93D2; Sat, 10 Jan 2015 23: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 t0ANhchK036360; Sat, 10 Jan 2015 23:43:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ANhcV5036359; Sat, 10 Jan 2015 23:43:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501102343.t0ANhcV5036359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 10 Jan 2015 23:43:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276950 - 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.18-1 Precedence: list List-Id: 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, 10 Jan 2015 23:43:38 -0000 Author: imp Date: Sat Jan 10 23:43:37 2015 New Revision: 276950 URL: https://svnweb.freebsd.org/changeset/base/276950 Log: Take out some more no-error warnings, as the build is clean without them. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Sat Jan 10 23:12:49 2015 (r276949) +++ head/sys/conf/kern.mk Sat Jan 10 23:43:37 2015 (r276950) @@ -28,7 +28,7 @@ NO_WSOMETIMES_UNINITIALIZED= -Wno-error- # some incentive to fix them eventually. CWARNEXTRA?= -Wno-error-tautological-compare -Wno-error-empty-body \ -Wno-error-parentheses-equality -Wno-error-unused-function \ - -Wno-error-pointer-sign -Wno-error-format -Wno-error-parentheses + -Wno-error-pointer-sign CLANG_NO_IAS= -no-integrated-as .if ${COMPILER_VERSION} < 30500 From owner-svn-src-head@FreeBSD.ORG Sat Jan 10 23:43: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 E447EB43; Sat, 10 Jan 2015 23:43: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 A4B393D3; Sat, 10 Jan 2015 23:43: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 t0ANhemV036405; Sat, 10 Jan 2015 23:43:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ANheO1036404; Sat, 10 Jan 2015 23:43:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501102343.t0ANheO1036404@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 10 Jan 2015 23:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276951 - head/sys/modules/aic7xxx/ahc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: 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, 10 Jan 2015 23:43:41 -0000 Author: imp Date: Sat Jan 10 23:43:39 2015 New Revision: 276951 URL: https://svnweb.freebsd.org/changeset/base/276951 Log: Use .MAKE.LEVEL being defined as a bootstrap aid when providing fallback targets to build the aic generated files. fmake doesn't like the current construct, and since it doesn't have .MAKE.LEVEL, just don't provide the fallback targets for fmake. This gives a little extra compatibility to old systems trying to build new kernels at almost no cost to the current code. Modified: head/sys/modules/aic7xxx/ahc/Makefile Modified: head/sys/modules/aic7xxx/ahc/Makefile ============================================================================== --- head/sys/modules/aic7xxx/ahc/Makefile Sat Jan 10 23:43:37 2015 (r276950) +++ head/sys/modules/aic7xxx/ahc/Makefile Sat Jan 10 23:43:39 2015 (r276951) @@ -35,7 +35,11 @@ ${GENSRCS}: \ ${REG_PRINT_OPT} \ -i ${SYSDIR}/dev/aic7xxx/aic7xxx_osm.h \ ${SYSDIR}/dev/aic7xxx/aic7xxx.seq -.else +.elif defined(.MAKE.LEVEL) +# This target interfers with fmake's world view and causes this message +# to appear when building the tree from 8.x worlds where fmake is the +# default. fmake doens't define .MAKE.LEVEL so key off that to omit it, +# while still allowing more-modern makes to theoretically update things. ${GENSRCS}: @echo "Error: ${.TARGET} is missing. Run 'make ahcfirmware'" .endif