From owner-svn-src-stable@FreeBSD.ORG Sun Nov 24 20:41:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C39AC6A; Sun, 24 Nov 2013 20:41: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B0A024C3; Sun, 24 Nov 2013 20:41:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAOKfaER007667; Sun, 24 Nov 2013 20:41:36 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAOKfa1V007666; Sun, 24 Nov 2013 20:41:36 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311242041.rAOKfa1V007666@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 24 Nov 2013 20:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258528 - stable/9/contrib/gcclibs/libcpp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 20:41:36 -0000 Author: pfg Date: Sun Nov 24 20:41:35 2013 New Revision: 258528 URL: http://svnweb.freebsd.org/changeset/base/258528 Log: libcpp: Keep a record of changes from upstream GCC (pre-43). This makes it easier to track the changes in the rare event of the code being distributed without access to version control. MFC after: 3 weeks Added: stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 Added: stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 Sun Nov 24 20:41:35 2013 (r258528) @@ -0,0 +1,29 @@ +2007-06-05 Joerg Wunsch (r250566) + + PR preprocessor/23479 + * expr.c (cpp_classify_number): Implement 0b-prefixed binary + integer constants. + (append_digit): Likewise. + * include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed + binary integer constants. + +2007-05-21 Ian Lance Taylor (r124929) + + * internal.h (struct cpp_reader): Add new fields: + nonexistent_file_hash and nonexistent_file_ob. + * files.c: Include "obstack.h". + (find_file_in_dir): Before trying to open the file, look up the + path name in the hash table of nonexistent files. After failing + to open the file, add the path name to the hash table. + (_cpp_find_file): Cache the results of looking up the file name + starting with the quote and bracket chain heads, if we can. + (nonexistent_file_hash_eq): New static function. + (_cpp_init_files): Initialize pfile->nonexistent_file_hash and + pfile->nonexistent_file_ob. + (_cpp_cleanup_files): Free pfile->nonexistent_file_hash and + pfile->nonexistent_file_ob. + +2006-12-29 Ian Lance Taylor (r120263) + + * lex.c (_cpp_clean_line): Add uses of __builtin_expect. Don't + look backward at the end of the line unless we saw a backslash. From owner-svn-src-stable@FreeBSD.ORG Sun Nov 24 20:53:48 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4B17F2B; Sun, 24 Nov 2013 20:53: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A1B42528; Sun, 24 Nov 2013 20:53:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAOKrmJ8011404; Sun, 24 Nov 2013 20:53:48 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAOKrmNH011403; Sun, 24 Nov 2013 20:53:48 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311242053.rAOKrmNH011403@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 24 Nov 2013 20:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258529 - stable/9/contrib/gcclibs/libcpp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 20:53:48 -0000 Author: pfg Date: Sun Nov 24 20:53:48 2013 New Revision: 258529 URL: http://svnweb.freebsd.org/changeset/base/258529 Log: Revert r258528: wrong tree Inofensive as it is, this was meant for current. It will be re-merged along with related changes in 3 weeks. Deleted: stable/9/contrib/gcclibs/libcpp/ChangeLog.gcc43 From owner-svn-src-stable@FreeBSD.ORG Sun Nov 24 22:10:39 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02E35162; Sun, 24 Nov 2013 22:10: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E497428CD; Sun, 24 Nov 2013 22:10:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAOMAcQm037085; Sun, 24 Nov 2013 22:10:38 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAOMAcfQ037079; Sun, 24 Nov 2013 22:10:38 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311242210.rAOMAcfQ037079@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 24 Nov 2013 22:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r258532 - in stable/8/contrib: gcc gcc/doc gcclibs/libcpp gcclibs/libcpp/include X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 22:10:39 -0000 Author: pfg Date: Sun Nov 24 22:10:37 2013 New Revision: 258532 URL: http://svnweb.freebsd.org/changeset/base/258532 Log: MFC r255107; Add support for the GCC binary integer constants extension. This is required to build the i965 backend with newer versions of mesa. Original patch from Joerg Wunsch in GCC Bug 23479, under the GPLv2; also taken from there in OpenBSD. Obtained from: gcc 4.3 (rev. 125346; GPLv2) Modified: stable/8/contrib/gcc/ChangeLog.gcc43 stable/8/contrib/gcc/doc/extend.texi stable/8/contrib/gcclibs/libcpp/expr.c stable/8/contrib/gcclibs/libcpp/include/cpplib.h Directory Properties: stable/8/ (props changed) stable/8/contrib/ (props changed) stable/8/contrib/gcc/ (props changed) stable/8/contrib/gcclibs/ (props changed) Modified: stable/8/contrib/gcc/ChangeLog.gcc43 ============================================================================== --- stable/8/contrib/gcc/ChangeLog.gcc43 Sun Nov 24 22:01:15 2013 (r258531) +++ stable/8/contrib/gcc/ChangeLog.gcc43 Sun Nov 24 22:10:37 2013 (r258532) @@ -1,3 +1,9 @@ +2007-06-05 Joerg Wunsch (r125346) + + PR preprocessor/23479 + * doc/extend.texi: Document the 0b-prefixed binary integer + constant extension. + 2007-05-01 Dwarakanath Rajagopal (r124339) * config/i386/i386.c (override_options): Accept k8-sse3, opteron-sse3 Modified: stable/8/contrib/gcc/doc/extend.texi ============================================================================== --- stable/8/contrib/gcc/doc/extend.texi Sun Nov 24 22:01:15 2013 (r258531) +++ stable/8/contrib/gcc/doc/extend.texi Sun Nov 24 22:10:37 2013 (r258532) @@ -81,6 +81,7 @@ extensions, accepted by GCC in C89 mode * Pragmas:: Pragmas accepted by GCC. * Unnamed Fields:: Unnamed struct/union fields within structs/unions. * Thread-Local:: Per-thread variables. +* Binary constants:: Binary constants using the @samp{0b} prefix. @end menu @node Statement Exprs @@ -10410,6 +10411,28 @@ Non-@code{static} members shall not be @ @end quotation @end itemize +@node Binary constants +@section Binary constants using the @samp{0b} prefix +@cindex Binary constants using the @samp{0b} prefix + +Integer constants can be written as binary constants, consisting of a +sequence of @samp{0} and @samp{1} digits, prefixed by @samp{0b} or +@samp{0B}. This is particularly useful in environments that operate a +lot on the bit-level (like microcontrollers). + +The following statements are identical: + +@smallexample +i = 42; +i = 0x2a; +i = 052; +i = 0b101010; +@end smallexample + +The type of these constants follows the same rules as for octal or +hexadecimal integer constants, so suffixes like @samp{L} or @samp{UL} +can be applied. + @node C++ Extensions @chapter Extensions to the C++ Language @cindex extensions, C++ language Modified: stable/8/contrib/gcclibs/libcpp/expr.c ============================================================================== --- stable/8/contrib/gcclibs/libcpp/expr.c Sun Nov 24 22:01:15 2013 (r258531) +++ stable/8/contrib/gcclibs/libcpp/expr.c Sun Nov 24 22:10:37 2013 (r258532) @@ -188,6 +188,11 @@ cpp_classify_number (cpp_reader *pfile, radix = 16; str++; } + else if ((*str == 'b' || *str == 'B') && (str[1] == '0' || str[1] == '1')) + { + radix = 2; + str++; + } } /* Now scan for a well-formed integer or float. */ @@ -226,10 +231,22 @@ cpp_classify_number (cpp_reader *pfile, radix = 10; if (max_digit >= radix) - SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit); + { + if (radix == 2) + SYNTAX_ERROR2 ("invalid digit \"%c\" in binary constant", '0' + max_digit); + else + SYNTAX_ERROR2 ("invalid digit \"%c\" in octal constant", '0' + max_digit); + } if (float_flag != NOT_FLOAT) { + if (radix == 2) + { + cpp_error (pfile, CPP_DL_ERROR, + "invalid prefix \"0b\" for floating constant"); + return CPP_N_INVALID; + } + if (radix == 16 && CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, c99)) cpp_error (pfile, CPP_DL_PEDWARN, "use of C99 hexadecimal floating constant"); @@ -321,11 +338,16 @@ cpp_classify_number (cpp_reader *pfile, if ((result & CPP_N_IMAGINARY) && CPP_PEDANTIC (pfile)) cpp_error (pfile, CPP_DL_PEDWARN, "imaginary constants are a GCC extension"); + if (radix == 2 && CPP_PEDANTIC (pfile)) + cpp_error (pfile, CPP_DL_PEDWARN, + "binary constants are a GCC extension"); if (radix == 10) result |= CPP_N_DECIMAL; else if (radix == 16) result |= CPP_N_HEX; + else if (radix == 2) + result |= CPP_N_BINARY; else result |= CPP_N_OCTAL; @@ -376,6 +398,11 @@ cpp_interpret_integer (cpp_reader *pfile base = 16; p += 2; } + else if ((type & CPP_N_RADIX) == CPP_N_BINARY) + { + base = 2; + p += 2; + } /* We can add a digit to numbers strictly less than this without needing the precision and slowness of double integers. */ @@ -431,12 +458,25 @@ static cpp_num append_digit (cpp_num num, int digit, int base, size_t precision) { cpp_num result; - unsigned int shift = 3 + (base == 16); + unsigned int shift; bool overflow; cpp_num_part add_high, add_low; - /* Multiply by 8 or 16. Catching this overflow here means we don't + /* Multiply by 2, 8 or 16. Catching this overflow here means we don't need to worry about add_high overflowing. */ + switch (base) + { + case 2: + shift = 1; + break; + + case 16: + shift = 4; + break; + + default: + shift = 3; + } overflow = !!(num.high >> (PART_PRECISION - shift)); result.high = num.high << shift; result.low = num.low << shift; Modified: stable/8/contrib/gcclibs/libcpp/include/cpplib.h ============================================================================== --- stable/8/contrib/gcclibs/libcpp/include/cpplib.h Sun Nov 24 22:01:15 2013 (r258531) +++ stable/8/contrib/gcclibs/libcpp/include/cpplib.h Sun Nov 24 22:10:37 2013 (r258532) @@ -744,6 +744,7 @@ struct cpp_num #define CPP_N_DECIMAL 0x0100 #define CPP_N_HEX 0x0200 #define CPP_N_OCTAL 0x0400 +#define CPP_N_BINARY 0x0800 #define CPP_N_UNSIGNED 0x1000 /* Properties. */ #define CPP_N_IMAGINARY 0x2000 From owner-svn-src-stable@FreeBSD.ORG Sun Nov 24 23:30:24 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B3C9E5; Sun, 24 Nov 2013 23:30: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AC552BEB; Sun, 24 Nov 2013 23:30:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAONUOG2064409; Sun, 24 Nov 2013 23:30:24 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAONUOXH064407; Sun, 24 Nov 2013 23:30:24 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201311242330.rAONUOXH064407@svn.freebsd.org> From: Colin Percival Date: Sun, 24 Nov 2013 23:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258536 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 23:30:24 -0000 Author: cperciva Date: Sun Nov 24 23:30:23 2013 New Revision: 258536 URL: http://svnweb.freebsd.org/changeset/base/258536 Log: MFC r258086: Strip the -pN patch level from the VERSION string which gets encoded into CTF data. Otherwise FreeBSD Update builds think every kernel file has changed every time there's a security advisory, since the FreeBSD Update build code isn't smart enough to look inside CTF data to ignore those changes. Approved by: re (gjb) Modified: stable/10/Makefile.inc1 (contents, props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Nov 24 23:12:13 2013 (r258535) +++ stable/10/Makefile.inc1 Sun Nov 24 23:30:23 2013 (r258536) @@ -133,7 +133,7 @@ REVISION!= make -C ${SRCDIR}/release -V BRANCH!= make -C ${SRCDIR}/release -V BRANCH SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ ${SRCDIR}/sys/sys/param.h -VERSION= FreeBSD ${REVISION}-${BRANCH} ${TARGET_ARCH} ${SRCRELDATE} +VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} .endif KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 15:34:58 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5A35F6D; Mon, 25 Nov 2013 15:34: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9514D221B; Mon, 25 Nov 2013 15:34:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPFYwJu096594; Mon, 25 Nov 2013 15:34:58 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPFYweo096592; Mon, 25 Nov 2013 15:34:58 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201311251534.rAPFYweo096592@svn.freebsd.org> From: Grzegorz Bernacki Date: Mon, 25 Nov 2013 15:34:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258554 - stable/10/sys/dev/nand X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:34:58 -0000 Author: gber Date: Mon Nov 25 15:34:57 2013 New Revision: 258554 URL: http://svnweb.freebsd.org/changeset/base/258554 Log: MFC: r258387,r258425 Split raw reading/programming into smaller chunks to avoid allocating too big chunk of kernel memory. Validate size of data. Add error handling to avoid calling copyout() when data has not been read correctly. Also MFC of change r258425 which fixes problem introduced by r258387. Reviewed by: zbb Reported by: x90c Approved by: re Modified: stable/10/sys/dev/nand/nand_cdev.c stable/10/sys/dev/nand/nand_geom.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/nand/nand_cdev.c ============================================================================== --- stable/10/sys/dev/nand/nand_cdev.c Mon Nov 25 15:01:59 2013 (r258553) +++ stable/10/sys/dev/nand/nand_cdev.c Mon Nov 25 15:34:57 2013 (r258554) @@ -294,19 +294,40 @@ nand_ioctl(struct cdev *dev, u_long cmd, struct thread *td) { struct nand_chip *chip; + struct chip_geom *cg; struct nand_oob_rw *oob_rw = NULL; struct nand_raw_rw *raw_rw = NULL; device_t nandbus; + size_t bufsize = 0, len = 0; + size_t raw_size; + off_t off; uint8_t *buf = NULL; int ret = 0; uint8_t status; chip = (struct nand_chip *)dev->si_drv1; + cg = &chip->chip_geom; nandbus = device_get_parent(chip->dev); if ((cmd == NAND_IO_RAW_READ) || (cmd == NAND_IO_RAW_PROG)) { raw_rw = (struct nand_raw_rw *)data; - buf = malloc(raw_rw->len, M_NAND, M_WAITOK); + raw_size = cg->pgs_per_blk * (cg->page_size + cg->oob_size); + + /* Check if len is not bigger than chip size */ + if (raw_rw->len > raw_size) + return (EFBIG); + + /* + * Do not ask for too much memory, in case of large transfers + * read/write in 16-pages chunks + */ + bufsize = 16 * (cg->page_size + cg->oob_size); + if (raw_rw->len < bufsize) + bufsize = raw_rw->len; + + buf = malloc(bufsize, M_NAND, M_WAITOK); + len = raw_rw->len; + off = 0; } switch(cmd) { case NAND_IO_ERASE: @@ -335,19 +356,37 @@ nand_ioctl(struct cdev *dev, u_long cmd, break; case NAND_IO_RAW_PROG: - ret = copyin(raw_rw->data, buf, raw_rw->len); - if (ret) - break; - ret = nand_prog_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + ret = copyin(raw_rw->data + off, buf, bufsize); + if (ret) + break; + ret = nand_prog_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_RAW_READ: - ret = nand_read_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); - if (ret) - break; - ret = copyout(buf, raw_rw->data, raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + + ret = nand_read_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + + ret = copyout(buf, raw_rw->data + off, bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_PAGE_STAT: Modified: stable/10/sys/dev/nand/nand_geom.c ============================================================================== --- stable/10/sys/dev/nand/nand_geom.c Mon Nov 25 15:01:59 2013 (r258553) +++ stable/10/sys/dev/nand/nand_geom.c Mon Nov 25 15:34:57 2013 (r258554) @@ -193,20 +193,42 @@ nand_ioctl(struct disk *ndisk, u_long cm struct thread *td) { struct nand_chip *chip; + struct chip_geom *cg; struct nand_oob_rw *oob_rw = NULL; struct nand_raw_rw *raw_rw = NULL; device_t nandbus; + size_t bufsize = 0, len = 0; + size_t raw_size; + off_t off; uint8_t *buf = NULL; int ret = 0; uint8_t status; chip = (struct nand_chip *)ndisk->d_drv1; + cg = &chip->chip_geom; nandbus = device_get_parent(chip->dev); if ((cmd == NAND_IO_RAW_READ) || (cmd == NAND_IO_RAW_PROG)) { raw_rw = (struct nand_raw_rw *)data; - buf = malloc(raw_rw->len, M_NAND, M_WAITOK); + raw_size = cg->pgs_per_blk * (cg->page_size + cg->oob_size); + + /* Check if len is not bigger than chip size */ + if (raw_rw->len > raw_size) + return (EFBIG); + + /* + * Do not ask for too much memory, in case of large transfers + * read/write in 16-pages chunks + */ + bufsize = 16 * (cg->page_size + cg->oob_size); + if (raw_rw->len < bufsize) + bufsize = raw_rw->len; + + buf = malloc(bufsize, M_NAND, M_WAITOK); + len = raw_rw->len; + off = 0; } + switch (cmd) { case NAND_IO_ERASE: ret = nand_erase_blocks(chip, ((off_t *)data)[0], @@ -234,15 +256,38 @@ nand_ioctl(struct disk *ndisk, u_long cm break; case NAND_IO_RAW_PROG: - copyin(raw_rw->data, buf, raw_rw->len); - ret = nand_prog_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + + ret = copyin(raw_rw->data + off, buf, bufsize); + if (ret) + break; + ret = nand_prog_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_RAW_READ: - ret = nand_read_pages_raw(chip, raw_rw->off, buf, - raw_rw->len); - copyout(buf, raw_rw->data, raw_rw->len); + while (len > 0) { + if (len < bufsize) + bufsize = len; + + ret = nand_read_pages_raw(chip, raw_rw->off + off, buf, + bufsize); + if (ret) + break; + + ret = copyout(buf, raw_rw->data + off, bufsize); + if (ret) + break; + len -= bufsize; + off += bufsize; + } break; case NAND_IO_GET_CHIP_PARAM: From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 15:39:51 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AD422F0; Mon, 25 Nov 2013 15:39: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0F780225C; Mon, 25 Nov 2013 15:39:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPFdogT097184; Mon, 25 Nov 2013 15:39:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPFdoQw097183; Mon, 25 Nov 2013 15:39:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251539.rAPFdoQw097183@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 15:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258555 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:39:51 -0000 Author: avg Date: Mon Nov 25 15:39:50 2013 New Revision: 258555 URL: http://svnweb.freebsd.org/changeset/base/258555 Log: MFC r258353: zfs page_busy: fix the boundaries of the cleared range This is a fix for a regression introduced in r246293. vm_page_clear_dirty expects the range to have DEV_BSIZE aligned boundaries, otherwise it extends them. Thus it can happen that the whole page is marked clean while actually having some small dirty region(s). This commit makes the range properly aligned and ensures that only the clean data is marked as such. It would interesting to evaluate how much benefit clearing with DEV_BSIZE granularity produces. Perhaps instead we should clear the whole page when it is completely overwritten and don't bother clearing any bits if only a portion a page is written. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 15:34:57 2013 (r258554) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 15:39:50 2013 (r258555) @@ -326,6 +326,20 @@ page_busy(vnode_t *vp, int64_t start, in { vm_object_t obj; vm_page_t pp; + int64_t end; + + /* + * At present vm_page_clear_dirty extends the cleared range to DEV_BSIZE + * aligned boundaries, if the range is not aligned. As a result a + * DEV_BSIZE subrange with partially dirty data may get marked as clean. + * It may happen that all DEV_BSIZE subranges are marked clean and thus + * the whole page would be considred clean despite have some dirty data. + * For this reason we should shrink the range to DEV_BSIZE aligned + * boundaries before calling vm_page_clear_dirty. + */ + end = rounddown2(off + nbytes, DEV_BSIZE); + off = roundup2(off, DEV_BSIZE); + nbytes = end - off; obj = vp->v_object; VM_OBJECT_LOCK_ASSERT(obj, MA_OWNED); @@ -357,7 +371,8 @@ page_busy(vnode_t *vp, int64_t start, in vm_object_pip_add(obj, 1); vm_page_io_start(pp); pmap_remove_write(pp); - vm_page_clear_dirty(pp, off, nbytes); + if (nbytes != 0) + vm_page_clear_dirty(pp, off, nbytes); } break; } From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 15:40:21 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F409481; Mon, 25 Nov 2013 15:40: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D7646226A; Mon, 25 Nov 2013 15:40:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPFeKKG097562; Mon, 25 Nov 2013 15:40:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPFeKfN097561; Mon, 25 Nov 2013 15:40:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251540.rAPFeKfN097561@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 15:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r258556 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:40:21 -0000 Author: avg Date: Mon Nov 25 15:40:20 2013 New Revision: 258556 URL: http://svnweb.freebsd.org/changeset/base/258556 Log: MFC r258353: zfs page_busy: fix the boundaries of the cleared range This is a fix for a regression introduced in r246293. vm_page_clear_dirty expects the range to have DEV_BSIZE aligned boundaries, otherwise it extends them. Thus it can happen that the whole page is marked clean while actually having some small dirty region(s). This commit makes the range properly aligned and ensures that only the clean data is marked as such. It would interesting to evaluate how much benefit clearing with DEV_BSIZE granularity produces. Perhaps instead we should clear the whole page when it is completely overwritten and don't bother clearing any bits if only a portion a page is written. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 15:39:50 2013 (r258555) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 15:40:20 2013 (r258556) @@ -327,6 +327,20 @@ page_busy(vnode_t *vp, int64_t start, in { vm_object_t obj; vm_page_t pp; + int64_t end; + + /* + * At present vm_page_clear_dirty extends the cleared range to DEV_BSIZE + * aligned boundaries, if the range is not aligned. As a result a + * DEV_BSIZE subrange with partially dirty data may get marked as clean. + * It may happen that all DEV_BSIZE subranges are marked clean and thus + * the whole page would be considred clean despite have some dirty data. + * For this reason we should shrink the range to DEV_BSIZE aligned + * boundaries before calling vm_page_clear_dirty. + */ + end = rounddown2(off + nbytes, DEV_BSIZE); + off = roundup2(off, DEV_BSIZE); + nbytes = end - off; obj = vp->v_object; VM_OBJECT_LOCK_ASSERT(obj, MA_OWNED); @@ -348,7 +362,8 @@ page_busy(vnode_t *vp, int64_t start, in vm_page_io_start(pp); vm_page_lock_queues(); pmap_remove_write(pp); - vm_page_clear_dirty(pp, off, nbytes); + if (nbytes != 0) + vm_page_clear_dirty(pp, off, nbytes); vm_page_unlock_queues(); } break; From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 15:53:09 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76F87970; Mon, 25 Nov 2013 15:53: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 56FA4236C; Mon, 25 Nov 2013 15:53:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPFr9jG003126; Mon, 25 Nov 2013 15:53:09 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPFr9UK003125; Mon, 25 Nov 2013 15:53:09 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251553.rAPFr9UK003125@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 15:53:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258557 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:53:09 -0000 Author: avg Date: Mon Nov 25 15:53:08 2013 New Revision: 258557 URL: http://svnweb.freebsd.org/changeset/base/258557 Log: MFC r258389: MFV r258378: 4089 NULL pointer dereference in arc_read() illumos/illumos-gate@57815f6b95a743697e148327725b7f568e75e6ea Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 15:40:20 2013 (r258556) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 15:53:08 2013 (r258557) @@ -20,9 +20,9 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ /* @@ -3173,6 +3173,8 @@ top: vdev_t *vd = NULL; uint64_t addr = 0; boolean_t devw = B_FALSE; + enum zio_compress b_compress = ZIO_COMPRESS_OFF; + uint64_t b_asize = 0; if (hdr == NULL) { /* this block is not in the cache */ @@ -3242,10 +3244,12 @@ top: hdr->b_acb = acb; hdr->b_flags |= ARC_IO_IN_PROGRESS; - if (HDR_L2CACHE(hdr) && hdr->b_l2hdr != NULL && + if (hdr->b_l2hdr != NULL && (vd = hdr->b_l2hdr->b_dev->l2ad_vdev) != NULL) { devw = hdr->b_l2hdr->b_dev->l2ad_writing; addr = hdr->b_l2hdr->b_daddr; + b_compress = hdr->b_l2hdr->b_compress; + b_asize = hdr->b_l2hdr->b_asize; /* * Lock out device removal. */ @@ -3296,7 +3300,7 @@ top: cb->l2rcb_bp = *bp; cb->l2rcb_zb = *zb; cb->l2rcb_flags = zio_flags; - cb->l2rcb_compress = hdr->b_l2hdr->b_compress; + cb->l2rcb_compress = b_compress; ASSERT(addr >= VDEV_LABEL_START_SIZE && addr + size < vd->vdev_psize - @@ -3308,8 +3312,7 @@ top: * Issue a null zio if the underlying buffer * was squashed to zero size by compression. */ - if (hdr->b_l2hdr->b_compress == - ZIO_COMPRESS_EMPTY) { + if (b_compress == ZIO_COMPRESS_EMPTY) { rzio = zio_null(pio, spa, vd, l2arc_read_done, cb, zio_flags | ZIO_FLAG_DONT_CACHE | @@ -3318,8 +3321,8 @@ top: ZIO_FLAG_DONT_RETRY); } else { rzio = zio_read_phys(pio, vd, addr, - hdr->b_l2hdr->b_asize, - buf->b_data, ZIO_CHECKSUM_OFF, + b_asize, buf->b_data, + ZIO_CHECKSUM_OFF, l2arc_read_done, cb, priority, zio_flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_CANFAIL | @@ -3328,8 +3331,7 @@ top: } DTRACE_PROBE2(l2arc__read, vdev_t *, vd, zio_t *, rzio); - ARCSTAT_INCR(arcstat_l2_read_bytes, - hdr->b_l2hdr->b_asize); + ARCSTAT_INCR(arcstat_l2_read_bytes, b_asize); if (*arc_flags & ARC_NOWAIT) { zio_nowait(rzio); From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 15:54:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68767C3F; Mon, 25 Nov 2013 15:54: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57567237E; Mon, 25 Nov 2013 15:54:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPFsJGd003292; Mon, 25 Nov 2013 15:54:19 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPFsJOE003291; Mon, 25 Nov 2013 15:54:19 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201311251554.rAPFsJOE003291@svn.freebsd.org> From: Ed Maste Date: Mon, 25 Nov 2013 15:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258558 - stable/10/contrib/libexecinfo X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:54:19 -0000 Author: emaste Date: Mon Nov 25 15:54:18 2013 New Revision: 258558 URL: http://svnweb.freebsd.org/changeset/base/258558 Log: MFC r258426: libexecinfo: Include terminating null in byte count Otherwise, a formatted string with a strlen equal to the remaining buffer space would have the last character omitted (because vsnprintf always null-terminates), and later the assert in backtrace_symbols_fmt would fail. Sponsored by: DARPA, AFRL Approved by: re (gjb) Modified: stable/10/contrib/libexecinfo/backtrace.c Directory Properties: stable/10/contrib/libexecinfo/ (props changed) Modified: stable/10/contrib/libexecinfo/backtrace.c ============================================================================== --- stable/10/contrib/libexecinfo/backtrace.c Mon Nov 25 15:53:08 2013 (r258557) +++ stable/10/contrib/libexecinfo/backtrace.c Mon Nov 25 15:54:18 2013 (r258558) @@ -89,7 +89,7 @@ rasprintf(char **buf, size_t *bufsiz, si len = vsnprintf(*buf + offs, *bufsiz - offs, fmt, ap); va_end(ap); - if (len < 0 || (size_t)len < *bufsiz - offs) + if (len < 0 || (size_t)len + 1 < *bufsiz - offs) return len; nbufsiz = MAX(*bufsiz + 512, (size_t)len + 1); } else From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 15:58:50 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B720ED3; Mon, 25 Nov 2013 15:58: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47A0A23BD; Mon, 25 Nov 2013 15:58:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPFwoig003912; Mon, 25 Nov 2013 15:58:50 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPFwmTA003904; Mon, 25 Nov 2013 15:58:48 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201311251558.rAPFwmTA003904@svn.freebsd.org> From: Ed Maste Date: Mon, 25 Nov 2013 15:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258559 - in stable/10/sys: amd64/amd64 amd64/ia32 amd64/linux32 i386/i386 i386/include i386/linux pc98/pc98 x86/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 15:58:50 -0000 Author: emaste Date: Mon Nov 25 15:58:48 2013 New Revision: 258559 URL: http://svnweb.freebsd.org/changeset/base/258559 Log: MFC r258135: x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...) Debuggers may need to change PSL_RF. Note that tf_eflags is already stored in the signal context during signal handling and PSL_RF previously could be modified via sigreturn, so this change should not provide any new ability to userspace. For background see the thread at: http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html Reviewed by: jhb, kib Sponsored by: DARPA, AFRL Approved by: re (gjb) Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/amd64/ia32/ia32_signal.c stable/10/sys/amd64/linux32/linux32_sysvec.c stable/10/sys/i386/i386/machdep.c stable/10/sys/i386/include/vm86.h stable/10/sys/i386/linux/linux_sysvec.c stable/10/sys/pc98/pc98/machdep.c stable/10/sys/x86/include/psl.h Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/amd64/amd64/machdep.c Mon Nov 25 15:58:48 2013 (r258559) @@ -486,17 +486,7 @@ sys_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_rflags for faults. Debuggers - * should sometimes set it there too. tf_rflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(rflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(rflags, regs->tf_rflags)) { uprintf("pid %d (%s): sigreturn rflags = 0x%lx\n", p->p_pid, td->td_name, rflags); return (EINVAL); Modified: stable/10/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/10/sys/amd64/ia32/ia32_signal.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/amd64/ia32/ia32_signal.c Mon Nov 25 15:58:48 2013 (r258559) @@ -719,7 +719,7 @@ ofreebsd32_sigreturn(struct thread *td, return (error); scp = ≻ eflags = scp->sc_eflags; - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_rflags)) { return (EINVAL); } if (!CS_SECURE(scp->sc_cs)) { @@ -787,17 +787,7 @@ freebsd4_freebsd32_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_rflags)) { uprintf("pid %d (%s): freebsd4_freebsd32_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); @@ -873,17 +863,7 @@ freebsd32_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_rflags)) { uprintf("pid %d (%s): freebsd32_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); Modified: stable/10/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/10/sys/amd64/linux32/linux32_sysvec.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/amd64/linux32/linux32_sysvec.c Mon Nov 25 15:58:48 2013 (r258559) @@ -587,17 +587,7 @@ linux_sigreturn(struct thread *td, struc */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = frame.sf_sc.sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_rflags)) return(EINVAL); /* @@ -689,17 +679,7 @@ linux_rt_sigreturn(struct thread *td, st */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = context->sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_rflags)) return(EINVAL); /* Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/i386/i386/machdep.c Mon Nov 25 15:58:48 2013 (r258559) @@ -842,17 +842,7 @@ osigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { return (EINVAL); } @@ -968,17 +958,7 @@ freebsd4_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): freebsd4_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); @@ -1082,17 +1062,7 @@ sys_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); Modified: stable/10/sys/i386/include/vm86.h ============================================================================== --- stable/10/sys/i386/include/vm86.h Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/i386/include/vm86.h Mon Nov 25 15:58:48 2013 (r258559) @@ -113,7 +113,7 @@ struct vm86context { } pmap[VM86_PMAPSIZE]; }; -#define VM_USERCHANGE (PSL_USERCHANGE | PSL_RF) +#define VM_USERCHANGE (PSL_USERCHANGE) #define VME_USERCHANGE (VM_USERCHANGE | PSL_VIP | PSL_VIF) struct vm86_kernel { Modified: stable/10/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/10/sys/i386/linux/linux_sysvec.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/i386/linux/linux_sysvec.c Mon Nov 25 15:58:48 2013 (r258559) @@ -684,17 +684,7 @@ linux_sigreturn(struct thread *td, struc */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = frame.sf_sc.sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_eflags)) return(EINVAL); /* @@ -785,17 +775,7 @@ linux_rt_sigreturn(struct thread *td, st */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = context->sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_eflags)) return(EINVAL); /* Modified: stable/10/sys/pc98/pc98/machdep.c ============================================================================== --- stable/10/sys/pc98/pc98/machdep.c Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/pc98/pc98/machdep.c Mon Nov 25 15:58:48 2013 (r258559) @@ -773,17 +773,7 @@ osigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { return (EINVAL); } @@ -899,17 +889,7 @@ freebsd4_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): freebsd4_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); @@ -1013,17 +993,7 @@ sys_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); Modified: stable/10/sys/x86/include/psl.h ============================================================================== --- stable/10/sys/x86/include/psl.h Mon Nov 25 15:54:18 2013 (r258558) +++ stable/10/sys/x86/include/psl.h Mon Nov 25 15:58:48 2013 (r258559) @@ -77,8 +77,16 @@ * is undesirable but it may as well be allowed since users can inflict * it on the kernel directly. Changes to PSL_AC are silently ignored on * 386's. + * + * Users are allowed to change the privileged flag PSL_RF. The cpu sets PSL_RF + * in tf_eflags for faults. Debuggers should sometimes set it there too. + * tf_eflags is kept in the signal context during signal handling and there is + * no other place to remember it, so the PSL_RF bit may be corrupted by the + * signal handler without us knowing. Corruption of the PSL_RF bit at worst + * causes one more or one less debugger trap, so allowing it is fairly + * harmless. */ #define PSL_USERCHANGE (PSL_C | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_T \ - | PSL_D | PSL_V | PSL_NT | PSL_AC | PSL_ID) + | PSL_D | PSL_V | PSL_NT | PSL_RF | PSL_AC | PSL_ID) #endif /* !_MACHINE_PSL_H_ */ From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 16:06:07 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE44924B; Mon, 25 Nov 2013 16:06: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BCA072443; Mon, 25 Nov 2013 16:06:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPG67Cw007287; Mon, 25 Nov 2013 16:06:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPG67Eu007286; Mon, 25 Nov 2013 16:06:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251606.rAPG67Eu007286@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 16:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258560 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 16:06:07 -0000 Author: avg Date: Mon Nov 25 16:06:07 2013 New Revision: 258560 URL: http://svnweb.freebsd.org/changeset/base/258560 Log: MFV r258377: 4088 use after free in arc_release() illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 15:58:48 2013 (r258559) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 16:06:07 2013 (r258560) @@ -3542,6 +3542,7 @@ arc_release(arc_buf_t *buf, void *tag) if (l2hdr) { mutex_enter(&l2arc_buflist_mtx); hdr->b_l2hdr = NULL; + list_remove(l2hdr->b_dev->l2ad_buflist, hdr); } buf_size = hdr->b_size; @@ -3629,7 +3630,6 @@ arc_release(arc_buf_t *buf, void *tag) ARCSTAT_INCR(arcstat_l2_asize, -l2hdr->b_asize); trim_map_free(l2hdr->b_dev->l2ad_vdev, l2hdr->b_daddr, hdr->b_size, 0); - list_remove(l2hdr->b_dev->l2ad_buflist, hdr); kmem_free(l2hdr, sizeof (l2arc_buf_hdr_t)); ARCSTAT_INCR(arcstat_l2_size, -buf_size); mutex_exit(&l2arc_buflist_mtx); From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 16:06:24 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A83D837A; Mon, 25 Nov 2013 16:06: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 94FA72446; Mon, 25 Nov 2013 16:06:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPG6OvC007361; Mon, 25 Nov 2013 16:06:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPG6Okt007360; Mon, 25 Nov 2013 16:06:24 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251606.rAPG6Okt007360@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 16:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r258561 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 16:06:24 -0000 Author: avg Date: Mon Nov 25 16:06:24 2013 New Revision: 258561 URL: http://svnweb.freebsd.org/changeset/base/258561 Log: MFV r258377: 4088 use after free in arc_release() illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772 Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 16:06:07 2013 (r258560) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 16:06:24 2013 (r258561) @@ -3460,6 +3460,7 @@ arc_release(arc_buf_t *buf, void *tag) if (l2hdr) { mutex_enter(&l2arc_buflist_mtx); hdr->b_l2hdr = NULL; + list_remove(l2hdr->b_dev->l2ad_buflist, hdr); } buf_size = hdr->b_size; @@ -3546,7 +3547,6 @@ arc_release(arc_buf_t *buf, void *tag) if (l2hdr) { trim_map_free(l2hdr->b_dev->l2ad_vdev, l2hdr->b_daddr, hdr->b_size, 0); - list_remove(l2hdr->b_dev->l2ad_buflist, hdr); kmem_free(l2hdr, sizeof (l2arc_buf_hdr_t)); ARCSTAT_INCR(arcstat_l2_size, -buf_size); mutex_exit(&l2arc_buflist_mtx); From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 16:31:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AAB31E3C; Mon, 25 Nov 2013 16:31: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F30325EC; Mon, 25 Nov 2013 16:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPGVV97017287; Mon, 25 Nov 2013 16:31:31 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPGVVdU017286; Mon, 25 Nov 2013 16:31:31 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251631.rAPGVVdU017286@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 16:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258563 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 16:31:31 -0000 Author: avg Date: Mon Nov 25 16:31:31 2013 New Revision: 258563 URL: http://svnweb.freebsd.org/changeset/base/258563 Log: MFC r258353: zfs page_busy: fix the boundaries of the cleared range This is a fix for a regression introduced in r246293. vm_page_clear_dirty expects the range to have DEV_BSIZE aligned boundaries, otherwise it extends them. Thus it can happen that the whole page is marked clean while actually having some small dirty region(s). This commit makes the range properly aligned and ensures that only the clean data is marked as such. It would interesting to evaluate how much benefit clearing with DEV_BSIZE granularity produces. Perhaps instead we should clear the whole page when it is completely overwritten and don't bother clearing any bits if only a portion a page is written. Reviewed by: kib Approved by: re (gjb) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/10/sys/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 16:19:21 2013 (r258562) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Mon Nov 25 16:31:31 2013 (r258563) @@ -329,6 +329,20 @@ page_busy(vnode_t *vp, int64_t start, in { vm_object_t obj; vm_page_t pp; + int64_t end; + + /* + * At present vm_page_clear_dirty extends the cleared range to DEV_BSIZE + * aligned boundaries, if the range is not aligned. As a result a + * DEV_BSIZE subrange with partially dirty data may get marked as clean. + * It may happen that all DEV_BSIZE subranges are marked clean and thus + * the whole page would be considred clean despite have some dirty data. + * For this reason we should shrink the range to DEV_BSIZE aligned + * boundaries before calling vm_page_clear_dirty. + */ + end = rounddown2(off + nbytes, DEV_BSIZE); + off = roundup2(off, DEV_BSIZE); + nbytes = end - off; obj = vp->v_object; zfs_vmobject_assert_wlocked(obj); @@ -363,7 +377,8 @@ page_busy(vnode_t *vp, int64_t start, in ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); vm_object_pip_add(obj, 1); pmap_remove_write(pp); - vm_page_clear_dirty(pp, off, nbytes); + if (nbytes != 0) + vm_page_clear_dirty(pp, off, nbytes); } break; } From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 17:19:05 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE1B9277; Mon, 25 Nov 2013 17:19: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BBD302979; Mon, 25 Nov 2013 17:19:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPHJ587032555; Mon, 25 Nov 2013 17:19:05 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPHJ5Yo032554; Mon, 25 Nov 2013 17:19:05 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251719.rAPHJ5Yo032554@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 17:19:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258565 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 17:19:05 -0000 Author: avg Date: Mon Nov 25 17:19:05 2013 New Revision: 258565 URL: http://svnweb.freebsd.org/changeset/base/258565 Log: MFV r258377: 4088 use after free in arc_release() illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772 Approved by: re (gjb) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/sys/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 16:44:02 2013 (r258564) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 17:19:05 2013 (r258565) @@ -3540,6 +3540,7 @@ arc_release(arc_buf_t *buf, void *tag) if (l2hdr) { mutex_enter(&l2arc_buflist_mtx); hdr->b_l2hdr = NULL; + list_remove(l2hdr->b_dev->l2ad_buflist, hdr); } buf_size = hdr->b_size; @@ -3627,7 +3628,6 @@ arc_release(arc_buf_t *buf, void *tag) ARCSTAT_INCR(arcstat_l2_asize, -l2hdr->b_asize); trim_map_free(l2hdr->b_dev->l2ad_vdev, l2hdr->b_daddr, hdr->b_size, 0); - list_remove(l2hdr->b_dev->l2ad_buflist, hdr); kmem_free(l2hdr, sizeof (l2arc_buf_hdr_t)); ARCSTAT_INCR(arcstat_l2_size, -buf_size); mutex_exit(&l2arc_buflist_mtx); From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 17:30:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 013C872A; Mon, 25 Nov 2013 17:30: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D5AC72A77; Mon, 25 Nov 2013 17:30:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPHUIFb037667; Mon, 25 Nov 2013 17:30:18 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPHUIaK037666; Mon, 25 Nov 2013 17:30:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251730.rAPHUIaK037666@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 17:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258566 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 17:30:19 -0000 Author: avg Date: Mon Nov 25 17:30:18 2013 New Revision: 258566 URL: http://svnweb.freebsd.org/changeset/base/258566 Log: MFV r258378: 4089 NULL pointer dereference in arc_read() illumos/illumos-gate@57815f6b95a743697e148327725b7f568e75e6ea Tested by: adrian Approved by: re (gjb) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/sys/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 17:19:05 2013 (r258565) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Mon Nov 25 17:30:18 2013 (r258566) @@ -20,9 +20,9 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ /* @@ -3173,6 +3173,8 @@ top: vdev_t *vd = NULL; uint64_t addr = 0; boolean_t devw = B_FALSE; + enum zio_compress b_compress = ZIO_COMPRESS_OFF; + uint64_t b_asize = 0; if (hdr == NULL) { /* this block is not in the cache */ @@ -3242,10 +3244,12 @@ top: hdr->b_acb = acb; hdr->b_flags |= ARC_IO_IN_PROGRESS; - if (HDR_L2CACHE(hdr) && hdr->b_l2hdr != NULL && + if (hdr->b_l2hdr != NULL && (vd = hdr->b_l2hdr->b_dev->l2ad_vdev) != NULL) { devw = hdr->b_l2hdr->b_dev->l2ad_writing; addr = hdr->b_l2hdr->b_daddr; + b_compress = hdr->b_l2hdr->b_compress; + b_asize = hdr->b_l2hdr->b_asize; /* * Lock out device removal. */ @@ -3296,7 +3300,7 @@ top: cb->l2rcb_bp = *bp; cb->l2rcb_zb = *zb; cb->l2rcb_flags = zio_flags; - cb->l2rcb_compress = hdr->b_l2hdr->b_compress; + cb->l2rcb_compress = b_compress; ASSERT(addr >= VDEV_LABEL_START_SIZE && addr + size < vd->vdev_psize - @@ -3308,8 +3312,7 @@ top: * Issue a null zio if the underlying buffer * was squashed to zero size by compression. */ - if (hdr->b_l2hdr->b_compress == - ZIO_COMPRESS_EMPTY) { + if (b_compress == ZIO_COMPRESS_EMPTY) { rzio = zio_null(pio, spa, vd, l2arc_read_done, cb, zio_flags | ZIO_FLAG_DONT_CACHE | @@ -3318,8 +3321,8 @@ top: ZIO_FLAG_DONT_RETRY); } else { rzio = zio_read_phys(pio, vd, addr, - hdr->b_l2hdr->b_asize, - buf->b_data, ZIO_CHECKSUM_OFF, + b_asize, buf->b_data, + ZIO_CHECKSUM_OFF, l2arc_read_done, cb, priority, zio_flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_CANFAIL | @@ -3328,8 +3331,7 @@ top: } DTRACE_PROBE2(l2arc__read, vdev_t *, vd, zio_t *, rzio); - ARCSTAT_INCR(arcstat_l2_read_bytes, - hdr->b_l2hdr->b_asize); + ARCSTAT_INCR(arcstat_l2_read_bytes, b_asize); if (*arc_flags & ARC_NOWAIT) { zio_nowait(rzio); From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 18:51:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 059B771F; Mon, 25 Nov 2013 18:51: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DDAE1200A; Mon, 25 Nov 2013 18:51:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPIpPoZ084894; Mon, 25 Nov 2013 18:51:25 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPIpPJ5084893; Mon, 25 Nov 2013 18:51:25 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251851.rAPIpPJ5084893@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 18:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258575 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 18:51:26 -0000 Author: avg Date: Mon Nov 25 18:51:25 2013 New Revision: 258575 URL: http://svnweb.freebsd.org/changeset/base/258575 Log: MFC r240834: Add rounddown2() macro similar to the roundup2() macro. MFC slacker: pjd Modified: stable/9/sys/sys/param.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Mon Nov 25 18:49:37 2013 (r258574) +++ stable/9/sys/sys/param.h Mon Nov 25 18:51:25 2013 (r258575) @@ -277,6 +277,7 @@ #endif #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #define rounddown(x, y) (((x)/(y))*(y)) +#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ #define powerof2(x) ((((x)-1)&(x))==0) From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 18:51:53 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C547185D; Mon, 25 Nov 2013 18:51: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B49C52037; Mon, 25 Nov 2013 18:51:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPIpr5w084976; Mon, 25 Nov 2013 18:51:53 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPIprto084975; Mon, 25 Nov 2013 18:51:53 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311251851.rAPIprto084975@svn.freebsd.org> From: Andriy Gapon Date: Mon, 25 Nov 2013 18:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r258576 - stable/8/sys/sys X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 18:51:53 -0000 Author: avg Date: Mon Nov 25 18:51:53 2013 New Revision: 258576 URL: http://svnweb.freebsd.org/changeset/base/258576 Log: MFC r240834: Add rounddown2() macro similar to the roundup2() macro. MFC slacker: pjd Modified: stable/8/sys/sys/param.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/sys/ (props changed) Modified: stable/8/sys/sys/param.h ============================================================================== --- stable/8/sys/sys/param.h Mon Nov 25 18:51:25 2013 (r258575) +++ stable/8/sys/sys/param.h Mon Nov 25 18:51:53 2013 (r258576) @@ -273,6 +273,7 @@ #endif #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #define rounddown(x, y) (((x)/(y))*(y)) +#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ #define powerof2(x) ((((x)-1)&(x))==0) From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 20:01:35 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77514724; Mon, 25 Nov 2013 20:01: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 65E492590; Mon, 25 Nov 2013 20:01:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPK1ZuT014006; Mon, 25 Nov 2013 20:01:35 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPK1YXX014000; Mon, 25 Nov 2013 20:01:34 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311252001.rAPK1YXX014000@svn.freebsd.org> From: Xin LI Date: Mon, 25 Nov 2013 20:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258584 - in stable/9/sys: dev/bxe dev/oce ofed/drivers/net/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:01:35 -0000 Author: delphij Date: Mon Nov 25 20:01:34 2013 New Revision: 258584 URL: http://svnweb.freebsd.org/changeset/base/258584 Log: MFC r246482 (rrs) + r246581: This fixes a out-of-order problem with several of the newer drivers. The basic problem was that the driver was pulling the mbuf off the drbr ring and then when sending with xmit(), encounting a full transmit ring. Thus the lower layer xmit() function would return an error, and the drivers would then append the data back on to the ring. For TCP this is a horrible scenario sure to bring on a fast-retransmit. The fix is to use drbr_peek() to pull the data pointer but not remove it from the ring. If it fails then we either call the new drbr_putback or drbr_advance method. Advance moves it forward (we do this sometimes when the xmit() function frees the mbuf). When we succeed we always call advance. The putback will always copy the mbuf back to the top of the ring. Note that the putback *cannot* be used with a drbr_dequeue() only with drbr_peek(). We most of the time, in putback, would not need to copy it back since most likey the mbuf is still the same, but sometimes xmit() functions will change the mbuf via a pullup or other call. So the optimial case for the single consumer is to always copy it back. If we ever do a multiple_consumer (for lagg?) we will need a test and atomic in the put back possibly a seperate putback_mc() in the ring buf. Reviewed by: jhb@freebsd.org, jlv@freebsd.org Modified: stable/9/sys/dev/bxe/if_bxe.c stable/9/sys/dev/oce/oce_if.c stable/9/sys/ofed/drivers/net/mlx4/en_tx.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/if_bxe.c ============================================================================== --- stable/9/sys/dev/bxe/if_bxe.c Mon Nov 25 19:53:46 2013 (r258583) +++ stable/9/sys/dev/bxe/if_bxe.c Mon Nov 25 20:01:34 2013 (r258584) @@ -9501,24 +9501,15 @@ bxe_tx_mq_start_locked(struct ifnet *ifp BXE_FP_LOCK_ASSERT(fp); - if (m == NULL) { - /* No new work, check for pending frames. */ - next = drbr_dequeue(ifp, fp->br); - } else if (drbr_needs_enqueue(ifp, fp->br)) { - /* Both new and pending work, maintain packet order. */ + if (m != NULL) { rc = drbr_enqueue(ifp, fp->br, m); if (rc != 0) { fp->tx_soft_errors++; goto bxe_tx_mq_start_locked_exit; } - next = drbr_dequeue(ifp, fp->br); - } else - /* New work only, nothing pending. */ - next = m; - + } /* Keep adding entries while there are frames to send. */ - while (next != NULL) { - + while ((next = drbr_peek(ifp, fp->br)) != NULL) { /* The transmit mbuf now belongs to us, keep track of it. */ fp->tx_mbuf_alloc++; @@ -9532,23 +9523,22 @@ bxe_tx_mq_start_locked(struct ifnet *ifp if (__predict_false(rc != 0)) { fp->tx_encap_failures++; /* Very Bad Frames(tm) may have been dropped. */ - if (next != NULL) { + if (next == NULL) { + drbr_advance(ifp, fp->br); + } else { + drbr_putback(ifp, fp->br, next); /* * Mark the TX queue as full and save * the frame. */ ifp->if_drv_flags |= IFF_DRV_OACTIVE; fp->tx_frame_deferred++; - - /* This may reorder frame. */ - rc = drbr_enqueue(ifp, fp->br, next); fp->tx_mbuf_alloc--; } - /* Stop looking for more work. */ break; } - + drbr_advance(ifp, fp->br); /* The transmit frame was enqueued successfully. */ tx_count++; @@ -9569,8 +9559,6 @@ bxe_tx_mq_start_locked(struct ifnet *ifp ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; break; } - - next = drbr_dequeue(ifp, fp->br); } /* No TX packets were dequeued. */ Modified: stable/9/sys/dev/oce/oce_if.c ============================================================================== --- stable/9/sys/dev/oce/oce_if.c Mon Nov 25 19:53:46 2013 (r258583) +++ stable/9/sys/dev/oce/oce_if.c Mon Nov 25 20:01:34 2013 (r258584) @@ -1173,29 +1173,27 @@ oce_multiq_transmit(struct ifnet *ifp, s return status; } - if (m == NULL) - next = drbr_dequeue(ifp, br); - else if (drbr_needs_enqueue(ifp, br)) { + if (m != NULL) { if ((status = drbr_enqueue(ifp, br, m)) != 0) return status; - next = drbr_dequeue(ifp, br); - } else - next = m; - - while (next != NULL) { + } + while ((next = drbr_peek(ifp, br)) != NULL) { if (oce_tx(sc, &next, queue_index)) { - if (next != NULL) { + if (next == NULL) { + drbr_advance(ifp, br); + } else { + drbr_putback(ifp, br, next); wq->tx_stats.tx_stops ++; ifp->if_drv_flags |= IFF_DRV_OACTIVE; status = drbr_enqueue(ifp, br, next); } break; } + drbr_advance(ifp, br); ifp->if_obytes += next->m_pkthdr.len; if (next->m_flags & M_MCAST) ifp->if_omcasts++; ETHER_BPF_MTAP(ifp, next); - next = drbr_dequeue(ifp, br); } return status; Modified: stable/9/sys/ofed/drivers/net/mlx4/en_tx.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_tx.c Mon Nov 25 19:53:46 2013 (r258583) +++ stable/9/sys/ofed/drivers/net/mlx4/en_tx.c Mon Nov 25 20:01:34 2013 (r258584) @@ -935,22 +935,21 @@ mlx4_en_transmit_locked(struct ifnet *de } enqueued = 0; - if (m == NULL) { - next = drbr_dequeue(dev, ring->br); - } else if (drbr_needs_enqueue(dev, ring->br)) { + if (m != NULL) { if ((err = drbr_enqueue(dev, ring->br, m)) != 0) return (err); - next = drbr_dequeue(dev, ring->br); - } else - next = m; - + } /* Process the queue */ - while (next != NULL) { + while ((next = drbr_peek(dev, ring->br)) != NULL) { if ((err = mlx4_en_xmit(dev, tx_ind, &next)) != 0) { - if (next != NULL) - err = drbr_enqueue(dev, ring->br, next); + if (next == NULL) { + drbr_advance(dev, ring->br); + } else { + drbr_putback(dev, ring->br, next); + } break; } + drbr_advance(dev, ring->br); enqueued++; dev->if_obytes += next->m_pkthdr.len; if (next->m_flags & M_MCAST) @@ -959,7 +958,6 @@ mlx4_en_transmit_locked(struct ifnet *de ETHER_BPF_MTAP(dev, next); if ((dev->if_drv_flags & IFF_DRV_RUNNING) == 0) break; - next = drbr_dequeue(dev, ring->br); } if (enqueued > 0) From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 20:05:24 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 908BB9F7; Mon, 25 Nov 2013 20:05: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7086B25C1; Mon, 25 Nov 2013 20:05:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPK5OMD014730; Mon, 25 Nov 2013 20:05:24 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPK5NUn014723; Mon, 25 Nov 2013 20:05:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311252005.rAPK5NUn014723@svn.freebsd.org> From: Xin LI Date: Mon, 25 Nov 2013 20:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258586 - stable/9/sys/dev/oce X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:05:24 -0000 Author: delphij Date: Mon Nov 25 20:05:23 2013 New Revision: 258586 URL: http://svnweb.freebsd.org/changeset/base/258586 Log: MFC r257007,258140: Update driver to version 10.0.664.0. Many thanks to Emulex for their continued support of FreeBSD. Submitted by: Venkata Duvvuru Modified: stable/9/sys/dev/oce/oce_hw.c stable/9/sys/dev/oce/oce_hw.h stable/9/sys/dev/oce/oce_if.c stable/9/sys/dev/oce/oce_if.h stable/9/sys/dev/oce/oce_mbox.c stable/9/sys/dev/oce/oce_queue.c stable/9/sys/dev/oce/oce_sysctl.c stable/9/sys/dev/oce/oce_util.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/oce/oce_hw.c ============================================================================== --- stable/9/sys/dev/oce/oce_hw.c Mon Nov 25 20:03:57 2013 (r258585) +++ stable/9/sys/dev/oce/oce_hw.c Mon Nov 25 20:05:23 2013 (r258586) @@ -38,6 +38,7 @@ /* $FreeBSD$ */ + #include "oce_if.h" static int oce_POST(POCE_SOFTC sc); @@ -203,12 +204,16 @@ void oce_get_pci_capabilities(POCE_SOFTC { uint32_t val; - if (pci_find_cap(sc->dev, PCIY_PCIX, &val) == 0) { +#if __FreeBSD_version >= 1000000 + #define pci_find_extcap pci_find_cap +#endif + + if (pci_find_extcap(sc->dev, PCIY_PCIX, &val) == 0) { if (val != 0) sc->flags |= OCE_FLAGS_PCIX; } - if (pci_find_cap(sc->dev, PCIY_EXPRESS, &val) == 0) { + if (pci_find_extcap(sc->dev, PCIY_EXPRESS, &val) == 0) { if (val != 0) { uint16_t link_status = pci_read_config(sc->dev, val + 0x12, 2); @@ -219,12 +224,12 @@ void oce_get_pci_capabilities(POCE_SOFTC } } - if (pci_find_cap(sc->dev, PCIY_MSI, &val) == 0) { + if (pci_find_extcap(sc->dev, PCIY_MSI, &val) == 0) { if (val != 0) sc->flags |= OCE_FLAGS_MSI_CAPABLE; } - if (pci_find_cap(sc->dev, PCIY_MSIX, &val) == 0) { + if (pci_find_extcap(sc->dev, PCIY_MSIX, &val) == 0) { if (val != 0) { val = pci_msix_count(sc->dev); sc->flags |= OCE_FLAGS_MSIX_CAPABLE; @@ -386,6 +391,9 @@ oce_create_nw_interface(POCE_SOFTC sc) capab_flags &= ~MBX_RX_IFACE_FLAGS_PASS_L3L4_ERR; } + if (IS_SH(sc) || IS_XE201(sc)) + capab_flags |= MBX_RX_IFACE_FLAGS_MULTICAST; + /* enable capabilities controlled via driver startup parameters */ if (is_rss_enabled(sc)) capab_en_flags |= MBX_RX_IFACE_FLAGS_RSS; Modified: stable/9/sys/dev/oce/oce_hw.h ============================================================================== --- stable/9/sys/dev/oce/oce_hw.h Mon Nov 25 20:03:57 2013 (r258585) +++ stable/9/sys/dev/oce/oce_hw.h Mon Nov 25 20:05:23 2013 (r258586) @@ -59,6 +59,30 @@ #define INTR_EN 0x20000000 #define IMAGE_TRANSFER_SIZE (32 * 1024) /* 32K at a time */ + +/********* UE Status and Mask Registers ***/ +#define PCICFG_UE_STATUS_LOW 0xA0 +#define PCICFG_UE_STATUS_HIGH 0xA4 +#define PCICFG_UE_STATUS_LOW_MASK 0xA8 + +/* Lancer SLIPORT registers */ +#define SLIPORT_STATUS_OFFSET 0x404 +#define SLIPORT_CONTROL_OFFSET 0x408 +#define SLIPORT_ERROR1_OFFSET 0x40C +#define SLIPORT_ERROR2_OFFSET 0x410 +#define PHYSDEV_CONTROL_OFFSET 0x414 + +#define SLIPORT_STATUS_ERR_MASK 0x80000000 +#define SLIPORT_STATUS_DIP_MASK 0x02000000 +#define SLIPORT_STATUS_RN_MASK 0x01000000 +#define SLIPORT_STATUS_RDY_MASK 0x00800000 +#define SLI_PORT_CONTROL_IP_MASK 0x08000000 +#define PHYSDEV_CONTROL_FW_RESET_MASK 0x00000002 +#define PHYSDEV_CONTROL_DD_MASK 0x00000004 +#define PHYSDEV_CONTROL_INP_MASK 0x40000000 + +#define SLIPORT_ERROR_NO_RESOURCE1 0x2 +#define SLIPORT_ERROR_NO_RESOURCE2 0x9 /* CSR register offsets */ #define MPU_EP_CONTROL 0 #define MPU_EP_SEMAPHORE_BE3 0xac @@ -1553,7 +1577,8 @@ struct mbx_common_read_write_flashrom { uint32_t flash_op_type; uint32_t data_buffer_size; uint32_t data_offset; - uint8_t data_buffer[4]; /* + IMAGE_TRANSFER_SIZE */ + uint8_t data_buffer[32768]; /* + IMAGE_TRANSFER_SIZE */ + uint8_t rsvd[4]; }; struct oce_phy_info { @@ -2079,7 +2104,8 @@ struct flash_file_hdr { uint32_t antidote; uint32_t num_imgs; uint8_t build[24]; - uint8_t rsvd[32]; + uint8_t asic_type_rev; + uint8_t rsvd[31]; }; struct image_hdr { @@ -3681,4 +3707,3 @@ enum OCE_QUEUE_RX_STATS { QUEUE_RX_BUFFER_ERRORS = 8, QUEUE_RX_N_WORDS = 10 }; - Modified: stable/9/sys/dev/oce/oce_if.c ============================================================================== --- stable/9/sys/dev/oce/oce_if.c Mon Nov 25 20:03:57 2013 (r258585) +++ stable/9/sys/dev/oce/oce_if.c Mon Nov 25 20:05:23 2013 (r258586) @@ -36,7 +36,6 @@ * Costa Mesa, CA 92626 */ - /* $FreeBSD$ */ #include "opt_inet6.h" @@ -44,6 +43,78 @@ #include "oce_if.h" +/* UE Status Low CSR */ +static char *ue_status_low_desc[] = { + "CEV", + "CTX", + "DBUF", + "ERX", + "Host", + "MPU", + "NDMA", + "PTC ", + "RDMA ", + "RXF ", + "RXIPS ", + "RXULP0 ", + "RXULP1 ", + "RXULP2 ", + "TIM ", + "TPOST ", + "TPRE ", + "TXIPS ", + "TXULP0 ", + "TXULP1 ", + "UC ", + "WDMA ", + "TXULP2 ", + "HOST1 ", + "P0_OB_LINK ", + "P1_OB_LINK ", + "HOST_GPIO ", + "MBOX ", + "AXGMAC0", + "AXGMAC1", + "JTAG", + "MPU_INTPEND" +}; + +/* UE Status High CSR */ +static char *ue_status_hi_desc[] = { + "LPCMEMHOST", + "MGMT_MAC", + "PCS0ONLINE", + "MPU_IRAM", + "PCS1ONLINE", + "PCTL0", + "PCTL1", + "PMEM", + "RR", + "TXPB", + "RXPP", + "XAUI", + "TXP", + "ARM", + "IPC", + "HOST2", + "HOST3", + "HOST4", + "HOST5", + "HOST6", + "HOST7", + "HOST8", + "HOST9", + "NETC", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown", + "Unknown" +}; + /* Driver entry points prototypes */ static int oce_probe(device_t dev); @@ -387,11 +458,11 @@ oce_ioctl(struct ifnet *ifp, u_long comm } if ((ifp->if_flags & IFF_PROMISC) && !sc->promisc) { - sc->promisc = TRUE; - oce_rxf_set_promiscuous(sc, sc->promisc); + if (!oce_rxf_set_promiscuous(sc, (1 | (1 << 1)))) + sc->promisc = TRUE; } else if (!(ifp->if_flags & IFF_PROMISC) && sc->promisc) { - sc->promisc = FALSE; - oce_rxf_set_promiscuous(sc, sc->promisc); + if (!oce_rxf_set_promiscuous(sc, 0)) + sc->promisc = FALSE; } break; @@ -861,10 +932,12 @@ retry: (m->m_pkthdr.csum_flags & CSUM_TCP) ? 1 : 0; nichdr->u0.s.num_wqe = num_wqes; nichdr->u0.s.total_length = m->m_pkthdr.len; + if (m->m_flags & M_VLANTAG) { nichdr->u0.s.vlan = 1; /*Vlan present*/ nichdr->u0.s.vlan_tag = m->m_pkthdr.ether_vtag; } + if (m->m_pkthdr.csum_flags & CSUM_TSO) { if (m->m_pkthdr.tso_segsz) { nichdr->u0.s.lso = 1; @@ -1155,6 +1228,18 @@ oce_wq_handler(void *arg) } +#if __FreeBSD_version >= 1000000 +static __inline void +drbr_stats_update(struct ifnet *ifp, int len, int mflags) +{ +#ifndef NO_SLOW_STATS + ifp->if_obytes += len; + if (mflags & M_MCAST) + ifp->if_omcasts++; +#endif +} +#endif + static int oce_multiq_transmit(struct ifnet *ifp, struct mbuf *m, struct oce_wq *wq) { @@ -1173,7 +1258,7 @@ oce_multiq_transmit(struct ifnet *ifp, s return status; } - if (m != NULL) { + if (m != NULL) { if ((status = drbr_enqueue(ifp, br, m)) != 0) return status; } @@ -1645,6 +1730,10 @@ oce_attach_ifp(POCE_SOFTC sc) sc->ifp->if_capenable = sc->ifp->if_capabilities; sc->ifp->if_baudrate = IF_Gbps(10UL); +#if __FreeBSD_version >= 1000000 + sc->ifp->if_hw_tsomax = OCE_MAX_TSO_SIZE; +#endif + ether_ifattach(sc->ifp, sc->macaddr.mac_addr); return 0; @@ -1663,7 +1752,8 @@ oce_add_vlan(void *arg, struct ifnet *if sc->vlan_tag[vtag] = 1; sc->vlans_added++; - oce_vid_config(sc); + if (sc->vlans_added <= (sc->max_vlans + 1)) + oce_vid_config(sc); } @@ -1865,12 +1955,76 @@ done: } +static void oce_detect_hw_error(POCE_SOFTC sc) +{ + + uint32_t ue_low = 0, ue_high = 0, ue_low_mask = 0, ue_high_mask = 0; + uint32_t sliport_status = 0, sliport_err1 = 0, sliport_err2 = 0; + uint32_t i; + + if (sc->hw_error) + return; + + if (IS_XE201(sc)) { + sliport_status = OCE_READ_REG32(sc, db, SLIPORT_STATUS_OFFSET); + if (sliport_status & SLIPORT_STATUS_ERR_MASK) { + sliport_err1 = OCE_READ_REG32(sc, db, SLIPORT_ERROR1_OFFSET); + sliport_err2 = OCE_READ_REG32(sc, db, SLIPORT_ERROR2_OFFSET); + } + } else { + ue_low = OCE_READ_REG32(sc, devcfg, PCICFG_UE_STATUS_LOW); + ue_high = OCE_READ_REG32(sc, devcfg, PCICFG_UE_STATUS_HIGH); + ue_low_mask = OCE_READ_REG32(sc, devcfg, PCICFG_UE_STATUS_LOW_MASK); + ue_high_mask = OCE_READ_REG32(sc, devcfg, PCICFG_UE_STATUS_HI_MASK); + + ue_low = (ue_low & ~ue_low_mask); + ue_high = (ue_high & ~ue_high_mask); + } + + /* On certain platforms BE hardware can indicate spurious UEs. + * Allow the h/w to stop working completely in case of a real UE. + * Hence not setting the hw_error for UE detection. + */ + if (sliport_status & SLIPORT_STATUS_ERR_MASK) { + sc->hw_error = TRUE; + device_printf(sc->dev, "Error detected in the card\n"); + } + + if (sliport_status & SLIPORT_STATUS_ERR_MASK) { + device_printf(sc->dev, + "ERR: sliport status 0x%x\n", sliport_status); + device_printf(sc->dev, + "ERR: sliport error1 0x%x\n", sliport_err1); + device_printf(sc->dev, + "ERR: sliport error2 0x%x\n", sliport_err2); + } + + if (ue_low) { + for (i = 0; ue_low; ue_low >>= 1, i++) { + if (ue_low & 1) + device_printf(sc->dev, "UE: %s bit set\n", + ue_status_low_desc[i]); + } + } + + if (ue_high) { + for (i = 0; ue_high; ue_high >>= 1, i++) { + if (ue_high & 1) + device_printf(sc->dev, "UE: %s bit set\n", + ue_status_hi_desc[i]); + } + } + +} + + static void oce_local_timer(void *arg) { POCE_SOFTC sc = arg; int i = 0; + oce_detect_hw_error(sc); oce_refresh_nic_stats(sc); oce_refresh_queue_stats(sc); oce_mac_addr_set(sc); @@ -1889,7 +2043,7 @@ oce_local_timer(void *arg) /* NOTE : This should only be called holding * DEVICE_LOCK. -*/ + */ static void oce_if_deactivate(POCE_SOFTC sc) { @@ -2079,6 +2233,9 @@ setup_max_queues_want(POCE_SOFTC sc) (sc->flags & OCE_FLAGS_BE2)) { sc->nrqs = 1; sc->nwqs = 1; + } else { + sc->nrqs = MIN(OCE_NCPUS, sc->nrssqs) + 1; + sc->nwqs = MIN(OCE_NCPUS, sc->nrssqs); } } Modified: stable/9/sys/dev/oce/oce_if.h ============================================================================== --- stable/9/sys/dev/oce/oce_if.h Mon Nov 25 20:03:57 2013 (r258585) +++ stable/9/sys/dev/oce/oce_if.h Mon Nov 25 20:05:23 2013 (r258586) @@ -36,7 +36,6 @@ * Costa Mesa, CA 92626 */ - /* $FreeBSD$ */ #include @@ -88,7 +87,8 @@ #include "oce_hw.h" -#define COMPONENT_REVISION "4.6.95.0" +/* OCE device driver module component revision informaiton */ +#define COMPONENT_REVISION "10.0.664.0" /* OCE devices supported by this driver */ #define PCI_VENDOR_EMULEX 0x10df /* Emulex */ @@ -150,6 +150,7 @@ extern int mp_ncpus; /* system's total #define OCE_MAX_TX_ELEMENTS 29 #define OCE_MAX_TX_DESC 1024 #define OCE_MAX_TX_SIZE 65535 +#define OCE_MAX_TSO_SIZE (65535 - ETHER_HDR_LEN) #define OCE_MAX_RX_SIZE 4096 #define OCE_MAX_RQ_POSTS 255 #define OCE_DEFAULT_PROMISCUOUS 0 @@ -173,6 +174,7 @@ extern int mp_ncpus; /* system's total #define OCE_CAPAB_FLAGS (MBX_RX_IFACE_FLAGS_BROADCAST | \ MBX_RX_IFACE_FLAGS_UNTAGGED | \ MBX_RX_IFACE_FLAGS_PROMISCUOUS | \ + MBX_RX_IFACE_FLAGS_VLAN_PROMISCUOUS | \ MBX_RX_IFACE_FLAGS_MCAST_PROMISCUOUS | \ MBX_RX_IFACE_FLAGS_RSS | \ MBX_RX_IFACE_FLAGS_PASS_L3L4_ERR) @@ -863,7 +865,7 @@ typedef struct oce_softc { uint32_t if_cap_flags; uint32_t flow_control; - uint32_t promisc; + uint8_t promisc; struct oce_aic_obj aic_obj[OCE_MAX_EQ]; @@ -877,9 +879,11 @@ typedef struct oce_softc { struct oce_drv_stats oce_stats_info; struct callout timer; int8_t be3_native; + uint8_t hw_error; uint16_t qnq_debug_event; uint16_t qnqid; uint16_t pvid; + uint16_t max_vlans; } OCE_SOFTC, *POCE_SOFTC; @@ -1010,7 +1014,7 @@ int oce_config_vlan(POCE_SOFTC sc, uint3 uint32_t untagged, uint32_t enable_promisc); int oce_set_flow_control(POCE_SOFTC sc, uint32_t flow_control); int oce_config_nic_rss(POCE_SOFTC sc, uint32_t if_id, uint16_t enable_rss); -int oce_rxf_set_promiscuous(POCE_SOFTC sc, uint32_t enable); +int oce_rxf_set_promiscuous(POCE_SOFTC sc, uint8_t enable); int oce_set_common_iface_rx_filter(POCE_SOFTC sc, POCE_DMA_MEM sgl); int oce_get_link_status(POCE_SOFTC sc, struct link_status *link); int oce_mbox_get_nic_stats_v0(POCE_SOFTC sc, POCE_DMA_MEM pstats_dma_mem); Modified: stable/9/sys/dev/oce/oce_mbox.c ============================================================================== --- stable/9/sys/dev/oce/oce_mbox.c Mon Nov 25 20:03:57 2013 (r258585) +++ stable/9/sys/dev/oce/oce_mbox.c Mon Nov 25 20:05:23 2013 (r258586) @@ -36,11 +36,8 @@ * Costa Mesa, CA 92626 */ - - /* $FreeBSD$ */ - #include "oce_if.h" extern uint32_t sfp_vpd_dump_buffer[TRANSCEIVER_DATA_NUM_ELE]; @@ -281,8 +278,10 @@ oce_get_fw_version(POCE_SOFTC sc) if (!ret) ret = fwcmd->hdr.u0.rsp.status; if (ret) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, ret); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, ret, + fwcmd->hdr.u0.rsp.additional_status); goto error; } @@ -438,8 +437,10 @@ oce_read_mac_addr(POCE_SOFTC sc, uint32_ if (!ret) ret = fwcmd->hdr.u0.rsp.status; if (ret) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, ret); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, ret, + fwcmd->hdr.u0.rsp.additional_status); goto error; } @@ -481,25 +482,27 @@ oce_get_fw_config(POCE_SOFTC sc) if (!ret) ret = fwcmd->hdr.u0.rsp.status; if (ret) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, ret); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, ret, + fwcmd->hdr.u0.rsp.additional_status); goto error; } DW_SWAP(u32ptr(fwcmd), sizeof(struct mbx_common_query_fw_config)); - sc->config_number = fwcmd->params.rsp.config_number; - sc->asic_revision = fwcmd->params.rsp.asic_revision; - sc->port_id = fwcmd->params.rsp.port_id; - sc->function_mode = fwcmd->params.rsp.function_mode; - sc->function_caps = fwcmd->params.rsp.function_caps; + sc->config_number = HOST_32(fwcmd->params.rsp.config_number); + sc->asic_revision = HOST_32(fwcmd->params.rsp.asic_revision); + sc->port_id = HOST_32(fwcmd->params.rsp.port_id); + sc->function_mode = HOST_32(fwcmd->params.rsp.function_mode); + sc->function_caps = HOST_32(fwcmd->params.rsp.function_caps); if (fwcmd->params.rsp.ulp[0].ulp_mode & ULP_NIC_MODE) { - sc->max_tx_rings = fwcmd->params.rsp.ulp[0].nic_wq_tot; - sc->max_rx_rings = fwcmd->params.rsp.ulp[0].lro_rqid_tot; + sc->max_tx_rings = HOST_32(fwcmd->params.rsp.ulp[0].nic_wq_tot); + sc->max_rx_rings = HOST_32(fwcmd->params.rsp.ulp[0].lro_rqid_tot); } else { - sc->max_tx_rings = fwcmd->params.rsp.ulp[1].nic_wq_tot; - sc->max_rx_rings = fwcmd->params.rsp.ulp[1].lro_rqid_tot; + sc->max_tx_rings = HOST_32(fwcmd->params.rsp.ulp[1].nic_wq_tot); + sc->max_rx_rings = HOST_32(fwcmd->params.rsp.ulp[1].lro_rqid_tot); } error: @@ -561,15 +564,17 @@ oce_if_create(POCE_SOFTC sc, if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } - *if_id = LE_32(fwcmd->params.rsp.if_id); + *if_id = HOST_32(fwcmd->params.rsp.if_id); if (mac_addr != NULL) - sc->pmac_id = LE_32(fwcmd->params.rsp.pmac_id); + sc->pmac_id = HOST_32(fwcmd->params.rsp.pmac_id); error: return rc; } @@ -607,8 +612,10 @@ oce_if_del(POCE_SOFTC sc, uint32_t if_id if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; } @@ -630,7 +637,10 @@ oce_config_vlan(POCE_SOFTC sc, { struct oce_mbx mbx; struct mbx_common_config_vlan *fwcmd; - int rc; + int rc = 0; + + if (sc->vlans_added > sc->max_vlans) + goto vlan_promisc; bzero(&mbx, sizeof(struct oce_mbx)); fwcmd = (struct mbx_common_config_vlan *)&mbx.payload; @@ -659,9 +669,19 @@ oce_config_vlan(POCE_SOFTC sc, if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); - return 0; + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); + + goto done; + +vlan_promisc: + /* Enable Vlan Promis */ + oce_rxf_set_promiscuous(sc, (1 << 1)); + device_printf(sc->dev,"Enabling Vlan Promisc Mode\n"); +done: + return rc; } @@ -702,8 +722,10 @@ oce_set_flow_control(POCE_SOFTC sc, uint if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; } @@ -802,8 +824,10 @@ oce_config_nic_rss(POCE_SOFTC sc, uint32 if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); } return rc; } @@ -818,7 +842,7 @@ oce_config_nic_rss(POCE_SOFTC sc, uint32 * This function uses the COMMON_SET_IFACE_RX_FILTER command instead. */ int -oce_rxf_set_promiscuous(POCE_SOFTC sc, uint32_t enable) +oce_rxf_set_promiscuous(POCE_SOFTC sc, uint8_t enable) { struct mbx_set_common_iface_rx_filter *fwcmd; int sz = sizeof(struct mbx_set_common_iface_rx_filter); @@ -836,10 +860,13 @@ oce_rxf_set_promiscuous(POCE_SOFTC sc, u req = &fwcmd->params.req; req->iface_flags_mask = MBX_RX_IFACE_FLAGS_PROMISCUOUS | MBX_RX_IFACE_FLAGS_VLAN_PROMISCUOUS; - if (enable) { - req->iface_flags = MBX_RX_IFACE_FLAGS_PROMISCUOUS | - MBX_RX_IFACE_FLAGS_VLAN_PROMISCUOUS; - } + /* Bit 0 Mac promisc, Bit 1 Vlan promisc */ + if (enable & 0x01) + req->iface_flags = MBX_RX_IFACE_FLAGS_PROMISCUOUS; + + if (enable & 0x02) + req->iface_flags = MBX_RX_IFACE_FLAGS_VLAN_PROMISCUOUS; + req->if_id = sc->if_id; rc = oce_set_common_iface_rx_filter(sc, &sgl); @@ -886,9 +913,11 @@ oce_set_common_iface_rx_filter(POCE_SOFT if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); - return 0; + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); + return rc; } /** @@ -925,14 +954,16 @@ oce_get_link_status(POCE_SOFTC sc, struc if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } /* interpret response */ bcopy(&fwcmd->params.rsp, link, sizeof(struct link_status)); - link->logical_link_status = LE_32(link->logical_link_status); - link->qos_link_speed = LE_16(link->qos_link_speed); + link->logical_link_status = HOST_32(link->logical_link_status); + link->qos_link_speed = HOST_16(link->qos_link_speed); error: return rc; } @@ -978,8 +1009,10 @@ oce_mbox_get_nic_stats_v0(POCE_SOFTC sc, if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; } @@ -1028,8 +1061,10 @@ oce_mbox_get_nic_stats(POCE_SOFTC sc, PO if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; } @@ -1080,8 +1115,10 @@ oce_mbox_get_pport_stats(POCE_SOFTC sc, if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; } @@ -1133,8 +1170,10 @@ oce_mbox_get_vport_stats(POCE_SOFTC sc, if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; } @@ -1178,8 +1217,10 @@ oce_update_multicast(POCE_SOFTC sc, POCE if (!rc) rc = req->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + req->hdr.u0.rsp.additional_status); return rc; } @@ -1243,8 +1284,10 @@ oce_mbox_macaddr_add(POCE_SOFTC sc, uint if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } *pmac_id = fwcmd->params.rsp.pmac_id; @@ -1281,8 +1324,10 @@ oce_mbox_macaddr_del(POCE_SOFTC sc, uint if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; } @@ -1318,11 +1363,13 @@ oce_mbox_check_native_mode(POCE_SOFTC sc if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } - sc->be3_native = fwcmd->params.rsp.capability_flags + sc->be3_native = HOST_32(fwcmd->params.rsp.capability_flags) & CAP_BE3_NATIVE_ERX_API; error: @@ -1363,8 +1410,10 @@ oce_mbox_cmd_set_loopback(POCE_SOFTC sc, if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; @@ -1406,8 +1455,10 @@ oce_mbox_cmd_test_loopback(POCE_SOFTC sc if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; } @@ -1433,9 +1484,9 @@ oce_mbox_write_flashrom(POCE_SOFTC sc, u payload_len, OCE_MBX_VER_V0); - fwcmd->flash_op_type = optype; - fwcmd->flash_op_code = opcode; - fwcmd->data_buffer_size = num_bytes; + fwcmd->flash_op_type = LE_32(optype); + fwcmd->flash_op_code = LE_32(opcode); + fwcmd->data_buffer_size = LE_32(num_bytes); mbx.u0.s.embedded = 0; /*Non embeded*/ mbx.payload_length = payload_len; @@ -1451,8 +1502,10 @@ oce_mbox_write_flashrom(POCE_SOFTC sc, u if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); return rc; @@ -1497,8 +1550,10 @@ oce_mbox_get_flashrom_crc(POCE_SOFTC sc, if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } bcopy(fwcmd->data_buffer, flash_crc, 4); @@ -1532,18 +1587,20 @@ oce_mbox_get_phy_info(POCE_SOFTC sc, str if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } - phy_info->phy_type = fwcmd->params.rsp.phy_info.phy_type; + phy_info->phy_type = HOST_16(fwcmd->params.rsp.phy_info.phy_type); phy_info->interface_type = - fwcmd->params.rsp.phy_info.interface_type; + HOST_16(fwcmd->params.rsp.phy_info.interface_type); phy_info->auto_speeds_supported = - fwcmd->params.rsp.phy_info.auto_speeds_supported; + HOST_16(fwcmd->params.rsp.phy_info.auto_speeds_supported); phy_info->fixed_speeds_supported = - fwcmd->params.rsp.phy_info.fixed_speeds_supported; - phy_info->misc_params =fwcmd->params.rsp.phy_info.misc_params; + HOST_16(fwcmd->params.rsp.phy_info.fixed_speeds_supported); + phy_info->misc_params = HOST_32(fwcmd->params.rsp.phy_info.misc_params); error: return rc; @@ -1593,11 +1650,13 @@ oce_mbox_lancer_write_flashrom(POCE_SOFT if (!rc) rc = fwcmd->params.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->params.rsp.additional_status); goto error; } - *written_data = fwcmd->params.rsp.actual_write_length; + *written_data = HOST_32(fwcmd->params.rsp.actual_write_length); *additional_status = fwcmd->params.rsp.additional_status; error: return rc; @@ -1649,11 +1708,13 @@ oce_mbox_create_rq(struct oce_rq *rq) if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } - rq->rq_id = fwcmd->params.rsp.rq_id; + rq->rq_id = HOST_16(fwcmd->params.rsp.rq_id); rq->rss_cpuid = fwcmd->params.rsp.rss_cpuid; error: return rc; @@ -1673,15 +1734,17 @@ oce_mbox_create_wq(struct oce_wq *wq) bzero(&mbx, sizeof(struct oce_mbx)); fwcmd = (struct mbx_create_nic_wq *)&mbx.payload; - if (IS_XE201(sc)) { + if (IS_XE201(sc)) version = OCE_MBX_VER_V1; - fwcmd->params.req.if_id = sc->if_id; - } else if(IS_BE(sc)) + else if(IS_BE(sc)) IS_PROFILE_SUPER_NIC(sc) ? (version = OCE_MBX_VER_V2) : (version = OCE_MBX_VER_V0); else version = OCE_MBX_VER_V2; + if (version > OCE_MBX_VER_V0) + fwcmd->params.req.if_id = sc->if_id; + mbx_common_req_hdr_init(&fwcmd->hdr, 0, 0, MBX_SUBSYSTEM_NIC, NIC_CREATE_WQ, MBX_TIMEOUT_SEC, @@ -1703,13 +1766,15 @@ oce_mbox_create_wq(struct oce_wq *wq) if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } - wq->wq_id = LE_16(fwcmd->params.rsp.wq_id); + wq->wq_id = HOST_16(fwcmd->params.rsp.wq_id); if (version == OCE_MBX_VER_V2) - wq->db_offset = LE_32(fwcmd->params.rsp.db_offset); + wq->db_offset = HOST_32(fwcmd->params.rsp.db_offset); else wq->db_offset = PD_TXULP_DB; error: @@ -1754,11 +1819,13 @@ oce_mbox_create_eq(struct oce_eq *eq) if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } - eq->eq_id = LE_16(fwcmd->params.rsp.eq_id); + eq->eq_id = HOST_16(fwcmd->params.rsp.eq_id); error: return rc; } @@ -1832,11 +1899,13 @@ oce_mbox_cq_create(struct oce_cq *cq, ui if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; } - cq->cq_id = LE_16(fwcmd->params.rsp.cq_id); + cq->cq_id = HOST_16(fwcmd->params.rsp.cq_id); error: return rc; @@ -1885,8 +1954,10 @@ oce_mbox_read_transrecv_data(POCE_SOFTC if (!rc) rc = fwcmd->hdr.u0.rsp.status; if (rc) { - device_printf(sc->dev,"%s failed - cmd status: %d\n", - __FUNCTION__, rc); + device_printf(sc->dev, + "%s failed - cmd status: %d addi status: %d\n", + __FUNCTION__, rc, + fwcmd->hdr.u0.rsp.additional_status); goto error; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 20:39:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30F7FB02; Mon, 25 Nov 2013 20:39: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1EF1627E2; Mon, 25 Nov 2013 20:39:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKdAOH026000; Mon, 25 Nov 2013 20:39:10 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKdAUA025995; Mon, 25 Nov 2013 20:39:10 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311252039.rAPKdAUA025995@svn.freebsd.org> From: Craig Rodrigues Date: Mon, 25 Nov 2013 20:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258593 - in stable/10/release/doc: de_DE.ISO8859-1/readme en_US.ISO8859-1/readme ru_RU.KOI8-R/readme zh_CN.GB2312/readme X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:39:11 -0000 Author: rodrigc Date: Mon Nov 25 20:39:09 2013 New Revision: 258593 URL: http://svnweb.freebsd.org/changeset/base/258593 Log: MFC 258570 Change sysinstall.8 references to bsdinstall.8. Submitted by: skreuzer Approved by: re (delphij) Modified: stable/10/release/doc/de_DE.ISO8859-1/readme/article.xml stable/10/release/doc/en_US.ISO8859-1/readme/article.xml stable/10/release/doc/ru_RU.KOI8-R/readme/article.xml stable/10/release/doc/zh_CN.GB2312/readme/article.xml Directory Properties: stable/10/release/ (props changed) stable/10/release/doc/ (props changed) Modified: stable/10/release/doc/de_DE.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/de_DE.ISO8859-1/readme/article.xml Mon Nov 25 20:37:53 2013 (r258592) +++ stable/10/release/doc/de_DE.ISO8859-1/readme/article.xml Mon Nov 25 20:39:09 2013 (r258593) @@ -390,13 +390,13 @@ gehört, steht immer am Anfang des Textes. - Auf den Plattformen, auf denen &man.sysinstall.8; zur + Auf den Plattformen, auf denen &man.bsdinstall.8; zur Verfügung steht (zur Zeit alpha, i386, ia64, pc98 und sparc64) finden Sie diese Dokumente während der Installation normalerweise unter dem Menüpunkt Dokumentation. Um nach der Installation des Systems dieses Menü zugreifen zu können, müssen Sie das - Programm &man.sysinstall.8; erneut aufrufen. + Programm &man.bsdinstall.8; erneut aufrufen. Sie sollten auf jeden Fall die Errata zur jeweiligen Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Mon Nov 25 20:37:53 2013 (r258592) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Mon Nov 25 20:39:09 2013 (r258593) @@ -324,11 +324,11 @@ - On platforms that support &man.sysinstall.8; (currently + On platforms that support &man.bsdinstall.8; (currently &arch.amd64;, &arch.i386;, &arch.ia64;, &arch.pc98;, and &arch.sparc64;), these documents are generally available via the Documentation menu during installation. Once the system is installed, you can revisit this menu by re-running the - &man.sysinstall.8; utility. + &man.bsdinstall.8; utility. It is extremely important to read the errata for any Modified: stable/10/release/doc/ru_RU.KOI8-R/readme/article.xml ============================================================================== --- stable/10/release/doc/ru_RU.KOI8-R/readme/article.xml Mon Nov 25 20:37:53 2013 (r258592) +++ stable/10/release/doc/ru_RU.KOI8-R/readme/article.xml Mon Nov 25 20:39:09 2013 (r258593) @@ -347,12 +347,12 @@ - îÁ ÐÌÁÔÆÏÒÍÁÈ, ËÏÔÏÒÙÅ ÐÏÄÄÅÒÖÉ×ÁÀÔ &man.sysinstall.8; (× + îÁ ÐÌÁÔÆÏÒÍÁÈ, ËÏÔÏÒÙÅ ÐÏÄÄÅÒÖÉ×ÁÀÔ &man.bsdinstall.8; (× ÎÁÓÔÏÑÝÅÅ ×ÒÅÍÑ alpha, &i386;, ia64, pc98, É &sparc64;), ÜÔÉ ÄÏËÕÍÅÎÔÙ ÏÂÙÞÎÏ ÄÏÓÔÕÐÎÙ ÞÅÒÅÚ ÍÅÎÀ Documentation ×Ï ×ÒÅÍÑ ÕÓÔÁÎÏ×ËÉ. ëÁË ÔÏÌØËÏ ÓÉÓÔÅÍÁ ÂÕÄÅÔ ÕÓÔÁÎÏ×ÌÅÎÁ, ×Ù ÍÏÖÅÔÅ ÐÏ×ÔÏÒÎÏ ×ÏÊÔÉ × ÜÔÏ ÍÅÎÀ, ÐÏ×ÔÏÒÎÏ ÚÁÐÕÓÔÉ× - &man.sysinstall.8;. + &man.bsdinstall.8;. ëÒÁÊÎÅ ×ÁÖÎÏ ÐÒÏÞÅÓÔØ ÓÐÉÓÏË ÐÒÏÂÌÅÍ ÌÀÂÏÇÏ ÓÕÝÅÓÔ×ÕÀÝÅÇÏ Modified: stable/10/release/doc/zh_CN.GB2312/readme/article.xml ============================================================================== --- stable/10/release/doc/zh_CN.GB2312/readme/article.xml Mon Nov 25 20:37:53 2013 (r258592) +++ stable/10/release/doc/zh_CN.GB2312/readme/article.xml Mon Nov 25 20:39:09 2013 (r258593) @@ -302,11 +302,11 @@ - ÔÚÖ§³Ö &man.sysinstall.8; µÄƽ̨ÉÏ (Ä¿Ç°ÓÐ + ÔÚÖ§³Ö &man.bsdinstall.8; µÄƽ̨ÉÏ (Ä¿Ç°ÓÐ &arch.amd64;¡¢ &arch.i386;¡¢ &arch.ia64;¡¢ &arch.pc98; ÒÔ¼° &arch.sparc64;)£¬ ÕâЩÎĵµÔÚ°²×°Ê±¶¼¿ÉÒÔͨ¹ý Documentation ²Ëµ¥·ÃÎÊ¡£ Ò»µ©ÏµÍ³ÒѾ­°²×°£¬Äú¿ÉÒÔͨ¹ýÖØÐÂÔËÐÐ - &man.sysinstall.8; ¹¤¾ßÀ´ÖØзÃÎʲ˵¥¡£ + &man.bsdinstall.8; ¹¤¾ßÀ´ÖØзÃÎʲ˵¥¡£ ÔÚ°²×°ÄúÄõ½µÄÈκη¢Ðаæ֮ǰÔĶÁ¿±ÎóÊǷdz£ÖØÒªµÄ£¬ From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 20:47:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05DBDE0F; Mon, 25 Nov 2013 20:47: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8D5F284F; Mon, 25 Nov 2013 20:47:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPKlbYi029220; Mon, 25 Nov 2013 20:47:37 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPKlbFE029219; Mon, 25 Nov 2013 20:47:37 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201311252047.rAPKlbFE029219@svn.freebsd.org> From: Steven Hartland Date: Mon, 25 Nov 2013 20:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258595 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 20:47:38 -0000 Author: smh Date: Mon Nov 25 20:47:37 2013 New Revision: 258595 URL: http://svnweb.freebsd.org/changeset/base/258595 Log: MFC r258294: Fix ZFS deadlock when sending a snapshot which is mounted. Approved by: re (glebius) Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Directory Properties: stable/10/sys/ (props changed) stable/10/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Mon Nov 25 20:45:30 2013 (r258594) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c Mon Nov 25 20:47:37 2013 (r258595) @@ -564,21 +564,23 @@ dsl_dataset_user_release_impl(nvlist_t * ddura.ddura_holdfunc = dsl_dataset_hold_obj_string; pool = spa_name(tmpdp->dp_spa); #ifdef _KERNEL - dsl_pool_config_enter(tmpdp, FTAG); for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; pair = nvlist_next_nvpair(holds, pair)) { dsl_dataset_t *ds; + dsl_pool_config_enter(tmpdp, FTAG); error = dsl_dataset_hold_obj_string(tmpdp, nvpair_name(pair), FTAG, &ds); if (error == 0) { char name[MAXNAMELEN]; dsl_dataset_name(ds, name); + dsl_pool_config_exit(tmpdp, FTAG); dsl_dataset_rele(ds, FTAG); (void) zfs_unmount_snap(name); + } else { + dsl_pool_config_exit(tmpdp, FTAG); } } - dsl_pool_config_exit(tmpdp, FTAG); #endif } else { /* Non-temporary holds are specified by name. */ From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 22:56:46 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 901E4EA3; Mon, 25 Nov 2013 22:56: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F19E2045; Mon, 25 Nov 2013 22:56:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPMukbR074056; Mon, 25 Nov 2013 22:56:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPMukkv074055; Mon, 25 Nov 2013 22:56:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311252256.rAPMukkv074055@svn.freebsd.org> From: Dimitry Andric Date: Mon, 25 Nov 2013 22:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258607 - stable/10/contrib/llvm/lib/Analysis X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 22:56:46 -0000 Author: dim Date: Mon Nov 25 22:56:46 2013 New Revision: 258607 URL: http://svnweb.freebsd.org/changeset/base/258607 Log: MFC r258350: Pull in r191896 from upstream llvm trunk: CaptureTracking: Plug a loophole in the "too many uses" heuristic. The heuristic was added to avoid spending too much compile time in a specially crafted test case (PR17461, PR16474) with many uses on a select or bitcast instruction can still trigger the slow case. Add a check for that case. This only affects compile time, don't have a good way to test it. This fixes the excessive compile time spent on a specific file of the graphics/rawtherapee port. Reported by: mandree Approved by: re (gjb) Modified: stable/10/contrib/llvm/lib/Analysis/CaptureTracking.cpp Directory Properties: stable/10/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/Analysis/CaptureTracking.cpp ============================================================================== --- stable/10/contrib/llvm/lib/Analysis/CaptureTracking.cpp Mon Nov 25 22:55:47 2013 (r258606) +++ stable/10/contrib/llvm/lib/Analysis/CaptureTracking.cpp Mon Nov 25 22:56:46 2013 (r258607) @@ -146,8 +146,14 @@ void llvm::PointerMayBeCaptured(const Va case Instruction::PHI: case Instruction::Select: // The original value is not captured via this if the new value isn't. + Count = 0; for (Instruction::use_iterator UI = I->use_begin(), UE = I->use_end(); UI != UE; ++UI) { + // If there are lots of uses, conservatively say that the value + // is captured to avoid taking too much compile time. + if (Count++ >= Threshold) + return Tracker->tooManyUses(); + Use *U = &UI.getUse(); if (Visited.insert(U)) if (Tracker->shouldExplore(U)) From owner-svn-src-stable@FreeBSD.ORG Mon Nov 25 22:58:13 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34745FE7; Mon, 25 Nov 2013 22:58: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 23F712057; Mon, 25 Nov 2013 22:58:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAPMwDWt074427; Mon, 25 Nov 2013 22:58:13 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAPMwChV074426; Mon, 25 Nov 2013 22:58:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311252258.rAPMwChV074426@svn.freebsd.org> From: Dimitry Andric Date: Mon, 25 Nov 2013 22:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258608 - stable/9/contrib/llvm/lib/Analysis X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 22:58:13 -0000 Author: dim Date: Mon Nov 25 22:58:12 2013 New Revision: 258608 URL: http://svnweb.freebsd.org/changeset/base/258608 Log: MFC r258350: Pull in r191896 from upstream llvm trunk: CaptureTracking: Plug a loophole in the "too many uses" heuristic. The heuristic was added to avoid spending too much compile time in a specially crafted test case (PR17461, PR16474) with many uses on a select or bitcast instruction can still trigger the slow case. Add a check for that case. This only affects compile time, don't have a good way to test it. This fixes the excessive compile time spent on a specific file of the graphics/rawtherapee port. Reported by: mandree Modified: stable/9/contrib/llvm/lib/Analysis/CaptureTracking.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/9/contrib/llvm/lib/Analysis/CaptureTracking.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Analysis/CaptureTracking.cpp Mon Nov 25 22:56:46 2013 (r258607) +++ stable/9/contrib/llvm/lib/Analysis/CaptureTracking.cpp Mon Nov 25 22:58:12 2013 (r258608) @@ -146,8 +146,14 @@ void llvm::PointerMayBeCaptured(const Va case Instruction::PHI: case Instruction::Select: // The original value is not captured via this if the new value isn't. + Count = 0; for (Instruction::use_iterator UI = I->use_begin(), UE = I->use_end(); UI != UE; ++UI) { + // If there are lots of uses, conservatively say that the value + // is captured to avoid taking too much compile time. + if (Count++ >= Threshold) + return Tracker->tooManyUses(); + Use *U = &UI.getUse(); if (Visited.insert(U)) if (Tracker->shouldExplore(U)) From owner-svn-src-stable@FreeBSD.ORG Tue Nov 26 08:46:40 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EFEBC98; Tue, 26 Nov 2013 08:46: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E58E2C21; Tue, 26 Nov 2013 08:46:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQ8kd5X080224; Tue, 26 Nov 2013 08:46:39 GMT (envelope-from jmg@svn.freebsd.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQ8kd9l080223; Tue, 26 Nov 2013 08:46:39 GMT (envelope-from jmg@svn.freebsd.org) Message-Id: <201311260846.rAQ8kd9l080223@svn.freebsd.org> From: John-Mark Gurney Date: Tue, 26 Nov 2013 08:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258623 - stable/10/sys/crypto/aesni X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 08:46:40 -0000 Author: jmg Date: Tue Nov 26 08:46:39 2013 New Revision: 258623 URL: http://svnweb.freebsd.org/changeset/base/258623 Log: MFC r258399,258492: mark aesni module _SYNC, improves performance ~27%... Approved by: re (glebius) Modified: stable/10/sys/crypto/aesni/aesni.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/crypto/aesni/aesni.c ============================================================================== --- stable/10/sys/crypto/aesni/aesni.c Tue Nov 26 08:46:27 2013 (r258622) +++ stable/10/sys/crypto/aesni/aesni.c Tue Nov 26 08:46:39 2013 (r258623) @@ -92,7 +92,8 @@ aesni_attach(device_t dev) sc = device_get_softc(dev); TAILQ_INIT(&sc->sessions); sc->sid = 1; - sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE); + sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE | + CRYPTOCAP_F_SYNC); if (sc->cid < 0) { device_printf(dev, "Could not get crypto driver id.\n"); return (ENOMEM); From owner-svn-src-stable@FreeBSD.ORG Tue Nov 26 10:22:24 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE3E2428; Tue, 26 Nov 2013 10:22: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD47921F5; Tue, 26 Nov 2013 10:22:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQAMOX5014158; Tue, 26 Nov 2013 10:22:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQAMOJb014157; Tue, 26 Nov 2013 10:22:24 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311261022.rAQAMOJb014157@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 10:22:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258635 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 10:22:24 -0000 Author: avg Date: Tue Nov 26 10:22:24 2013 New Revision: 258635 URL: http://svnweb.freebsd.org/changeset/base/258635 Log: MFC r229663: Allow to change vfs.zfs.arc_meta_limit at runtime. - Change vfs.zfs.arc_meta_used from CTLFLAG_RDTUN to CTLFLAG_RD, as it is not a tunable. MFC slacker: pjd Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Nov 26 10:14:23 2013 (r258634) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Nov 26 10:22:24 2013 (r258635) @@ -504,10 +504,10 @@ static uint64_t arc_loaned_bytes; static uint64_t arc_meta_used; static uint64_t arc_meta_limit; static uint64_t arc_meta_max = 0; -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN, - &arc_meta_used, 0, "ARC metadata used"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN, - &arc_meta_limit, 0, "ARC metadata limit"); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RD, &arc_meta_used, 0, + "ARC metadata used"); +SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RW, &arc_meta_limit, 0, + "ARC metadata limit"); typedef struct l2arc_buf_hdr l2arc_buf_hdr_t; From owner-svn-src-stable@FreeBSD.ORG Tue Nov 26 10:26:40 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A732B5AA; Tue, 26 Nov 2013 10:26: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 967B7221F; Tue, 26 Nov 2013 10:26:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQAQeaC014751; Tue, 26 Nov 2013 10:26:40 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQAQeIq014750; Tue, 26 Nov 2013 10:26:40 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201311261026.rAQAQeIq014750@svn.freebsd.org> From: Andriy Gapon Date: Tue, 26 Nov 2013 10:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r258636 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 10:26:40 -0000 Author: avg Date: Tue Nov 26 10:26:40 2013 New Revision: 258636 URL: http://svnweb.freebsd.org/changeset/base/258636 Log: MFC r229663: Allow to change vfs.zfs.arc_meta_limit at runtime. - Change vfs.zfs.arc_meta_used from CTLFLAG_RDTUN to CTLFLAG_RD, as it is not a tunable. MFC slacker: pjd Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Nov 26 10:22:24 2013 (r258635) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Nov 26 10:26:40 2013 (r258636) @@ -491,10 +491,10 @@ static uint64_t arc_loaned_bytes; static uint64_t arc_meta_used; static uint64_t arc_meta_limit; static uint64_t arc_meta_max = 0; -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RDTUN, - &arc_meta_used, 0, "ARC metadata used"); -SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RDTUN, - &arc_meta_limit, 0, "ARC metadata limit"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RD, &arc_meta_used, 0, + "ARC metadata used"); +SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RW, &arc_meta_limit, 0, + "ARC metadata limit"); typedef struct l2arc_buf_hdr l2arc_buf_hdr_t; From owner-svn-src-stable@FreeBSD.ORG Tue Nov 26 14:50:39 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7DA6B6A; Tue, 26 Nov 2013 14:50: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C6E7623E3; Tue, 26 Nov 2013 14:50:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQEod4R007419; Tue, 26 Nov 2013 14:50:39 GMT (envelope-from gibbs@svn.freebsd.org) Received: (from gibbs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQEodOG007418; Tue, 26 Nov 2013 14:50:39 GMT (envelope-from gibbs@svn.freebsd.org) Message-Id: <201311261450.rAQEodOG007418@svn.freebsd.org> From: "Justin T. Gibbs" Date: Tue, 26 Nov 2013 14:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258650 - stable/10/sys/dev/xen/blkfront X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 14:50:39 -0000 Author: gibbs Date: Tue Nov 26 14:50:39 2013 New Revision: 258650 URL: http://svnweb.freebsd.org/changeset/base/258650 Log: [Forced commit to correct checkin comment for r256757] MFC: r256423 Allow FreeBSD to be booted from CDROM media on XenServer 6.2 and prior releases. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (gjb) sys/dev/xen/blkfront/blkfront.c: On XenServer versions up to an including 6.2, paravirtualized CDROM support is broken. When running in an HVM domain, ignore paravirtualized instances of CDROM media, and instead rely on native drivers attaching to emulated hardware. This functions correctly on all currently known Xen based platforms. ------------------------------------------------------------------------ Modified: stable/10/sys/dev/xen/blkfront/blkfront.c Modified: stable/10/sys/dev/xen/blkfront/blkfront.c ============================================================================== From owner-svn-src-stable@FreeBSD.ORG Tue Nov 26 16:12:41 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 409A6245; Tue, 26 Nov 2013 16:12: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EFB92A0B; Tue, 26 Nov 2013 16:12:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQGCf2v037945; Tue, 26 Nov 2013 16:12:41 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQGCeKt037941; Tue, 26 Nov 2013 16:12:40 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201311261612.rAQGCeKt037941@svn.freebsd.org> From: Brooks Davis Date: Tue, 26 Nov 2013 16:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258655 - stable/10/contrib/mtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 16:12:41 -0000 Author: brooks Date: Tue Nov 26 16:12:40 2013 New Revision: 258655 URL: http://svnweb.freebsd.org/changeset/base/258655 Log: MFC r258437: Sync with NetBSD. The functional change is to make the output when comparing a directory to an mtree file more compatible with fmtree when FreeBSD 9 compatiblity mode is on. This output is clearly intended for humans not computers, but some tools such as mergemaster's -U option rely on it. Approved by: re (glebius) Modified: stable/10/contrib/mtree/compare.c stable/10/contrib/mtree/create.c stable/10/contrib/mtree/spec.c Directory Properties: stable/10/contrib/mtree/ (props changed) Modified: stable/10/contrib/mtree/compare.c ============================================================================== --- stable/10/contrib/mtree/compare.c Tue Nov 26 15:23:56 2013 (r258654) +++ stable/10/contrib/mtree/compare.c Tue Nov 26 16:12:40 2013 (r258655) @@ -1,4 +1,4 @@ -/* $NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $ */ +/* $NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $"); +__RCSID("$NetBSD: compare.c,v 1.58 2013/11/21 18:39:50 christos Exp $"); #endif #endif /* not lint */ @@ -47,8 +47,8 @@ __RCSID("$NetBSD: compare.c,v 1.56 2013/ #include #include -#include #include +#include #include #include #include @@ -72,13 +72,18 @@ __RCSID("$NetBSD: compare.c,v 1.56 2013/ #define INDENTNAMELEN 8 #define MARK \ do { \ - len = printf("%s: ", RP(p)); \ - if (len > INDENTNAMELEN) { \ + if (flavor == F_FREEBSD9) { \ + len = printf("%s changed\n", RP(p)); \ tab = "\t"; \ - printf("\n"); \ } else { \ - tab = ""; \ - printf("%*s", INDENTNAMELEN - (int)len, ""); \ + len = printf("%s: ", RP(p)); \ + if (len > INDENTNAMELEN) { \ + tab = "\t"; \ + printf("\n"); \ + } else { \ + tab = ""; \ + printf("%*s", INDENTNAMELEN - (int)len, ""); \ + } \ } \ } while (0) #define LABEL if (!label++) MARK @@ -171,7 +176,8 @@ compare(NODE *s, FTSENT *p) break; #endif typeerr: LABEL; - printf("\ttype (%s, %s)\n", + printf(flavor == F_FREEBSD9 ? + "\ttype expected %s found %s\n" : "\ttype (%s, %s)\n", nodetype(s->type), inotype(p->fts_statp->st_mode)); return (label); } @@ -193,7 +199,9 @@ typeerr: LABEL; (s->type == F_BLOCK || s->type == F_CHAR) && s->st_rdev != p->fts_statp->st_rdev) { LABEL; - printf("%sdevice (%#jx, %#jx", + printf(flavor == F_FREEBSD9 ? + "%sdevice expected %#jx found %#jx" : + "%sdevice (%#jx, %#jx", tab, (uintmax_t)s->st_rdev, (uintmax_t)p->fts_statp->st_rdev); if (uflag) { @@ -203,10 +211,12 @@ typeerr: LABEL; s->st_rdev) == -1) || (lchown(p->fts_accpath, p->fts_statp->st_uid, p->fts_statp->st_gid) == -1) ) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else printf(")\n"); tab = "\t"; @@ -214,28 +224,34 @@ typeerr: LABEL; /* Set the uid/gid first, then set the mode. */ if (s->flags & (F_UID | F_UNAME) && s->st_uid != p->fts_statp->st_uid) { LABEL; - printf("%suser (%lu, %lu", + printf(flavor == F_FREEBSD9 ? + "%suser expected %lu found %lu" : "%suser (%lu, %lu", tab, (u_long)s->st_uid, (u_long)p->fts_statp->st_uid); if (uflag) { if (lchown(p->fts_accpath, s->st_uid, -1)) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else printf(")\n"); tab = "\t"; } if (s->flags & (F_GID | F_GNAME) && s->st_gid != p->fts_statp->st_gid) { LABEL; - printf("%sgid (%lu, %lu", + printf(flavor == F_FREEBSD9 ? + "%sgid expected %lu found %lu" : "%sgid (%lu, %lu", tab, (u_long)s->st_gid, (u_long)p->fts_statp->st_gid); if (uflag) { if (lchown(p->fts_accpath, -1, s->st_gid)) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else printf(")\n"); @@ -260,15 +276,19 @@ typeerr: LABEL; } LABEL; - printf("%spermissions (%#lo, %#lo", + printf(flavor == F_FREEBSD9 ? + "%spermissions expcted %#lo found %#lo" : + "%spermissions (%#lo, %#lo", tab, (u_long)s->st_mode, (u_long)p->fts_statp->st_mode & MBITS); if (uflag) { if (lchmod(p->fts_accpath, s->st_mode)) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else printf(")\n"); @@ -278,13 +298,16 @@ typeerr: LABEL; if (s->flags & F_NLINK && s->type != F_DIR && s->st_nlink != p->fts_statp->st_nlink) { LABEL; - printf("%slink count (%lu, %lu)\n", + printf(flavor == F_FREEBSD9 ? + "%slink count expected %lu found %lu\n" : + "%slink count (%lu, %lu)\n", tab, (u_long)s->st_nlink, (u_long)p->fts_statp->st_nlink); tab = "\t"; } if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size) { LABEL; - printf("%ssize (%ju, %ju)\n", + printf(flavor == F_FREEBSD9 ? + "%ssize expected %ju found %ju\n" : "%ssize (%ju, %ju)\n", tab, (uintmax_t)s->st_size, (uintmax_t)p->fts_statp->st_size); tab = "\t"; @@ -319,18 +342,22 @@ typeerr: LABEL; if (tv[0].tv_sec != tv[1].tv_sec || tv[0].tv_usec != tv[1].tv_usec) { LABEL; - printf("%smodification time (%.24s, ", + printf(flavor == F_FREEBSD9 ? + "%smodification time expected %.24s found " : + "%smodification time (%.24s, ", tab, ctime(&smtime)); printf("%.24s", ctime(&pmtime)); if (tflag) { tv[1] = tv[0]; if (utimes(p->fts_accpath, tv)) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else - printf(")\n"); + printf("%s\n", flavor == F_FREEBSD9 ? "" : ")"); tab = "\t"; } } @@ -347,7 +374,9 @@ typeerr: LABEL; char *f_s; LABEL; f_s = flags_to_string(s->st_flags, "none"); - printf("%sflags (\"%s\" is not ", tab, f_s); + printf(flavor == F_FREEBSD9 ? + "%sflags expected \"%s\" found " : + "%sflags (\"%s\" is not ", tab, f_s); free(f_s); f_s = flags_to_string(p->fts_statp->st_flags, "none"); printf("\"%s\"", f_s); @@ -361,7 +390,7 @@ typeerr: LABEL; else SETFLAGS(0, (~SP_FLGS & CH_MASK)); } else - printf(")\n"); + printf("%s\n", flavor == F_FREEBSD9 ? "" : ")"); tab = "\t"; } #endif /* HAVE_STRUCT_STAT_ST_FLAGS */ @@ -387,7 +416,9 @@ typeerr: LABEL; close(fd); if (s->cksum != val) { LABEL; - printf("%scksum (%lu, %lu)\n", + printf(flavor == F_FREEBSD9 ? + "%scksum expected %lu found %lu\n" : + "%scksum (%lu, %lu)\n", tab, s->cksum, (unsigned long)val); } tab = "\t"; @@ -403,7 +434,9 @@ typeerr: LABEL; } else { if (strcmp(s->md5digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, MD5KEY, s->md5digest, digestbuf); } tab = "\t"; @@ -421,7 +454,9 @@ typeerr: LABEL; } else { if (strcmp(s->rmd160digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, RMD160KEY, s->rmd160digest, digestbuf); } tab = "\t"; @@ -439,7 +474,9 @@ typeerr: LABEL; } else { if (strcmp(s->sha1digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, SHA1KEY, s->sha1digest, digestbuf); } tab = "\t"; @@ -457,7 +494,9 @@ typeerr: LABEL; } else { if (strcmp(s->sha256digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, SHA256KEY, s->sha256digest, digestbuf); } tab = "\t"; @@ -474,7 +513,9 @@ typeerr: LABEL; } else { if (strcmp(s->sha384digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, SHA384KEY, s->sha384digest, digestbuf); } tab = "\t"; @@ -491,7 +532,9 @@ typeerr: LABEL; } else { if (strcmp(s->sha512digest, digestbuf)) { LABEL; - printf("%s%s (0x%s, 0x%s)\n", + printf(flavor == F_FREEBSD9 ? + "%s%s expected %s found %s\n" : + "%s%s (0x%s, 0x%s)\n", tab, SHA512KEY, s->sha512digest, digestbuf); } tab = "\t"; @@ -502,16 +545,20 @@ typeerr: LABEL; if (s->flags & F_SLINK && strcmp(cp = rlink(p->fts_accpath), s->slink)) { LABEL; - printf("%slink ref (%s, %s", tab, cp, s->slink); + printf(flavor == F_FREEBSD9 ? + "%slink ref expected %s found %s" : + "%slink ref (%s, %s", tab, cp, s->slink); if (uflag) { if ((unlink(p->fts_accpath) == -1) || (symlink(s->slink, p->fts_accpath) == -1) ) - printf(", not modified: %s)\n", - strerror(errno)); + printf(", not modified: %s%s\n", + strerror(errno), + flavor == F_FREEBSD9 ? "" : ")"); else - printf(", modified)\n"); + printf(", modified%s\n", + flavor == F_FREEBSD9 ? "" : ")"); } else - printf(")\n"); + printf("%s\n", flavor == F_FREEBSD9 ? "" : ")"); } return (label); } Modified: stable/10/contrib/mtree/create.c ============================================================================== --- stable/10/contrib/mtree/create.c Tue Nov 26 15:23:56 2013 (r258654) +++ stable/10/contrib/mtree/create.c Tue Nov 26 16:12:40 2013 (r258655) @@ -1,4 +1,4 @@ -/* $NetBSD: create.c,v 1.71 2013/10/16 17:24:20 christos Exp $ */ +/* $NetBSD: create.c,v 1.72 2013/10/17 17:22:59 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: create.c,v 1.71 2013/10/16 17:24:20 christos Exp $"); +__RCSID("$NetBSD: create.c,v 1.72 2013/10/17 17:22:59 christos Exp $"); #endif #endif /* not lint */ @@ -53,9 +53,9 @@ __RCSID("$NetBSD: create.c,v 1.71 2013/1 #include #include #include -#include #include #include +#include #include #include #include Modified: stable/10/contrib/mtree/spec.c ============================================================================== --- stable/10/contrib/mtree/spec.c Tue Nov 26 15:23:56 2013 (r258654) +++ stable/10/contrib/mtree/spec.c Tue Nov 26 16:12:40 2013 (r258655) @@ -1,4 +1,4 @@ -/* $NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $ */ +/* $NetBSD: spec.c,v 1.88 2013/10/17 17:22:59 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -67,7 +67,7 @@ #if 0 static char sccsid[] = "@(#)spec.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: spec.c,v 1.87 2013/10/16 17:26:14 christos Exp $"); +__RCSID("$NetBSD: spec.c,v 1.88 2013/10/17 17:22:59 christos Exp $"); #endif #endif /* not lint */ @@ -80,8 +80,8 @@ __RCSID("$NetBSD: spec.c,v 1.87 2013/10/ #include #include #include -#include #include +#include #include #include #include From owner-svn-src-stable@FreeBSD.ORG Tue Nov 26 16:13:49 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23FE93A0; Tue, 26 Nov 2013 16:13: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 131422A22; Tue, 26 Nov 2013 16:13:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAQGDmg6038254; Tue, 26 Nov 2013 16:13:48 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAQGDm3J038253; Tue, 26 Nov 2013 16:13:48 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201311261613.rAQGDm3J038253@svn.freebsd.org> From: Brooks Davis Date: Tue, 26 Nov 2013 16:13:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258657 - stable/10/usr.sbin/mergemaster X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Nov 2013 16:13:49 -0000 Author: brooks Date: Tue Nov 26 16:13:48 2013 New Revision: 258657 URL: http://svnweb.freebsd.org/changeset/base/258657 Log: MFC: r258456 Fix mergemaster -U by forcing FreeBSD 9 compatiblity in mtree when mtree is nmtree. The mtree output used by mergemaster in this case was clearly not meant for computer consumption and an approach based on -f -f would probably be a better idea, but this is a minimal change. Approved by: re (glebius) Modified: stable/10/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/10/usr.sbin/mergemaster/ (props changed) Modified: stable/10/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/10/usr.sbin/mergemaster/mergemaster.sh Tue Nov 26 16:13:38 2013 (r258656) +++ stable/10/usr.sbin/mergemaster/mergemaster.sh Tue Nov 26 16:13:48 2013 (r258657) @@ -492,8 +492,14 @@ MM_MAKE="make ${ARCHSTRING} -m ${SOURCED # files the user changed from the reference files. # if [ -n "${AUTO_UPGRADE}" -a -s "${MTREEFILE}" ]; then + # Force FreeBSD 9 compatible output when available. + if mtree -F freebsd9 -c -p /var/empty/ > /dev/null 2>&1; then + MTREE_FLAVOR="-F freebsd9" + else + MTREE_FLAVOR= + fi CHANGED=: - for file in `mtree -eqL -f ${MTREEFILE} -p ${DESTDIR}/ \ + for file in `mtree -eqL ${MTREE_FLAVOR} -f ${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED}${DESTDIR}/${file}:" From owner-svn-src-stable@FreeBSD.ORG Wed Nov 27 16:08:35 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7740B64F; Wed, 27 Nov 2013 16:08: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6425B28D8; Wed, 27 Nov 2013 16:08:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rARG8ZrR032089; Wed, 27 Nov 2013 16:08:35 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rARG8Xfp032073; Wed, 27 Nov 2013 16:08:33 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201311271608.rARG8Xfp032073@svn.freebsd.org> From: Ed Maste Date: Wed, 27 Nov 2013 16:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258685 - in stable/9/sys: amd64/amd64 amd64/ia32 amd64/include amd64/linux32 i386/i386 i386/include i386/linux pc98/pc98 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 16:08:35 -0000 Author: emaste Date: Wed Nov 27 16:08:33 2013 New Revision: 258685 URL: http://svnweb.freebsd.org/changeset/base/258685 Log: MFC r258135: x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...) Debuggers may need to change PSL_RF. Note that tf_eflags is already stored in the signal context during signal handling and PSL_RF previously could be modified via sigreturn, so this change should not provide any new ability to userspace. For background see the thread at: http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html Reviewed by: jhb, kib Sponsored by: DARPA, AFRL Modified: stable/9/sys/amd64/amd64/machdep.c stable/9/sys/amd64/ia32/ia32_signal.c stable/9/sys/amd64/include/psl.h stable/9/sys/amd64/linux32/linux32_sysvec.c stable/9/sys/i386/i386/machdep.c stable/9/sys/i386/include/psl.h stable/9/sys/i386/include/vm86.h stable/9/sys/i386/linux/linux_sysvec.c stable/9/sys/pc98/pc98/machdep.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/machdep.c Wed Nov 27 15:58:07 2013 (r258684) +++ stable/9/sys/amd64/amd64/machdep.c Wed Nov 27 16:08:33 2013 (r258685) @@ -486,17 +486,7 @@ sys_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_rflags for faults. Debuggers - * should sometimes set it there too. tf_rflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(rflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(rflags, regs->tf_rflags)) { uprintf("pid %d (%s): sigreturn rflags = 0x%lx\n", p->p_pid, td->td_name, rflags); return (EINVAL); Modified: stable/9/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/9/sys/amd64/ia32/ia32_signal.c Wed Nov 27 15:58:07 2013 (r258684) +++ stable/9/sys/amd64/ia32/ia32_signal.c Wed Nov 27 16:08:33 2013 (r258685) @@ -719,7 +719,7 @@ ofreebsd32_sigreturn(struct thread *td, return (error); scp = ≻ eflags = scp->sc_eflags; - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_rflags)) { return (EINVAL); } if (!CS_SECURE(scp->sc_cs)) { @@ -787,17 +787,7 @@ freebsd4_freebsd32_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_rflags)) { uprintf("pid %d (%s): freebsd4_freebsd32_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); @@ -873,17 +863,7 @@ freebsd32_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_rflags)) { uprintf("pid %d (%s): freebsd32_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); Modified: stable/9/sys/amd64/include/psl.h ============================================================================== --- stable/9/sys/amd64/include/psl.h Wed Nov 27 15:58:07 2013 (r258684) +++ stable/9/sys/amd64/include/psl.h Wed Nov 27 16:08:33 2013 (r258685) @@ -77,8 +77,16 @@ * is undesirable but it may as well be allowed since users can inflict * it on the kernel directly. Changes to PSL_AC are silently ignored on * 386's. + * + * Users are allowed to change the privileged flag PSL_RF. The cpu sets PSL_RF + * in tf_eflags for faults. Debuggers should sometimes set it there too. + * tf_eflags is kept in the signal context during signal handling and there is + * no other place to remember it, so the PSL_RF bit may be corrupted by the + * signal handler without us knowing. Corruption of the PSL_RF bit at worst + * causes one more or one less debugger trap, so allowing it is fairly + * harmless. */ #define PSL_USERCHANGE (PSL_C | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_T \ - | PSL_D | PSL_V | PSL_NT | PSL_AC | PSL_ID) + | PSL_D | PSL_V | PSL_NT | PSL_RF | PSL_AC | PSL_ID) #endif /* !_MACHINE_PSL_H_ */ Modified: stable/9/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/9/sys/amd64/linux32/linux32_sysvec.c Wed Nov 27 15:58:07 2013 (r258684) +++ stable/9/sys/amd64/linux32/linux32_sysvec.c Wed Nov 27 16:08:33 2013 (r258685) @@ -586,17 +586,7 @@ linux_sigreturn(struct thread *td, struc */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = frame.sf_sc.sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_rflags)) return(EINVAL); /* @@ -688,17 +678,7 @@ linux_rt_sigreturn(struct thread *td, st */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = context->sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_rflags)) return(EINVAL); /* Modified: stable/9/sys/i386/i386/machdep.c ============================================================================== --- stable/9/sys/i386/i386/machdep.c Wed Nov 27 15:58:07 2013 (r258684) +++ stable/9/sys/i386/i386/machdep.c Wed Nov 27 16:08:33 2013 (r258685) @@ -843,17 +843,7 @@ osigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { return (EINVAL); } @@ -969,17 +959,7 @@ freebsd4_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): freebsd4_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); @@ -1083,17 +1063,7 @@ sys_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); Modified: stable/9/sys/i386/include/psl.h ============================================================================== --- stable/9/sys/i386/include/psl.h Wed Nov 27 15:58:07 2013 (r258684) +++ stable/9/sys/i386/include/psl.h Wed Nov 27 16:08:33 2013 (r258685) @@ -77,8 +77,16 @@ * is undesirable but it may as well be allowed since users can inflict * it on the kernel directly. Changes to PSL_AC are silently ignored on * 386's. + * + * Users are allowed to change the privileged flag PSL_RF. The cpu sets PSL_RF + * in tf_eflags for faults. Debuggers should sometimes set it there too. + * tf_eflags is kept in the signal context during signal handling and there is + * no other place to remember it, so the PSL_RF bit may be corrupted by the + * signal handler without us knowing. Corruption of the PSL_RF bit at worst + * causes one more or one less debugger trap, so allowing it is fairly + * harmless. */ #define PSL_USERCHANGE (PSL_C | PSL_PF | PSL_AF | PSL_Z | PSL_N | PSL_T \ - | PSL_D | PSL_V | PSL_NT | PSL_AC | PSL_ID) + | PSL_D | PSL_V | PSL_NT | PSL_RF | PSL_AC | PSL_ID) #endif /* !_MACHINE_PSL_H_ */ Modified: stable/9/sys/i386/include/vm86.h ============================================================================== --- stable/9/sys/i386/include/vm86.h Wed Nov 27 15:58:07 2013 (r258684) +++ stable/9/sys/i386/include/vm86.h Wed Nov 27 16:08:33 2013 (r258685) @@ -113,7 +113,7 @@ struct vm86context { } pmap[VM86_PMAPSIZE]; }; -#define VM_USERCHANGE (PSL_USERCHANGE | PSL_RF) +#define VM_USERCHANGE (PSL_USERCHANGE) #define VME_USERCHANGE (VM_USERCHANGE | PSL_VIP | PSL_VIF) struct vm86_kernel { Modified: stable/9/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/9/sys/i386/linux/linux_sysvec.c Wed Nov 27 15:58:07 2013 (r258684) +++ stable/9/sys/i386/linux/linux_sysvec.c Wed Nov 27 16:08:33 2013 (r258685) @@ -683,17 +683,7 @@ linux_sigreturn(struct thread *td, struc */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = frame.sf_sc.sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_eflags)) return(EINVAL); /* @@ -784,17 +774,7 @@ linux_rt_sigreturn(struct thread *td, st */ #define EFLAGS_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) eflags = context->sc_eflags; - /* - * XXX do allow users to change the privileged flag PSL_RF. The - * cpu sets PSL_RF in tf_eflags for faults. Debuggers should - * sometimes set it there too. tf_eflags is kept in the signal - * context during signal handling and there is no other place - * to remember it, so the PSL_RF bit may be corrupted by the - * signal handler without us knowing. Corruption of the PSL_RF - * bit at worst causes one more or one less debugger trap, so - * allowing it is fairly harmless. - */ - if (!EFLAGS_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) + if (!EFLAGS_SECURE(eflags, regs->tf_eflags)) return(EINVAL); /* Modified: stable/9/sys/pc98/pc98/machdep.c ============================================================================== --- stable/9/sys/pc98/pc98/machdep.c Wed Nov 27 15:58:07 2013 (r258684) +++ stable/9/sys/pc98/pc98/machdep.c Wed Nov 27 16:08:33 2013 (r258685) @@ -777,17 +777,7 @@ osigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { return (EINVAL); } @@ -903,17 +893,7 @@ freebsd4_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): freebsd4_sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); @@ -1017,17 +997,7 @@ sys_sigreturn(td, uap) /* * Don't allow users to change privileged or reserved flags. */ - /* - * XXX do allow users to change the privileged flag PSL_RF. - * The cpu sets PSL_RF in tf_eflags for faults. Debuggers - * should sometimes set it there too. tf_eflags is kept in - * the signal context during signal handling and there is no - * other place to remember it, so the PSL_RF bit may be - * corrupted by the signal handler without us knowing. - * Corruption of the PSL_RF bit at worst causes one more or - * one less debugger trap, so allowing it is fairly harmless. - */ - if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_eflags & ~PSL_RF)) { + if (!EFL_SECURE(eflags, regs->tf_eflags)) { uprintf("pid %d (%s): sigreturn eflags = 0x%x\n", td->td_proc->p_pid, td->td_name, eflags); return (EINVAL); From owner-svn-src-stable@FreeBSD.ORG Thu Nov 28 09:30:06 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA167A2C; Thu, 28 Nov 2013 09:30:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A86B1070; Thu, 28 Nov 2013 09:30:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAS9U6Qs066586; Thu, 28 Nov 2013 09:30:06 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAS9U59h066580; Thu, 28 Nov 2013 09:30:05 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201311280930.rAS9U59h066580@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Thu, 28 Nov 2013 09:30:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258706 - stable/10/sys/dev/drm2 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 09:30:06 -0000 Author: dumbbell Date: Thu Nov 28 09:30:05 2013 New Revision: 258706 URL: http://svnweb.freebsd.org/changeset/base/258706 Log: MFC r258262: drm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability This fixes DPMS with KDE and radeonkms. Without this, the display would freeze when the monitor is put into sleep state, and only resumes after several dozens of minutes once the monitor is powered on again. Tested by: Mathias Picker Approved by: re (kib) Modified: stable/10/sys/dev/drm2/drm.h stable/10/sys/dev/drm2/drmP.h stable/10/sys/dev/drm2/drm_drv.c stable/10/sys/dev/drm2/drm_ioctl.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/drm2/drm.h ============================================================================== --- stable/10/sys/dev/drm2/drm.h Thu Nov 28 08:54:15 2013 (r258705) +++ stable/10/sys/dev/drm2/drm.h Thu Nov 28 09:30:05 2013 (r258706) @@ -1015,6 +1015,8 @@ struct drm_event_vblank { #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 #define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 #define DRM_CAP_DUMB_PREFER_SHADOW 0x4 +#define DRM_CAP_PRIME 0x5 +#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 #include "drm_mode.h" Modified: stable/10/sys/dev/drm2/drmP.h ============================================================================== --- stable/10/sys/dev/drm2/drmP.h Thu Nov 28 08:54:15 2013 (r258705) +++ stable/10/sys/dev/drm2/drmP.h Thu Nov 28 09:30:05 2013 (r258706) @@ -1067,6 +1067,7 @@ extern int drm_debug_flag; extern int drm_notyet_flag; extern unsigned int drm_vblank_offdelay; extern unsigned int drm_timestamp_precision; +extern unsigned int drm_timestamp_monotonic; /* Device setup support (drm_drv.c) */ int drm_probe(device_t kdev, drm_pci_id_list_t *idlist); Modified: stable/10/sys/dev/drm2/drm_drv.c ============================================================================== --- stable/10/sys/dev/drm2/drm_drv.c Thu Nov 28 08:54:15 2013 (r258705) +++ stable/10/sys/dev/drm2/drm_drv.c Thu Nov 28 09:30:05 2013 (r258706) @@ -56,6 +56,12 @@ int drm_notyet_flag = 0; unsigned int drm_vblank_offdelay = 5000; /* Default to 5000 msecs. */ unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */ +/* + * Default to use monotonic timestamps for wait-for-vblank and page-flip + * complete events. + */ +unsigned int drm_timestamp_monotonic = 1; + static int drm_load(struct drm_device *dev); static void drm_unload(struct drm_device *dev); static drm_pci_id_list_t *drm_find_description(int vendor, int device, Modified: stable/10/sys/dev/drm2/drm_ioctl.c ============================================================================== --- stable/10/sys/dev/drm2/drm_ioctl.c Thu Nov 28 08:54:15 2013 (r258705) +++ stable/10/sys/dev/drm2/drm_ioctl.c Thu Nov 28 09:30:05 2013 (r258706) @@ -250,6 +250,9 @@ int drm_getcap(struct drm_device *dev, v case DRM_CAP_DUMB_PREFER_SHADOW: req->value = dev->mode_config.prefer_shadow; break; + case DRM_CAP_TIMESTAMP_MONOTONIC: + req->value = drm_timestamp_monotonic; + break; default: return EINVAL; } From owner-svn-src-stable@FreeBSD.ORG Thu Nov 28 10:04:53 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF9AA69B; Thu, 28 Nov 2013 10:04: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FAF812AD; Thu, 28 Nov 2013 10:04:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASA4rO8079142; Thu, 28 Nov 2013 10:04:53 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASA4rwY079141; Thu, 28 Nov 2013 10:04:53 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201311281004.rASA4rwY079141@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Thu, 28 Nov 2013 10:04:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258707 - stable/10/sys/dev/drm2 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 10:04:54 -0000 Author: dumbbell Date: Thu Nov 28 10:04:53 2013 New Revision: 258707 URL: http://svnweb.freebsd.org/changeset/base/258707 Log: MFC r258549 and r258553: drm: Dereference pointers given to qsort_r()'s cmp callback drm_le_cmp() (qsort_r()'s callback) receives pointers to elements in the array passed to qsort_r(), not the elements themselves. Before this fix, the use of qsort_r() shuffled the array, not sorted it, because the compare callback accessed random memory locations, not the expected elements. This bug triggered an infinite loop in KDE/xserver: 1. KDE has a kded module called "randrmonitor" which queries xserver for current monitors at startup and then listens to RandR notifications from xserver. 2. xserver handles the query from "randrmonitor" by polling the video device using the "drm_mode_getconnector()" ioctl. This ioctl returns a list of connectors and, for those with a connected monitor, the available modes. Each modes list is sorted by the kernel before returning. When xserver gets the connectors list, it sorts the modes lists again. In the case of this bug, when two modes are equal (in xserver's compare function PoV), their order is kept stable (ie. the kernel order is kept for those two modes). And because the list was shuffled by the kernel, the order of two equal modes was frequently changed in the final modes list in xserver. 3. xserver compares the returned connectors list with the list obtained earlier. In particular, it compares the sorted modes lists for each connector. If a property of a connector changes (eg. modes), xserver sends a "RRNotify_OutputChange" notification. Because of the change of order between equal modes, xserver sent a notification after each polling of the connectors. 4. "randrmonitor" receives a notification, triggered by its query. The notification doesn't contain the new connectors list, therefore, it asks for the new list using the same function: go back to step #2. Approved by: re (kib) Modified: stable/10/sys/dev/drm2/drm_linux_list_sort.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/drm2/drm_linux_list_sort.c ============================================================================== --- stable/10/sys/dev/drm2/drm_linux_list_sort.c Thu Nov 28 09:30:05 2013 (r258706) +++ stable/10/sys/dev/drm2/drm_linux_list_sort.c Thu Nov 28 10:04:53 2013 (r258707) @@ -42,8 +42,8 @@ drm_le_cmp(void *priv, const void *d1, c struct drm_list_sort_thunk *thunk; thunk = priv; - le1 = __DECONST(struct list_head *, d1); - le2 = __DECONST(struct list_head *, d2); + le1 = *(__DECONST(struct list_head **, d1)); + le2 = *(__DECONST(struct list_head **, d2)); return ((thunk->cmp)(thunk->priv, le1, le2)); } From owner-svn-src-stable@FreeBSD.ORG Thu Nov 28 14:24:27 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31D54D51; Thu, 28 Nov 2013 14:24:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DC6810CD; Thu, 28 Nov 2013 14:24:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASEOQsJ067545; Thu, 28 Nov 2013 14:24:26 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASEOQ3A067544; Thu, 28 Nov 2013 14:24:26 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311281424.rASEOQ3A067544@svn.freebsd.org> From: Glen Barber Date: Thu, 28 Nov 2013 14:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258710 - stable/10/etc/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 14:24:27 -0000 Author: gjb Date: Thu Nov 28 14:24:26 2013 New Revision: 258710 URL: http://svnweb.freebsd.org/changeset/base/258710 Log: MFC r258227 (bapt): Enabled should be a boolean, not a string Approved by: re (glebius) Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/pkg/FreeBSD.conf Directory Properties: stable/10/etc/ (props changed) Modified: stable/10/etc/pkg/FreeBSD.conf ============================================================================== --- stable/10/etc/pkg/FreeBSD.conf Thu Nov 28 11:06:18 2013 (r258709) +++ stable/10/etc/pkg/FreeBSD.conf Thu Nov 28 14:24:26 2013 (r258710) @@ -4,5 +4,5 @@ FreeBSD: { mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", - enabled: "yes" + enabled: yes } From owner-svn-src-stable@FreeBSD.ORG Thu Nov 28 22:06:38 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31CBCBFB; Thu, 28 Nov 2013 22:06: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C52717CB; Thu, 28 Nov 2013 22:06:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASM6bPC024930; Thu, 28 Nov 2013 22:06:37 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASM6bvg024929; Thu, 28 Nov 2013 22:06:37 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311282206.rASM6bvg024929@svn.freebsd.org> From: Xin LI Date: Thu, 28 Nov 2013 22:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258723 - stable/10/usr.sbin/freebsd-update X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 22:06:38 -0000 Author: delphij Date: Thu Nov 28 22:06:37 2013 New Revision: 258723 URL: http://svnweb.freebsd.org/changeset/base/258723 Log: MFC r257879: Fix typo in r256646: We want to generate lists of directories in INDEX-OLD and INDEX-NEW and compare them, not generate the same list of directories from INDEX-OLD twice... Pointy hats to: cperciva & everybody who didn't proofread EN-13:04 enough Errata Notice: FreeBSD-EN-13:05.freebsd-update Approved by: re (gjb) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/10/usr.sbin/freebsd-update/ (props changed) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Thu Nov 28 21:57:17 2013 (r258722) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Thu Nov 28 22:06:37 2013 (r258723) @@ -2884,8 +2884,8 @@ again to finish installing updates. install_delete INDEX-OLD INDEX-NEW || return 1 # Remove old directories - grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '^[^|]+\|d\|' > INDEX-OLD + grep -vE '^/boot/' $1/INDEX-NEW | + grep -E '^[^|]+\|d\|' > INDEX-NEW grep -vE '^/boot/' $1/INDEX-OLD | grep -E '^[^|]+\|d\|' > INDEX-OLD install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-stable@FreeBSD.ORG Thu Nov 28 22:08:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D0F7D55; Thu, 28 Nov 2013 22:08: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 67B7917E8; Thu, 28 Nov 2013 22:08:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASM8g9U025280; Thu, 28 Nov 2013 22:08:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASM8g2O025279; Thu, 28 Nov 2013 22:08:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311282208.rASM8g2O025279@svn.freebsd.org> From: Xin LI Date: Thu, 28 Nov 2013 22:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r258724 - in stable: 8/usr.sbin/freebsd-update 9/usr.sbin/freebsd-update X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 22:08:42 -0000 Author: delphij Date: Thu Nov 28 22:08:41 2013 New Revision: 258724 URL: http://svnweb.freebsd.org/changeset/base/258724 Log: MFC r257879: Fix typo in r256646: We want to generate lists of directories in INDEX-OLD and INDEX-NEW and compare them, not generate the same list of directories from INDEX-OLD twice... Pointy hats to: cperciva & everybody who didn't proofread EN-13:04 enough Errata Notice: FreeBSD-EN-13:05.freebsd-update Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/8/usr.sbin/freebsd-update/ (props changed) Changes in other areas also in this revision: Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/9/usr.sbin/freebsd-update/ (props changed) Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.sh Thu Nov 28 22:06:37 2013 (r258723) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh Thu Nov 28 22:08:41 2013 (r258724) @@ -2835,8 +2835,8 @@ again to finish installing updates. install_delete INDEX-OLD INDEX-NEW || return 1 # Remove old directories - grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '^[^|]+\|d\|' > INDEX-OLD + grep -vE '^/boot/' $1/INDEX-NEW | + grep -E '^[^|]+\|d\|' > INDEX-NEW grep -vE '^/boot/' $1/INDEX-OLD | grep -E '^[^|]+\|d\|' > INDEX-OLD install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-stable@FreeBSD.ORG Thu Nov 28 22:08:42 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E5A8D54; Thu, 28 Nov 2013 22:08: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1876317E7; Thu, 28 Nov 2013 22:08:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rASM8fZY025274; Thu, 28 Nov 2013 22:08:41 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rASM8f9L025273; Thu, 28 Nov 2013 22:08:41 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311282208.rASM8f9L025273@svn.freebsd.org> From: Xin LI Date: Thu, 28 Nov 2013 22:08:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258724 - in stable: 8/usr.sbin/freebsd-update 9/usr.sbin/freebsd-update X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2013 22:08:42 -0000 Author: delphij Date: Thu Nov 28 22:08:41 2013 New Revision: 258724 URL: http://svnweb.freebsd.org/changeset/base/258724 Log: MFC r257879: Fix typo in r256646: We want to generate lists of directories in INDEX-OLD and INDEX-NEW and compare them, not generate the same list of directories from INDEX-OLD twice... Pointy hats to: cperciva & everybody who didn't proofread EN-13:04 enough Errata Notice: FreeBSD-EN-13:05.freebsd-update Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/9/usr.sbin/freebsd-update/ (props changed) Changes in other areas also in this revision: Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/8/usr.sbin/freebsd-update/ (props changed) Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/9/usr.sbin/freebsd-update/freebsd-update.sh Thu Nov 28 22:06:37 2013 (r258723) +++ stable/9/usr.sbin/freebsd-update/freebsd-update.sh Thu Nov 28 22:08:41 2013 (r258724) @@ -2884,8 +2884,8 @@ again to finish installing updates. install_delete INDEX-OLD INDEX-NEW || return 1 # Remove old directories - grep -vE '^/boot/' $1/INDEX-OLD | - grep -E '^[^|]+\|d\|' > INDEX-OLD + grep -vE '^/boot/' $1/INDEX-NEW | + grep -E '^[^|]+\|d\|' > INDEX-NEW grep -vE '^/boot/' $1/INDEX-OLD | grep -E '^[^|]+\|d\|' > INDEX-OLD install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-stable@FreeBSD.ORG Fri Nov 29 07:12:11 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C9AE7A2; Fri, 29 Nov 2013 07:12: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 785621280; Fri, 29 Nov 2013 07:12:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAT7CBjc022362; Fri, 29 Nov 2013 07:12:11 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAT7CBLF022361; Fri, 29 Nov 2013 07:12:11 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311290712.rAT7CBLF022361@svn.freebsd.org> From: Craig Rodrigues Date: Fri, 29 Nov 2013 07:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258734 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 07:12:11 -0000 Author: rodrigc Date: Fri Nov 29 07:12:10 2013 New Revision: 258734 URL: http://svnweb.freebsd.org/changeset/base/258734 Log: MFC r258714 Add some text to clarify that nslookup and dig are no longer in the base system after the removal of BIND. Approved by: re (delphij) Modified: stable/10/UPDATING (contents, props changed) Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Fri Nov 29 07:08:17 2013 (r258733) +++ stable/10/UPDATING Fri Nov 29 07:12:10 2013 (r258734) @@ -55,7 +55,12 @@ older version of current is a bit fragil BIND has been removed from the base system. If all you need is a local resolver, simply enable and start the local_unbound service instead. Otherwise, several versions of BIND are - available in the ports tree. + available in the ports tree. The dns/bind99 port is one example. + + With this change, nslookup(1) and dig(1) are no longer in the base + system. Users should instead use host(1) which is still + in the base system. Alternatively, nslookup and dig can + be obtained by installing the dns/bind-tools port. 20130916: With the addition of unbound(8), a new unbound user is now From owner-svn-src-stable@FreeBSD.ORG Fri Nov 29 18:06:03 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D100CC4; Fri, 29 Nov 2013 18:06: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 282611577; Fri, 29 Nov 2013 18:06:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATI638X047903; Fri, 29 Nov 2013 18:06:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATI62bQ047902; Fri, 29 Nov 2013 18:06:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311291806.rATI62bQ047902@svn.freebsd.org> From: Dimitry Andric Date: Fri, 29 Nov 2013 18:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258747 - stable/10/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 18:06:03 -0000 Author: dim Date: Fri Nov 29 18:06:02 2013 New Revision: 258747 URL: http://svnweb.freebsd.org/changeset/base/258747 Log: MFC r258620: Pull in r195558 from upstream clang trunk: Fix a SSE2 intrinsics typo Full discourse at: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html Patch by Dimitry Andric and Alexey Dokuchaev! Reported by: danfe Approved by: re (gjb) Modified: stable/10/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Directory Properties: stable/10/contrib/llvm/ (props changed) stable/10/contrib/llvm/tools/clang/ (props changed) Modified: stable/10/contrib/llvm/tools/clang/lib/Headers/emmintrin.h ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Fri Nov 29 15:39:39 2013 (r258746) +++ stable/10/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Fri Nov 29 18:06:02 2013 (r258747) @@ -1344,7 +1344,7 @@ _mm_movepi64_pi64(__m128i __a) } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) -_mm_movpi64_pi64(__m64 __a) +_mm_movpi64_epi64(__m64 __a) { return (__m128i){ (long long)__a, 0 }; } From owner-svn-src-stable@FreeBSD.ORG Fri Nov 29 18:51:54 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D78F9B8; Fri, 29 Nov 2013 18:51: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C35141923; Fri, 29 Nov 2013 18:51:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATIpsiS064531; Fri, 29 Nov 2013 18:51:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATIpsNV064530; Fri, 29 Nov 2013 18:51:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311291851.rATIpsNV064530@svn.freebsd.org> From: Dimitry Andric Date: Fri, 29 Nov 2013 18:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258749 - stable/9/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 18:51:54 -0000 Author: dim Date: Fri Nov 29 18:51:54 2013 New Revision: 258749 URL: http://svnweb.freebsd.org/changeset/base/258749 Log: MFC r258620: Pull in r195558 from upstream clang trunk: Fix a SSE2 intrinsics typo Full discourse at: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131104/092514.html http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-November/068124.html Patch by Dimitry Andric and Alexey Dokuchaev! Reported by: danfe Modified: stable/9/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/Headers/emmintrin.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Fri Nov 29 18:46:02 2013 (r258748) +++ stable/9/contrib/llvm/tools/clang/lib/Headers/emmintrin.h Fri Nov 29 18:51:54 2013 (r258749) @@ -1344,7 +1344,7 @@ _mm_movepi64_pi64(__m128i __a) } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__)) -_mm_movpi64_pi64(__m64 __a) +_mm_movpi64_epi64(__m64 __a) { return (__m128i){ (long long)__a, 0 }; } From owner-svn-src-stable@FreeBSD.ORG Fri Nov 29 19:44:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5FA8488; Fri, 29 Nov 2013 19:44: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AE5B91BD3; Fri, 29 Nov 2013 19:44:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATJiY5L082474; Fri, 29 Nov 2013 19:44:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATJiUoB082454; Fri, 29 Nov 2013 19:44:30 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311291944.rATJiUoB082454@svn.freebsd.org> From: Glen Barber Date: Fri, 29 Nov 2013 19:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258750 - in stable/10: include lib/libc lib/libc/iconv lib/libc_nonshared X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 19:44:35 -0000 Author: gjb Date: Fri Nov 29 19:44:30 2013 New Revision: 258750 URL: http://svnweb.freebsd.org/changeset/base/258750 Log: MFC r258537, r258587: r258537 (hrs): Add ICONV_{GET,SET}_ILSEQ_INVALID iconvctl. GNU iconv returns EILSEQ when there is an invalid character in the output codeset while it is valid in the input. However, POSIX requires iconv() to perform an implementation-defined conversion on the character. So, Citrus iconv converts such a character to a special character which means it is invalid in the output codeset. This is not a problem in most cases but some software like libxml2 depends on GNU's behavior to determine if a character is output as-is or another form such as a character entity (&#NNN;). r258587 (peter): Move the iconv wrapper source from libc_nonshared to libc/iconv so that it is all in the one place again. Rename libc/iconv/iconv.c to bsd_iconv.c. Compile the wrappers into libc.a so that WITHOUT_DYNAMICROOT works again. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Added: stable/10/lib/libc/iconv/__iconv.c - copied unchanged from r258587, head/lib/libc/iconv/__iconv.c stable/10/lib/libc/iconv/__iconv_free_list.c - copied unchanged from r258587, head/lib/libc/iconv/__iconv_free_list.c stable/10/lib/libc/iconv/__iconv_get_list.c - copied unchanged from r258587, head/lib/libc/iconv/__iconv_get_list.c stable/10/lib/libc/iconv/bsd_iconv.c - copied unchanged from r258587, head/lib/libc/iconv/bsd_iconv.c stable/10/lib/libc/iconv/iconv_canonicalize.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_canonicalize.c stable/10/lib/libc/iconv/iconv_close.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_close.c stable/10/lib/libc/iconv/iconv_open.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_open.c stable/10/lib/libc/iconv/iconv_open_into.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_open_into.c stable/10/lib/libc/iconv/iconv_set_relocation_prefix.c - copied unchanged from r258587, head/lib/libc/iconv/iconv_set_relocation_prefix.c stable/10/lib/libc/iconv/iconvctl.c - copied unchanged from r258587, head/lib/libc/iconv/iconvctl.c stable/10/lib/libc/iconv/iconvlist.c - copied unchanged from r258587, head/lib/libc/iconv/iconvlist.c stable/10/lib/libc_nonshared/Makefile.iconv - copied unchanged from r258587, head/lib/libc_nonshared/Makefile.iconv Replaced: stable/10/lib/libc/iconv/iconv.c - copied unchanged from r258587, head/lib/libc/iconv/iconv.c Deleted: stable/10/lib/libc_nonshared/__iconv.c stable/10/lib/libc_nonshared/__iconv_free_list.c stable/10/lib/libc_nonshared/__iconv_get_list.c stable/10/lib/libc_nonshared/iconv.c stable/10/lib/libc_nonshared/iconv_canonicalize.c stable/10/lib/libc_nonshared/iconv_close.c stable/10/lib/libc_nonshared/iconv_open.c stable/10/lib/libc_nonshared/iconv_open_into.c stable/10/lib/libc_nonshared/iconv_set_relocation_prefix.c stable/10/lib/libc_nonshared/iconvctl.c stable/10/lib/libc_nonshared/iconvlist.c Modified: stable/10/include/iconv.h stable/10/lib/libc/Makefile stable/10/lib/libc/iconv/Makefile.inc stable/10/lib/libc/iconv/citrus_iconv_local.h stable/10/lib/libc/iconv/iconvctl.3 stable/10/lib/libc_nonshared/Makefile Directory Properties: stable/10/include/ (props changed) stable/10/lib/libc/ (props changed) stable/10/lib/libc_nonshared/ (props changed) Modified: stable/10/include/iconv.h ============================================================================== --- stable/10/include/iconv.h Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/include/iconv.h Fri Nov 29 19:44:30 2013 (r258750) @@ -86,6 +86,8 @@ void iconv_set_relocation_prefix(const #define ICONV_SET_DISCARD_ILSEQ 4 #define ICONV_SET_HOOKS 5 #define ICONV_SET_FALLBACKS 6 +#define ICONV_GET_ILSEQ_INVALID 128 +#define ICONV_SET_ILSEQ_INVALID 129 typedef void (*iconv_unicode_char_hook) (unsigned int mbr, void *data); typedef void (*iconv_wide_char_hook) (wchar_t wc, void *data); Modified: stable/10/lib/libc/Makefile ============================================================================== --- stable/10/lib/libc/Makefile Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc/Makefile Fri Nov 29 19:44:30 2013 (r258750) @@ -50,6 +50,9 @@ LDADD+= -lgcc LDADD+= -lssp_nonshared .endif +# Extras that live in either libc.a or libc_nonshared.a +LIBC_NONSHARED_SRCS= + # Define (empty) variables so that make doesn't give substitution # errors if the included makefiles don't change these: MDSRCS= @@ -114,6 +117,8 @@ CFLAGS+= -DNS_CACHING CFLAGS+=-D_FREEFALL_CONFIG .endif +STATICOBJS+=${LIBC_NONSHARED_SRCS:S/.c$/.o/} + VERSION_DEF=${.CURDIR}/Versions.def SYMBOL_MAPS=${SYM_MAPS} CFLAGS+= -DSYMBOL_VERSIONING Modified: stable/10/lib/libc/iconv/Makefile.inc ============================================================================== --- stable/10/lib/libc/iconv/Makefile.inc Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc/iconv/Makefile.inc Fri Nov 29 19:44:30 2013 (r258750) @@ -14,5 +14,9 @@ SRCS+= citrus_bcs.c citrus_bcs_strtol.c citrus_esdb.c citrus_hash.c citrus_iconv.c citrus_lookup.c \ citrus_lookup_factory.c citrus_mapper.c citrus_memstream.c \ citrus_mmap.c citrus_module.c citrus_none.c citrus_pivot_factory.c \ - citrus_prop.c citrus_stdenc.c iconv.c iconv_compat.c + citrus_prop.c citrus_stdenc.c bsd_iconv.c iconv_compat.c SYM_MAPS+= ${.CURDIR}/iconv/Symbol.map + +.if ${MK_ICONV} == yes +.include "${.CURDIR}/../libc_nonshared/Makefile.iconv" +.endif Copied: stable/10/lib/libc/iconv/__iconv.c (from r258587, head/lib/libc/iconv/__iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/__iconv.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/__iconv.c) @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +size_t +__iconv(iconv_t a, const char **b, size_t *c, char **d, + size_t *e, __uint32_t f, size_t *g) +{ + return __bsd___iconv(a, b, c, d, e, f, g); +} Copied: stable/10/lib/libc/iconv/__iconv_free_list.c (from r258587, head/lib/libc/iconv/__iconv_free_list.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/__iconv_free_list.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/__iconv_free_list.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +void +__iconv_free_list(char **a, size_t b) +{ + __bsd___iconv_free_list(a, b); +} Copied: stable/10/lib/libc/iconv/__iconv_get_list.c (from r258587, head/lib/libc/iconv/__iconv_get_list.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/__iconv_get_list.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/__iconv_get_list.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +int +__iconv_get_list(char ***a, size_t *b, __iconv_bool c) +{ + return __bsd___iconv_get_list(a, b, c); +} Copied: stable/10/lib/libc/iconv/bsd_iconv.c (from r258587, head/lib/libc/iconv/bsd_iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/bsd_iconv.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/bsd_iconv.c) @@ -0,0 +1,318 @@ +/* $FreeBSD$ */ +/* $NetBSD: iconv.c,v 1.11 2009/03/03 16:22:33 explorer Exp $ */ + +/*- + * Copyright (c) 2003 Citrus Project, + * Copyright (c) 2009, 2010 Gabor Kovesdan , + * 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 +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "citrus_types.h" +#include "citrus_module.h" +#include "citrus_esdb.h" +#include "citrus_hash.h" +#include "citrus_iconv.h" + +#include "iconv-internal.h" + +#define ISBADF(_h_) (!(_h_) || (_h_) == (iconv_t)-1) + +static iconv_t +__bsd___iconv_open(const char *out, const char *in, struct _citrus_iconv *handle) +{ + const char *out_slashes; + char *out_noslashes; + int ret; + + /* + * Remove anything following a //, as these are options (like + * //ignore, //translate, etc) and we just don't handle them. + * This is for compatibility with software that uses these + * blindly. + */ + out_slashes = strstr(out, "//"); + if (out_slashes != NULL) { + out_noslashes = strndup(out, out_slashes - out); + if (out_noslashes == NULL) { + errno = ENOMEM; + return ((iconv_t)-1); + } + ret = _citrus_iconv_open(&handle, in, out_noslashes); + free(out_noslashes); + } else { + ret = _citrus_iconv_open(&handle, in, out); + } + + if (ret) { + errno = ret == ENOENT ? EINVAL : ret; + return ((iconv_t)-1); + } + + handle->cv_shared->ci_discard_ilseq = strcasestr(out, "//IGNORE"); + handle->cv_shared->ci_hooks = NULL; + + return ((iconv_t)(void *)handle); +} + +iconv_t +__bsd_iconv_open(const char *out, const char *in) +{ + + return (__bsd___iconv_open(out, in, NULL)); +} + +int +__bsd_iconv_open_into(const char *out, const char *in, iconv_allocation_t *ptr) +{ + struct _citrus_iconv *handle; + + handle = (struct _citrus_iconv *)ptr; + return ((__bsd___iconv_open(out, in, handle) == (iconv_t)-1) ? -1 : 0); +} + +int +__bsd_iconv_close(iconv_t handle) +{ + + if (ISBADF(handle)) { + errno = EBADF; + return (-1); + } + + _citrus_iconv_close((struct _citrus_iconv *)(void *)handle); + + return (0); +} + +size_t +__bsd_iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) +{ + size_t ret; + int err; + + if (ISBADF(handle)) { + errno = EBADF; + return ((size_t)-1); + } + + err = _citrus_iconv_convert((struct _citrus_iconv *)(void *)handle, + in, szin, out, szout, 0, &ret); + if (err) { + errno = err; + ret = (size_t)-1; + } + + return (ret); +} + +size_t +__bsd___iconv(iconv_t handle, const char **in, size_t *szin, char **out, + size_t *szout, uint32_t flags, size_t *invalids) +{ + size_t ret; + int err; + + if (ISBADF(handle)) { + errno = EBADF; + return ((size_t)-1); + } + + err = _citrus_iconv_convert((struct _citrus_iconv *)(void *)handle, + in, szin, out, szout, flags, &ret); + if (invalids) + *invalids = ret; + if (err) { + errno = err; + ret = (size_t)-1; + } + + return (ret); +} + +int +__bsd___iconv_get_list(char ***rlist, size_t *rsz, bool sorted) +{ + int ret; + + ret = _citrus_esdb_get_list(rlist, rsz, sorted); + if (ret) { + errno = ret; + return (-1); + } + + return (0); +} + +void +__bsd___iconv_free_list(char **list, size_t sz) +{ + + _citrus_esdb_free_list(list, sz); +} + +/* + * GNU-compatibile non-standard interfaces. + */ +static int +qsort_helper(const void *first, const void *second) +{ + const char * const *s1; + const char * const *s2; + + s1 = first; + s2 = second; + return (strcmp(*s1, *s2)); +} + +void +__bsd_iconvlist(int (*do_one) (unsigned int, const char * const *, + void *), void *data) +{ + char **list, **names; + const char * const *np; + char *curitem, *curkey, *slashpos; + size_t sz; + unsigned int i, j; + + i = 0; + + if (__bsd___iconv_get_list(&list, &sz, true)) + list = NULL; + qsort((void *)list, sz, sizeof(char *), qsort_helper); + while (i < sz) { + j = 0; + slashpos = strchr(list[i], '/'); + curkey = (char *)malloc(slashpos - list[i] + 2); + names = (char **)malloc(sz * sizeof(char *)); + if ((curkey == NULL) || (names == NULL)) { + __bsd___iconv_free_list(list, sz); + return; + } + strlcpy(curkey, list[i], slashpos - list[i] + 1); + names[j++] = strdup(curkey); + for (; (i < sz) && (memcmp(curkey, list[i], strlen(curkey)) == 0); i++) { + slashpos = strchr(list[i], '/'); + curitem = (char *)malloc(strlen(slashpos) + 1); + if (curitem == NULL) { + __bsd___iconv_free_list(list, sz); + return; + } + strlcpy(curitem, &slashpos[1], strlen(slashpos) + 1); + if (strcmp(curkey, curitem) == 0) { + continue; + } + names[j++] = strdup(curitem); + } + np = (const char * const *)names; + do_one(j, np, data); + free(names); + } + + __bsd___iconv_free_list(list, sz); +} + +__inline const char * +__bsd_iconv_canonicalize(const char *name) +{ + + return (_citrus_iconv_canonicalize(name)); +} + +int +__bsd_iconvctl(iconv_t cd, int request, void *argument) +{ + struct _citrus_iconv *cv; + struct iconv_hooks *hooks; + const char *convname; + char src[PATH_MAX], *dst; + int *i; + + cv = (struct _citrus_iconv *)(void *)cd; + hooks = (struct iconv_hooks *)argument; + i = (int *)argument; + + if (ISBADF(cd)) { + errno = EBADF; + return (-1); + } + + switch (request) { + case ICONV_TRIVIALP: + convname = cv->cv_shared->ci_convname; + dst = strchr(convname, '/'); + + strlcpy(src, convname, dst - convname + 1); + dst++; + if ((convname == NULL) || (src == NULL) || (dst == NULL)) + return (-1); + *i = strcmp(src, dst) == 0 ? 1 : 0; + return (0); + case ICONV_GET_TRANSLITERATE: + *i = 1; + return (0); + case ICONV_SET_TRANSLITERATE: + return ((*i == 1) ? 0 : -1); + case ICONV_GET_DISCARD_ILSEQ: + *i = cv->cv_shared->ci_discard_ilseq ? 1 : 0; + return (0); + case ICONV_SET_DISCARD_ILSEQ: + cv->cv_shared->ci_discard_ilseq = *i; + return (0); + case ICONV_SET_HOOKS: + cv->cv_shared->ci_hooks = hooks; + return (0); + case ICONV_SET_FALLBACKS: + errno = EOPNOTSUPP; + return (-1); + case ICONV_GET_ILSEQ_INVALID: + *i = cv->cv_shared->ci_ilseq_invalid ? 1 : 0; + return (0); + case ICONV_SET_ILSEQ_INVALID: + cv->cv_shared->ci_ilseq_invalid = *i; + return (0); + default: + errno = EINVAL; + return (-1); + } +} + +void +__bsd_iconv_set_relocation_prefix(const char *orig_prefix __unused, + const char *curr_prefix __unused) +{ + +} Modified: stable/10/lib/libc/iconv/citrus_iconv_local.h ============================================================================== --- stable/10/lib/libc/iconv/citrus_iconv_local.h Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc/iconv/citrus_iconv_local.h Fri Nov 29 19:44:30 2013 (r258750) @@ -99,6 +99,7 @@ struct _citrus_iconv_shared { char *ci_convname; bool ci_discard_ilseq; struct iconv_hooks *ci_hooks; + bool ci_ilseq_invalid; }; struct _citrus_iconv { Copied: stable/10/lib/libc/iconv/iconv.c (from r258587, head/lib/libc/iconv/iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv.c) @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +size_t +iconv(iconv_t a, const char ** __restrict b, + size_t * __restrict c, char ** __restrict d, + size_t * __restrict e) +{ + return __bsd_iconv(a, b, c, d, e); +} Copied: stable/10/lib/libc/iconv/iconv_canonicalize.c (from r258587, head/lib/libc/iconv/iconv_canonicalize.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_canonicalize.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_canonicalize.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +const char * +iconv_canonicalize(const char *a) +{ + return __bsd_iconv_canonicalize(a); +} Copied: stable/10/lib/libc/iconv/iconv_close.c (from r258587, head/lib/libc/iconv/iconv_close.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_close.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_close.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +int +iconv_close(iconv_t a) +{ + return __bsd_iconv_close(a); +} Copied: stable/10/lib/libc/iconv/iconv_open.c (from r258587, head/lib/libc/iconv/iconv_open.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_open.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_open.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +iconv_t +iconv_open(const char *a, const char *b) +{ + return __bsd_iconv_open(a, b); +} Copied: stable/10/lib/libc/iconv/iconv_open_into.c (from r258587, head/lib/libc/iconv/iconv_open_into.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_open_into.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_open_into.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +int +iconv_open_into(const char *a, const char *b, iconv_allocation_t *c) +{ + return __bsd_iconv_open_into(a, b, c); +} Copied: stable/10/lib/libc/iconv/iconv_set_relocation_prefix.c (from r258587, head/lib/libc/iconv/iconv_set_relocation_prefix.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_set_relocation_prefix.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconv_set_relocation_prefix.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +void +iconv_set_relocation_prefix(const char *a, const char *b) +{ + return __bsd_iconv_set_relocation_prefix(a, b); +} Modified: stable/10/lib/libc/iconv/iconvctl.3 ============================================================================== --- stable/10/lib/libc/iconv/iconvctl.3 Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc/iconv/iconvctl.3 Fri Nov 29 19:44:30 2013 (r258750) @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2009 +.Dd November 25, 2009 .Dt ICONVCTL 3 .Os .Sh NAME @@ -110,6 +110,31 @@ variable, which is passed to via .Fa argument by its address. +.It ICONV_GET_ILSEQ_INVALID +Determines if a character in the input buffer that is valid, +but for which an identical character does not exist in the target +codeset returns +.Er EILSEQ +or not. +The answer is stored in +.Fa argument , +which is of +.Ft int * . +It will be set to 1 if this feature is enabled or set to 0 otherwise. +.It ICONV_SET_ILSEQ_INVALID +Sets whether a character in the input buffer that is valid, +but for which an identical character does not exist in the target +codeset returns +.Er EILSEQ +or not. +If +.Fa argument , +which is of +.Ft int * +is set to 1 it will be enabled, +and if +.Fa argument +is set to 0 it will be disabled. .El .\" XXX: fallbacks are unimplemented and trying to set them will always .\" return EOPNOTSUPP but definitions are provided for source-level Copied: stable/10/lib/libc/iconv/iconvctl.c (from r258587, head/lib/libc/iconv/iconvctl.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconvctl.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconvctl.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +int +iconvctl(iconv_t a, int b, void *c) +{ + return __bsd_iconvctl(a, b, c); +} Copied: stable/10/lib/libc/iconv/iconvlist.c (from r258587, head/lib/libc/iconv/iconvlist.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconvlist.c Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc/iconv/iconvlist.c) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2013 Peter Wemm + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include "iconv-internal.h" + +void +iconvlist(int (*a) (unsigned int, const char * const *, void *), void *b) +{ + return __bsd_iconvlist(a, b); +} Modified: stable/10/lib/libc_nonshared/Makefile ============================================================================== --- stable/10/lib/libc_nonshared/Makefile Fri Nov 29 18:51:54 2013 (r258749) +++ stable/10/lib/libc_nonshared/Makefile Fri Nov 29 19:44:30 2013 (r258750) @@ -12,16 +12,17 @@ CFLAGS+=${PICFLAG} -DPIC -fvisibility=hi LIB= c_nonshared +LIBC_NONSHARED_SRCS= + # So that an empty .a file doesn't cause errors. SRCS= __stub.c .if ${MK_ICONV} == "yes" -SRCS+= __iconv.c __iconv_free_list.c __iconv_get_list.c \ - iconv.c iconv_canonicalize.c iconv_close.c \ - iconv_open.c iconv_open_into.c \ - iconv_set_relocation_prefix.c iconvctl.c iconvlist.c +.PATH: ${.CURDIR}/../libc/iconv +.include "Makefile.iconv" CFLAGS+=-I${.CURDIR}/../libc/iconv .endif -.include +SRCS+= ${LIBC_NONSHARED_SRCS} +.include Copied: stable/10/lib/libc_nonshared/Makefile.iconv (from r258587, head/lib/libc_nonshared/Makefile.iconv) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc_nonshared/Makefile.iconv Fri Nov 29 19:44:30 2013 (r258750, copy of r258587, head/lib/libc_nonshared/Makefile.iconv) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.if ${MK_ICONV} == "yes" +LIBC_NONSHARED_SRCS+= \ + __iconv.c __iconv_free_list.c __iconv_get_list.c \ + iconv.c iconv_canonicalize.c iconv_close.c \ + iconv_open.c iconv_open_into.c \ + iconv_set_relocation_prefix.c iconvctl.c iconvlist.c +.endif From owner-svn-src-stable@FreeBSD.ORG Fri Nov 29 21:12:35 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC4D2BD6; Fri, 29 Nov 2013 21:12: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D76CC1FD8; Fri, 29 Nov 2013 21:12:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATLCZXm014497; Fri, 29 Nov 2013 21:12:35 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATLCZmG014496; Fri, 29 Nov 2013 21:12:35 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201311292112.rATLCZmG014496@svn.freebsd.org> From: Bryan Drewery Date: Fri, 29 Nov 2013 21:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258755 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 21:12:36 -0000 Author: bdrewery (ports committer) Date: Fri Nov 29 21:12:35 2013 New Revision: 258755 URL: http://svnweb.freebsd.org/changeset/base/258755 Log: MFC r258348: Document 'enabled' as boolean instead of string. Approved by: bapt (implicit) Approved by: re (gjb) Modified: stable/10/usr.sbin/pkg/pkg.7 Directory Properties: stable/10/usr.sbin/pkg/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.7 ============================================================================== --- stable/10/usr.sbin/pkg/pkg.7 Fri Nov 29 20:28:37 2013 (r258754) +++ stable/10/usr.sbin/pkg/pkg.7 Fri Nov 29 21:12:35 2013 (r258755) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 4, 2013 +.Dd November 19, 2013 .Dt PKG 7 .Os .Sh NAME @@ -108,7 +108,7 @@ FreeBSD: { mirror_type: "srv", signature_type: "none", fingerprints: "/usr/share/keys/pkg", - enabled: "yes" + enabled: yes } .Ed .Bl -tag -width signature_type -compact From owner-svn-src-stable@FreeBSD.ORG Fri Nov 29 21:13:31 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E96DDE4; Fri, 29 Nov 2013 21:13: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07A141FDF; Fri, 29 Nov 2013 21:13:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rATLDUZh014731; Fri, 29 Nov 2013 21:13:30 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rATLDUEY014730; Fri, 29 Nov 2013 21:13:30 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201311292113.rATLDUEY014730@svn.freebsd.org> From: Bryan Drewery Date: Fri, 29 Nov 2013 21:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258756 - stable/10/lib/libfetch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Nov 2013 21:13:31 -0000 Author: bdrewery (ports committer) Date: Fri Nov 29 21:13:30 2013 New Revision: 258756 URL: http://svnweb.freebsd.org/changeset/base/258756 Log: MFC r258347,r258349: Support SNI in libfetch SNI is Server Name Indentification which is a protocol for TLS that indicates the host that is being connected to at the start of the handshake. It allows to use Virtual Hosts on HTTPS. PR: kern/183583 Approved by: bapt (implicit) Approved by: re (gjb) Modified: stable/10/lib/libfetch/common.c Directory Properties: stable/10/lib/libfetch/ (props changed) Modified: stable/10/lib/libfetch/common.c ============================================================================== --- stable/10/lib/libfetch/common.c Fri Nov 29 21:12:35 2013 (r258755) +++ stable/10/lib/libfetch/common.c Fri Nov 29 21:13:30 2013 (r258756) @@ -829,6 +829,16 @@ fetch_ssl(conn_t *conn, const struct url return (-1); } SSL_set_fd(conn->ssl, conn->sd); + +#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) + if (!SSL_set_tlsext_host_name(conn->ssl, + __DECONST(struct url *, URL)->host)) { + fprintf(stderr, + "TLS server name indication extension failed for host %s\n", + URL->host); + return (-1); + } +#endif while ((ret = SSL_connect(conn->ssl)) == -1) { ssl_err = SSL_get_error(conn->ssl, ret); if (ssl_err != SSL_ERROR_WANT_READ && From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 03:31:40 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A28717C2; Sat, 30 Nov 2013 03:31: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8E3CB14C1; Sat, 30 Nov 2013 03:31:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAU3Ve1L049219; Sat, 30 Nov 2013 03:31:40 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAU3Veqq049218; Sat, 30 Nov 2013 03:31:40 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311300331.rAU3Veqq049218@svn.freebsd.org> From: Glen Barber Date: Sat, 30 Nov 2013 03:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258761 - stable/10/release X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 03:31:40 -0000 Author: gjb Date: Sat Nov 30 03:31:40 2013 New Revision: 258761 URL: http://svnweb.freebsd.org/changeset/base/258761 Log: MFC r258669: Document the dvdrom target and NODVD variable. Approved by: re (delphij) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/Makefile Directory Properties: stable/10/release/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Fri Nov 29 22:36:00 2013 (r258760) +++ stable/10/release/Makefile Sat Nov 30 03:31:40 2013 (r258761) @@ -4,6 +4,7 @@ # # User-driven targets: # cdrom: Builds release CD-ROM media (disc1.iso) +# dvdrom: Builds release DVD-ROM media (dvd1.iso) # memstick: Builds memory stick image (memstick.img) # ftp: Sets up FTP distribution area (ftp) # release: Build all media and FTP distribution area @@ -17,6 +18,7 @@ # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree # NODOC: if set, do not generate release documentation +# NODVD: if set, do not generate dvd1.iso # TARGET/TARGET_ARCH: architecture of built release # From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 07:03:19 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 388D6634; Sat, 30 Nov 2013 07:03: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 242DC1FF0; Sat, 30 Nov 2013 07:03:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAU73JBL021786; Sat, 30 Nov 2013 07:03:19 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAU73IgV021785; Sat, 30 Nov 2013 07:03:19 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311300703.rAU73IgV021785@svn.freebsd.org> From: Xin LI Date: Sat, 30 Nov 2013 07:03:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258762 - stable/10/etc/mtree X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 07:03:19 -0000 Author: delphij Date: Sat Nov 30 07:03:18 2013 New Revision: 258762 URL: http://svnweb.freebsd.org/changeset/base/258762 Log: MFC r258664: Create /var/cache with mode 0755 instead of 0750. This directory is used by many third party applications and having permission 0750 makes it impossible to drop group privileges. Approved by: re (glebius) Modified: stable/10/etc/mtree/BSD.var.dist Directory Properties: stable/10/etc/ (props changed) Modified: stable/10/etc/mtree/BSD.var.dist ============================================================================== --- stable/10/etc/mtree/BSD.var.dist Sat Nov 30 03:31:40 2013 (r258761) +++ stable/10/etc/mtree/BSD.var.dist Sat Nov 30 07:03:18 2013 (r258762) @@ -28,7 +28,7 @@ /set gname=wheel backups .. - cache + cache mode=0755 .. crash .. From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 07:04:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18C7777B; Sat, 30 Nov 2013 07: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0498D1FFC; Sat, 30 Nov 2013 07:04:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAU74Zxe022018; Sat, 30 Nov 2013 07:04:35 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAU74ZIP022017; Sat, 30 Nov 2013 07:04:35 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311300704.rAU74ZIP022017@svn.freebsd.org> From: Xin LI Date: Sat, 30 Nov 2013 07:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258763 - stable/9/etc/mtree X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 07:04:36 -0000 Author: delphij Date: Sat Nov 30 07:04:35 2013 New Revision: 258763 URL: http://svnweb.freebsd.org/changeset/base/258763 Log: MFC r258664: Create /var/cache with mode 0755 instead of 0750. This directory is used by many third party applications and having permission 0750 makes it impossible to drop group privileges. Modified: stable/9/etc/mtree/BSD.var.dist Directory Properties: stable/9/etc/mtree/ (props changed) Modified: stable/9/etc/mtree/BSD.var.dist ============================================================================== --- stable/9/etc/mtree/BSD.var.dist Sat Nov 30 07:03:18 2013 (r258762) +++ stable/9/etc/mtree/BSD.var.dist Sat Nov 30 07:04:35 2013 (r258763) @@ -28,7 +28,7 @@ /set gname=wheel backups .. - cache + cache mode=0755 .. crash .. From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 14:36:33 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 022D98D0; Sat, 30 Nov 2013 14:36: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C8BD8178B; Sat, 30 Nov 2013 14:36:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUEaWWF076109; Sat, 30 Nov 2013 14:36:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUEaWOD076107; Sat, 30 Nov 2013 14:36:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311301436.rAUEaWOD076107@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 30 Nov 2013 14:36:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258766 - stable/10/lib/libthr/thread X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 14:36:33 -0000 Author: kib Date: Sat Nov 30 14:36:32 2013 New Revision: 258766 URL: http://svnweb.freebsd.org/changeset/base/258766 Log: MFC r258499: Fix for the spurious signal handler call with zero signo in the threaded process. Approved by: re (hrs) Modified: stable/10/lib/libthr/thread/thr_private.h stable/10/lib/libthr/thread/thr_sig.c Directory Properties: stable/10/lib/libthr/ (props changed) Modified: stable/10/lib/libthr/thread/thr_private.h ============================================================================== --- stable/10/lib/libthr/thread/thr_private.h Sat Nov 30 12:51:19 2013 (r258765) +++ stable/10/lib/libthr/thread/thr_private.h Sat Nov 30 14:36:32 2013 (r258766) @@ -433,6 +433,9 @@ struct pthread { /* the sigaction should be used for deferred signal. */ struct sigaction deferred_sigact; + /* deferred signal delivery is performed, do not reenter. */ + int deferred_run; + /* Force new thread to exit. */ int force_exit; Modified: stable/10/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/10/lib/libthr/thread/thr_sig.c Sat Nov 30 12:51:19 2013 (r258765) +++ stable/10/lib/libthr/thread/thr_sig.c Sat Nov 30 14:36:32 2013 (r258766) @@ -162,6 +162,7 @@ thr_sighandler(int sig, siginfo_t *info, act = _thr_sigact[sig-1].sigact; _thr_rwl_unlock(&_thr_sigact[sig-1].lock); errno = err; + curthread->deferred_run = 0; /* * if a thread is in critical region, for example it holds low level locks, @@ -320,14 +321,18 @@ check_deferred_signal(struct pthread *cu siginfo_t info; int uc_len; - if (__predict_true(curthread->deferred_siginfo.si_signo == 0)) + if (__predict_true(curthread->deferred_siginfo.si_signo == 0 || + curthread->deferred_run)) return; + curthread->deferred_run = 1; uc_len = __getcontextx_size(); uc = alloca(uc_len); getcontext(uc); - if (curthread->deferred_siginfo.si_signo == 0) + if (curthread->deferred_siginfo.si_signo == 0) { + curthread->deferred_run = 0; return; + } __fillcontextx2((char *)uc); act = curthread->deferred_sigact; uc->uc_sigmask = curthread->deferred_sigmask; From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 14:39:57 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD715ADD; Sat, 30 Nov 2013 14:39: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B099817A8; Sat, 30 Nov 2013 14:39:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUEdv2a076571; Sat, 30 Nov 2013 14:39:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUEdv8A076569; Sat, 30 Nov 2013 14:39:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311301439.rAUEdv8A076569@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 30 Nov 2013 14:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258767 - stable/9/lib/libthr/thread X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 14:39:57 -0000 Author: kib Date: Sat Nov 30 14:39:56 2013 New Revision: 258767 URL: http://svnweb.freebsd.org/changeset/base/258767 Log: MFC r258499: Fix for the spurious signal handler call with zero signo in the threaded process. Modified: stable/9/lib/libthr/thread/thr_private.h stable/9/lib/libthr/thread/thr_sig.c Directory Properties: stable/9/lib/libthr/ (props changed) Modified: stable/9/lib/libthr/thread/thr_private.h ============================================================================== --- stable/9/lib/libthr/thread/thr_private.h Sat Nov 30 14:36:32 2013 (r258766) +++ stable/9/lib/libthr/thread/thr_private.h Sat Nov 30 14:39:56 2013 (r258767) @@ -431,6 +431,9 @@ struct pthread { /* the sigaction should be used for deferred signal. */ struct sigaction deferred_sigact; + /* deferred signal delivery is performed, do not reenter. */ + int deferred_run; + /* Force new thread to exit. */ int force_exit; Modified: stable/9/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/9/lib/libthr/thread/thr_sig.c Sat Nov 30 14:36:32 2013 (r258766) +++ stable/9/lib/libthr/thread/thr_sig.c Sat Nov 30 14:39:56 2013 (r258767) @@ -162,6 +162,7 @@ thr_sighandler(int sig, siginfo_t *info, act = _thr_sigact[sig-1].sigact; _thr_rwl_unlock(&_thr_sigact[sig-1].lock); errno = err; + curthread->deferred_run = 0; /* * if a thread is in critical region, for example it holds low level locks, @@ -320,14 +321,18 @@ check_deferred_signal(struct pthread *cu siginfo_t info; int uc_len; - if (__predict_true(curthread->deferred_siginfo.si_signo == 0)) + if (__predict_true(curthread->deferred_siginfo.si_signo == 0 || + curthread->deferred_run)) return; + curthread->deferred_run = 1; uc_len = __getcontextx_size(); uc = alloca(uc_len); getcontext(uc); - if (curthread->deferred_siginfo.si_signo == 0) + if (curthread->deferred_siginfo.si_signo == 0) { + curthread->deferred_run = 0; return; + } __fillcontextx2((char *)uc); act = curthread->deferred_sigact; uc->uc_sigmask = curthread->deferred_sigmask; From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 17:33:50 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6982AFB7; Sat, 30 Nov 2013 17:33: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 550901EAD; Sat, 30 Nov 2013 17:33:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUHXo4L038327; Sat, 30 Nov 2013 17:33:50 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUHXosr038326; Sat, 30 Nov 2013 17:33:50 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311301733.rAUHXosr038326@svn.freebsd.org> From: Glen Barber Date: Sat, 30 Nov 2013 17:33:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258773 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 17:33:50 -0000 Author: gjb Date: Sat Nov 30 17:33:49 2013 New Revision: 258773 URL: http://svnweb.freebsd.org/changeset/base/258773 Log: MFC r258550: Do not create pkg.conf, as it is not necessary anymore and packagesite is deprecated Approved by: re (glebius) Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/pkg/pkg.c Directory Properties: stable/10/usr.sbin/pkg/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.c ============================================================================== --- stable/10/usr.sbin/pkg/pkg.c Sat Nov 30 17:31:04 2013 (r258772) +++ stable/10/usr.sbin/pkg/pkg.c Sat Nov 30 17:33:49 2013 (r258773) @@ -747,12 +747,9 @@ cleanup: static int bootstrap_pkg(bool force) { - FILE *config; int fd_pkg, fd_sig; int ret; - char *site; char url[MAXPATHLEN]; - char conf[MAXPATHLEN]; char tmppkg[MAXPATHLEN]; char tmpsig[MAXPATHLEN]; const char *packagesite; @@ -761,7 +758,6 @@ bootstrap_pkg(bool force) fd_sig = -1; ret = -1; - config = NULL; if (config_string(PACKAGESITE, &packagesite) != 0) { warnx("No PACKAGESITE defined"); @@ -808,26 +804,6 @@ bootstrap_pkg(bool force) if ((ret = extract_pkg_static(fd_pkg, pkgstatic, MAXPATHLEN)) == 0) ret = install_pkg_static(pkgstatic, tmppkg, force); - snprintf(conf, MAXPATHLEN, "%s/etc/pkg.conf", - getenv("LOCALBASE") ? getenv("LOCALBASE") : _LOCALBASE); - - if (access(conf, R_OK) == -1) { - site = strrchr(url, '/'); - if (site == NULL) - goto cleanup; - site[0] = '\0'; - site = strrchr(url, '/'); - if (site == NULL) - goto cleanup; - site[0] = '\0'; - - config = fopen(conf, "w+"); - if (config == NULL) - goto cleanup; - fprintf(config, "packagesite: %s\n", url); - fclose(config); - } - goto cleanup; fetchfail: From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 17:40:49 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E39422B; Sat, 30 Nov 2013 17:40:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE3AE1ECF; Sat, 30 Nov 2013 17:40:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUHemID039738; Sat, 30 Nov 2013 17:40:48 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUHemO6039737; Sat, 30 Nov 2013 17:40:48 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311301740.rAUHemO6039737@svn.freebsd.org> From: Glen Barber Date: Sat, 30 Nov 2013 17:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r258774 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 17:40:49 -0000 Author: gjb Date: Sat Nov 30 17:40:48 2013 New Revision: 258774 URL: http://svnweb.freebsd.org/changeset/base/258774 Log: Update stable/10 to BETA4 as part of the 10.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/conf/newvers.sh Modified: stable/10/sys/conf/newvers.sh ============================================================================== --- stable/10/sys/conf/newvers.sh Sat Nov 30 17:33:49 2013 (r258773) +++ stable/10/sys/conf/newvers.sh Sat Nov 30 17:40:48 2013 (r258774) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.0" -BRANCH="BETA3" +BRANCH="BETA4" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 21:29:34 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D99876E4; Sat, 30 Nov 2013 21:29: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB3A61AD5; Sat, 30 Nov 2013 21:29:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAULTY4e020662; Sat, 30 Nov 2013 21:29:34 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAULTYtu020661; Sat, 30 Nov 2013 21:29:34 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201311302129.rAULTYtu020661@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 30 Nov 2013 21:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r258777 - stable/8/gnu/lib/libstdc++ X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 21:29:34 -0000 Author: pfg Date: Sat Nov 30 21:29:34 2013 New Revision: 258777 URL: http://svnweb.freebsd.org/changeset/base/258777 Log: MFC r246857: Regenerate libstdc++'s config.h, synchronizing it with our almost-C99 headers. After verifying the changes in the source code, avoid expl() which is not available in 8.x (or 9.x). Modified: stable/8/gnu/lib/libstdc++/config.h Directory Properties: stable/8/ (props changed) stable/8/gnu/ (props changed) stable/8/gnu/lib/libstdc++/ (props changed) Modified: stable/8/gnu/lib/libstdc++/config.h ============================================================================== --- stable/8/gnu/lib/libstdc++/config.h Sat Nov 30 21:27:11 2013 (r258776) +++ stable/8/gnu/lib/libstdc++/config.h Sat Nov 30 21:29:34 2013 (r258777) @@ -22,7 +22,7 @@ #define HAVE_ATAN2F 1 /* Define to 1 if you have the `atan2l' function. */ -/* #undef HAVE_ATAN2L */ +#define HAVE_ATAN2L 1 /* Define to 1 if you have the `atanf' function. */ #define HAVE_ATANF 1 @@ -100,7 +100,7 @@ #define HAVE_FMODF 1 /* Define to 1 if you have the `fmodl' function. */ -/* #undef HAVE_FMODL */ +#define HAVE_FMODL 1 /* Define to 1 if you have the `fpclass' function. */ /* #undef HAVE_FPCLASS */ @@ -134,7 +134,7 @@ #define HAVE_HYPOTF 1 /* Define to 1 if you have the `hypotl' function. */ -/* #undef HAVE_HYPOTL */ +#define HAVE_HYPOTL 1 /* Define to 1 if you have the `iconv' function. */ /* #undef HAVE_ICONV */ @@ -293,7 +293,7 @@ #define HAVE_SQRTF 1 /* Define to 1 if you have the `sqrtl' function. */ -/* #undef HAVE_SQRTL */ +#define HAVE_SQRTL 1 /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 @@ -304,6 +304,12 @@ /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 +/* Define if strerror_l is available in . */ +/* #undef HAVE_STRERROR_L */ + +/* Define if strerror_r is available in . */ +#define HAVE_STRERROR_R 1 + /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 @@ -316,6 +322,9 @@ /* Define to 1 if you have the `strtold' function. */ #define HAVE_STRTOLD 1 +/* Define if strxfrm_l is available in . */ +/* #undef HAVE_STRXFRM_L */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_FILIO_H 1 From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 23:06:52 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DB77E86; Sat, 30 Nov 2013 23:06: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 790081FF7; Sat, 30 Nov 2013 23:06:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUN6q9o054365; Sat, 30 Nov 2013 23:06:52 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUN6qbs054363; Sat, 30 Nov 2013 23:06:52 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311302306.rAUN6qbs054363@svn.freebsd.org> From: Peter Wemm Date: Sat, 30 Nov 2013 23:06:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r258783 - in stable/8/sys: compat/freebsd32 kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 23:06:52 -0000 Author: peter Date: Sat Nov 30 23:06:51 2013 New Revision: 258783 URL: http://svnweb.freebsd.org/changeset/base/258783 Log: MFC: r258718: fix emulated jail_v0 byte order Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c stable/8/sys/kern/kern_jail.c Modified: stable/8/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/8/sys/compat/freebsd32/freebsd32_misc.c Sat Nov 30 22:49:26 2013 (r258782) +++ stable/8/sys/compat/freebsd32/freebsd32_misc.c Sat Nov 30 23:06:51 2013 (r258783) @@ -1773,7 +1773,7 @@ freebsd32_jail(struct thread *td, struct CP(j32_v0, j, version); PTRIN_CP(j32_v0, j, path); PTRIN_CP(j32_v0, j, hostname); - j.ip4s = j32_v0.ip_number; + j.ip4s = htonl(j32_v0.ip_number); /* jail_v0 is host order */ break; } Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Sat Nov 30 22:49:26 2013 (r258782) +++ stable/8/sys/kern/kern_jail.c Sat Nov 30 23:06:51 2013 (r258783) @@ -291,7 +291,7 @@ jail(struct thread *td, struct jail_args j.version = j0.version; j.path = j0.path; j.hostname = j0.hostname; - j.ip4s = j0.ip_number; + j.ip4s = htonl(j0.ip_number); /* jail_v0 is host order */ break; } From owner-svn-src-stable@FreeBSD.ORG Sat Nov 30 23:08:32 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF49FFE9; Sat, 30 Nov 2013 23:08: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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BAE231008; Sat, 30 Nov 2013 23:08:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAUN8Wkk054669; Sat, 30 Nov 2013 23:08:32 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAUN8Wd0054667; Sat, 30 Nov 2013 23:08:32 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311302308.rAUN8Wd0054667@svn.freebsd.org> From: Peter Wemm Date: Sat, 30 Nov 2013 23:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258784 - in stable/9/sys: compat/freebsd32 kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Nov 2013 23:08:32 -0000 Author: peter Date: Sat Nov 30 23:08:32 2013 New Revision: 258784 URL: http://svnweb.freebsd.org/changeset/base/258784 Log: MFC: r258718: fix emulated jail_v0 byte order Modified: stable/9/sys/compat/freebsd32/freebsd32_misc.c stable/9/sys/kern/kern_jail.c Modified: stable/9/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_misc.c Sat Nov 30 23:06:51 2013 (r258783) +++ stable/9/sys/compat/freebsd32/freebsd32_misc.c Sat Nov 30 23:08:32 2013 (r258784) @@ -1913,7 +1913,7 @@ freebsd32_jail(struct thread *td, struct CP(j32_v0, j, version); PTRIN_CP(j32_v0, j, path); PTRIN_CP(j32_v0, j, hostname); - j.ip4s = j32_v0.ip_number; + j.ip4s = htonl(j32_v0.ip_number); /* jail_v0 is host order */ break; } Modified: stable/9/sys/kern/kern_jail.c ============================================================================== --- stable/9/sys/kern/kern_jail.c Sat Nov 30 23:06:51 2013 (r258783) +++ stable/9/sys/kern/kern_jail.c Sat Nov 30 23:08:32 2013 (r258784) @@ -311,7 +311,7 @@ sys_jail(struct thread *td, struct jail_ j.version = j0.version; j.path = j0.path; j.hostname = j0.hostname; - j.ip4s = j0.ip_number; + j.ip4s = htonl(j0.ip_number); /* jail_v0 is host order */ break; }