From owner-svn-src-stable@FreeBSD.ORG Sun Nov 17 01:07:47 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 34A321AB; Sun, 17 Nov 2013 01:07:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2292A2EC0; Sun, 17 Nov 2013 01:07:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAH17lEm051527; Sun, 17 Nov 2013 01:07:47 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAH17kDe051526; Sun, 17 Nov 2013 01:07:46 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201311170107.rAH17kDe051526@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 17 Nov 2013 01:07: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: r258242 - stable/10/sys/ofed/drivers/net/mlx4 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, 17 Nov 2013 01:07:47 -0000 Author: alfred Date: Sun Nov 17 01:07:46 2013 New Revision: 258242 URL: http://svnweb.freebsd.org/changeset/base/258242 Log: MFC: 257542 Fix API mismatch exposed by lagg. When destroying a lagg the driver tries to restore the old mac and fails due to API mismatch. Submitted by: Shahar Klein (shahark at mellanox.com) Approved by: re Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Nov 17 00:49:55 2013 (r258241) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Nov 17 01:07:46 2013 (r258242) @@ -604,8 +604,8 @@ int mlx4_en_start_port(struct net_device en_dbg(DRV, priv, "Setting mac for port %d\n", priv->port); err = mlx4_register_mac(mdev->dev, priv->port, mlx4_en_mac_to_u64(IF_LLADDR(dev))); - if (err) { - en_err(priv, "Failed setting port mac\n"); + if (err < 0) { + en_err(priv, "Failed setting port mac err=%d\n", err); goto tx_err; } mdev->mac_removed[priv->port] = 0; From owner-svn-src-stable@FreeBSD.ORG Sun Nov 17 15:58:14 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 7FCFF60C; Sun, 17 Nov 2013 15:58:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6F37324B2; Sun, 17 Nov 2013 15:58:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAHFwEVw053802; Sun, 17 Nov 2013 15:58:14 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAHFwE3c053801; Sun, 17 Nov 2013 15:58:14 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311171558.rAHFwE3c053801@svn.freebsd.org> From: Glen Barber Date: Sun, 17 Nov 2013 15:58:14 +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: r258261 - 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: Sun, 17 Nov 2013 15:58:14 -0000 Author: gjb Date: Sun Nov 17 15:58:13 2013 New Revision: 258261 URL: http://svnweb.freebsd.org/changeset/base/258261 Log: MFC r258101: Since the doc/ toolchain conversion to docbook 5.0, JADETEX is no longer a valid option, so remove 'WITHOUT_JADETEX=yes' from PBUILD_FLAGS. While here, also remove 'WITHOUT_X11=yes', since it will cause a dependency conflict by requiring both print/ghostscript9 and print/ghostscript9-nox11. Switch to OPTIONSNG format (WITHOUT_* -> OPTIONS_UNSET='FOO'), and unset the FOP option, which requires Java (although it is disabled by default). Also unset the 'IGOR' option, since textproc/igor is a validation tool, not necessarily a dependency of the doc/ build itself. While here, reduce the line length of PBUILD_FLAGS. Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/release.sh Directory Properties: stable/10/release/ (props changed) Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Sun Nov 17 15:14:07 2013 (r258260) +++ stable/10/release/release.sh Sun Nov 17 15:58:13 2013 (r258261) @@ -174,7 +174,8 @@ build_doc_ports() { ## Trick the ports 'run-autotools-fixup' target to do the right thing. _OSVERSION=$(sysctl -n kern.osreldate) if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then - PBUILD_FLAGS="OSVERSION=${_OSVERSION} WITHOUT_JADETEX=yes WITHOUT_X11=yes BATCH=yes" + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS} OPTIONS_UNSET='FOP IGOR'" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ ${PBUILD_FLAGS} install clean distclean fi From owner-svn-src-stable@FreeBSD.ORG Sun Nov 17 22:24: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 11E421A6; Sun, 17 Nov 2013 22:24: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 002DA2920; Sun, 17 Nov 2013 22:24: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 rAHMOYq7092092; Sun, 17 Nov 2013 22:24:34 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAHMOY4I092091; Sun, 17 Nov 2013 22:24:34 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201311172224.rAHMOY4I092091@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 17 Nov 2013 22:24:34 +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: r258280 - stable/10/sys/ofed/drivers/net/mlx4 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, 17 Nov 2013 22:24:35 -0000 Author: alfred Date: Sun Nov 17 22:24:34 2013 New Revision: 258280 URL: http://svnweb.freebsd.org/changeset/base/258280 Log: MFC: 258276 Fix creating a vlan over lagg over mlxen crash. PR: 181931 Submitted by: Shahar Klein (shahark mellanox.com) Approved by: re Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Nov 17 21:36:19 2013 (r258279) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Nov 17 22:24:34 2013 (r258280) @@ -52,6 +52,9 @@ static void mlx4_en_vlan_rx_add_vid(void int idx; u8 field; + if (arg != priv) + return; + if ((vid == 0) || (vid > 4095)) /* Invalid */ return; en_dbg(HW, priv, "adding VLAN:%d\n", vid); @@ -73,6 +76,9 @@ static void mlx4_en_vlan_rx_kill_vid(voi int idx; u8 field; + if (arg != priv) + return; + if ((vid == 0) || (vid > 4095)) /* Invalid */ return; en_dbg(HW, priv, "Killing VID:%d\n", vid); From owner-svn-src-stable@FreeBSD.ORG Mon Nov 18 04:42:59 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 235194E4; Mon, 18 Nov 2013 04:42:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1201C2BD9; Mon, 18 Nov 2013 04:42:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAI4gxFR022129; Mon, 18 Nov 2013 04:42:59 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAI4gw4f022125; Mon, 18 Nov 2013 04:42:58 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201311180442.rAI4gw4f022125@svn.freebsd.org> From: Hiroki Sato Date: Mon, 18 Nov 2013 04:42: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: r258293 - in stable/10/share/i18n: csmapper/JIS esdb/EUC 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, 18 Nov 2013 04:42:59 -0000 Author: hrs Date: Mon Nov 18 04:42:58 2013 New Revision: 258293 URL: http://svnweb.freebsd.org/changeset/base/258293 Log: MFC 257636: Fix EUC ESDB and JIS CS-mapper. Approved by: re (delphij) Modified: stable/10/share/i18n/csmapper/JIS/JISX0201-KANA%UCS.src stable/10/share/i18n/csmapper/JIS/JISX0208@1990%UCS.src stable/10/share/i18n/csmapper/JIS/UCS%JISX0201-KANA.src stable/10/share/i18n/csmapper/JIS/UCS%JISX0208@1990.src stable/10/share/i18n/csmapper/JIS/charset.pivot.JIS.src stable/10/share/i18n/csmapper/JIS/mapper.dir.JIS.src stable/10/share/i18n/esdb/EUC/EUC-JP.src Directory Properties: stable/10/share/i18n/csmapper/JIS/ (props changed) stable/10/share/i18n/esdb/EUC/ (props changed) Modified: stable/10/share/i18n/csmapper/JIS/JISX0201-KANA%UCS.src ============================================================================== --- stable/10/share/i18n/csmapper/JIS/JISX0201-KANA%UCS.src Mon Nov 18 04:17:04 2013 (r258292) +++ stable/10/share/i18n/csmapper/JIS/JISX0201-KANA%UCS.src Mon Nov 18 04:42:58 2013 (r258293) @@ -3,7 +3,7 @@ TYPE ROWCOL NAME JISX0201-KANA/UCS -SRC_ZONE 0x00-0xDF +SRC_ZONE 0x21-0x5F OOB_MODE ILSEQ DST_ILSEQ 0xFFFE DST_UNIT_BITS 16 @@ -62,10 +62,67 @@ BEGIN_MAP # The entries are in JIS order # # -0x00 - 0x5B = 0x0000 - -0x5C = 0x00A5 -0x5D - 0x7D = 0x005D - -0x7E = 0x203E -0x7F = 0x007F -0xA1 - 0xDF = 0xFF61 - +0x21 = 0xFF61 +0x22 = 0xFF62 +0x23 = 0xFF63 +0x24 = 0xFF64 +0x25 = 0xFF65 +0x26 = 0xFF66 +0x27 = 0xFF67 +0x28 = 0xFF68 +0x29 = 0xFF69 +0x2A = 0xFF6A +0x2B = 0xFF6B +0x2C = 0xFF6C +0x2D = 0xFF6D +0x2E = 0xFF6E +0x2F = 0xFF6F +0x30 = 0xFF70 +0x31 = 0xFF71 +0x32 = 0xFF72 +0x33 = 0xFF73 +0x34 = 0xFF74 +0x35 = 0xFF75 +0x36 = 0xFF76 +0x37 = 0xFF77 +0x38 = 0xFF78 +0x39 = 0xFF79 +0x3A = 0xFF7A +0x3B = 0xFF7B +0x3C = 0xFF7C +0x3D = 0xFF7D +0x3E = 0xFF7E +0x3F = 0xFF7F +0x40 = 0xFF80 +0x41 = 0xFF81 +0x42 = 0xFF82 +0x43 = 0xFF83 +0x44 = 0xFF84 +0x45 = 0xFF85 +0x46 = 0xFF86 +0x47 = 0xFF87 +0x48 = 0xFF88 +0x49 = 0xFF89 +0x4A = 0xFF8A +0x4B = 0xFF8B +0x4C = 0xFF8C +0x4D = 0xFF8D +0x4E = 0xFF8E +0x4F = 0xFF8F +0x50 = 0xFF90 +0x51 = 0xFF91 +0x52 = 0xFF92 +0x53 = 0xFF93 +0x54 = 0xFF94 +0x55 = 0xFF95 +0x56 = 0xFF96 +0x57 = 0xFF97 +0x58 = 0xFF98 +0x59 = 0xFF99 +0x5A = 0xFF9A +0x5B = 0xFF9B +0x5C = 0xFF9C +0x5D = 0xFF9D +0x5E = 0xFF9E +0x5F = 0xFF9F END_MAP Modified: stable/10/share/i18n/csmapper/JIS/JISX0208@1990%UCS.src ============================================================================== --- stable/10/share/i18n/csmapper/JIS/JISX0208@1990%UCS.src Mon Nov 18 04:17:04 2013 (r258292) +++ stable/10/share/i18n/csmapper/JIS/JISX0208@1990%UCS.src Mon Nov 18 04:42:58 2013 (r258293) @@ -119,7 +119,7 @@ BEGIN_MAP 0x213A = 0x3006 0x213B = 0x3007 0x213C = 0x30FC -0x213D = 0x2015 +0x213D = 0x2014 0x213E = 0x2010 0x213F = 0xFF0F 0x2140 = 0xFF3C Modified: stable/10/share/i18n/csmapper/JIS/UCS%JISX0201-KANA.src ============================================================================== --- stable/10/share/i18n/csmapper/JIS/UCS%JISX0201-KANA.src Mon Nov 18 04:17:04 2013 (r258292) +++ stable/10/share/i18n/csmapper/JIS/UCS%JISX0201-KANA.src Mon Nov 18 04:42:58 2013 (r258293) @@ -3,10 +3,10 @@ TYPE ROWCOL NAME "UCS/JISX0201-KANA" -SRC_ZONE 0x0000 - 0xFFEC +SRC_ZONE 0xFF60 - 0xFF9F OOB_MODE INVALID DST_INVALID 0xFF -DST_UNIT_BITS 32 +DST_UNIT_BITS 8 BEGIN_MAP # @@ -62,1094 +62,67 @@ BEGIN_MAP # The entries are in JIS order # # - -0x0000 = 0x00 -0x0001 = 0x01 -0x0002 = 0x02 -0x0003 = 0x03 -0x0004 = 0x04 -0x0005 = 0x05 -0x0006 = 0x06 -0x0007 = 0x07 -0x0008 = 0x08 -0x0009 = 0x09 -0x000A = 0x0A -0x000B = 0x0B -0x000C = 0x0C -0x000D = 0x0D -0x000E = 0x0E -0x000F = 0x0F -0x0010 = 0x10 -0x0011 = 0x11 -0x0012 = 0x12 -0x0013 = 0x13 -0x0014 = 0x14 -0x0015 = 0x15 -0x0016 = 0x16 -0x0017 = 0x17 -0x0018 = 0x18 -0x0019 = 0x19 -0x001A = 0x1A -0x001B = 0x1B -0x001C = 0x1C -0x001D = 0x1D -0x001E = 0x1E -0x001F = 0x1F -0x0020 = 0x20 -0x0021 = 0x21 -0x0022 = 0x22 -0x0023 = 0x23 -0x0024 = 0x24 -0x0025 = 0x25 -0x0026 = 0x26 -0x0027 = 0x27 -0x0028 = 0x28 -0x0029 = 0x29 -0x002A = 0x2A -0x002B = 0x2B -0x002C = 0x2C -0x002D = 0x2D -0x002E = 0x2E -0x002F = 0x2F -0x0030 = 0x30 -0x0031 = 0x31 -0x0032 = 0x32 -0x0033 = 0x33 -0x0034 = 0x34 -0x0035 = 0x35 -0x0036 = 0x36 -0x0037 = 0x37 -0x0038 = 0x38 -0x0039 = 0x39 -0x003A = 0x3A -0x003B = 0x3B -0x003C = 0x3C -0x003D = 0x3D -0x003E = 0x3E -0x003F = 0x3F -0x0040 = 0x40 -0x0041 = 0x41 -0x0042 = 0x42 -0x0043 = 0x43 -0x0044 = 0x44 -0x0045 = 0x45 -0x0046 = 0x46 -0x0047 = 0x47 -0x0048 = 0x48 -0x0049 = 0x49 -0x004A = 0x4A -0x004B = 0x4B -0x004C = 0x4C -0x004D = 0x4D -0x004E = 0x4E -0x004F = 0x4F -0x0050 = 0x50 -0x0051 = 0x51 -0x0052 = 0x52 -0x0053 = 0x53 -0x0054 = 0x54 -0x0055 = 0x55 -0x0056 = 0x56 -0x0057 = 0x57 -0x0058 = 0x58 -0x0059 = 0x59 -0x005A = 0x5A -0x005B = 0x5B -0x005D = 0x5D -0x005E = 0x5E -0x005F = 0x5F -0x0060 = 0x60 -0x0061 = 0x61 -0x0062 = 0x62 -0x0063 = 0x63 -0x0064 = 0x64 -0x0065 = 0x65 -0x0066 = 0x66 -0x0067 = 0x67 -0x0068 = 0x68 -0x0069 = 0x69 -0x006A = 0x6A -0x006B = 0x6B -0x006C = 0x6C -0x006D = 0x6D -0x006E = 0x6E -0x006F = 0x6F -0x0070 = 0x70 -0x0071 = 0x71 -0x0072 = 0x72 -0x0073 = 0x73 -0x0074 = 0x74 -0x0075 = 0x75 -0x0076 = 0x76 -0x0077 = 0x77 -0x0078 = 0x78 -0x0079 = 0x79 -0x007A = 0x7A -0x007B = 0x7B -0x007C = 0x7C -0x007D = 0x7D -0x007F = 0x7F -0x00A0 = 0x20 -0x00A1 = 0x21 -0x00A2 = 0x63 -0x00A3 = 0x626C -0x00A5 = 0x5C -0x00A6 = 0x7C -0x00A7 = 0x5353 -0x00A8 = 0x22 -0x00A9 = 0x296328 -0x00AA = 0x61 -0x00AB = 0x3C3C -0x00AC = 0x746F6E -0x00AD = 0x2D -0x00AE = 0x295228 -0x00B0 = 0x305E -0x00B1 = 0x2D2F2B -0x00B2 = 0x325E -0x00B3 = 0x335E -0x00B4 = 0x27 -0x00B5 = 0x75 -0x00B6 = 0x50 -0x00B7 = 0x2E -0x00B8 = 0x2C -0x00B9 = 0x315E -0x00BA = 0x6F -0x00BB = 0x3E3E -0x00BF = 0x3F -0x00C0 = 0x4160 -0x00C1 = 0x4127 -0x00C2 = 0x415E -0x00C4 = 0x4122 -0x00C5 = 0x41 -0x00C6 = 0x4541 -0x00C7 = 0x43 -0x00C8 = 0x4560 -0x00C9 = 0x4527 -0x00CA = 0x455E -0x00CB = 0x4522 -0x00CC = 0x4960 -0x00CD = 0x4927 -0x00CE = 0x495E -0x00CF = 0x4922 -0x00D0 = 0x44 -0x00D2 = 0x4F60 -0x00D3 = 0x4F27 -0x00D4 = 0x4F5E -0x00D6 = 0x4F22 -0x00D7 = 0x78 -0x00D8 = 0x4F -0x00D9 = 0x5560 -0x00DA = 0x5527 -0x00DB = 0x555E -0x00DC = 0x5522 -0x00DD = 0x5927 -0x00DE = 0x6854 -0x00DF = 0x7373 -0x00E0 = 0x6160 -0x00E1 = 0x6127 -0x00E2 = 0x615E -0x00E4 = 0x6122 -0x00E5 = 0x61 -0x00E6 = 0x6561 -0x00E7 = 0x63 -0x00E8 = 0x6560 -0x00E9 = 0x6527 -0x00EA = 0x655E -0x00EB = 0x6522 -0x00EC = 0x6960 -0x00ED = 0x6927 -0x00EE = 0x695E -0x00EF = 0x6922 -0x00F0 = 0x64 -0x00F2 = 0x6F60 -0x00F3 = 0x6F27 -0x00F4 = 0x6F5E -0x00F6 = 0x6F22 -0x00F7 = 0x3A -0x00F8 = 0x6F -0x00F9 = 0x7560 -0x00FA = 0x7527 -0x00FB = 0x755E -0x00FC = 0x7522 -0x00FD = 0x7927 -0x00FE = 0x6874 -0x00FF = 0x7922 -0x0100 = 0x41 -0x0101 = 0x61 -0x0102 = 0x41 -0x0103 = 0x61 -0x0104 = 0x41 -0x0105 = 0x61 -0x0106 = 0x4327 -0x0107 = 0x6327 -0x0108 = 0x435E -0x0109 = 0x635E -0x010A = 0x43 -0x010B = 0x63 -0x010C = 0x43 -0x010D = 0x63 -0x010E = 0x44 -0x010F = 0x64 -0x0110 = 0x44 -0x0111 = 0x64 -0x0112 = 0x45 -0x0113 = 0x65 -0x0114 = 0x45 -0x0115 = 0x65 -0x0116 = 0x45 -0x0117 = 0x65 -0x0118 = 0x45 -0x0119 = 0x65 -0x011A = 0x45 -0x011B = 0x65 -0x011C = 0x475E -0x011D = 0x675E -0x011E = 0x47 -0x011F = 0x67 -0x0120 = 0x47 -0x0121 = 0x67 -0x0122 = 0x47 -0x0123 = 0x67 -0x0124 = 0x485E -0x0125 = 0x685E -0x0126 = 0x48 -0x0127 = 0x68 -0x012A = 0x49 -0x012B = 0x69 -0x012C = 0x49 -0x012D = 0x69 -0x012E = 0x49 -0x012F = 0x69 -0x0130 = 0x49 -0x0131 = 0x69 -0x0132 = 0x4A49 -0x0133 = 0x6A69 -0x0134 = 0x4A5E -0x0135 = 0x6A5E -0x0136 = 0x4B -0x0137 = 0x6B -0x0139 = 0x4C -0x013A = 0x6C -0x013B = 0x4C -0x013C = 0x6C -0x013D = 0x4C -0x013E = 0x6C -0x013F = 0x4C -0x0140 = 0x6C -0x0141 = 0x4C -0x0142 = 0x6C -0x0143 = 0x4E27 -0x0144 = 0x6E27 -0x0145 = 0x4E -0x0146 = 0x6E -0x0147 = 0x4E -0x0148 = 0x6E -0x0149 = 0x6E27 -0x014C = 0x4F -0x014D = 0x6F -0x014E = 0x4F -0x014F = 0x6F -0x0150 = 0x4F22 -0x0151 = 0x6F22 -0x0152 = 0x454F -0x0153 = 0x656F -0x0154 = 0x5227 -0x0155 = 0x7227 -0x0156 = 0x52 -0x0157 = 0x72 -0x0158 = 0x52 -0x0159 = 0x72 -0x015A = 0x5327 -0x015B = 0x7327 -0x015C = 0x535E -0x015D = 0x735E -0x015E = 0x53 -0x015F = 0x73 -0x0160 = 0x53 -0x0161 = 0x73 -0x0162 = 0x54 -0x0163 = 0x74 -0x0164 = 0x54 -0x0165 = 0x74 -0x0166 = 0x54 -0x0167 = 0x74 -0x016A = 0x55 -0x016B = 0x75 -0x016C = 0x55 -0x016D = 0x75 -0x016E = 0x55 -0x016F = 0x75 -0x0170 = 0x5522 -0x0171 = 0x7522 -0x0172 = 0x55 -0x0173 = 0x75 -0x0174 = 0x575E -0x0175 = 0x775E -0x0176 = 0x595E -0x0177 = 0x795E -0x0178 = 0x5922 -0x0179 = 0x5A27 -0x017A = 0x7A27 -0x017B = 0x5A -0x017C = 0x7A -0x017D = 0x5A -0x017E = 0x7A -0x017F = 0x73 -0x0192 = 0x66 -0x01C4 = 0x5A44 -0x01C5 = 0x7A44 -0x01C6 = 0x7A64 -0x01C7 = 0x4A4C -0x01C8 = 0x6A4C -0x01C9 = 0x6A6C -0x01CA = 0x4A4E -0x01CB = 0x6A4E -0x01CC = 0x6A6E -0x01F1 = 0x5A44 -0x01F2 = 0x7A44 -0x01F3 = 0x7A64 -0x0218 = 0x53 -0x0219 = 0x73 -0x021A = 0x54 -0x021B = 0x74 -0x02B9 = 0x27 -0x02BA = 0x2727 -0x02BB = 0x27 -0x02BC = 0x27 -0x02BD = 0x27 -0x02C6 = 0x5E -0x02C8 = 0x27 -0x02CA = 0x27 -0x02CB = 0x60 -0x02CD = 0x5F -0x02DD = 0x22 -0x1E02 = 0x42 -0x1E03 = 0x62 -0x1E0A = 0x44 -0x1E0B = 0x64 -0x1E1E = 0x46 -0x1E1F = 0x66 -0x1E40 = 0x4D -0x1E41 = 0x6D -0x1E56 = 0x50 -0x1E57 = 0x70 -0x1E60 = 0x53 -0x1E61 = 0x73 -0x1E6A = 0x54 -0x1E6B = 0x74 -0x1E80 = 0x5760 -0x1E81 = 0x7760 -0x1E82 = 0x5727 -0x1E83 = 0x7727 -0x1E84 = 0x5722 -0x1E85 = 0x7722 -0x1EF2 = 0x5960 -0x1EF3 = 0x7960 -0x2002 = 0x20 -0x2003 = 0x20 -0x2004 = 0x20 -0x2005 = 0x20 -0x2006 = 0x20 -0x2008 = 0x20 -0x2009 = 0x20 -0x200A = 0x20 -0x2010 = 0x2D -0x2011 = 0x2D -0x2012 = 0x2D -0x2013 = 0x2D -0x2014 = 0x2D -0x2015 = 0x2D -0x2018 = 0x27 -0x2019 = 0x27 -0x201A = 0x27 -0x201B = 0x27 -0x201C = 0x22 -0x201D = 0x22 -0x201E = 0x22 -0x201F = 0x22 -0x2020 = 0x2B -0x2022 = 0x6F -0x2024 = 0x2E -0x2025 = 0x2E2E -0x2026 = 0x2E2E2E -0x2030 = 0x6F6F2F6F -0x2032 = 0x27 -0x2033 = 0x2727 -0x2034 = 0x272727 -0x2039 = 0x3C -0x203A = 0x3E -0x203C = 0x2121 -0x203E = 0x7E -0x2044 = 0x2F -0x2047 = 0x3F3F -0x2048 = 0x213F -0x2049 = 0x3F21 -0x2057 = 0x27272727 -0x20A8 = 0x7352 -0x20AC = 0x525545 -0x2100 = 0x632F61 -0x2101 = 0x732F61 -0x2102 = 0x43 -0x2103 = 0x43305E -0x2105 = 0x6F2F63 -0x2106 = 0x752F63 -0x2109 = 0x46305E -0x210A = 0x67 -0x210B = 0x48 -0x210C = 0x48 -0x210D = 0x48 -0x210E = 0x68 -0x210F = 0x68 -0x2110 = 0x49 -0x2111 = 0x49 -0x2112 = 0x4C -0x2113 = 0x6C -0x2115 = 0x4E -0x2116 = 0x6F4E -0x2119 = 0x50 -0x211A = 0x51 -0x211B = 0x52 -0x211C = 0x52 -0x211D = 0x52 -0x2121 = 0x4C4554 -0x2122 = 0x4D54 -0x2124 = 0x5A -0x2126 = 0x6D684F -0x2128 = 0x5A -0x212C = 0x42 -0x212D = 0x43 -0x212E = 0x65 -0x212F = 0x65 -0x2130 = 0x45 -0x2131 = 0x46 -0x2133 = 0x4D -0x2134 = 0x6F -0x2139 = 0x69 -0x213B = 0x584146 -0x2145 = 0x44 -0x2146 = 0x64 -0x2147 = 0x65 -0x2148 = 0x69 -0x2149 = 0x6A -0x215F = 0x2F3120 -0x2160 = 0x49 -0x2161 = 0x4949 -0x2162 = 0x494949 -0x2163 = 0x5649 -0x2164 = 0x56 -0x2165 = 0x4956 -0x2166 = 0x494956 -0x2167 = 0x49494956 -0x2168 = 0x5849 -0x2169 = 0x58 -0x216A = 0x4958 -0x216B = 0x494958 -0x216C = 0x4C -0x216D = 0x43 -0x216E = 0x44 -0x216F = 0x4D -0x2170 = 0x69 -0x2171 = 0x6969 -0x2172 = 0x696969 -0x2173 = 0x7669 -0x2174 = 0x76 -0x2175 = 0x6976 -0x2176 = 0x696976 -0x2177 = 0x69696976 -0x2178 = 0x7869 -0x2179 = 0x78 -0x217A = 0x6978 -0x217B = 0x696978 -0x217C = 0x6C -0x217D = 0x63 -0x217E = 0x64 -0x217F = 0x6D -0x2190 = 0x2D3C -0x2191 = 0x5E -0x2192 = 0x3E2D -0x2193 = 0x56 -0x2194 = 0x3E2D3C -0x21D0 = 0x3D3C -0x21D2 = 0x3E3D -0x21D4 = 0x3E3D3C -0x2212 = 0x2D -0x2215 = 0x2F -0x2217 = 0x2A -0x2219 = 0x6F -0x2223 = 0x7C -0x2236 = 0x3A -0x2260 = 0x3D2F -0x2264 = 0x3D3C -0x2265 = 0x3D3E -0x226A = 0x3C3C -0x226B = 0x3E3E -0x22C5 = 0x2E -0x22D8 = 0x3C3C3C -0x22D9 = 0x3E3E3E -0x22EF = 0x2E2E2E -0x2408 = 0x5D53425B -0x2409 = 0x5D54485B -0x240A = 0x5D464C5B -0x240B = 0x5D54565B -0x240C = 0x5D46465B -0x240D = 0x5D52435B -0x240E = 0x5D4F535B -0x240F = 0x5D49535B -0x2419 = 0x5D4D455B -0x241C = 0x5D53465B -0x241D = 0x5D53475B -0x241E = 0x5D53525B -0x241F = 0x5D53555B -0x2420 = 0x5D50535B -0x2424 = 0x5D4C4E5B -0x2460 = 0x293128 -0x2461 = 0x293228 -0x2462 = 0x293328 -0x2463 = 0x293428 -0x2464 = 0x293528 -0x2465 = 0x293628 -0x2466 = 0x293728 -0x2467 = 0x293828 -0x2468 = 0x293928 -0x2469 = 0x29303128 -0x246A = 0x29313128 -0x246B = 0x29323128 -0x246C = 0x29333128 -0x246D = 0x29343128 -0x246E = 0x29353128 -0x246F = 0x29363128 -0x2470 = 0x29373128 -0x2471 = 0x29383128 -0x2472 = 0x29393128 -0x2473 = 0x29303228 -0x2474 = 0x293128 -0x2475 = 0x293228 -0x2476 = 0x293328 -0x2477 = 0x293428 -0x2478 = 0x293528 -0x2479 = 0x293628 -0x247A = 0x293728 -0x247B = 0x293828 -0x247C = 0x293928 -0x247D = 0x29303128 -0x247E = 0x29313128 -0x247F = 0x29323128 -0x2480 = 0x29333128 -0x2481 = 0x29343128 -0x2482 = 0x29353128 -0x2483 = 0x29363128 -0x2484 = 0x29373128 -0x2485 = 0x29383128 -0x2486 = 0x29393128 -0x2487 = 0x29303228 -0x2488 = 0x2E31 -0x2489 = 0x2E32 -0x248A = 0x2E33 -0x248B = 0x2E34 -0x248C = 0x2E35 -0x248D = 0x2E36 -0x248E = 0x2E37 -0x248F = 0x2E38 -0x2490 = 0x2E39 -0x2491 = 0x2E3031 -0x2492 = 0x2E3131 -0x2493 = 0x2E3231 -0x2494 = 0x2E3331 -0x2495 = 0x2E3431 -0x2496 = 0x2E3531 -0x2497 = 0x2E3631 -0x2498 = 0x2E3731 -0x2499 = 0x2E3831 -0x249A = 0x2E3931 -0x249B = 0x2E3032 -0x249C = 0x296128 -0x249D = 0x296228 -0x249E = 0x296328 -0x249F = 0x296428 -0x24A0 = 0x296528 -0x24A1 = 0x296628 -0x24A2 = 0x296728 -0x24A3 = 0x296828 -0x24A4 = 0x296928 -0x24A5 = 0x296A28 -0x24A6 = 0x296B28 -0x24A7 = 0x296C28 -0x24A8 = 0x296D28 -0x24A9 = 0x296E28 -0x24AA = 0x296F28 -0x24AB = 0x297028 -0x24AC = 0x297128 -0x24AD = 0x297228 -0x24AE = 0x297328 -0x24AF = 0x297428 -0x24B0 = 0x297528 -0x24B1 = 0x297628 -0x24B2 = 0x297728 -0x24B3 = 0x297828 -0x24B4 = 0x297928 -0x24B5 = 0x297A28 -0x24B6 = 0x294128 -0x24B7 = 0x294228 -0x24B8 = 0x294328 -0x24B9 = 0x294428 -0x24BA = 0x294528 -0x24BB = 0x294628 -0x24BC = 0x294728 -0x24BD = 0x294828 -0x24BE = 0x294928 -0x24BF = 0x294A28 -0x24C0 = 0x294B28 -0x24C1 = 0x294C28 -0x24C2 = 0x294D28 -0x24C3 = 0x294E28 -0x24C4 = 0x294F28 -0x24C5 = 0x295028 -0x24C6 = 0x295128 -0x24C7 = 0x295228 -0x24C8 = 0x295328 -0x24C9 = 0x295428 -0x24CA = 0x295528 -0x24CB = 0x295628 -0x24CC = 0x295728 -0x24CD = 0x295828 -0x24CE = 0x295928 -0x24CF = 0x295A28 -0x24D0 = 0x296128 -0x24D1 = 0x296228 -0x24D2 = 0x296328 -0x24D3 = 0x296428 -0x24D4 = 0x296528 -0x24D5 = 0x296628 -0x24D6 = 0x296728 -0x24D7 = 0x296828 -0x24D8 = 0x296928 -0x24D9 = 0x296A28 -0x24DA = 0x296B28 -0x24DB = 0x296C28 -0x24DC = 0x296D28 -0x24DD = 0x296E28 -0x24DE = 0x296F28 -0x24DF = 0x297028 -0x24E0 = 0x297128 -0x24E1 = 0x297228 -0x24E2 = 0x297328 -0x24E3 = 0x297428 -0x24E4 = 0x297528 -0x24E5 = 0x297628 -0x24E6 = 0x297728 -0x24E7 = 0x297828 -0x24E8 = 0x297928 -0x24E9 = 0x297A28 -0x24EA = 0x293028 -0x2500 = 0x2D -0x2502 = 0x7C -0x250C = 0x2B -0x2510 = 0x2B -0x2514 = 0x2B -0x2518 = 0x2B -0x251C = 0x2B -0x2524 = 0x2B -0x252C = 0x2B -0x2534 = 0x2B -0x253C = 0x2B -0x25E6 = 0x6F -0x2A74 = 0x3D3A3A -0x2A75 = 0x3D3D -0x2A76 = 0x3D3D3D -0x3000 = 0x20 -0x30A0 = 0x3D -0x3250 = 0x455450 -0x3251 = 0x29313228 -0x3252 = 0x29323228 -0x3253 = 0x29333228 -0x3254 = 0x29343228 -0x3255 = 0x29353228 -0x3256 = 0x29363228 -0x3257 = 0x29373228 -0x3258 = 0x29383228 -0x3259 = 0x29393228 -0x325A = 0x29303328 -0x325B = 0x29313328 -0x325C = 0x29323328 -0x325D = 0x29333328 -0x325E = 0x29343328 -0x325F = 0x29353328 -0x32B1 = 0x29363328 -0x32B2 = 0x29373328 -0x32B3 = 0x29383328 -0x32B4 = 0x29393328 -0x32B5 = 0x29303428 -0x32B6 = 0x29313428 -0x32B7 = 0x29323428 -0x32B8 = 0x29333428 -0x32B9 = 0x29343428 -0x32BA = 0x29353428 -0x32BB = 0x29363428 -0x32BC = 0x29373428 -0x32BD = 0x29383428 -0x32BE = 0x29393428 -0x32BF = 0x29303528 -0x32CC = 0x6748 -0x32CD = 0x677265 -0x32CE = 0x5665 -0x32CF = 0x44544C -0x3371 = 0x615068 -0x3372 = 0x6164 -0x3373 = 0x5541 -0x3374 = 0x726162 -0x3375 = 0x566F -0x3376 = 0x6370 -0x3377 = 0x6D64 -0x3378 = 0x325E6D64 -0x3379 = 0x335E6D64 -0x337A = 0x5549 -0x3380 = 0x4170 -0x3381 = 0x416E -0x3383 = 0x416D -0x3384 = 0x416B -0x3385 = 0x424B -0x3386 = 0x424D -0x3387 = 0x4247 -0x3388 = 0x6C6163 -0x3389 = 0x6C61636B -0x338A = 0x4670 -0x338B = 0x466E -0x338E = 0x676D -0x338F = 0x676B -0x3390 = 0x7A48 -0x3391 = 0x7A486B -0x3392 = 0x7A484D -0x3393 = 0x7A4847 -0x3394 = 0x7A4854 -0x3396 = 0x6C6D -0x3397 = 0x6C64 -0x3398 = 0x6C6B -0x3399 = 0x6D66 -0x339A = 0x6D6E -0x339C = 0x6D6D -0x339D = 0x6D63 -0x339E = 0x6D6B -0x339F = 0x325E6D6D -0x33A0 = 0x325E6D63 -0x33A1 = 0x325E6D -0x33A2 = 0x325E6D6B -0x33A3 = 0x335E6D6D -0x33A4 = 0x335E6D63 -0x33A5 = 0x335E6D -0x33A6 = 0x335E6D6B -0x33A7 = 0x732F6D -0x33A9 = 0x6150 -0x33AA = 0x61506B -0x33AB = 0x61504D -0x33AC = 0x615047 -0x33AD = 0x646172 -0x33B0 = 0x7370 -0x33B1 = 0x736E -0x33B3 = 0x736D -0x33B4 = 0x5670 -0x33B5 = 0x566E -0x33B7 = 0x566D -0x33B8 = 0x566B -0x33B9 = 0x564D -0x33BA = 0x5770 -0x33BB = 0x576E -0x33BD = 0x576D -0x33BE = 0x576B -0x33BF = 0x574D -0x33C2 = 0x2E6D2E61 -0x33C3 = 0x7142 -0x33C4 = 0x6363 -0x33C5 = 0x6463 -0x33C6 = 0x676B2F43 -0x33C7 = 0x2E6F43 -0x33C8 = 0x4264 -0x33C9 = 0x7947 -0x33CA = 0x6168 -0x33CB = 0x5048 -0x33CC = 0x6E69 -0x33CD = 0x4B4B -0x33CE = 0x4D4B -0x33CF = 0x746B -0x33D0 = 0x6D6C -0x33D1 = 0x6E6C -0x33D2 = 0x676F6C -0x33D3 = 0x786C -0x33D4 = 0x626D -0x33D5 = 0x6C696D -0x33D6 = 0x6C6F6D -0x33D7 = 0x4850 -0x33D8 = 0x2E6D2E70 -0x33D9 = 0x4D5050 -0x33DA = 0x5250 -0x33DB = 0x7273 -0x33DC = 0x7653 -0x33DD = 0x6257 -0x33DE = 0x6D2F56 -0x33DF = 0x6D2F41 -0x33FF = 0x6C6167 -0xFB00 = 0x6666 -0xFB01 = 0x6966 -0xFB02 = 0x6C66 -0xFB03 = 0x696666 -0xFB04 = 0x6C6666 -0xFB05 = 0x7473 -0xFB06 = 0x7473 -0xFB29 = 0x2B -0xFE49 = 0x7E -0xFE4A = 0x7E -0xFE4B = 0x7E -0xFE4C = 0x7E -0xFE4D = 0x5F -0xFE4E = 0x5F -0xFE4F = 0x5F -0xFE50 = 0x2C -0xFE52 = 0x2E -0xFE54 = 0x3B -0xFE55 = 0x3A -0xFE56 = 0x3F -0xFE57 = 0x21 -0xFE58 = 0x2D -0xFE59 = 0x28 -0xFE5A = 0x29 -0xFE5B = 0x7B -0xFE5C = 0x7D -0xFE5F = 0x23 -0xFE60 = 0x26 -0xFE61 = 0x2A -0xFE62 = 0x2B -0xFE63 = 0x2D -0xFE64 = 0x3C -0xFE65 = 0x3E -0xFE66 = 0x3D -0xFE69 = 0x24 -0xFE6A = 0x25 -0xFE6B = 0x40 -0xFF01 = 0x21 -0xFF02 = 0x22 -0xFF03 = 0x23 -0xFF04 = 0x24 -0xFF05 = 0x25 -0xFF06 = 0x26 -0xFF07 = 0x27 -0xFF08 = 0x28 -0xFF09 = 0x29 -0xFF0A = 0x2A -0xFF0B = 0x2B -0xFF0C = 0x2C -0xFF0D = 0x2D -0xFF0E = 0x2E -0xFF0F = 0x2F -0xFF10 = 0x30 -0xFF11 = 0x31 -0xFF12 = 0x32 -0xFF13 = 0x33 -0xFF14 = 0x34 -0xFF15 = 0x35 -0xFF16 = 0x36 -0xFF17 = 0x37 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Mon Nov 18 13:12:45 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 95A50D87; Mon, 18 Nov 2013 13:12:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8525F2965; Mon, 18 Nov 2013 13:12:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAIDCjYp099753; Mon, 18 Nov 2013 13:12:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAIDCjE3099752; Mon, 18 Nov 2013 13:12:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311181312.rAIDCjE3099752@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Nov 2013 13:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258300 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 18 Nov 2013 13:12:45 -0000 Author: mav Date: Mon Nov 18 13:12:45 2013 New Revision: 258300 URL: http://svnweb.freebsd.org/changeset/base/258300 Log: MFC r239710 (by glebius): Fix function name in keg_cachespread_init() assert. Modified: stable/9/sys/vm/uma_core.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Mon Nov 18 12:57:46 2013 (r258299) +++ stable/9/sys/vm/uma_core.c Mon Nov 18 13:12:45 2013 (r258300) @@ -1233,7 +1233,7 @@ keg_cachespread_init(uma_keg_t keg) keg->uk_ipers = ((pages * PAGE_SIZE) + trailer) / rsize; keg->uk_flags |= UMA_ZONE_OFFPAGE | UMA_ZONE_VTOSLAB; KASSERT(keg->uk_ipers <= uma_max_ipers, - ("keg_small_init: keg->uk_ipers too high(%d) increase max_ipers", + ("%s: keg->uk_ipers too high(%d) increase max_ipers", __func__, keg->uk_ipers)); } From owner-svn-src-stable@FreeBSD.ORG Mon Nov 18 13:17:57 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 6A19FF3A; Mon, 18 Nov 2013 13:17: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 59A8D29A1; Mon, 18 Nov 2013 13:17: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 rAIDHv4c000713; Mon, 18 Nov 2013 13:17:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAIDHv2P000712; Mon, 18 Nov 2013 13:17:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311181317.rAIDHv2P000712@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Nov 2013 13:17: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: r258301 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 18 Nov 2013 13:17:57 -0000 Author: mav Date: Mon Nov 18 13:17:56 2013 New Revision: 258301 URL: http://svnweb.freebsd.org/changeset/base/258301 Log: MFC r240676 (by glebius): If caller specifies UMA_ZONE_OFFPAGE explicitly, then do not waste memory in an allocation for a slab. Modified: stable/9/sys/vm/uma_core.c Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Mon Nov 18 13:12:45 2013 (r258300) +++ stable/9/sys/vm/uma_core.c Mon Nov 18 13:17:56 2013 (r258301) @@ -1122,7 +1122,9 @@ keg_small_init(uma_keg_t keg) keg->uk_rsize = rsize; keg->uk_ppera = 1; - if (keg->uk_flags & UMA_ZONE_REFCNT) { + if (keg->uk_flags & UMA_ZONE_OFFPAGE) { + shsize = 0; + } else if (keg->uk_flags & UMA_ZONE_REFCNT) { rsize += UMA_FRITMREF_SZ; /* linkage & refcnt */ shsize = sizeof(struct uma_slab_refcnt); } else { From owner-svn-src-stable@FreeBSD.ORG Mon Nov 18 13:20:21 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 602E924D; Mon, 18 Nov 2013 13:20: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 4F97929C7; Mon, 18 Nov 2013 13:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAIDKLTh003113; Mon, 18 Nov 2013 13:20:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAIDKL7N003112; Mon, 18 Nov 2013 13:20:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201311181320.rAIDKL7N003112@svn.freebsd.org> From: Alexander Motin Date: Mon, 18 Nov 2013 13:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258302 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 18 Nov 2013 13:20:21 -0000 Author: mav Date: Mon Nov 18 13:20:20 2013 New Revision: 258302 URL: http://svnweb.freebsd.org/changeset/base/258302 Log: MFC r246087 (by glebius): Fix typo in debug printf. Modified: stable/9/sys/vm/uma_core.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/uma_core.c ============================================================================== --- stable/9/sys/vm/uma_core.c Mon Nov 18 13:17:56 2013 (r258301) +++ stable/9/sys/vm/uma_core.c Mon Nov 18 13:20:20 2013 (r258302) @@ -1678,7 +1678,7 @@ uma_startup(void *bootmem, int boot_page #ifdef UMA_DEBUG printf("Calculated uma_max_ipers (for OFFPAGE) is %d\n", uma_max_ipers); - printf("Calculated uma_max_ipers_slab (for OFFPAGE) is %d\n", + printf("Calculated uma_max_ipers_ref (for OFFPAGE) is %d\n", uma_max_ipers_ref); #endif From owner-svn-src-stable@FreeBSD.ORG Mon Nov 18 15:13: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 92D18BA4; Mon, 18 Nov 2013 15:13: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 824592124; Mon, 18 Nov 2013 15:13: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 rAIFDw2U047664; Mon, 18 Nov 2013 15:13:58 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAIFDwgY047663; Mon, 18 Nov 2013 15:13:58 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201311181513.rAIFDwgY047663@svn.freebsd.org> From: Dimitry Andric Date: Mon, 18 Nov 2013 15:13: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: r258306 - stable/10/sys/i386/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: Mon, 18 Nov 2013 15:13:58 -0000 Author: dim Date: Mon Nov 18 15:13:58 2013 New Revision: 258306 URL: http://svnweb.freebsd.org/changeset/base/258306 Log: MFC r258016: Disable building the ctl module for the i386 XEN kernel configuration for now, since it causes gcc warnings about casting 64 bit bus_addr_t's to 32 bit pointers, and vice versa. Reviewed by: ken Approved by: re (gjb) Modified: stable/10/sys/i386/conf/XEN Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/i386/conf/XEN ============================================================================== --- stable/10/sys/i386/conf/XEN Mon Nov 18 15:11:13 2013 (r258305) +++ stable/10/sys/i386/conf/XEN Mon Nov 18 15:13:58 2013 (r258306) @@ -7,7 +7,7 @@ cpu I686_CPU ident XEN makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions WITHOUT_MODULES="aha ahb amd cxgb dpt drm drm2 hptnr hptmv ida malo mps mwl nve rdma sound sym trm xfs" +makeoptions WITHOUT_MODULES="aha ahb amd ctl cxgb dpt drm drm2 hptnr hptmv ida malo mps mwl nve rdma sound sym trm xfs" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption From owner-svn-src-stable@FreeBSD.ORG Mon Nov 18 17:03:12 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 3633BB90; Mon, 18 Nov 2013 17:03:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 164562820; Mon, 18 Nov 2013 17:03:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAIH3Bs3092826; Mon, 18 Nov 2013 17:03:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAIH3BwC092824; Mon, 18 Nov 2013 17:03:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311181703.rAIH3BwC092824@svn.freebsd.org> From: Glen Barber Date: Mon, 18 Nov 2013 17:03:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258312 - in stable/9: release share/man/man7 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, 18 Nov 2013 17:03:12 -0000 Author: gjb Date: Mon Nov 18 17:03:11 2013 New Revision: 258312 URL: http://svnweb.freebsd.org/changeset/base/258312 Log: MFC r257805, r257806, r257807: r257805: Add a 'mini-memstick.img' release target, which will use the 'bootonly.iso' components to create a smaller memory stick image. This is useful for system recovery, where a full memstick.img image is not necessarily needed (or wanted). In addition, it is possible to do bootonly-style installation, where the base.txz, kernel.txz, etc. are fetched from a remote source. Provide backwards-compatible target (mini-memstick), to keep in sync with the targets documented in release/Makefile. r257806: Remove extra target from 'memstick' in r257805. r257807: Update release(7) to include 'mini-memstick' target. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/Makefile stable/9/share/man/man7/release.7 Directory Properties: stable/9/release/ (props changed) stable/9/share/man/man7/ (props changed) Modified: stable/9/release/Makefile ============================================================================== --- stable/9/release/Makefile Mon Nov 18 16:51:56 2013 (r258311) +++ stable/9/release/Makefile Mon Nov 18 17:03:11 2013 (r258312) @@ -5,6 +5,7 @@ # User-driven targets: # cdrom: Builds release CD-ROM media (disc1.iso) # memstick: Builds memory stick image (memstick.img) +# mini-memstick: Builds minimal memory stick image (mini-memstick.img) # ftp: Sets up FTP distribution area (ftp) # release: Build all media and FTP distribution area # install: Copies all release media into ${DESTDIR} @@ -74,7 +75,9 @@ IMAGES+= disc1.iso bootonly.iso .endif .if exists(${.CURDIR}/${TARGET}/make-memstick.sh) RELEASE_TARGETS+= memstick.img +RELEASE_TARGETS+= mini-memstick.img IMAGES+= memstick.img +IMAGES+= mini-memstick.img .endif .include @@ -181,6 +184,10 @@ memstick: memstick.img memstick.img: system sh ${.CURDIR}/${TARGET}/make-memstick.sh release ${.TARGET} +mini-memstick: mini-memstick.img +mini-memstick.img: system + sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET} + packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST touch ${.TARGET} Modified: stable/9/share/man/man7/release.7 ============================================================================== --- stable/9/share/man/man7/release.7 Mon Nov 18 16:51:56 2013 (r258311) +++ stable/9/share/man/man7/release.7 Mon Nov 18 17:03:11 2013 (r258312) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 31, 2013 +.Dd November 7, 2013 .Dt RELEASE 7 .Os .Sh NAME @@ -175,6 +175,11 @@ Not applicable on all platforms. Require .Xr md 4 (memory disk) device driver be present in the kernel (either by being compiled in or available as a module). +.It Cm mini-memstick +Similar to +.Cm memstick , +with the exception that the installation distribution sets +are not included. .It Cm ftp Creates a directory named .Pa ftp From owner-svn-src-stable@FreeBSD.ORG Mon Nov 18 17:06:34 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 992FFD52; Mon, 18 Nov 2013 17:06: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 6EDEB284B; Mon, 18 Nov 2013 17:06: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 rAIH6YEG093391; Mon, 18 Nov 2013 17:06:34 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAIH6YT6093390; Mon, 18 Nov 2013 17:06:34 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311181706.rAIH6YT6093390@svn.freebsd.org> From: Glen Barber Date: Mon, 18 Nov 2013 17:06: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: r258313 - stable/9/release X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 18 Nov 2013 17:06:34 -0000 Author: gjb Date: Mon Nov 18 17:06:33 2013 New Revision: 258313 URL: http://svnweb.freebsd.org/changeset/base/258313 Log: MFC r257942, r258101: r257942: Fix a few style nits. r258101: Since the doc/ toolchain conversion to docbook 5.0, JADETEX is no longer a valid option, so remove 'WITHOUT_JADETEX=yes' from PBUILD_FLAGS. While here, also remove 'WITHOUT_X11=yes', since it will cause a dependency conflict by requiring both print/ghostscript9 and print/ghostscript9-nox11. Switch to OPTIONSNG format (WITHOUT_* -> OPTIONS_UNSET='FOO'), and unset the FOP option, which requires Java (although it is disabled by default). Also unset the 'IGOR' option, since textproc/igor is a validation tool, not necessarily a dependency of the doc/ build itself. While here, reduce the line length of PBUILD_FLAGS. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/release.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/release.sh ============================================================================== --- stable/9/release/release.sh Mon Nov 18 17:03:11 2013 (r258312) +++ stable/9/release/release.sh Mon Nov 18 17:06:33 2013 (r258313) @@ -125,10 +125,10 @@ fi # instead of their values. DOCPORTS= if [ "x${NOPORTS}" != "x" ]; then - DOCPORTS="NOPORTS=yes " + DOCPORTS="NOPORTS=yes " fi if [ "x${NODOC}" != "x" ]; then - DOCPORTS="${DOCPORTS}NODOC=yes" + DOCPORTS="${DOCPORTS}NODOC=yes" fi # The aggregated build-time flags based upon variables defined within @@ -147,7 +147,7 @@ RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCO # Force src checkout if configured FORCE_SRC_KEY= if [ "x${SRC_FORCE_CHECKOUT}" != "x" ]; then - FORCE_SRC_KEY="--force" + FORCE_SRC_KEY="--force" fi if [ ! ${CHROOTDIR} ]; then @@ -189,7 +189,8 @@ build_doc_ports() { ## Trick the ports 'run-autotools-fixup' target to do the right thing. _OSVERSION=$(sysctl -n kern.osreldate) if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then - PBUILD_FLAGS="OSVERSION=${_OSVERSION} WITHOUT_JADETEX=yes WITHOUT_X11=yes BATCH=yes" + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS} OPTIONS_UNSET='FOP IGOR'" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ ${PBUILD_FLAGS} install clean distclean fi From owner-svn-src-stable@FreeBSD.ORG Mon Nov 18 22:37:03 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 D7C9ACBF; Mon, 18 Nov 2013 22:37:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B78002C12; Mon, 18 Nov 2013 22:37:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAIMb2ZT041819; Mon, 18 Nov 2013 22:37:02 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAIMb1om041807; Mon, 18 Nov 2013 22:37:01 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201311182237.rAIMb1om041807@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 18 Nov 2013 22:37:01 +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: r258324 - in stable/10: share/man/man4 sys/kern sys/sys usr.bin/procstat 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, 18 Nov 2013 22:37:03 -0000 Author: pjd Date: Mon Nov 18 22:37:01 2013 New Revision: 258324 URL: http://svnweb.freebsd.org/changeset/base/258324 Log: MFC r258148,r258149,r258150,r258152,r258153,r258154,r258181,r258182: r258148: Add a note that this file is compiled as part of the kernel and libc. Requested by: kib r258149: Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer to the destination cap_rights_t structure. This already matches manual page. r258150: Sync return value with actual implementation. r258151: Style. r258152: Precisely document capability rights here too (they are already documented in rights(4)). r258153: The CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT, CAP_SYMLINKAT and CAP_UNLINKAT capability rights make no sense without the CAP_LOOKUP right, so include this rights. r258154: - Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room in index 0 for the future. - Move CAP_BINDAT and CAP_CONNECTAT rights to index 0 so we can include CAP_LOOKUP right in them. - Shuffle the bits around so there are no gaps. This is last chance to do that as all moved rights are not used yet. r258181: Replace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had a very hard time to fully understand) with much more intuitive rights: CAP_EVENT - when set on descriptor, the descriptor can be monitored with syscalls like select(2), poll(2), kevent(2). CAP_KQUEUE_EVENT - When set on a kqueue descriptor, the kevent(2) syscall can be called on this kqueue to with the eventlist argument set to non-NULL value; in other words the given kqueue descriptor can be used to monitor other descriptors. CAP_KQUEUE_CHANGE - When set on a kqueue descriptor, the kevent(2) syscall can be called on this kqueue to with the changelist argument set to non-NULL value; in other words it allows to modify events monitored with the given kqueue descriptor. Add alias CAP_KQUEUE, which allows for both CAP_KQUEUE_EVENT and CAP_KQUEUE_CHANGE. Add backward compatibility define CAP_POLL_EVENT which is equal to CAP_EVENT. r258182: Correct right names. Sponsored by: The FreeBSD Foundation Approved by: re (kib) Modified: stable/10/share/man/man4/rights.4 stable/10/sys/kern/kern_event.c stable/10/sys/kern/subr_capability.c stable/10/sys/kern/sys_generic.c stable/10/sys/kern/uipc_mqueue.c stable/10/sys/sys/capability.h stable/10/usr.bin/procstat/procstat_files.c Directory Properties: stable/10/share/man/man4/ (props changed) stable/10/sys/ (props changed) stable/10/usr.bin/procstat/ (props changed) Modified: stable/10/share/man/man4/rights.4 ============================================================================== --- stable/10/share/man/man4/rights.4 Mon Nov 18 22:35:02 2013 (r258323) +++ stable/10/share/man/man4/rights.4 Mon Nov 18 22:37:01 2013 (r258324) @@ -306,7 +306,7 @@ An alias to .Dv CAP_KQUEUE_CHANGE and .Dv CAP_KQUEUE_EVENT . -.It Dv CAP_KEVENT_CHANGE +.It Dv CAP_KQUEUE_CHANGE Permit .Xr kevent 2 on a @@ -314,7 +314,7 @@ on a descriptor that modifies list of monitored events (the .Fa changelist argument is non-NULL). -.It Dv CAP_KEVENT_EVENT +.It Dv CAP_KQUEUE_EVENT Permit .Xr kevent 2 on a Modified: stable/10/sys/kern/kern_event.c ============================================================================== --- stable/10/sys/kern/kern_event.c Mon Nov 18 22:35:02 2013 (r258323) +++ stable/10/sys/kern/kern_event.c Mon Nov 18 22:37:01 2013 (r258324) @@ -835,10 +835,17 @@ kern_kevent(struct thread *td, int fd, i cap_rights_t rights; int i, n, nerrors, error; - error = fget(td, fd, cap_rights_init(&rights, CAP_POST_EVENT), &fp); + cap_rights_init(&rights); + if (nchanges > 0) + cap_rights_set(&rights, CAP_KQUEUE_CHANGE); + if (nevents > 0) + cap_rights_set(&rights, CAP_KQUEUE_EVENT); + error = fget(td, fd, &rights, &fp); if (error != 0) return (error); - if ((error = kqueue_acquire(fp, &kq)) != 0) + + error = kqueue_acquire(fp, &kq); + if (error != 0) goto done_norel; nerrors = 0; @@ -995,7 +1002,7 @@ findkn: if (fops->f_isfd) { KASSERT(td != NULL, ("td is NULL")); error = fget(td, kev->ident, - cap_rights_init(&rights, CAP_POLL_EVENT), &fp); + cap_rights_init(&rights, CAP_EVENT), &fp); if (error) goto done; @@ -2279,7 +2286,7 @@ kqfd_register(int fd, struct kevent *kev cap_rights_t rights; int error; - error = fget(td, fd, cap_rights_init(&rights, CAP_POST_EVENT), &fp); + error = fget(td, fd, cap_rights_init(&rights, CAP_KQUEUE_CHANGE), &fp); if (error != 0) return (error); if ((error = kqueue_acquire(fp, &kq)) != 0) Modified: stable/10/sys/kern/subr_capability.c ============================================================================== --- stable/10/sys/kern/subr_capability.c Mon Nov 18 22:35:02 2013 (r258323) +++ stable/10/sys/kern/subr_capability.c Mon Nov 18 22:37:01 2013 (r258324) @@ -30,6 +30,10 @@ #include __FBSDID("$FreeBSD$"); +/* + * Note that this file is compiled into the kernel and into libc. + */ + #ifdef _KERNEL #include #include @@ -164,7 +168,7 @@ __cap_rights_init(int version, cap_right return (rights); } -void +cap_rights_t * __cap_rights_set(cap_rights_t *rights, ...) { va_list ap; @@ -174,9 +178,11 @@ __cap_rights_set(cap_rights_t *rights, . va_start(ap, rights); cap_rights_vset(rights, ap); va_end(ap); + + return (rights); } -void +cap_rights_t * __cap_rights_clear(cap_rights_t *rights, ...) { va_list ap; @@ -186,6 +192,8 @@ __cap_rights_clear(cap_rights_t *rights, va_start(ap, rights); cap_rights_vclear(rights, ap); va_end(ap); + + return (rights); } bool @@ -231,7 +239,7 @@ cap_rights_is_valid(const cap_rights_t * return (true); } -void +cap_rights_t * cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src) { unsigned int i, n; @@ -250,9 +258,11 @@ cap_rights_merge(cap_rights_t *dst, cons assert(cap_rights_is_valid(src)); assert(cap_rights_is_valid(dst)); + + return (dst); } -void +cap_rights_t * cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src) { unsigned int i, n; @@ -273,6 +283,8 @@ cap_rights_remove(cap_rights_t *dst, con assert(cap_rights_is_valid(src)); assert(cap_rights_is_valid(dst)); + + return (dst); } bool Modified: stable/10/sys/kern/sys_generic.c ============================================================================== --- stable/10/sys/kern/sys_generic.c Mon Nov 18 22:35:02 2013 (r258323) +++ stable/10/sys/kern/sys_generic.c Mon Nov 18 22:37:01 2013 (r258324) @@ -1195,8 +1195,9 @@ getselfd_cap(struct filedesc *fdp, int f { cap_rights_t rights; - return (fget_unlocked(fdp, fd, cap_rights_init(&rights, CAP_POLL_EVENT), - 0, fpp, NULL)); + cap_rights_init(&rights, CAP_EVENT); + + return (fget_unlocked(fdp, fd, &rights, 0, fpp, NULL)); } /* @@ -1392,7 +1393,7 @@ pollrescan(struct thread *td) #ifdef CAPABILITIES if (fp == NULL || cap_check(cap_rights(fdp, fd->fd), - cap_rights_init(&rights, CAP_POLL_EVENT)) != 0) + cap_rights_init(&rights, CAP_EVENT)) != 0) #else if (fp == NULL) #endif @@ -1467,7 +1468,7 @@ pollscan(td, fds, nfd) #ifdef CAPABILITIES if (fp == NULL || cap_check(cap_rights(fdp, fds->fd), - cap_rights_init(&rights, CAP_POLL_EVENT)) != 0) + cap_rights_init(&rights, CAP_EVENT)) != 0) #else if (fp == NULL) #endif Modified: stable/10/sys/kern/uipc_mqueue.c ============================================================================== --- stable/10/sys/kern/uipc_mqueue.c Mon Nov 18 22:35:02 2013 (r258323) +++ stable/10/sys/kern/uipc_mqueue.c Mon Nov 18 22:37:01 2013 (r258324) @@ -2119,7 +2119,7 @@ getmq(struct thread *td, int fd, struct { cap_rights_t rights; - return _getmq(td, fd, cap_rights_init(&rights, CAP_POLL_EVENT), fget, + return _getmq(td, fd, cap_rights_init(&rights, CAP_EVENT), fget, fpp, ppn, pmq); } @@ -2282,7 +2282,7 @@ again: } #ifdef CAPABILITIES error = cap_check(cap_rights(fdp, mqd), - cap_rights_init(&rights, CAP_POLL_EVENT)); + cap_rights_init(&rights, CAP_EVENT)); if (error) { FILEDESC_SUNLOCK(fdp); goto out; Modified: stable/10/sys/sys/capability.h ============================================================================== --- stable/10/sys/sys/capability.h Mon Nov 18 22:35:02 2013 (r258323) +++ stable/10/sys/sys/capability.h Mon Nov 18 22:37:01 2013 (r258324) @@ -79,9 +79,12 @@ #define CAP_SEEK_TELL CAPRIGHT(0, 0x0000000000000004ULL) /* Allows for lseek(2). */ #define CAP_SEEK (CAP_SEEK_TELL | 0x0000000000000008ULL) -/* Allows for pread(2), preadv(2). */ +/* Allows for aio_read(2), pread(2), preadv(2). */ #define CAP_PREAD (CAP_SEEK | CAP_READ) -/* Allows for openat(O_WRONLY) (without O_APPEND), pwrite(2), pwritev(2). */ +/* + * Allows for aio_write(2), openat(O_WRONLY) (without O_APPEND), pwrite(2), + * pwritev(2). + */ #define CAP_PWRITE (CAP_SEEK | CAP_WRITE) /* Allows for mmap(PROT_NONE). */ #define CAP_MMAP CAPRIGHT(0, 0x0000000000000010ULL) @@ -103,7 +106,7 @@ #define CAP_CREATE CAPRIGHT(0, 0x0000000000000040ULL) /* Allows for openat(O_EXEC) and fexecve(2) in turn. */ #define CAP_FEXECVE CAPRIGHT(0, 0x0000000000000080ULL) -/* Allows for openat(O_SYNC), openat(O_FSYNC), fsync(2). */ +/* Allows for openat(O_SYNC), openat(O_FSYNC), fsync(2), aio_fsync(2). */ #define CAP_FSYNC CAPRIGHT(0, 0x0000000000000100ULL) /* Allows for openat(O_TRUNC), ftruncate(2). */ #define CAP_FTRUNCATE CAPRIGHT(0, 0x0000000000000200ULL) @@ -112,55 +115,87 @@ #define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL) /* VFS methods. */ +/* Allows for fchdir(2). */ #define CAP_FCHDIR CAPRIGHT(0, 0x0000000000000800ULL) +/* Allows for fchflags(2). */ #define CAP_FCHFLAGS CAPRIGHT(0, 0x0000000000001000ULL) +/* Allows for fchflags(2) and chflagsat(2). */ #define CAP_CHFLAGSAT (CAP_FCHFLAGS | CAP_LOOKUP) +/* Allows for fchmod(2). */ #define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL) +/* Allows for fchmod(2) and fchmodat(2). */ #define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP) +/* Allows for fchown(2). */ #define CAP_FCHOWN CAPRIGHT(0, 0x0000000000004000ULL) +/* Allows for fchown(2) and fchownat(2). */ #define CAP_FCHOWNAT (CAP_FCHOWN | CAP_LOOKUP) +/* Allows for fcntl(2). */ #define CAP_FCNTL CAPRIGHT(0, 0x0000000000008000ULL) +/* + * Allows for flock(2), openat(O_SHLOCK), openat(O_EXLOCK), + * fcntl(F_SETLK_REMOTE), fcntl(F_SETLKW), fcntl(F_SETLK), fcntl(F_GETLK). + */ #define CAP_FLOCK CAPRIGHT(0, 0x0000000000010000ULL) +/* Allows for fpathconf(2). */ #define CAP_FPATHCONF CAPRIGHT(0, 0x0000000000020000ULL) +/* Allows for UFS background-fsck operations. */ #define CAP_FSCK CAPRIGHT(0, 0x0000000000040000ULL) +/* Allows for fstat(2). */ #define CAP_FSTAT CAPRIGHT(0, 0x0000000000080000ULL) +/* Allows for fstat(2), fstatat(2) and faccessat(2). */ #define CAP_FSTATAT (CAP_FSTAT | CAP_LOOKUP) +/* Allows for fstatfs(2). */ #define CAP_FSTATFS CAPRIGHT(0, 0x0000000000100000ULL) +/* Allows for futimes(2). */ #define CAP_FUTIMES CAPRIGHT(0, 0x0000000000200000ULL) +/* Allows for futimes(2) and futimesat(2). */ #define CAP_FUTIMESAT (CAP_FUTIMES | CAP_LOOKUP) -#define CAP_LINKAT CAPRIGHT(0, 0x0000000000400000ULL) -#define CAP_MKDIRAT CAPRIGHT(0, 0x0000000000800000ULL) -#define CAP_MKFIFOAT CAPRIGHT(0, 0x0000000001000000ULL) -#define CAP_MKNODAT CAPRIGHT(0, 0x0000000002000000ULL) -#define CAP_RENAMEAT CAPRIGHT(0, 0x0000000004000000ULL) -#define CAP_SYMLINKAT CAPRIGHT(0, 0x0000000008000000ULL) -#define CAP_UNLINKAT CAPRIGHT(0, 0x0000000010000000ULL) - -/* Extended attributes. */ -#define CAP_EXTATTR_DELETE CAPRIGHT(0, 0x0000000020000000ULL) -#define CAP_EXTATTR_GET CAPRIGHT(0, 0x0000000040000000ULL) -#define CAP_EXTATTR_LIST CAPRIGHT(0, 0x0000000080000000ULL) -#define CAP_EXTATTR_SET CAPRIGHT(0, 0x0000000100000000ULL) - -/* Access Control Lists. */ -#define CAP_ACL_CHECK CAPRIGHT(0, 0x0000000200000000ULL) -#define CAP_ACL_DELETE CAPRIGHT(0, 0x0000000400000000ULL) -#define CAP_ACL_GET CAPRIGHT(0, 0x0000000800000000ULL) -#define CAP_ACL_SET CAPRIGHT(0, 0x0000001000000000ULL) +/* Allows for linkat(2) and renameat(2) (destination directory descriptor). */ +#define CAP_LINKAT (CAP_LOOKUP | 0x0000000000400000ULL) +/* Allows for mkdirat(2). */ +#define CAP_MKDIRAT (CAP_LOOKUP | 0x0000000000800000ULL) +/* Allows for mkfifoat(2). */ +#define CAP_MKFIFOAT (CAP_LOOKUP | 0x0000000001000000ULL) +/* Allows for mknodat(2). */ +#define CAP_MKNODAT (CAP_LOOKUP | 0x0000000002000000ULL) +/* Allows for renameat(2). */ +#define CAP_RENAMEAT (CAP_LOOKUP | 0x0000000004000000ULL) +/* Allows for symlinkat(2). */ +#define CAP_SYMLINKAT (CAP_LOOKUP | 0x0000000008000000ULL) +/* + * Allows for unlinkat(2) and renameat(2) if destination object exists and + * will be removed. + */ +#define CAP_UNLINKAT (CAP_LOOKUP | 0x0000000010000000ULL) /* Socket operations. */ -#define CAP_ACCEPT CAPRIGHT(0, 0x0000002000000000ULL) -#define CAP_BIND CAPRIGHT(0, 0x0000004000000000ULL) -#define CAP_CONNECT CAPRIGHT(0, 0x0000008000000000ULL) -#define CAP_GETPEERNAME CAPRIGHT(0, 0x0000010000000000ULL) -#define CAP_GETSOCKNAME CAPRIGHT(0, 0x0000020000000000ULL) -#define CAP_GETSOCKOPT CAPRIGHT(0, 0x0000040000000000ULL) -#define CAP_LISTEN CAPRIGHT(0, 0x0000080000000000ULL) -#define CAP_PEELOFF CAPRIGHT(0, 0x0000100000000000ULL) +/* Allows for accept(2) and accept4(2). */ +#define CAP_ACCEPT CAPRIGHT(0, 0x0000000020000000ULL) +/* Allows for bind(2). */ +#define CAP_BIND CAPRIGHT(0, 0x0000000040000000ULL) +/* Allows for connect(2). */ +#define CAP_CONNECT CAPRIGHT(0, 0x0000000080000000ULL) +/* Allows for getpeername(2). */ +#define CAP_GETPEERNAME CAPRIGHT(0, 0x0000000100000000ULL) +/* Allows for getsockname(2). */ +#define CAP_GETSOCKNAME CAPRIGHT(0, 0x0000000200000000ULL) +/* Allows for getsockopt(2). */ +#define CAP_GETSOCKOPT CAPRIGHT(0, 0x0000000400000000ULL) +/* Allows for listen(2). */ +#define CAP_LISTEN CAPRIGHT(0, 0x0000000800000000ULL) +/* Allows for sctp_peeloff(2). */ +#define CAP_PEELOFF CAPRIGHT(0, 0x0000001000000000ULL) #define CAP_RECV CAP_READ #define CAP_SEND CAP_WRITE -#define CAP_SETSOCKOPT CAPRIGHT(0, 0x0000200000000000ULL) -#define CAP_SHUTDOWN CAPRIGHT(0, 0x0000400000000000ULL) +/* Allows for setsockopt(2). */ +#define CAP_SETSOCKOPT CAPRIGHT(0, 0x0000002000000000ULL) +/* Allows for shutdown(2). */ +#define CAP_SHUTDOWN CAPRIGHT(0, 0x0000004000000000ULL) + +/* Allows for bindat(2) on a directory descriptor. */ +#define CAP_BINDAT (CAP_LOOKUP | 0x0000008000000000ULL) +/* Allows for connectat(2) on a directory descriptor. */ +#define CAP_CONNECTAT (CAP_LOOKUP | 0x0000010000000000ULL) #define CAP_SOCK_CLIENT \ (CAP_CONNECT | CAP_GETPEERNAME | CAP_GETSOCKNAME | CAP_GETSOCKOPT | \ @@ -171,17 +206,19 @@ CAP_SETSOCKOPT | CAP_SHUTDOWN) /* All used bits for index 0. */ -#define CAP_ALL0 CAPRIGHT(0, 0x00007FFFFFFFFFFFULL) +#define CAP_ALL0 CAPRIGHT(0, 0x0000007FFFFFFFFFULL) /* Available bits for index 0. */ -#define CAP_UNUSED0_48 CAPRIGHT(0, 0x0000800000000000ULL) +#define CAP_UNUSED0_40 CAPRIGHT(0, 0x0000008000000000ULL) /* ... */ #define CAP_UNUSED0_57 CAPRIGHT(0, 0x0100000000000000ULL) /* INDEX 1 */ /* Mandatory Access Control. */ +/* Allows for mac_get_fd(3). */ #define CAP_MAC_GET CAPRIGHT(1, 0x0000000000000001ULL) +/* Allows for mac_set_fd(3). */ #define CAP_MAC_SET CAPRIGHT(1, 0x0000000000000002ULL) /* Methods on semaphores. */ @@ -189,34 +226,60 @@ #define CAP_SEM_POST CAPRIGHT(1, 0x0000000000000008ULL) #define CAP_SEM_WAIT CAPRIGHT(1, 0x0000000000000010ULL) -/* kqueue events. */ -#define CAP_POLL_EVENT CAPRIGHT(1, 0x0000000000000020ULL) -#define CAP_POST_EVENT CAPRIGHT(1, 0x0000000000000040ULL) +/* Allows select(2) and poll(2) on descriptor. */ +#define CAP_EVENT CAPRIGHT(1, 0x0000000000000020ULL) +/* Allows for kevent(2) on kqueue descriptor with eventlist != NULL. */ +#define CAP_KQUEUE_EVENT CAPRIGHT(1, 0x0000000000000040ULL) /* Strange and powerful rights that should not be given lightly. */ +/* Allows for ioctl(2). */ #define CAP_IOCTL CAPRIGHT(1, 0x0000000000000080ULL) #define CAP_TTYHOOK CAPRIGHT(1, 0x0000000000000100ULL) /* Process management via process descriptors. */ +/* Allows for pdgetpid(2). */ #define CAP_PDGETPID CAPRIGHT(1, 0x0000000000000200ULL) +/* Allows for pdwait4(2). */ #define CAP_PDWAIT CAPRIGHT(1, 0x0000000000000400ULL) +/* Allows for pdkill(2). */ #define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL) -/* - * Rights that allow to use bindat(2) and connectat(2) syscalls on a - * directory descriptor. - */ -#define CAP_BINDAT CAPRIGHT(1, 0x0000000000001000ULL) -#define CAP_CONNECTAT CAPRIGHT(1, 0x0000000000002000ULL) +/* Extended attributes. */ +/* Allows for extattr_delete_fd(2). */ +#define CAP_EXTATTR_DELETE CAPRIGHT(1, 0x0000000000001000ULL) +/* Allows for extattr_get_fd(2). */ +#define CAP_EXTATTR_GET CAPRIGHT(1, 0x0000000000002000ULL) +/* Allows for extattr_list_fd(2). */ +#define CAP_EXTATTR_LIST CAPRIGHT(1, 0x0000000000004000ULL) +/* Allows for extattr_set_fd(2). */ +#define CAP_EXTATTR_SET CAPRIGHT(1, 0x0000000000008000ULL) + +/* Access Control Lists. */ +/* Allows for acl_valid_fd_np(3). */ +#define CAP_ACL_CHECK CAPRIGHT(1, 0x0000000000010000ULL) +/* Allows for acl_delete_fd_np(3). */ +#define CAP_ACL_DELETE CAPRIGHT(1, 0x0000000000020000ULL) +/* Allows for acl_get_fd(3) and acl_get_fd_np(3). */ +#define CAP_ACL_GET CAPRIGHT(1, 0x0000000000040000ULL) +/* Allows for acl_set_fd(3) and acl_set_fd_np(3). */ +#define CAP_ACL_SET CAPRIGHT(1, 0x0000000000080000ULL) + +/* Allows for kevent(2) on kqueue descriptor with changelist != NULL. */ +#define CAP_KQUEUE_CHANGE CAPRIGHT(1, 0x0000000000100000ULL) + +#define CAP_KQUEUE (CAP_KQUEUE_EVENT | CAP_KQUEUE_CHANGE) /* All used bits for index 1. */ -#define CAP_ALL1 CAPRIGHT(1, 0x0000000000003FFFULL) +#define CAP_ALL1 CAPRIGHT(1, 0x00000000001FFFFFULL) /* Available bits for index 1. */ -#define CAP_UNUSED1_15 CAPRIGHT(1, 0x0000000000004000ULL) +#define CAP_UNUSED1_22 CAPRIGHT(1, 0x0000000000200000ULL) /* ... */ #define CAP_UNUSED1_57 CAPRIGHT(1, 0x0100000000000000ULL) +/* Backward compatibility. */ +#define CAP_POLL_EVENT CAP_EVENT + #define CAP_ALL(rights) do { \ (rights)->cr_rights[0] = \ ((uint64_t)CAP_RIGHTS_VERSION << 62) | CAP_ALL0; \ @@ -258,19 +321,19 @@ cap_rights_t *__cap_rights_init(int vers #define cap_rights_set(rights, ...) \ __cap_rights_set((rights), __VA_ARGS__, 0ULL) -void __cap_rights_set(cap_rights_t *rights, ...); +cap_rights_t *__cap_rights_set(cap_rights_t *rights, ...); #define cap_rights_clear(rights, ...) \ __cap_rights_clear((rights), __VA_ARGS__, 0ULL) -void __cap_rights_clear(cap_rights_t *rights, ...); +cap_rights_t *__cap_rights_clear(cap_rights_t *rights, ...); #define cap_rights_is_set(rights, ...) \ __cap_rights_is_set((rights), __VA_ARGS__, 0ULL) bool __cap_rights_is_set(const cap_rights_t *rights, ...); bool cap_rights_is_valid(const cap_rights_t *rights); -void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); -void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); +cap_rights_t *cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); +cap_rights_t *cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); #ifdef _KERNEL Modified: stable/10/usr.bin/procstat/procstat_files.c ============================================================================== --- stable/10/usr.bin/procstat/procstat_files.c Mon Nov 18 22:35:02 2013 (r258323) +++ stable/10/usr.bin/procstat/procstat_files.c Mon Nov 18 22:37:01 2013 (r258324) @@ -203,8 +203,9 @@ static struct cap_desc { { CAP_SEM_WAIT, "sw" }, /* Event monitoring and posting. */ - { CAP_POLL_EVENT, "po" }, - { CAP_POST_EVENT, "ev" }, + { CAP_EVENT, "ev" }, + { CAP_KQUEUE_EVENT, "ke" }, + { CAP_KQUEUE_CHANGE, "kc" }, /* Strange and powerful rights that should not be given lightly. */ { CAP_IOCTL, "io" }, From owner-svn-src-stable@FreeBSD.ORG Tue Nov 19 09:35:20 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 C9EA6C8C; Tue, 19 Nov 2013 09:35:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B842D206D; Tue, 19 Nov 2013 09:35: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 rAJ9ZKeg037826; Tue, 19 Nov 2013 09:35:20 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAJ9ZKgJ037825; Tue, 19 Nov 2013 09:35:20 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201311190935.rAJ9ZKgJ037825@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 19 Nov 2013 09:35:20 +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: r258335 - stable/10/crypto/openssh 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, 19 Nov 2013 09:35:20 -0000 Author: des Date: Tue Nov 19 09:35:20 2013 New Revision: 258335 URL: http://svnweb.freebsd.org/changeset/base/258335 Log: Pre-zero the MAC context. Security: CVE-2013-4548 Security: FreeBSD-SA-13:14.openssh Approved by: re (implicit) Modified: stable/10/crypto/openssh/monitor_wrap.c Modified: stable/10/crypto/openssh/monitor_wrap.c ============================================================================== --- stable/10/crypto/openssh/monitor_wrap.c Tue Nov 19 01:07:25 2013 (r258334) +++ stable/10/crypto/openssh/monitor_wrap.c Tue Nov 19 09:35:20 2013 (r258335) @@ -482,7 +482,7 @@ mm_newkeys_from_blob(u_char *blob, int b buffer_init(&b); buffer_append(&b, blob, blen); - newkey = xmalloc(sizeof(*newkey)); + newkey = xcalloc(1, sizeof(*newkey)); enc = &newkey->enc; mac = &newkey->mac; comp = &newkey->comp; From owner-svn-src-stable@FreeBSD.ORG Tue Nov 19 10:39:48 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 CABEA979; Tue, 19 Nov 2013 10:39: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 B8E2D2612; Tue, 19 Nov 2013 10:39: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 rAJAdmdS059255; Tue, 19 Nov 2013 10:39:48 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAJAdmEn059252; Tue, 19 Nov 2013 10:39:48 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311191039.rAJAdmEn059252@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 19 Nov 2013 10:39: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: r258339 - in stable/10: . lib/libc/sys 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, 19 Nov 2013 10:39:48 -0000 Author: pluknet Date: Tue Nov 19 10:39:48 2013 New Revision: 258339 URL: http://svnweb.freebsd.org/changeset/base/258339 Log: MFC r257874: Fix extattr(2) MLINKS. Approved by: re (kib) Modified: stable/10/ObsoleteFiles.inc (contents, props changed) stable/10/lib/libc/sys/Makefile.inc Directory Properties: stable/10/lib/libc/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Tue Nov 19 10:17:10 2013 (r258338) +++ stable/10/ObsoleteFiles.inc Tue Nov 19 10:39:48 2013 (r258339) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20131109: extattr(2) mlinks fixed +OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz +OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz # 20131103: WITH_LIBICONV_COMPAT removal OLD_FILES+=usr/include/_libiconv_compat.h OLD_FILES+=usr/lib/libiconv.a Modified: stable/10/lib/libc/sys/Makefile.inc ============================================================================== --- stable/10/lib/libc/sys/Makefile.inc Tue Nov 19 10:17:10 2013 (r258338) +++ stable/10/lib/libc/sys/Makefile.inc Tue Nov 19 10:39:48 2013 (r258339) @@ -300,9 +300,9 @@ MLINKS+=execve.2 fexecve.2 MLINKS+=extattr_get_file.2 extattr.2 \ extattr_get_file.2 extattr_delete_fd.2 \ extattr_get_file.2 extattr_delete_file.2 \ - extattr_get_file.2 extattr_delete_list.2 \ + extattr_get_file.2 extattr_delete_link.2 \ extattr_get_file.2 extattr_get_fd.2 \ - extattr_get_file.2 extattr_get_list.2 \ + extattr_get_file.2 extattr_get_link.2 \ extattr_get_file.2 extattr_list_fd.2 \ extattr_get_file.2 extattr_list_file.2 \ extattr_get_file.2 extattr_list_link.2 \ From owner-svn-src-stable@FreeBSD.ORG Tue Nov 19 11:11:52 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 3A12943E; Tue, 19 Nov 2013 11:11: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 28D45280F; Tue, 19 Nov 2013 11:11: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 rAJBBp8B072050; Tue, 19 Nov 2013 11:11:51 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAJBBpRH072047; Tue, 19 Nov 2013 11:11:51 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201311191111.rAJBBpRH072047@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 19 Nov 2013 11:11:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258341 - in stable/9: . lib/libc/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-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, 19 Nov 2013 11:11:52 -0000 Author: pluknet Date: Tue Nov 19 11:11:51 2013 New Revision: 258341 URL: http://svnweb.freebsd.org/changeset/base/258341 Log: MFC r257874: Fix extattr(2) MLINKS. Modified: stable/9/ObsoleteFiles.inc (contents, props changed) stable/9/lib/libc/sys/Makefile.inc Directory Properties: stable/9/lib/libc/ (props changed) stable/9/lib/libc/sys/ (props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Tue Nov 19 10:51:46 2013 (r258340) +++ stable/9/ObsoleteFiles.inc Tue Nov 19 11:11:51 2013 (r258341) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20131109: extattr(2) mlinks fixed +OLD_FILES+=usr/share/man/man2/extattr_delete_list.2.gz +OLD_FILES+=usr/share/man/man2/extattr_get_list.2.gz # 20130704: new clang import which bumps version from 3.2 to 3.3. OLD_FILES+=usr/include/clang/3.2/__wmmintrin_aes.h OLD_FILES+=usr/include/clang/3.2/__wmmintrin_pclmul.h Modified: stable/9/lib/libc/sys/Makefile.inc ============================================================================== --- stable/9/lib/libc/sys/Makefile.inc Tue Nov 19 10:51:46 2013 (r258340) +++ stable/9/lib/libc/sys/Makefile.inc Tue Nov 19 11:11:51 2013 (r258341) @@ -137,9 +137,9 @@ MLINKS+=execve.2 fexecve.2 MLINKS+=extattr_get_file.2 extattr.2 \ extattr_get_file.2 extattr_delete_fd.2 \ extattr_get_file.2 extattr_delete_file.2 \ - extattr_get_file.2 extattr_delete_list.2 \ + extattr_get_file.2 extattr_delete_link.2 \ extattr_get_file.2 extattr_get_fd.2 \ - extattr_get_file.2 extattr_get_list.2 \ + extattr_get_file.2 extattr_get_link.2 \ extattr_get_file.2 extattr_list_fd.2 \ extattr_get_file.2 extattr_list_file.2 \ extattr_get_file.2 extattr_list_link.2 \ From owner-svn-src-stable@FreeBSD.ORG Tue Nov 19 11:47:36 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 0D2ADF55; Tue, 19 Nov 2013 11:47: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 EEDE12A1E; Tue, 19 Nov 2013 11:47: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 rAJBlZFj083291; Tue, 19 Nov 2013 11:47:35 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAJBlUZN083259; Tue, 19 Nov 2013 11:47:30 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201311191147.rAJBlUZN083259@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 19 Nov 2013 11:47: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: r258343 - in stable/10/crypto/openssh: . contrib/caldera contrib/redhat contrib/suse 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, 19 Nov 2013 11:47:36 -0000 Author: des Date: Tue Nov 19 11:47:30 2013 New Revision: 258343 URL: http://svnweb.freebsd.org/changeset/base/258343 Log: MFH (r257954): upgrade to OpenSSH 6.4p1 Approved by: re (kib) Modified: stable/10/crypto/openssh/ChangeLog stable/10/crypto/openssh/README stable/10/crypto/openssh/auth-options.c stable/10/crypto/openssh/auth2-chall.c stable/10/crypto/openssh/authfd.c stable/10/crypto/openssh/channels.c stable/10/crypto/openssh/cipher-3des1.c stable/10/crypto/openssh/clientloop.c stable/10/crypto/openssh/contrib/caldera/openssh.spec stable/10/crypto/openssh/contrib/redhat/openssh.spec stable/10/crypto/openssh/contrib/suse/openssh.spec stable/10/crypto/openssh/gss-genr.c stable/10/crypto/openssh/monitor_mm.c stable/10/crypto/openssh/monitor_wrap.c stable/10/crypto/openssh/packet.c stable/10/crypto/openssh/schnorr.c stable/10/crypto/openssh/sftp-client.c stable/10/crypto/openssh/sftp-glob.c stable/10/crypto/openssh/sftp-server.0 stable/10/crypto/openssh/sftp.0 stable/10/crypto/openssh/ssh_config stable/10/crypto/openssh/ssh_config.5 stable/10/crypto/openssh/sshd_config stable/10/crypto/openssh/sshd_config.5 stable/10/crypto/openssh/umac.c stable/10/crypto/openssh/version.h Directory Properties: stable/10/crypto/openssh/ (props changed) Modified: stable/10/crypto/openssh/ChangeLog ============================================================================== --- stable/10/crypto/openssh/ChangeLog Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/ChangeLog Tue Nov 19 11:47:30 2013 (r258343) @@ -1,3 +1,20 @@ +20131108 + - (djm) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2013/11/06 16:52:11 + [monitor_wrap.c] + fix rekeying for AES-GCM modes; ok deraadt + - djm@cvs.openbsd.org 2013/11/08 00:39:15 + [auth-options.c auth2-chall.c authfd.c channels.c cipher-3des1.c] + [clientloop.c gss-genr.c monitor_mm.c packet.c schnorr.c umac.c] + [sftp-client.c sftp-glob.c] + use calloc for all structure allocations; from markus@ + - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec] + [contrib/suse/openssh.spec] update version numbers + - djm@cvs.openbsd.org 2013/11/08 01:38:11 + [version.h] + openssh-6.4 + - (djm) Release 6.4p1 + 20130913 - (djm) [channels.c] Fix unaligned access on sparc machines in SOCKS5 code; ok dtucker@ Modified: stable/10/crypto/openssh/README ============================================================================== --- stable/10/crypto/openssh/README Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/README Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -See http://www.openssh.com/txt/release-6.3 for the release notes. +See http://www.openssh.com/txt/release-6.4 for the release notes. - A Japanese translation of this document and of the OpenSSH FAQ is - available at http://www.unixuser.org/~haruyama/security/openssh/index.html @@ -62,4 +62,4 @@ References - [6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 [7] http://www.openssh.com/faq.html -$Id: README,v 1.83 2013/07/25 02:34:00 djm Exp $ +$Id: README,v 1.83.4.1 2013/11/08 01:36:17 djm Exp $ Modified: stable/10/crypto/openssh/auth-options.c ============================================================================== --- stable/10/crypto/openssh/auth-options.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/auth-options.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth-options.c,v 1.59 2013/07/12 00:19:58 djm Exp $ */ +/* $OpenBSD: auth-options.c,v 1.61 2013/11/08 00:39:14 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -239,7 +239,7 @@ auth_parse_options(struct passwd *pw, ch auth_debug_add("Adding to environment: %.900s", s); debug("Adding to environment: %.900s", s); opts++; - new_envstring = xmalloc(sizeof(struct envstring)); + new_envstring = xcalloc(1, sizeof(struct envstring)); new_envstring->s = s; new_envstring->next = custom_environment; custom_environment = new_envstring; Modified: stable/10/crypto/openssh/auth2-chall.c ============================================================================== --- stable/10/crypto/openssh/auth2-chall.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/auth2-chall.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.38 2013/05/17 00:13:13 djm Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.39 2013/11/08 00:39:14 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -111,7 +111,7 @@ kbdint_alloc(const char *devs) remove_kbdint_device("pam"); #endif - kbdintctxt = xmalloc(sizeof(KbdintAuthctxt)); + kbdintctxt = xcalloc(1, sizeof(KbdintAuthctxt)); if (strcmp(devs, "") == 0) { buffer_init(&b); for (i = 0; devices[i]; i++) { Modified: stable/10/crypto/openssh/authfd.c ============================================================================== --- stable/10/crypto/openssh/authfd.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/authfd.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: authfd.c,v 1.87 2013/05/17 00:13:13 djm Exp $ */ +/* $OpenBSD: authfd.c,v 1.88 2013/11/08 00:39:14 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -206,7 +206,7 @@ ssh_get_authentication_connection(void) if (sock < 0) return NULL; - auth = xmalloc(sizeof(*auth)); + auth = xcalloc(1, sizeof(*auth)); auth->fd = sock; buffer_init(&auth->identities); auth->howmany = 0; Modified: stable/10/crypto/openssh/channels.c ============================================================================== --- stable/10/crypto/openssh/channels.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/channels.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.c,v 1.324 2013/07/12 00:19:58 djm Exp $ */ +/* $OpenBSD: channels.c,v 1.327 2013/11/08 00:39:15 djm Exp $ */ /* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -711,7 +711,7 @@ channel_register_status_confirm(int id, if ((c = channel_lookup(id)) == NULL) fatal("channel_register_expect: %d: bad id", id); - cc = xmalloc(sizeof(*cc)); + cc = xcalloc(1, sizeof(*cc)); cc->cb = cb; cc->abandon_cb = abandon_cb; cc->ctx = ctx; Modified: stable/10/crypto/openssh/cipher-3des1.c ============================================================================== --- stable/10/crypto/openssh/cipher-3des1.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/cipher-3des1.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher-3des1.c,v 1.8 2013/05/17 00:13:13 djm Exp $ */ +/* $OpenBSD: cipher-3des1.c,v 1.9 2013/11/08 00:39:15 djm Exp $ */ /* * Copyright (c) 2003 Markus Friedl. All rights reserved. * @@ -67,7 +67,7 @@ ssh1_3des_init(EVP_CIPHER_CTX *ctx, cons u_char *k1, *k2, *k3; if ((c = EVP_CIPHER_CTX_get_app_data(ctx)) == NULL) { - c = xmalloc(sizeof(*c)); + c = xcalloc(1, sizeof(*c)); EVP_CIPHER_CTX_set_app_data(ctx, c); } if (key == NULL) Modified: stable/10/crypto/openssh/clientloop.c ============================================================================== --- stable/10/crypto/openssh/clientloop.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/clientloop.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.253 2013/06/07 15:37:52 dtucker Exp $ */ +/* $OpenBSD: clientloop.c,v 1.255 2013/11/08 00:39:15 djm Exp $ */ /* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -838,7 +838,7 @@ void client_expect_confirm(int id, const char *request, enum confirm_action action) { - struct channel_reply_ctx *cr = xmalloc(sizeof(*cr)); + struct channel_reply_ctx *cr = xcalloc(1, sizeof(*cr)); cr->request_type = request; cr->action = action; @@ -861,7 +861,7 @@ client_register_global_confirm(global_co return; } - gc = xmalloc(sizeof(*gc)); + gc = xcalloc(1, sizeof(*gc)); gc->cb = cb; gc->ctx = ctx; gc->ref_count = 1; @@ -1439,7 +1439,7 @@ client_new_escape_filter_ctx(int escape_ { struct escape_filter_ctx *ret; - ret = xmalloc(sizeof(*ret)); + ret = xcalloc(1, sizeof(*ret)); ret->escape_pending = 0; ret->escape_char = escape_char; return (void *)ret; Modified: stable/10/crypto/openssh/contrib/caldera/openssh.spec ============================================================================== --- stable/10/crypto/openssh/contrib/caldera/openssh.spec Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/contrib/caldera/openssh.spec Tue Nov 19 11:47:30 2013 (r258343) @@ -16,7 +16,7 @@ #old cvs stuff. please update before use. may be deprecated. %define use_stable 1 -%define version 6.3p1 +%define version 6.4p1 %if %{use_stable} %define cvs %{nil} %define release 1 @@ -363,4 +363,4 @@ fi * Mon Jan 01 1998 ... Template Version: 1.31 -$Id: openssh.spec,v 1.80 2013/07/25 02:34:00 djm Exp $ +$Id: openssh.spec,v 1.80.4.1 2013/11/08 01:36:19 djm Exp $ Modified: stable/10/crypto/openssh/contrib/redhat/openssh.spec ============================================================================== --- stable/10/crypto/openssh/contrib/redhat/openssh.spec Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/contrib/redhat/openssh.spec Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -%define ver 6.3p1 +%define ver 6.4p1 %define rel 1 # OpenSSH privilege separation requires a user & group ID Modified: stable/10/crypto/openssh/contrib/suse/openssh.spec ============================================================================== --- stable/10/crypto/openssh/contrib/suse/openssh.spec Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/contrib/suse/openssh.spec Tue Nov 19 11:47:30 2013 (r258343) @@ -13,7 +13,7 @@ Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation Name: openssh -Version: 6.3p1 +Version: 6.4p1 URL: http://www.openssh.com/ Release: 1 Source0: openssh-%{version}.tar.gz Modified: stable/10/crypto/openssh/gss-genr.c ============================================================================== --- stable/10/crypto/openssh/gss-genr.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/gss-genr.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: gss-genr.c,v 1.21 2013/05/17 00:13:13 djm Exp $ */ +/* $OpenBSD: gss-genr.c,v 1.22 2013/11/08 00:39:15 djm Exp $ */ /* * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved. @@ -62,7 +62,7 @@ ssh_gssapi_set_oid_data(Gssctxt *ctx, vo free(ctx->oid->elements); free(ctx->oid); } - ctx->oid = xmalloc(sizeof(gss_OID_desc)); + ctx->oid = xcalloc(1, sizeof(gss_OID_desc)); ctx->oid->length = len; ctx->oid->elements = xmalloc(len); memcpy(ctx->oid->elements, data, len); Modified: stable/10/crypto/openssh/monitor_mm.c ============================================================================== --- stable/10/crypto/openssh/monitor_mm.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/monitor_mm.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_mm.c,v 1.17 2013/05/17 00:13:13 djm Exp $ */ +/* $OpenBSD: monitor_mm.c,v 1.18 2013/11/08 00:39:15 djm Exp $ */ /* * Copyright 2002 Niels Provos * All rights reserved. @@ -65,7 +65,7 @@ mm_make_entry(struct mm_master *mm, stru struct mm_share *tmp, *tmp2; if (mm->mmalloc == NULL) - tmp = xmalloc(sizeof(struct mm_share)); + tmp = xcalloc(1, sizeof(struct mm_share)); else tmp = mm_xmalloc(mm->mmalloc, sizeof(struct mm_share)); tmp->address = address; @@ -88,7 +88,7 @@ mm_create(struct mm_master *mmalloc, siz struct mm_master *mm; if (mmalloc == NULL) - mm = xmalloc(sizeof(struct mm_master)); + mm = xcalloc(1, sizeof(struct mm_master)); else mm = mm_xmalloc(mmalloc, sizeof(struct mm_master)); @@ -161,6 +161,7 @@ mm_xmalloc(struct mm_master *mm, size_t address = mm_malloc(mm, size); if (address == NULL) fatal("%s: mm_malloc(%lu)", __func__, (u_long)size); + memset(address, 0, size); return (address); } Modified: stable/10/crypto/openssh/monitor_wrap.c ============================================================================== --- stable/10/crypto/openssh/monitor_wrap.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/monitor_wrap.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.76 2013/05/17 00:13:13 djm Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.77 2013/11/06 16:52:11 markus Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl Modified: stable/10/crypto/openssh/packet.c ============================================================================== --- stable/10/crypto/openssh/packet.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/packet.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.188 2013/07/12 00:19:58 djm Exp $ */ +/* $OpenBSD: packet.c,v 1.189 2013/11/08 00:39:15 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -999,7 +999,7 @@ packet_send2(void) (type == SSH2_MSG_SERVICE_REQUEST) || (type == SSH2_MSG_SERVICE_ACCEPT)) { debug("enqueue packet: %u", type); - p = xmalloc(sizeof(*p)); + p = xcalloc(1, sizeof(*p)); p->type = type; memcpy(&p->payload, &active_state->outgoing_packet, sizeof(Buffer)); Modified: stable/10/crypto/openssh/schnorr.c ============================================================================== --- stable/10/crypto/openssh/schnorr.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/schnorr.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: schnorr.c,v 1.7 2013/05/17 00:13:14 djm Exp $ */ +/* $OpenBSD: schnorr.c,v 1.8 2013/11/08 00:39:15 djm Exp $ */ /* $FreeBSD$ */ /* * Copyright (c) 2008 Damien Miller. All rights reserved. @@ -552,7 +552,7 @@ modp_group_from_g_and_safe_p(const char { struct modp_group *ret; - ret = xmalloc(sizeof(*ret)); + ret = xcalloc(1, sizeof(*ret)); ret->p = ret->q = ret->g = NULL; if (BN_hex2bn(&ret->p, grp_p) == 0 || BN_hex2bn(&ret->g, grp_g) == 0) Modified: stable/10/crypto/openssh/sftp-client.c ============================================================================== --- stable/10/crypto/openssh/sftp-client.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/sftp-client.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.c,v 1.101 2013/07/25 00:56:51 djm Exp $ */ +/* $OpenBSD: sftp-client.c,v 1.108 2013/11/08 00:39:15 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -471,7 +471,7 @@ do_lsreaddir(struct sftp_conn *conn, cha if (dir) { ents = 0; - *dir = xmalloc(sizeof(**dir)); + *dir = xcalloc(1, sizeof(**dir)); (*dir)[0] = NULL; } @@ -545,7 +545,7 @@ do_lsreaddir(struct sftp_conn *conn, cha if (dir) { *dir = xrealloc(*dir, ents + 2, sizeof(**dir)); - (*dir)[ents] = xmalloc(sizeof(***dir)); + (*dir)[ents] = xcalloc(1, sizeof(***dir)); (*dir)[ents]->filename = xstrdup(filename); (*dir)[ents]->longname = xstrdup(longname); memcpy(&(*dir)[ents]->a, a, sizeof(*a)); @@ -564,7 +564,7 @@ do_lsreaddir(struct sftp_conn *conn, cha /* Don't return partial matches on interrupt */ if (interrupted && dir != NULL && *dir != NULL) { free_sftp_dirents(*dir); - *dir = xmalloc(sizeof(**dir)); + *dir = xcalloc(1, sizeof(**dir)); **dir = NULL; } @@ -1105,7 +1105,7 @@ do_download(struct sftp_conn *conn, char (unsigned long long)offset, (unsigned long long)offset + buflen - 1, num_req, max_req); - req = xmalloc(sizeof(*req)); + req = xcalloc(1, sizeof(*req)); req->id = conn->msg_id++; req->len = buflen; req->offset = offset; @@ -1463,7 +1463,7 @@ do_upload(struct sftp_conn *conn, char * strerror(errno)); if (len != 0) { - ack = xmalloc(sizeof(*ack)); + ack = xcalloc(1, sizeof(*ack)); ack->id = ++id; ack->offset = offset; ack->len = len; Modified: stable/10/crypto/openssh/sftp-glob.c ============================================================================== --- stable/10/crypto/openssh/sftp-glob.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/sftp-glob.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-glob.c,v 1.24 2013/05/17 00:13:14 djm Exp $ */ +/* $OpenBSD: sftp-glob.c,v 1.25 2013/11/08 00:39:15 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -48,7 +48,7 @@ fudge_opendir(const char *path) { struct SFTP_OPENDIR *r; - r = xmalloc(sizeof(*r)); + r = xcalloc(1, sizeof(*r)); if (do_readdir(cur.conn, (char *)path, &r->dir)) { free(r); Modified: stable/10/crypto/openssh/sftp-server.0 ============================================================================== --- stable/10/crypto/openssh/sftp-server.0 Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/sftp-server.0 Tue Nov 19 11:47:30 2013 (r258343) @@ -61,9 +61,8 @@ DESCRIPTION SEE ALSO sftp(1), ssh(1), sshd_config(5), sshd(8) - T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, - draft-ietf-secsh-filexfer-02.txt, October 2001, work in progress - material. + T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh- + filexfer-02.txt, October 2001, work in progress material. HISTORY sftp-server first appeared in OpenBSD 2.8. Modified: stable/10/crypto/openssh/sftp.0 ============================================================================== --- stable/10/crypto/openssh/sftp.0 Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/sftp.0 Tue Nov 19 11:47:30 2013 (r258343) @@ -342,8 +342,7 @@ SEE ALSO ftp(1), ls(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), glob(3), ssh_config(5), sftp-server(8), sshd(8) - T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, - draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress - material. + T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh- + filexfer-00.txt, January 2001, work in progress material. OpenBSD 5.4 July 25, 2013 OpenBSD 5.4 Modified: stable/10/crypto/openssh/ssh_config ============================================================================== --- stable/10/crypto/openssh/ssh_config Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/ssh_config Tue Nov 19 11:47:30 2013 (r258343) @@ -48,4 +48,4 @@ # ProxyCommand ssh -q -W %h:%p gateway.example.com # RekeyLimit 1G 1h # VerifyHostKeyDNS yes -# VersionAddendum FreeBSD-20130918 +# VersionAddendum FreeBSD-20131111 Modified: stable/10/crypto/openssh/ssh_config.5 ============================================================================== --- stable/10/crypto/openssh/ssh_config.5 Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/ssh_config.5 Tue Nov 19 11:47:30 2013 (r258343) @@ -1259,7 +1259,7 @@ See also VERIFYING HOST KEYS in Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20130918 . +.Dq FreeBSD-20131111 . .It Cm VisualHostKey If this flag is set to .Dq yes , Modified: stable/10/crypto/openssh/sshd_config ============================================================================== --- stable/10/crypto/openssh/sshd_config Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/sshd_config Tue Nov 19 11:47:30 2013 (r258343) @@ -118,7 +118,7 @@ #MaxStartups 10:30:100 #PermitTunnel no #ChrootDirectory none -#VersionAddendum FreeBSD-20130918 +#VersionAddendum FreeBSD-20131111 # no default banner path #Banner none Modified: stable/10/crypto/openssh/sshd_config.5 ============================================================================== --- stable/10/crypto/openssh/sshd_config.5 Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/sshd_config.5 Tue Nov 19 11:47:30 2013 (r258343) @@ -1217,7 +1217,7 @@ restrictions. Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Dq FreeBSD-20130918 . +.Dq FreeBSD-20131111 . .It Cm X11DisplayOffset Specifies the first display number available for .Xr sshd 8 Ns 's Modified: stable/10/crypto/openssh/umac.c ============================================================================== --- stable/10/crypto/openssh/umac.c Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/umac.c Tue Nov 19 11:47:30 2013 (r258343) @@ -1,4 +1,4 @@ -/* $OpenBSD: umac.c,v 1.7 2013/07/22 05:00:17 djm Exp $ */ +/* $OpenBSD: umac.c,v 1.8 2013/11/08 00:39:15 djm Exp $ */ /* ----------------------------------------------------------------------- * * umac.c -- C Implementation UMAC Message Authentication @@ -1227,7 +1227,7 @@ struct umac_ctx *umac_new(const u_char k size_t bytes_to_add; aes_int_key prf_key; - octx = ctx = xmalloc(sizeof(*ctx) + ALLOC_BOUNDARY); + octx = ctx = xcalloc(1, sizeof(*ctx) + ALLOC_BOUNDARY); if (ctx) { if (ALLOC_BOUNDARY) { bytes_to_add = ALLOC_BOUNDARY - Modified: stable/10/crypto/openssh/version.h ============================================================================== --- stable/10/crypto/openssh/version.h Tue Nov 19 11:19:07 2013 (r258342) +++ stable/10/crypto/openssh/version.h Tue Nov 19 11:47:30 2013 (r258343) @@ -1,10 +1,10 @@ -/* $OpenBSD: version.h,v 1.67 2013/07/25 00:57:37 djm Exp $ */ +/* $OpenBSD: version.h,v 1.68 2013/11/08 01:38:11 djm Exp $ */ /* $FreeBSD$ */ -#define SSH_VERSION "OpenSSH_6.3" +#define SSH_VERSION "OpenSSH_6.4" #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20130918" +#define SSH_VERSION_FREEBSD "FreeBSD-20131111" #define SSH_VERSION_HPN "_hpn13v11" From owner-svn-src-stable@FreeBSD.ORG Tue Nov 19 14:24:26 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 87ED0A7C; Tue, 19 Nov 2013 14:24: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 68CAF2395; Tue, 19 Nov 2013 14:24:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAJEOQZ8037411; Tue, 19 Nov 2013 14:24:26 GMT (envelope-from oleg@svn.freebsd.org) Received: (from oleg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAJEOQ8U037410; Tue, 19 Nov 2013 14:24:26 GMT (envelope-from oleg@svn.freebsd.org) Message-Id: <201311191424.rAJEOQ8U037410@svn.freebsd.org> From: Oleg Bulyzhin Date: Tue, 19 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: r258346 - stable/10/sys/dev/ixgbe 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, 19 Nov 2013 14:24:26 -0000 Author: oleg Date: Tue Nov 19 14:24:25 2013 New Revision: 258346 URL: http://svnweb.freebsd.org/changeset/base/258346 Log: MFC: 257695 - Fix link loss on vlan reconfiguration. - Fix issues with 'vlanhwfilter'. Approved by: re (glebius) Modified: stable/10/sys/dev/ixgbe/ixgbe.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Tue Nov 19 13:32:24 2013 (r258345) +++ stable/10/sys/dev/ixgbe/ixgbe.c Tue Nov 19 14:24:25 2013 (r258346) @@ -1253,9 +1253,6 @@ ixgbe_init_locked(struct adapter *adapte IXGBE_WRITE_REG(hw, IXGBE_RDT(i), adapter->num_rx_desc - 1); } - /* Set up VLAN support and filter */ - ixgbe_setup_vlan_hw_support(adapter); - /* Enable Receive engine */ rxctrl = IXGBE_READ_REG(hw, IXGBE_RXCTRL); if (hw->mac.type == ixgbe_mac_82598EB) @@ -1339,6 +1336,9 @@ ixgbe_init_locked(struct adapter *adapte /* Initialize the FC settings */ ixgbe_start_hw(hw); + /* Set up VLAN support and filter */ + ixgbe_setup_vlan_hw_support(adapter); + /* And now turn on interrupts */ ixgbe_enable_intr(adapter); @@ -4691,7 +4691,7 @@ ixgbe_register_vlan(void *arg, struct if bit = vtag & 0x1F; adapter->shadow_vfta[index] |= (1 << bit); ++adapter->num_vlans; - ixgbe_init_locked(adapter); + ixgbe_setup_vlan_hw_support(adapter); IXGBE_CORE_UNLOCK(adapter); } @@ -4718,7 +4718,7 @@ ixgbe_unregister_vlan(void *arg, struct adapter->shadow_vfta[index] &= ~(1 << bit); --adapter->num_vlans; /* Re-init to load the changes */ - ixgbe_init_locked(adapter); + ixgbe_setup_vlan_hw_support(adapter); IXGBE_CORE_UNLOCK(adapter); } @@ -4740,6 +4740,20 @@ ixgbe_setup_vlan_hw_support(struct adapt if (adapter->num_vlans == 0) return; + /* Setup the queues for vlans */ + for (int i = 0; i < adapter->num_queues; i++) { + rxr = &adapter->rx_rings[i]; + /* On 82599 the VLAN enable is per/queue in RXDCTL */ + if (hw->mac.type != ixgbe_mac_82598EB) { + ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); + ctrl |= IXGBE_RXDCTL_VME; + IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); + } + rxr->vtag_strip = TRUE; + } + + if ((ifp->if_capenable & IFCAP_VLAN_HWFILTER) == 0) + return; /* ** A soft reset zero's out the VFTA, so ** we need to repopulate it now. @@ -4758,18 +4772,6 @@ ixgbe_setup_vlan_hw_support(struct adapt if (hw->mac.type == ixgbe_mac_82598EB) ctrl |= IXGBE_VLNCTRL_VME; IXGBE_WRITE_REG(hw, IXGBE_VLNCTRL, ctrl); - - /* Setup the queues for vlans */ - for (int i = 0; i < adapter->num_queues; i++) { - rxr = &adapter->rx_rings[i]; - /* On 82599 the VLAN enable is per/queue in RXDCTL */ - if (hw->mac.type != ixgbe_mac_82598EB) { - ctrl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(i)); - ctrl |= IXGBE_RXDCTL_VME; - IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(i), ctrl); - } - rxr->vtag_strip = TRUE; - } } static void From owner-svn-src-stable@FreeBSD.ORG Wed Nov 20 17:46:23 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 E2BF6E43; Wed, 20 Nov 2013 17:46:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C29FB2C6C; Wed, 20 Nov 2013 17:46:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAKHkN1I099017; Wed, 20 Nov 2013 17:46:23 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAKHkNIc099015; Wed, 20 Nov 2013 17:46:23 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311201746.rAKHkNIc099015@svn.freebsd.org> From: Peter Wemm Date: Wed, 20 Nov 2013 17:46:23 +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: r258394 - stable/10/usr.bin/uname 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: Wed, 20 Nov 2013 17:46:24 -0000 Author: peter Date: Wed Nov 20 17:46:23 2013 New Revision: 258394 URL: http://svnweb.freebsd.org/changeset/base/258394 Log: MFC r256557: add uname flags to access userland's __FreeBSD_version more conveniently than the traditional way of scripts parsing #include files. Approved by: re (hrs) Modified: stable/10/usr.bin/uname/uname.1 stable/10/usr.bin/uname/uname.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/uname/uname.1 ============================================================================== --- stable/10/usr.bin/uname/uname.1 Wed Nov 20 16:42:01 2013 (r258393) +++ stable/10/usr.bin/uname/uname.1 Wed Nov 20 17:46:23 2013 (r258394) @@ -28,7 +28,7 @@ .\" @(#)uname.1 8.3 (Berkeley) 4/8/94 .\" $FreeBSD$ .\" -.Dd January 26, 2010 +.Dd November 20, 2013 .Dt UNAME 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd display information about the system .Sh SYNOPSIS .Nm -.Op Fl aimnoprsv +.Op Fl aiKmnoprsUv .Sh DESCRIPTION The .Nm @@ -55,6 +55,10 @@ and were specified. .It Fl i Write the kernel ident to standard output. +.It Fl K +Write the +.Fx +version of the kernel. .It Fl m Write the type of the current hardware platform to standard output. .It Fl n @@ -70,6 +74,10 @@ Write the current release level of the o to standard output. .It Fl s Write the name of the operating system implementation to standard output. +.It Fl U +Write the +.Fx +version of the user environment. .It Fl v Write the version level of this release of the operating system to standard output. @@ -79,6 +87,14 @@ If the .Fl a flag is specified, or multiple flags are specified, all output is written on a single line, separated by spaces. +.Pp +The +.Fl K +and +.Fl U +flags are intended to be used for fine grain differentiation of incremental +.Fx +development and user visible changes. .Sh ENVIRONMENT An environment variable composed of the string .Ev UNAME_ @@ -91,6 +107,8 @@ of the environment variable. .Sh EXIT STATUS .Ex -std .Sh SEE ALSO +.Xr feature_present 3 , +.Xr getosreldate 3 , .Xr sysctl 3 , .Xr uname 3 , .Xr sysctl 8 @@ -104,3 +122,10 @@ specification. The .Nm command appeared in PWB UNIX. +.Pp +The +.Fl K +and +.Fl U +extension flags appeared in +.Fx 10.0 . Modified: stable/10/usr.bin/uname/uname.c ============================================================================== --- stable/10/usr.bin/uname/uname.c Wed Nov 20 16:42:01 2013 (r258393) +++ stable/10/usr.bin/uname/uname.c Wed Nov 20 17:46:23 2013 (r258394) @@ -54,6 +54,8 @@ static const char sccsid[] = "@(#)uname. #include #include +#include + #define MFLAG 0x01 #define NFLAG 0x02 #define PFLAG 0x04 @@ -61,10 +63,12 @@ static const char sccsid[] = "@(#)uname. #define SFLAG 0x10 #define VFLAG 0x20 #define IFLAG 0x40 +#define UFLAG 0x80 +#define KFLAG 0x100 typedef void (*get_t)(void); static get_t get_ident, get_platform, get_hostname, get_arch, - get_release, get_sysname, get_version; + get_release, get_sysname, get_kernvers, get_uservers, get_version; static void native_ident(void); static void native_platform(void); @@ -73,11 +77,13 @@ static void native_arch(void); static void native_release(void); static void native_sysname(void); static void native_version(void); +static void native_kernvers(void); +static void native_uservers(void); static void print_uname(u_int); static void setup_get(void); static void usage(void); -static char *ident, *platform, *hostname, *arch, *release, *sysname, *version; +static char *ident, *platform, *hostname, *arch, *release, *sysname, *version, *kernvers, *uservers; static int space; int @@ -89,7 +95,7 @@ main(int argc, char *argv[]) setup_get(); flags = 0; - while ((ch = getopt(argc, argv, "aimnoprsv")) != -1) + while ((ch = getopt(argc, argv, "aiKmnoprsUv")) != -1) switch(ch) { case 'a': flags |= (MFLAG | NFLAG | RFLAG | SFLAG | VFLAG); @@ -97,6 +103,9 @@ main(int argc, char *argv[]) case 'i': flags |= IFLAG; break; + case 'K': + flags |= KFLAG; + break; case 'm': flags |= MFLAG; break; @@ -113,6 +122,9 @@ main(int argc, char *argv[]) case 'o': flags |= SFLAG; break; + case 'U': + flags |= UFLAG; + break; case 'v': flags |= VFLAG; break; @@ -153,6 +165,8 @@ setup_get(void) CHECK_ENV("m", platform); CHECK_ENV("p", arch); CHECK_ENV("i", ident); + CHECK_ENV("K", kernvers); + CHECK_ENV("U", uservers); } #define PRINT_FLAG(flags,flag,var) \ @@ -176,6 +190,8 @@ print_uname(u_int flags) PRINT_FLAG(flags, MFLAG, platform); PRINT_FLAG(flags, PFLAG, arch); PRINT_FLAG(flags, IFLAG, ident); + PRINT_FLAG(flags, KFLAG, kernvers); + PRINT_FLAG(flags, UFLAG, uservers); printf("\n"); } @@ -244,8 +260,26 @@ NATIVE_SYSCTLNAME_GET(ident, "kern.ident } NATIVE_SET; static void +native_uservers(void) +{ + static char buf[128]; + + snprintf(buf, sizeof(buf), "%d", __FreeBSD_version); + uservers = buf; +} + +static void +native_kernvers(void) +{ + static char buf[128]; + + snprintf(buf, sizeof(buf), "%d", getosreldate()); + kernvers = buf; +} + +static void usage(void) { - fprintf(stderr, "usage: uname [-aimnoprsv]\n"); + fprintf(stderr, "usage: uname [-aiKmnoprsUv]\n"); exit(1); } From owner-svn-src-stable@FreeBSD.ORG Wed Nov 20 18:58:08 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 191E7814; Wed, 20 Nov 2013 18:58:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07A062186; Wed, 20 Nov 2013 18:58:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAKIw7BM023864; Wed, 20 Nov 2013 18:58:07 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAKIw7HM023863; Wed, 20 Nov 2013 18:58:07 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311201858.rAKIw7HM023863@svn.freebsd.org> From: Peter Wemm Date: Wed, 20 Nov 2013 18:58:07 +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: r258396 - stable/10/share/i18n/esdb/UTF 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: Wed, 20 Nov 2013 18:58:08 -0000 Author: peter Date: Wed Nov 20 18:58:07 2013 New Revision: 258396 URL: http://svnweb.freebsd.org/changeset/base/258396 Log: MFC r258254 - teach iconv about a WCHAR_T pseudo-type Approved by: re (kib) Modified: stable/10/share/i18n/esdb/UTF/UTF.alias Directory Properties: stable/10/ (props changed) stable/10/share/ (props changed) Modified: stable/10/share/i18n/esdb/UTF/UTF.alias ============================================================================== --- stable/10/share/i18n/esdb/UTF/UTF.alias Wed Nov 20 17:48:38 2013 (r258395) +++ stable/10/share/i18n/esdb/UTF/UTF.alias Wed Nov 20 18:58:07 2013 (r258396) @@ -28,6 +28,7 @@ 16LE utf16le 32-INTERNAL ucs-4-internal +32-INTERNAL wchar_t 32-SWAPPED ucs-4-swapped From owner-svn-src-stable@FreeBSD.ORG Wed Nov 20 20:25:02 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 1D23274D; Wed, 20 Nov 2013 20:25:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0A6C3270F; Wed, 20 Nov 2013 20:25:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAKKP1Ls054331; Wed, 20 Nov 2013 20:25:01 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAKKP0ce054293; Wed, 20 Nov 2013 20:25:00 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201311202025.rAKKP0ce054293@svn.freebsd.org> From: Peter Wemm Date: Wed, 20 Nov 2013 20:25:00 +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: r258398 - in stable/10: . include lib lib/libc lib/libc/iconv lib/libc_nonshared sys/sys 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: Wed, 20 Nov 2013 20:25:02 -0000 Author: peter Date: Wed Nov 20 20:24:59 2013 New Revision: 258398 URL: http://svnweb.freebsd.org/changeset/base/258398 Log: MFC r258283 - move iconv* symbols out of libc.so.7 namespace with compatibility symbols to aid transition for existing 10.x installs. Approved by: re (kib) Added: stable/10/lib/libc/iconv/iconv-internal.h - copied unchanged from r258283, head/lib/libc/iconv/iconv-internal.h stable/10/lib/libc/iconv/iconv_compat.c - copied unchanged from r258283, head/lib/libc/iconv/iconv_compat.c stable/10/lib/libc_nonshared/ - copied from r258283, head/lib/libc_nonshared/ Modified: stable/10/Makefile.inc1 (contents, props changed) stable/10/include/iconv.h stable/10/lib/Makefile stable/10/lib/libc/iconv/Makefile.inc stable/10/lib/libc/iconv/Symbol.map stable/10/lib/libc/iconv/iconv.c stable/10/lib/libc/libc.ldscript stable/10/sys/sys/param.h Directory Properties: stable/10/ (props changed) stable/10/include/ (props changed) stable/10/lib/ (props changed) stable/10/lib/libc/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Wed Nov 20 19:41:00 2013 (r258397) +++ stable/10/Makefile.inc1 Wed Nov 20 20:24:59 2013 (r258398) @@ -1453,11 +1453,13 @@ _startup_libs+= lib/csu/${MACHINE_CPUARC _startup_libs+= gnu/lib/libgcc _startup_libs+= lib/libcompiler_rt _startup_libs+= lib/libc +_startup_libs+= lib/libc_nonshared .if ${MK_LIBCPLUSPLUS} != "no" _startup_libs+= lib/libcxxrt .endif gnu/lib/libgcc__L: lib/libc__L +gnu/lib/libgcc__L: lib/libc_nonshared__L .if ${MK_LIBCPLUSPLUS} != "no" lib/libcxxrt__L: gnu/lib/libgcc__L .endif Modified: stable/10/include/iconv.h ============================================================================== --- stable/10/include/iconv.h Wed Nov 20 19:41:00 2013 (r258397) +++ stable/10/include/iconv.h Wed Nov 20 20:24:59 2013 (r258398) @@ -69,17 +69,12 @@ size_t __iconv(iconv_t, const char **, s /* * GNU interfaces for iconv */ -/* We have iconvctl() */ -#define _ICONV_VERSION 0x0108 -extern int _iconv_version; - typedef struct { void *spaceholder[64]; } iconv_allocation_t; int iconv_open_into(const char *, const char *, iconv_allocation_t *); -void iconv_set_relocation_prefix(const char *orig_prefix, - const char *curr_prefix); +void iconv_set_relocation_prefix(const char *, const char *); /* * iconvctl() request macros Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Wed Nov 20 19:41:00 2013 (r258397) +++ stable/10/lib/Makefile Wed Nov 20 20:24:59 2013 (r258398) @@ -32,6 +32,7 @@ SUBDIR_ORDERED= ${_csu} \ libc \ + libc_nonshared \ libbsm \ libauditd \ libcompiler_rt \ Modified: stable/10/lib/libc/iconv/Makefile.inc ============================================================================== --- stable/10/lib/libc/iconv/Makefile.inc Wed Nov 20 19:41:00 2013 (r258397) +++ stable/10/lib/libc/iconv/Makefile.inc Wed Nov 20 20:24:59 2013 (r258398) @@ -14,5 +14,5 @@ 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 + citrus_prop.c citrus_stdenc.c iconv.c iconv_compat.c SYM_MAPS+= ${.CURDIR}/iconv/Symbol.map Modified: stable/10/lib/libc/iconv/Symbol.map ============================================================================== --- stable/10/lib/libc/iconv/Symbol.map Wed Nov 20 19:41:00 2013 (r258397) +++ stable/10/lib/libc/iconv/Symbol.map Wed Nov 20 20:24:59 2013 (r258398) @@ -2,22 +2,18 @@ * $FreeBSD$ */ -FBSD_1.2 { - __iconv; - __iconv_free_list; - __iconv_get_list; - iconv_canonicalize; -}; - FBSD_1.3 { - _iconv_version; - iconv; - iconv_open; - iconv_close; - iconv_open_into; - iconv_set_relocation_prefix; - iconvctl; - iconvlist; + __bsd___iconv; + __bsd___iconv_free_list; + __bsd___iconv_get_list; + __bsd_iconv; + __bsd_iconv_canonicalize; + __bsd_iconv_close; + __bsd_iconv_open; + __bsd_iconv_open_into; + __bsd_iconv_set_relocation_prefix; + __bsd_iconvctl; + __bsd_iconvlist; }; FBSDprivate_1.0 { Copied: stable/10/lib/libc/iconv/iconv-internal.h (from r258283, head/lib/libc/iconv/iconv-internal.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv-internal.h Wed Nov 20 20:24:59 2013 (r258398, copy of r258283, head/lib/libc/iconv/iconv-internal.h) @@ -0,0 +1,45 @@ +/*- + * 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$ + */ + +/* + * Interal prototypes for our back-end functions. + */ +size_t __bsd___iconv(iconv_t, const char **, size_t *, char **, + size_t *, __uint32_t, size_t *); +void __bsd___iconv_free_list(char **, size_t); +int __bsd___iconv_get_list(char ***, size_t *, __iconv_bool); +size_t __bsd_iconv(iconv_t, const char ** __restrict, + size_t * __restrict, char ** __restrict, + size_t * __restrict); +const char *__bsd_iconv_canonicalize(const char *); +int __bsd_iconv_close(iconv_t); +iconv_t __bsd_iconv_open(const char *, const char *); +int __bsd_iconv_open_into(const char *, const char *, iconv_allocation_t *); +void __bsd_iconv_set_relocation_prefix(const char *, const char *); +int __bsd_iconvctl(iconv_t, int, void *); +void __bsd_iconvlist(int (*) (unsigned int, const char * const *, void *), void *); Modified: stable/10/lib/libc/iconv/iconv.c ============================================================================== --- stable/10/lib/libc/iconv/iconv.c Wed Nov 20 19:41:00 2013 (r258397) +++ stable/10/lib/libc/iconv/iconv.c Wed Nov 20 20:24:59 2013 (r258398) @@ -47,15 +47,12 @@ #include "citrus_hash.h" #include "citrus_iconv.h" -#define ISBADF(_h_) (!(_h_) || (_h_) == (iconv_t)-1) - -int _iconv_version = _ICONV_VERSION; +#include "iconv-internal.h" -iconv_t _iconv_open(const char *out, const char *in, - struct _citrus_iconv *prealloc); +#define ISBADF(_h_) (!(_h_) || (_h_) == (iconv_t)-1) -iconv_t -_iconv_open(const char *out, const char *in, struct _citrus_iconv *handle) +static iconv_t +__bsd___iconv_open(const char *out, const char *in, struct _citrus_iconv *handle) { const char *out_slashes; char *out_noslashes; @@ -92,23 +89,23 @@ _iconv_open(const char *out, const char } iconv_t -iconv_open(const char *out, const char *in) +__bsd_iconv_open(const char *out, const char *in) { - return (_iconv_open(out, in, NULL)); + return (__bsd___iconv_open(out, in, NULL)); } int -iconv_open_into(const char *out, const char *in, iconv_allocation_t *ptr) +__bsd_iconv_open_into(const char *out, const char *in, iconv_allocation_t *ptr) { struct _citrus_iconv *handle; handle = (struct _citrus_iconv *)ptr; - return ((_iconv_open(out, in, handle) == (iconv_t)-1) ? -1 : 0); + return ((__bsd___iconv_open(out, in, handle) == (iconv_t)-1) ? -1 : 0); } int -iconv_close(iconv_t handle) +__bsd_iconv_close(iconv_t handle) { if (ISBADF(handle)) { @@ -122,7 +119,7 @@ iconv_close(iconv_t handle) } size_t -iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) +__bsd_iconv(iconv_t handle, const char **in, size_t *szin, char **out, size_t *szout) { size_t ret; int err; @@ -143,7 +140,7 @@ iconv(iconv_t handle, const char **in, s } size_t -__iconv(iconv_t handle, const char **in, size_t *szin, char **out, +__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; @@ -167,7 +164,7 @@ __iconv(iconv_t handle, const char **in, } int -__iconv_get_list(char ***rlist, size_t *rsz, bool sorted) +__bsd___iconv_get_list(char ***rlist, size_t *rsz, bool sorted) { int ret; @@ -181,7 +178,7 @@ __iconv_get_list(char ***rlist, size_t * } void -__iconv_free_list(char **list, size_t sz) +__bsd___iconv_free_list(char **list, size_t sz) { _citrus_esdb_free_list(list, sz); @@ -202,7 +199,7 @@ qsort_helper(const void *first, const vo } void -iconvlist(int (*do_one) (unsigned int, const char * const *, +__bsd_iconvlist(int (*do_one) (unsigned int, const char * const *, void *), void *data) { char **list, **names; @@ -213,7 +210,7 @@ iconvlist(int (*do_one) (unsigned int, c i = 0; - if (__iconv_get_list(&list, &sz, true)) + if (__bsd___iconv_get_list(&list, &sz, true)) list = NULL; qsort((void *)list, sz, sizeof(char *), qsort_helper); while (i < sz) { @@ -222,7 +219,7 @@ iconvlist(int (*do_one) (unsigned int, c curkey = (char *)malloc(slashpos - list[i] + 2); names = (char **)malloc(sz * sizeof(char *)); if ((curkey == NULL) || (names == NULL)) { - __iconv_free_list(list, sz); + __bsd___iconv_free_list(list, sz); return; } strlcpy(curkey, list[i], slashpos - list[i] + 1); @@ -231,7 +228,7 @@ iconvlist(int (*do_one) (unsigned int, c slashpos = strchr(list[i], '/'); curitem = (char *)malloc(strlen(slashpos) + 1); if (curitem == NULL) { - __iconv_free_list(list, sz); + __bsd___iconv_free_list(list, sz); return; } strlcpy(curitem, &slashpos[1], strlen(slashpos) + 1); @@ -245,18 +242,18 @@ iconvlist(int (*do_one) (unsigned int, c free(names); } - __iconv_free_list(list, sz); + __bsd___iconv_free_list(list, sz); } -__inline const char -*iconv_canonicalize(const char *name) +__inline const char * +__bsd_iconv_canonicalize(const char *name) { return (_citrus_iconv_canonicalize(name)); } int -iconvctl(iconv_t cd, int request, void *argument) +__bsd_iconvctl(iconv_t cd, int request, void *argument) { struct _citrus_iconv *cv; struct iconv_hooks *hooks; @@ -308,7 +305,7 @@ iconvctl(iconv_t cd, int request, void * } void -iconv_set_relocation_prefix(const char *orig_prefix __unused, +__bsd_iconv_set_relocation_prefix(const char *orig_prefix __unused, const char *curr_prefix __unused) { Copied: stable/10/lib/libc/iconv/iconv_compat.c (from r258283, head/lib/libc/iconv/iconv_compat.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/iconv/iconv_compat.c Wed Nov 20 20:24:59 2013 (r258398, copy of r258283, head/lib/libc/iconv/iconv_compat.c) @@ -0,0 +1,121 @@ +/*- + * 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$ + */ + +/* + * These are ABI implementations for when the raw iconv_* symbol + * space was exposed via libc.so.7 in its early life. This is + * a transition aide, these wrappers will not normally ever be + * executed except via __sym_compat() references. + */ +#include +#include +#include "iconv-internal.h" + +size_t +__iconv_compat(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); +} + +void +__iconv_free_list_compat(char ** a, size_t b) +{ + __bsd___iconv_free_list(a, b); +} + +int +__iconv_get_list_compat(char ***a, size_t *b, __iconv_bool c) +{ + return __bsd___iconv_get_list(a, b, c); +} + +size_t +iconv_compat(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); +} + +const char * +iconv_canonicalize_compat(const char *a) +{ + return __bsd_iconv_canonicalize(a); +} + +int +iconv_close_compat(iconv_t a) +{ + return __bsd_iconv_close(a); +} + +iconv_t +iconv_open_compat(const char *a, const char *b) +{ + return __bsd_iconv_open(a, b); +} + +int +iconv_open_into_compat(const char *a, const char *b, iconv_allocation_t *c) +{ + return __bsd_iconv_open_into(a, b, c); +} + +void +iconv_set_relocation_prefix_compat(const char *a, const char *b) +{ + return __bsd_iconv_set_relocation_prefix(a, b); +} + +int +iconvctl_compat(iconv_t a, int b, void *c) +{ + return __bsd_iconvctl(a, b, c); +} + +void +iconvlist_compat(int (*a) (unsigned int, const char * const *, void *), void *b) +{ + return __bsd_iconvlist(a, b); +} + +int _iconv_version_compat = 0x0108; /* Magic - not used */ + +__sym_compat(__iconv, __iconv_compat, FBSD_1.2); +__sym_compat(__iconv_free_list, __iconv_free_list_compat, FBSD_1.2); +__sym_compat(__iconv_get_list, __iconv_get_list_compat, FBSD_1.2); +__sym_compat(_iconv_version, _iconv_version_compat, FBSD_1.3); +__sym_compat(iconv, iconv_compat, FBSD_1.3); +__sym_compat(iconv_canonicalize, iconv_canonicalize_compat, FBSD_1.2); +__sym_compat(iconv_close, iconv_close_compat, FBSD_1.3); +__sym_compat(iconv_open, iconv_open_compat, FBSD_1.3); +__sym_compat(iconv_open_into, iconv_open_into_compat, FBSD_1.3); +__sym_compat(iconv_set_relocation_prefix, iconv_set_relocation_prefix_compat, FBSD_1.3); +__sym_compat(iconvctl, iconvctl_compat, FBSD_1.3); +__sym_compat(iconvlist, iconvlist_compat, FBSD_1.3); Modified: stable/10/lib/libc/libc.ldscript ============================================================================== --- stable/10/lib/libc/libc.ldscript Wed Nov 20 19:41:00 2013 (r258397) +++ stable/10/lib/libc/libc.ldscript Wed Nov 20 20:24:59 2013 (r258398) @@ -1,2 +1,2 @@ /* $FreeBSD$ */ -GROUP ( @@SHLIB@@ @@LIBDIR@@/libssp_nonshared.a ) +GROUP ( @@SHLIB@@ @@LIBDIR@@/libc_nonshared.a @@LIBDIR@@/libssp_nonshared.a ) Modified: stable/10/sys/sys/param.h ============================================================================== --- stable/10/sys/sys/param.h Wed Nov 20 19:41:00 2013 (r258397) +++ stable/10/sys/sys/param.h Wed Nov 20 20:24:59 2013 (r258398) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000501 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000502 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable@FreeBSD.ORG Wed Nov 20 21:19: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 799CF1E0; Wed, 20 Nov 2013 21:19:19 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3403C2A52; Wed, 20 Nov 2013 21:19:18 +0000 (UTC) Received: from julian-mbp3.pixel8networks.com (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.14.7/8.14.7) with ESMTP id rAKLJGA4006077 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 20 Nov 2013 13:19:17 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <528D274E.5020007@freebsd.org> Date: Wed, 20 Nov 2013 13:19:10 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Peter Wemm , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r258398 - in stable/10: . include lib lib/libc lib/libc/iconv lib/libc_nonshared sys/sys References: <201311202025.rAKKP0ce054293@svn.freebsd.org> In-Reply-To: <201311202025.rAKKP0ce054293@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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, 20 Nov 2013 21:19:19 -0000 On 11/20/13, 12:25 PM, Peter Wemm wrote: > +int _iconv_version_compat = 0x0108; /* Magic - not used */ > + > can you illuminate this a bit more? is it magic, or is it not used? From owner-svn-src-stable@FreeBSD.ORG Thu Nov 21 02:45: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 3509E340; Thu, 21 Nov 2013 02:45: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 23A132AE7; Thu, 21 Nov 2013 02:45: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 rAL2jcUc084460; Thu, 21 Nov 2013 02:45:38 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAL2jasX084451; Thu, 21 Nov 2013 02:45:36 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201311210245.rAL2jasX084451@svn.freebsd.org> From: Glen Barber Date: Thu, 21 Nov 2013 02:45:36 +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: r258415 - in stable/10: release release/amd64 release/i386 release/scripts share/man/man7 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, 21 Nov 2013 02:45:38 -0000 Author: gjb Date: Thu Nov 21 02:45:36 2013 New Revision: 258415 URL: http://svnweb.freebsd.org/changeset/base/258415 Log: MFC r258305, r258307, r258308, r258309, r258310, r258314, r258317, r258319, r258320: r258305: Use the IMAGES variable to determine which image files to remove as part of 'make -C /usr/src/release clean'. r258307: Add a script and configuration files to fetch pre-built packages from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso). r258308: Unconditionally copy the build host /etc/resolv.conf into the chroot directory, since hostname resolution may be needed in the case of building a dvd image (with packages) and also setting 'NOPORTS=1'. r258309: Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/' in preparation of adding a 'dvd1.iso' target. r258310: Add the 'dvd1.iso' target. This mimics the 'release.iso' target, with the additional step of fetching packages for inclusion on the dvd image. The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if the '${TARGET}/pkg-stage.conf' configuration file exists (currently only amd64 and i386). Allow dvd1.iso to be skipped if NODVD=1. r258314: Fix how ABI is evaluated so it matches more than a dot-zero case. r258317: Document the 'dvdrom' target. r258319: Remove WITHOUT_PROFILE=1 for the dvd1.iso medium. r258320: Simplify PKG_ABI for pkg-stage.sh. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation Added: stable/10/release/amd64/pkg-stage.conf - copied, changed from r258307, head/release/amd64/pkg-stage.conf stable/10/release/i386/pkg-stage.conf - copied, changed from r258307, head/release/i386/pkg-stage.conf stable/10/release/scripts/pkg-stage.sh - copied unchanged from r258307, head/release/scripts/pkg-stage.sh Modified: stable/10/release/Makefile stable/10/release/release.sh stable/10/share/man/man7/release.7 Directory Properties: stable/10/release/ (props changed) stable/10/share/man/man7/ (props changed) Modified: stable/10/release/Makefile ============================================================================== --- stable/10/release/Makefile Thu Nov 21 02:45:07 2013 (r258414) +++ stable/10/release/Makefile Thu Nov 21 02:45:36 2013 (r258415) @@ -71,6 +71,10 @@ IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom IMAGES+= disc1.iso bootonly.iso +. if(!defined(NODVD)) +RELEASE_TARGETS+= dvdrom +IMAGES+= dvd1.iso +. endif .endif .if exists(${.CURDIR}/${TARGET}/make-memstick.sh) RELEASE_TARGETS+= memstick.img @@ -160,10 +164,32 @@ bootonly: packagesystem echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf cp ${.CURDIR}/rc.local bootonly/etc +dvd: +# Install system + mkdir -p ${.TARGET} + cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ + DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1 +# Copy distfiles + mkdir -p ${.TARGET}/usr/freebsd-dist + cp *.txz MANIFEST ${.TARGET}/usr/freebsd-dist +# Copy documentation, if generated +.if !defined(NODOC) + cp reldoc/* ${.TARGET} +.endif +# Set up installation environment + ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf + echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf + echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf + cp ${.CURDIR}/rc.local ${.TARGET}/etc + touch ${.TARGET} + release.iso: disc1.iso disc1.iso: system sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} release +dvd1.iso: dvd pkg-stage + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} dvd + bootonly.iso: bootonly sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} bootonly @@ -175,7 +201,14 @@ packagesystem: base.txz kernel.txz ${EXT sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST touch ${.TARGET} +pkg-stage: +.if(exists(${.CURDIR}/${TARGET}/pkg-stage.conf)) + sh ${.CURDIR}/scripts/pkg-stage.sh ${.CURDIR}/${TARGET}/pkg-stage.conf \ + ${REVISION} +.endif + cdrom: disc1.iso bootonly.iso +dvdrom: dvd1.iso ftp: packagesystem rm -rf ftp mkdir -p ftp @@ -191,8 +224,8 @@ clean: rm -f packagesystem rm -f *.txz MANIFEST rm -f system - rm -rf release bootonly - rm -f disc1.iso bootonly.iso memstick.img + rm -rf release bootonly dvd + rm -f ${IMAGES} install: .if defined(DESTDIR) && !empty(DESTDIR) Copied and modified: stable/10/release/amd64/pkg-stage.conf (from r258307, head/release/amd64/pkg-stage.conf) ============================================================================== --- head/release/amd64/pkg-stage.conf Mon Nov 18 15:22:55 2013 (r258307, copy source) +++ stable/10/release/amd64/pkg-stage.conf Thu Nov 21 02:45:36 2013 (r258415) @@ -3,14 +3,14 @@ # $FreeBSD$ # -export PKG_ABI="freebsd:$(echo ${REVISION} | tr -d '.0'):x86:64" +export PKG_ABI="freebsd:${REVISION%.[0-9]*}:x86:64" export ASSUME_ALWAYS_YES=1 export __PKG_CONF="/etc/pkg/FreeBSD.conf" export PACKAGESITE="http://pkg.FreeBSD.org/${PKG_ABI}/latest" export MIRROR_TYPE="SRV" export REPO_AUTOUPDATE="NO" export PKG_DBDIR="/tmp/pkg" -export PKG_CACHEDIR="release/packages/${PKG_ABI}" +export PKG_CACHEDIR="dvd/packages/${PKG_ABI}" export PERMISSIVE="YES" export PKGCMD="/usr/sbin/pkg -d -C ${__PKG_CONF}" Copied and modified: stable/10/release/i386/pkg-stage.conf (from r258307, head/release/i386/pkg-stage.conf) ============================================================================== --- head/release/i386/pkg-stage.conf Mon Nov 18 15:22:55 2013 (r258307, copy source) +++ stable/10/release/i386/pkg-stage.conf Thu Nov 21 02:45:36 2013 (r258415) @@ -3,14 +3,14 @@ # $FreeBSD$ # -export PKG_ABI="freebsd:$(echo ${REVISION} | tr -d '.0'):x86:32" +export PKG_ABI="freebsd:${REVISION%.[0-9]*}:x86:32" export ASSUME_ALWAYS_YES=1 export __PKG_CONF="/etc/pkg/FreeBSD.conf" export PACKAGESITE="http://pkg.FreeBSD.org/${PKG_ABI}/latest" export MIRROR_TYPE="SRV" export REPO_AUTOUPDATE="NO" export PKG_DBDIR="/tmp/pkg" -export PKG_CACHEDIR="release/packages/${PKG_ABI}" +export PKG_CACHEDIR="dvd/packages/${PKG_ABI}" export PERMISSIVE="YES" export PKGCMD="/usr/sbin/pkg -d -C ${__PKG_CONF}" Modified: stable/10/release/release.sh ============================================================================== --- stable/10/release/release.sh Thu Nov 21 02:45:07 2013 (r258414) +++ stable/10/release/release.sh Thu Nov 21 02:45:36 2013 (r258415) @@ -159,6 +159,7 @@ if [ "x${NOPORTS}" = "x" ]; then svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports fi +cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf cd ${CHROOTDIR}/usr/src make ${CHROOT_WMAKEFLAGS} buildworld make ${CHROOT_IMAKEFLAGS} installworld DESTDIR=${CHROOTDIR} @@ -193,7 +194,6 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CO fi if [ -d ${CHROOTDIR}/usr/ports ]; then - cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf build_doc_ports ${CHROOTDIR} fi Copied: stable/10/release/scripts/pkg-stage.sh (from r258307, head/release/scripts/pkg-stage.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/release/scripts/pkg-stage.sh Thu Nov 21 02:45:36 2013 (r258415, copy of r258307, head/release/scripts/pkg-stage.sh) @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +set -e + +usage() { + echo "$(basename ${0}) /path/to/pkg-stage.conf revision" + exit 1 +} + +if [ ! -e "${1}" ]; then + echo "Configuration file not specified." + echo + usage +fi + +if [ "$#" -lt 2 ]; then + usage +fi + +# Source config file for this architecture. +REVISION="${2}" +. "${1}" || exit 1 + +if [ ! -x /usr/local/sbin/pkg ]; then + /usr/sbin/pkg bootstrap +fi + +/bin/mkdir -p ${PKG_CACHEDIR} + +${PKGCMD} update -f +${PKGCMD} fetch -d ${DVD_PACKAGES} + +${PKGCMD} repo ${PKG_CACHEDIR} + +# Always exit '0', even if pkg(8) complains about conflicts. +exit 0 Modified: stable/10/share/man/man7/release.7 ============================================================================== --- stable/10/share/man/man7/release.7 Thu Nov 21 02:45:07 2013 (r258414) +++ stable/10/share/man/man7/release.7 Thu Nov 21 02:45:36 2013 (r258415) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 14, 2013 +.Dd November 18, 2013 .Dt RELEASE 7 .Os .Sh NAME @@ -230,6 +230,10 @@ When set, will prevent the .Fa doc.txz distribution package from being created. +.It Va NODVD +Set to a non-empty value to skip the +.Cm dvdrom +target. .It Va NOPORTS Set to a non-empty value to skip the .Li ports/ @@ -270,6 +274,15 @@ This target produces files called and .Pa bootonly.iso as its output. +.It Cm dvdrom +Builds installation DVD-ROM images. +This may require the +.Xr md 4 +(memory disk) device driver be present in the kernel +(either by being compiled in or available as a module). +This target produces the +.Pa dvd1.iso +file as its output. .It Cm memstick Builds an installation memory stick image named .Pa memstick.img . @@ -297,7 +310,8 @@ Builds a bootable installation system co packaged by the .Cm packagesystem target, and suitable for imaging by the -.Cm cdrom +.Cm cdrom , +.Cm dvdrom and .Cm memstick targets. From owner-svn-src-stable@FreeBSD.ORG Thu Nov 21 03:38: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 7AC48352; Thu, 21 Nov 2013 03:38: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 685712E4B; Thu, 21 Nov 2013 03:38: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 rAL3cnhp002929; Thu, 21 Nov 2013 03:38:49 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAL3clfK002918; Thu, 21 Nov 2013 03:38:47 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311210338.rAL3clfK002918@svn.freebsd.org> From: Devin Teske Date: Thu, 21 Nov 2013 03:38:47 +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: r258420 - in stable/10/usr.sbin/bsdconfig: . include packages share share/media share/packages startup/share 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, 21 Nov 2013 03:38:49 -0000 Author: dteske Date: Thu Nov 21 03:38:47 2013 New Revision: 258420 URL: http://svnweb.freebsd.org/changeset/base/258420 Log: MFC r257755-257756,257780-257785,257787-257793, and 257795,257817,257819,257937-257938,258029,258263-258267: 257755: SRV records 257756: fix spurious error message 257780: Whitespace 257781: Comments and funny syntax 257782: Debug file truncation is optional 257783: f_show_err for debugging 257784: f_eval_catch for debugging 257785: fix size calculations bug 257787: fix broken HTTP "any" media type 257788: more debugging 257789: Comments 257790: fix printf usage bug 257791: f_[v]sprintf added 257792: Comments 257793: fix off-by-one error in size calcs 257795: Replace pkg-tools with pkgng 257817: fix cosmetic typos 257819: Use `pkg -vv' to get ABI 257937: Adjustment to last 257938: Adjustment to last 258029: Comments 258263: Shuffle code around 258264: Remove unused code 258265: Debugging. Use f_eval_catch with pkg 258266: Shutdown media on exit from packages 258267: Fix pkg install from DVD Reviewed by: many Discussed on: -current Approved by: re (hrs) Modified: stable/10/usr.sbin/bsdconfig/bsdconfig stable/10/usr.sbin/bsdconfig/include/messages.subr stable/10/usr.sbin/bsdconfig/packages/packages stable/10/usr.sbin/bsdconfig/share/common.subr stable/10/usr.sbin/bsdconfig/share/dialog.subr stable/10/usr.sbin/bsdconfig/share/media/cdrom.subr stable/10/usr.sbin/bsdconfig/share/media/http.subr stable/10/usr.sbin/bsdconfig/share/media/tcpip.subr stable/10/usr.sbin/bsdconfig/share/packages/index.subr stable/10/usr.sbin/bsdconfig/share/packages/packages.subr stable/10/usr.sbin/bsdconfig/share/strings.subr stable/10/usr.sbin/bsdconfig/share/sysrc.subr stable/10/usr.sbin/bsdconfig/startup/share/rcconf.subr Directory Properties: stable/10/usr.sbin/bsdconfig/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/bsdconfig ============================================================================== --- stable/10/usr.sbin/bsdconfig/bsdconfig Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/bsdconfig Thu Nov 21 03:38:47 2013 (r258420) @@ -342,7 +342,7 @@ while getopts f:h$GETOPTS_STDARGS flag; h|\?) usage ;; esac done -shift $(( $OPTIND -1 )) +shift $(( $OPTIND - 1 )) # If we've loaded any scripts, do not continue any further [ $scripts_loaded -gt 0 ] && exit Modified: stable/10/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/include/messages.subr Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/include/messages.subr Thu Nov 21 03:38:47 2013 (r258420) @@ -40,6 +40,7 @@ msg_afterstep_desc="Ports to support the msg_all="All" msg_all_desc="All available packages in all categories." msg_always_try_sudo_when_run_as="Always try sudo(8) when run as %s" +msg_an_unknown_error_occurred="An unknown error occurred" msg_arabic_desc="Ported software for Arab countries." msg_archivers_desc="Utilities for archiving and unarchiving data." msg_armenia="Armenia" @@ -48,7 +49,7 @@ msg_assume_yes_to_all_non_critical_dialo msg_astro_desc="Applications related to astronomy." msg_attempt_automatic_dhcp_configuration="Attempt automatic DHCP configuration of interfaces" msg_attempt_ipv6_configuration_of_interfaces="Attempt IPv6 configuration of interfaces" -msg_attempting_to_fetch_file_from_selected_media="Attempting to fetch %s file from selected media." +msg_attempting_to_update_repository_catalogue="Attempting to update repository catalogue from selected media." msg_audio_desc="Audio utilities - most require a supported sound card." msg_australia="Australia" msg_austria="Austria" @@ -137,9 +138,12 @@ msg_ftp_desc="FTP client and server util msg_ftp_passive="FTP Passive" msg_ftp_username="FTP username" msg_games_desc="Various games and sundry amusements." +msg_generating_index_from_pkg_database="Generating INDEX from pkg(8) database\n(this can take a while)..." msg_geography_desc="Geography-related software." msg_german_desc="Ported software for Germanic countries." msg_germany="Germany" +msg_getting_package_categories_via_pkg_rquery="Getting package categories via pkg-rquery(8)..." +msg_getting_package_dependencies_via_pkg_rquery="Getting package dependencies via pkg-rquery(8)\n(this can take a while)..." msg_gnome_desc="Components of the Gnome Desktop environment." msg_gnustep_desc="Software for GNUstep desktop environment." msg_graphics_desc="Graphics libraries and utilities." @@ -175,7 +179,7 @@ msg_invalid_name_server_ip_address_speci msg_invalid_netmask_value="Invalid netmask value" msg_invalid_nfs_path_specification="Invalid NFS path specification. Must be of the form:\nhost:/full/pathname/to/FreeBSD/distdir" msg_io_error_while_reading_in_the_package="I/O error while reading in the %s package." -msg_io_or_format_error_on_index_file="I/O or format error on %s file.\nPlease verify media (or path to media) and try again." +msg_io_or_format_error_on_index_file="I/O or format error on INDEX file.\nPlease verify media (or path to media) and try again." msg_ipv4_address="IPv4 Address" msg_ipv4_gateway="IPv4 Gateway" msg_ipv6="IPv6" @@ -245,6 +249,7 @@ msg_no_gateway_has_been_set="No gateway msg_no_network_devices="No network devices available!" msg_no_package_name_passed_in_package_variable="No package name passed in package variable" msg_no_packages_were_selected_for_extraction="No packages were selected for extraction." +msg_no_pkg_database_found="No pkg(8) database found!" msg_no_such_file_or_directory="%s: %s: No such file or directory" msg_no_usb_devices_found="No USB devices found (try Options/Re-scan Devices)" msg_no_username="No username provided!" @@ -256,10 +261,9 @@ msg_ok="OK" msg_options="Options" msg_options_editor="Options Editor" msg_other="other" -msg_pkg_delete_failed="Warning: pkg_delete of %s failed.\n Run with debugging for details." +msg_pkg_delete_failed="Warning: pkg-delete(8) of %s failed.\n Run with debugging for details." msg_package_is_needed_by_other_installed_packages="Warning: Package %s is needed by\n %d other installed package%s." msg_package_not_installed_cannot_delete="Warning: package %s not installed\n No package can be deleted." -msg_package_read_successfully_waiting_for_pkg_add="Package %s read successfully - waiting for pkg_add(1)" msg_package_temp="Package Temp" msg_package_was_added_successfully="Package %s was added successfully" msg_packages="packages" @@ -269,7 +273,7 @@ msg_parallel_desc="Applications dealing msg_pear_desc="Software related to the Pear PHP framework." msg_perl5_desc="Utilities/modules for the PERL5 language." msg_permission_denied="%s: %s: Permission denied" -msg_pkg_add_apparently_did_not_like_the_package="pkg_add(1) apparently did not like the %s package." +msg_pkg_install_apparently_did_not_like_the_package="pkg-install(8) apparently did not like the %s package." msg_plan9_desc="Software from the Plan9 operating system." msg_please_check_the_url_and_try_again="No such directory: %s\nplease check the URL and try again.\n" msg_please_enter_password="Please enter your password for sudo(8):" @@ -371,10 +375,13 @@ msg_unable_to_get_file_from_selected_med msg_unable_to_get_proper_ftp_path="Unable to get proper FTP path. FTP media not initialized." msg_unable_to_initialize_media_type_for_package_extract="Unable to initialize media type for package extract." msg_unable_to_make_directory_mountpoint="Unable to make %s directory mountpoint for %s!" +msg_unable_to_pkg_rquery_package_dependencies="Unable to pkg-rquery(8) package dependencies!" +msg_unable_to_pkg_rquery_package_categories="Unable to pkg-rquery(8) package categories!" msg_unable_to_open="Unable to open %s" +msg_unable_to_update_pkg_from_selected_media="Unable to update pkg(8) from selected media." msg_uninstall="Uninstall" msg_uninstall_desc="Mark this package for deletion" -msg_uninstalling_package_waiting_for_pkg_delete="Uninstalling %s package - waiting for pkg_delete(1)" +msg_uninstalling_package_waiting_for_pkg_delete="Uninstalling %s package - waiting for pkg-delete(8)" msg_unknown="unknown" msg_unknown_user="Unknown user: %s" msg_url_was_not_found="%s was not found, maybe directory or release-version are wrong?" Modified: stable/10/usr.sbin/bsdconfig/packages/packages ============================================================================== --- stable/10/usr.sbin/bsdconfig/packages/packages Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/packages/packages Thu Nov 21 03:38:47 2013 (r258420) @@ -38,6 +38,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 f_dprintf "%s: loading includes..." "$0" f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/media/common.subr f_include $BSDCFG_SHARE/mustberoot.subr f_include $BSDCFG_SHARE/packages/packages.subr @@ -73,6 +74,7 @@ f_device_get_all # # Display the package configuration menu and exit # +trap 'f_media_close' EXIT f_package_config ################################################################################ Modified: stable/10/usr.sbin/bsdconfig/share/common.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/common.subr Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/share/common.subr Thu Nov 21 03:38:47 2013 (r258420) @@ -60,7 +60,14 @@ FAILURE=1 # export UNAME_S="$(uname -s)" # Operating System (i.e. FreeBSD) export UNAME_P="$(uname -p)" # Processor Architecture (i.e. i386) +export UNAME_M="$(uname -m)" # Machine platform (i.e. i386) export UNAME_R="$(uname -r)" # Release Level (i.e. X.Y-RELEASE) +if [ ! "${PKG_ABI+set}" ]; then + export PKG_ABI="$( + ASSUME_ALWAYS_YES=1 pkg -vv | + awk '$1=="ABI:"{print $2;exit}' 2> /dev/null + )" +fi # # Default behavior is to call f_debug_init() automatically when loaded. @@ -68,6 +75,14 @@ export UNAME_R="$(uname -r)" # Release L : ${DEBUG_SELF_INITIALIZE=1} # +# Default behavior of f_debug_init() is to truncate $debugFile (set to NULL to +# disable truncating the debug file when initializing). To get child processes +# to append to the same log file, export this variarable (with a NULL value) +# and also export debugFile with the desired value. +# +: ${DEBUG_INITIALIZE_FILE=1} + +# # Define standard optstring arguments that should be supported by all programs # using this include (unless DEBUG_SELF_INITIALIZE is set to NULL to prevent # f_debug_init() from autamatically processing "$@" for the below arguments): @@ -106,7 +121,7 @@ GETOPTS_ALLFLAGS="${GETOPTS_ALLFLAGS}012 ############################################################ FUNCTIONS -# f_dprintf $fmt [ $opts ... ] +# f_dprintf $format [$arguments ...] # # Sensible debug function. Override in ~/.bsdconfigrc if desired. # See /usr/share/examples/bsdconfig/bsdconfigrc for example. @@ -164,18 +179,17 @@ f_debug_init() [ "$debugFile" ] && export debugFile # - # Truncate the debug file upon. Note that we will trim a leading plus - # (`+') from the value of debugFile to support persistant meaning that - # f_dprintf() should print both to standard output and $debugFile - # (minus the leading plus, of course). + # Truncate debug file unless requested otherwise. Note that we will + # trim a leading plus (`+') from the value of debugFile to support + # persistant meaning that f_dprintf() should print both to standard + # output and $debugFile (minus the leading plus, of course). # local _debug_file="${debugFile#+}" - if [ "$_debug_file" ]; then + if [ "$_debug_file" -a "$DEBUG_INITIALIZE_FILE" ]; then if ( umask 022 && :> "$_debug_file" ); then f_dprintf "Successfully initialized debugFile \`%s'" \ "$_debug_file" - [ "${debug+set}" ] || - debug=1 # turn debugging on if not set + f_isset debug || debug=1 # turn debugging on if not set else unset debugFile f_dprintf "Unable to initialize debugFile \`%s'" \ @@ -184,7 +198,7 @@ f_debug_init() fi } -# f_err $fmt [ $opts ... ] +# f_err $format [$arguments ...] # # Print a message to stderr (fd=2). # @@ -193,7 +207,7 @@ f_err() printf "$@" >&${TERMINAL_STDERR_PASSTHRU:-2} } -# f_quietly $command [ $arguments ... ] +# f_quietly $command [$arguments ...] # # Run a command quietly (quell any output to stdout or stderr) # @@ -275,7 +289,7 @@ f_isset() eval [ \"\${${1%%[$IFS]*}+set}\" ] } -# f_die [ $status [ $fmt [ $opts ... ]]] +# f_die [$status [$format [$arguments ...]]] # # Abruptly terminate due to an error optionally displaying a message in a # dialog box using printf(1) syntax. @@ -309,7 +323,7 @@ f_interrupt() f_die } -# f_show_info $fmt [ $opts ... ] +# f_show_info $format [$arguments ...] # # Display a message in a dialog infobox using printf(1) syntax. # @@ -330,7 +344,7 @@ f_show_info() fi } -# f_show_msg $fmt [ $opts ... ] +# f_show_msg $format [$arguments ...] # # Display a message in a dialog box using printf(1) syntax. # @@ -351,8 +365,32 @@ f_show_msg() fi } +# f_show_err $format [$arguments ...] +# +# Display a message in a dialog box with ``Error'' i18n title (overridden by +# setting msg_error) using printf(1) syntax. If running non-interactively, +# the process will terminate (using [above] f_die()). +# +f_show_err() +{ + [ "$nonInteractive" ] && f_die + + local msg + msg=$( printf "$@" ) -# f_yesno $fmt [ $opts ... ] + : ${msg:=${msg_an_unknown_error_occurred:-An unknown error occurred}} + + if [ "$_DIALOG_SUBR" ]; then + f_dialog_title "${msg_error:-Error}" + f_dialog_msgbox "$msg" + f_dialog_title_restore + else + dialog --title "${msg_error:-Error}" --msgbox "$msg" 0 0 + fi + return $SUCCESS +} + +# f_yesno $format [$arguments ...] # # Display a message in a dialog yes/no box using printf(1) syntax. # @@ -373,7 +411,7 @@ f_yesno() fi } -# f_noyes $fmt [ $opts ... ] +# f_noyes $format [$arguments ...] # # Display a message in a dialog yes/no box using printf(1) syntax. # NOTE: THis is just like the f_yesno function except "No" is default. @@ -466,7 +504,7 @@ f_include_lang() fi } -# f_usage $file [ $key1 $value1 ... ] +# f_usage $file [$key1 $value1 ...] # # Display USAGE file with optional pre-processor macro definitions. The first # argument is the template file containing the usage text to be displayed. If @@ -746,6 +784,88 @@ f_mounted() mount | grep -Eq " on $dir \([^)]+\)$" } +# f_eval_catch [-d] $funcname $utility $format [$arguments ...] +# +# Silently evaluate a command in a sub-shell and test for error. If debugging +# is enabled a copy of the command and its output is sent to debug (either +# stdout or file depending on environment). If an error occurs, output of the +# command is displayed in a dialog(1) msgbox using the [above] f_show_err() +# function (unless optional `-d' flag is the first argument, then no dialog). +# The $funcname argument is sent to debugging while the $utility argument is +# used in the title of the dialog box. The command that is sent to debugging +# along with $funcname is the product of the printf(1) syntax produced by +# $format with optional $arguments. +# +# Example 1: +# +# debug=1 +# f_eval_catch myfunc cat 'contents=$( cat "%s" )' /some/file +# # Error displayed ``cat: /some/file: No such file or directory'' +# +# Produces the following debug output: +# +# DEBUG: myfunc: cat "/some/file" +# DEBUG: myfunc: retval=1 +# cat: /some/file: No such file or directory +# +# Example 2: +# +# debug=1 +# f_eval_catch myfunc echo 'echo "%s"' "Hello, World!" +# # No error displayed +# +# Produces the following debug output: +# +# DEBUG: myfunc: echo "Hello, World!" +# DEBUG: myfunc: retval=0 +# Hello, World! +# +# Example 3: +# +# debug=1 +# echo 123 | f_eval_catch myfunc rev rev +# # No error displayed +# +# Produces the following debug output: +# +# DEBUG: myfunc: rev +# DEBUG: myfunc: retval=0 +# 321 +# +# Example 4: +# +# debug=1 +# f_eval_catch myfunc true true +# # No error displayed +# +# Produces the following debug output: +# +# DEBUG: myfunc: true +# DEBUG: myfunc: retval=0 +# +f_eval_catch() +{ + local no_dialog= + [ "$1" = "-d" ] && no_dialog=1 && shift 1 + local funcname="$1" utility="$2"; shift 2 + local cmd output retval + cmd=$( printf -- "$@" ) + f_dprintf "%s: %s" "$funcname" "$cmd" # Log command *before* eval + output=$( exec 2>&1; eval "$cmd" ) + retval=$? + if [ "$output" ]; then + f_dprintf "%s: retval=%i \n%s" "$funcname" \ + $retval "$output" + else + f_dprintf "%s: retval=%i " "$funcname" $retval + fi + ! [ "$no_dialog" -o "$nonInteractive" -o $retval -eq $SUCCESS ] && + msg_error="${msg_error:-Error}${utility:+: $utility}" \ + f_show_err "%s" "$output" + # NB: f_show_err will handle NULL output appropriately + return $retval +} + ############################################################ MAIN # Modified: stable/10/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/dialog.subr Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/share/dialog.subr Thu Nov 21 03:38:47 2013 (r258420) @@ -301,7 +301,16 @@ f_dialog_max_size() if [ "$USE_XDIALOG" ]; then __max_size="$XDIALOG_MAXSIZE" # see CONFIGURATION else - __max_size=$( stty size 2> /dev/null ) # usually "24 80" + if __max_size=$( $DIALOG --print-maxsize \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) + then + # usually "MaxSize: 24, 80" + __max_size="${__max_size#*: }" + f_replaceall "$__max_size" "," "" __max_size + else + __max_size=$( stty size 2> /dev/null ) + # usually "24 80" + fi : ${__max_size:=$DEFAULT_TERMINAL_SIZE} fi if [ "$__var_height" ]; then @@ -518,7 +527,7 @@ f_dialog_menu_constrain() : ${__min_rows:=0} fi - local __max_rows=$(( $__max_height_menu_constrain - 8 )) + local __max_rows=$(( $__max_height_menu_constrain - 7 )) # If prompt_len is zero (no prompt), bump the max-rows by 1 # Default assumption is (if no argument) that there's no prompt [ ${__prompt_len:-0} -gt 0 ] || Modified: stable/10/usr.sbin/bsdconfig/share/media/cdrom.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/media/cdrom.subr Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/share/media/cdrom.subr Thu Nov 21 03:38:47 2013 (r258420) @@ -163,8 +163,7 @@ f_media_get_cdrom() # f_media_shutdown_cdrom $device # -# Shuts down the CDROM device and ejects the media using f_media_eject_cdrom(), -# below. Return status should be ignored. +# Shuts down the CDROM device. Return status should be ignored. # f_media_shutdown_cdrom() { @@ -184,8 +183,6 @@ f_media_shutdown_cdrom() else CDROM_MOUNTED= fi - - f_media_eject_cdrom "$dev" } # f_media_eject_cdrom $device Modified: stable/10/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/share/media/http.subr Thu Nov 21 03:38:47 2013 (r258420) @@ -77,7 +77,8 @@ f_dialog_menu_media_http() f_dialog_title_restore local prompt="$msg_please_select_the_site_closest_to_you_or_other" local menu_list=" - '$msg_main_site' 'ftp.freebsd.org' + 'dist $msg_main_site' 'ftp.freebsd.org' + 'pkg $msg_main_site' 'pkg.freebsd.org' 'URL' '$msg_specify_some_other_http_site' " # END-QUOTE local hline="$msg_select_a_site_thats_close" @@ -452,6 +453,11 @@ f_media_init_http() local dev="$1" f_dprintf "Init routine called for HTTP device. dev=[%s]" "$dev" + if [ "$HTTP_INITIALIZED" ]; then + f_dprintf "HTTP device already initialized." + return $SUCCESS + fi + # # First verify access # @@ -481,7 +487,7 @@ f_media_init_http() case "$rel" in __RELEASE|any) - setvar $VAR_HTTP_PATH "$VAR_HTTP_DIR" + f_getvar $VAR_HTTP_DIR $VAR_HTTP_PATH f_http_check_access http_found=$? ;; @@ -493,22 +499,31 @@ f_media_init_http() # local fdir hp f_getvar $VAR_HTTP_PATH%/ hp - for fdir in $HTTP_DIRS; do - setvar $VAR_HTTP_PATH "$hp/$fdir/$rel" - if f_http_check_access; then - http_found=$SUCCESS - break - fi - done + setvar $VAR_HTTP_PATH "$hp/$PKG_ABI/latest" + if [ "$PKG_ABI" ] && f_http_check_access; then + http_found=$SUCCESS + setvar $VAR_HTTP_PATH "$hp" + else + for fdir in $HTTP_DIRS; do + setvar $VAR_HTTP_PATH "$hp/$fdir/$rel" + if f_http_check_access; then + http_found=$SUCCESS + break + fi + done + fi esac - [ $http_found -eq $SUCCESS ] && break + if [ $http_found -eq $SUCCESS ]; then + HTTP_INITIALIZED=YES + break + fi f_getvar $VAR_HTTP_PATH http_path f_show_msg "$msg_please_check_the_url_and_try_again" \ "$http_path" - unset $VAR_HTTP_PATH + unset HTTP_INITIALIZED $VAR_HTTP_PATH f_media_set_http || break done @@ -558,6 +573,11 @@ f_media_get_http() f_getvar $VAR_HTTP_HOST http_host f_getvar $VAR_HTTP_PORT http_port + if [ ! "$HTTP_INITIALIZED" ]; then + f_dprintf "No HTTP connection open, can't get file %s" "$file" + return $FAILURE + fi + if ! { f_validate_ipaddr "$http_host" || f_validate_ipaddr6 "$http_host" || @@ -595,6 +615,7 @@ f_media_get_http() local url="$http_path/$file" rx f_dprintf "sending http request for: %s" "$url" + f_dprintf "using nc to connect to: %s:%s" "$host" "$http_port" printf "GET %s HTTP/1.0\r\n\r\n" "$url" | nc -n "$host" "$http_port" | ( # @@ -648,6 +669,18 @@ f_media_get_http() return $FAILURE } +# f_media_shutdown_http $device +# +# Shuts down the HTTP device. Return status should be ignored. Note that since +# we don't maintain an open connection to the HTTP server, nothing to do. +# +f_media_shutdown_http() +{ + [ "$HTTP_INITIALIZED" ] || return $SUCCESS + + unset HTTP_INITIALIZED +} + ############################################################ MAIN f_dprintf "%s: Successfully loaded." media/http.subr Modified: stable/10/usr.sbin/bsdconfig/share/media/tcpip.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/media/tcpip.subr Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/share/media/tcpip.subr Thu Nov 21 03:38:47 2013 (r258420) @@ -1020,10 +1020,41 @@ f_host_lookup() # Fall back to host(1) -- which is further governed by nsswitch.conf(5) # - local __output __ip6 __addrs="" __wait="" - f_getvar $VAR_MEDIA_TIMEOUT __wait - [ "$__wait" ] && __wait="-W $(( $__wait / 2 ))" + local __output __ip6 __addrs= f_getvar $VAR_IPV6_ENABLE __ip6 + + # If we have a TCP media type configured, check for an SRV record + local __srvtypes= + { f_quietly f_getvar $VAR_HTTP_PATH || + f_quietly f_getvar $VAR_HTTP_PROXY_PATH + } && __srvtypes="$__srvtypes _http._tcp" + f_quietly f_getvar $VAR_FTP_PATH && __srvtypes="$__srvtypes _ftp._tcp" + f_quietly f_getvar $VAR_NFS_PATH && + __srvtypes="$__srvtypes _nfs._tcp _nfs._udp" + + # Calculate wait time as dividend of total time and host(1) invocations + local __host_runs __wait + if [ "$__ip6" = "YES" ]; then + __host_runs=$(( 2 + $( set -- $__srvtypes; echo $# ) )) + else + __host_runs=$(( 1 + $( set -- $__srvtypes; echo $# ) )) + fi + f_getvar $VAR_MEDIA_TIMEOUT __wait + [ "$__wait" ] && __wait="-W $(( $__wait / $__host_runs ))" + + # Query SRV types first (1st host response taken as new host to query) + for __type in $__srvtypes; do + if __output=$( + host -t SRV $__wait -- "$__type.$__host" \ + 2> /dev/null + ); then + __host=$( echo "$__output" | + awk '/ SRV /{print $NF;exit}' ) + break + fi + done + + # Try IPv6 first (if enabled) if [ "$__ip6" = "YES" ]; then if ! __output=$( host -t AAAA $__wait -- "$__host" 2>&1 ); then # An error occurred, display in-full and return error @@ -1031,13 +1062,17 @@ f_host_lookup() setvar "$__var_to_set" "$__output" return $FAILURE fi + # Add the IPv6 addresses and fall-through to collect IPv4 too __addrs=$( echo "$__output" | awk '/ address /{print $NF}' ) fi + + # Good ol' IPv4 if ! __output=$( host -t A $__wait -- "$__host" 2>&1 ); then # An error occurred, display it in-full and return error [ "$__var_to_set" ] && setvar "$__var_to_set" "$__output" return $FAILURE fi + __addrs="$__addrs${__addrs:+ }$( echo "$__output" | awk '/ address /{print $NF}' )" if [ "$__var_to_set" ]; then Modified: stable/10/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/packages/index.subr Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/share/packages/index.subr Thu Nov 21 03:38:47 2013 (r258420) @@ -43,24 +43,53 @@ f_include_lang $BSDCFG_LIBE/include/mess PACKAGE_INDEX= _INDEX_INITTED= +# +# Default path to pkg(8) repo-packagesite.sqlite database +# +SQLITE_REPO="/var/db/pkg/repo-packagesite.sqlite" + +# +# Default path to on-disk cache INDEX file +# +PACKAGES_INDEX_CACHEFILE="/var/run/bsdconfig/packages_INDEX.cache" + +# +# INDEX format for FreeBSD-6.0 or higher: +# +# package|port-origin|install-prefix|comment|port-desc-file|maintainer| +# categories|build-deps|run-deps|www-site|reserve|reserve|reserve|disc +# +INDEX_FORMAT="%n-%v" # package +INDEX_FORMAT="$INDEX_FORMAT|/usr/ports/%o" # port-origin +INDEX_FORMAT="$INDEX_FORMAT|%p" # install-prefix +INDEX_FORMAT="$INDEX_FORMAT|%c" # comment +INDEX_FORMAT="$INDEX_FORMAT|/usr/ports/%o/pkg-descr" # port-desc-file +INDEX_FORMAT="$INDEX_FORMAT|%m" # maintainer +INDEX_FORMAT="$INDEX_FORMAT|@CATEGORIES@" # place-holder +INDEX_FORMAT="$INDEX_FORMAT|" # build-deps +INDEX_FORMAT="$INDEX_FORMAT|@RUNDEPS@" # place-holder +INDEX_FORMAT="$INDEX_FORMAT|%w" # www-site +INDEX_FORMAT="$INDEX_FORMAT|" # reserved +INDEX_FORMAT="$INDEX_FORMAT|" # reserved +INDEX_FORMAT="$INDEX_FORMAT|" # reserved +INDEX_FORMAT="$INDEX_FORMAT|" # disc + ############################################################ FUNCTIONS -# f_index_initialize $path [$var_to_set] +# f_index_initialize [$var_to_set] # -# Read and initialize the global index. $path is to be relative to the chosen -# media (not necessarily the filesystem; e.g. FTP) -- this is usually going to -# be `packages/INDEX'. Returns success unless media cannot be initialized for -# any reason (e.g. user cancels media selection dialog) or an error occurs. The -# index is sorted before being loaded into $var_to_set. +# Read and initialize the global index. Returns success unless media cannot be +# initialized for any reason (e.g. user cancels media selection dialog or an +# error occurs). The index is sorted before being loaded into $var_to_set. # # NOTE: The index is processed with f_index_read() [below] after being loaded. # f_index_initialize() { - local __path="$1" __var_to_set="${2:-PACKAGE_INDEX}" + local __funcname=f_index_initialize + local __var_to_set="${2:-PACKAGE_INDEX}" [ "$_INDEX_INITTED" ] && return $SUCCESS - [ "$__path" ] || return $FAILURE # Got any media? f_media_verify || return $FAILURE @@ -68,20 +97,170 @@ f_index_initialize() # Does it move when you kick it? f_device_init media || return $FAILURE - f_show_info "$msg_attempting_to_fetch_file_from_selected_media" \ - "$__path" - eval "$__var_to_set"='$( f_device_get media "$__path" )' - if [ $? -ne $SUCCESS ]; then - f_show_msg "$msg_unable_to_get_file_from_selected_media" \ - "$__path" + f_show_info "$msg_attempting_to_update_repository_catalogue" + + # + # Generate $PACKAGESITE variable for pkg(8) based on media type + # + local __type __data __site + device_media get type __type + device_media get private __data + case "$__type" in + $DEVICE_TYPE_DIRECTORY) + __site="file://$__data/packages/$PKG_ABI" ;; + $DEVICE_TYPE_FLOPPY) + __site="file://${__data:-$MOUNTPOINT}/packages/$PKG_ABI" ;; + $DEVICE_TYPE_FTP) + f_getvar $VAR_FTP_PATH __site + __site="$__site/packages/$PKG_ABI" ;; + $DEVICE_TYPE_HTTP) + f_getvar $VAR_HTTP_PATH __site + __site="$__site/$PKG_ABI/latest" ;; + $DEVICE_TYPE_HTTP_PROXY) + f_getvar $VAR_HTTP_PROXY_PATH __site + __site="$__site/packages/$PKG_ABI" ;; + *) # UFS, DISK, CDROM, USB, DOS, NFS, etc. + __site="file://$MOUNTPOINT/packages/$PKG_ABI" + esac + + export PACKAGESITE="$__site" + f_dprintf "PACKAGESITE=[%s]" "$PACKAGESITE" + if ! f_eval_catch $__funcname pkg "pkg update"; then + f_show_err "$msg_unable_to_update_pkg_from_selected_media" + f_device_shutdown media + return $FAILURE + fi + + # + # Try to get contents from validated on-disk cache + # + + # + # Calculate digest used to determine if the on-disk persistant cache + # INDEX (containing this digest on the first line) is valid and can be + # used to quickly populate the environment. + # + local __sqlite_digest + if ! __sqlite_digest=$( md5 < "$SQLITE_REPO" 2> /dev/null ); then + f_show_err "$msg_no_pkg_database_found" + f_device_shutdown media + return $FAILURE + fi + + # + # Check to see if the persistant cache INDEX file exists + # + if [ -f "$PACKAGES_INDEX_CACHEFILE" ]; then + # + # Attempt to populate the environment with the (soon to be) + # validated on-disk cache. If validation fails, fall-back to + # generating a fresh cache. + # + if eval $__var_to_set='$( + ( # Get digest as the first word on first line + read digest rest_ignored + + # + # If the stored digest matches the calculated- + # one populate the environment from the on-disk + # cache and provide success exit status. + # + if [ "$digest" = "$__sqlite_digest" ]; then + cat + exit $SUCCESS + else + # Otherwise, return the current value + eval echo \"\$__var_to_set\" + exit $FAILURE + fi + ) < "$PACKAGES_INDEX_CACHEFILE" 2> /dev/null + )'; then + f_show_info \ + "$msg_located_index_now_reading_package_data_from_it" + if ! f_index_read "$__var_to_set"; then + f_show_err \ + "$msg_io_or_format_error_on_index_file" + return $FAILURE + fi + _INDEX_INITTED=1 + return $SUCCESS + fi + # Otherwise, fall-thru to create a fresh cache from scratch + fi + + # + # If we reach this point, we need to generate the data from scratch + # + + f_show_info "$msg_getting_package_categories_via_pkg_rquery" + if ! eval "$( pkg rquery "%n-%v %C" | awk ' + { categories[$1] = categories[$1] " " $2 } + END { + for (package in categories) + { + cats = categories[package] + sub(/^ /, "", cats) + gsub(/[^[:alnum:]_]/, "_", package) + printf "local _%s_categories=\"%s\";\n", package, cats + } + }' )"; then + f_show_err "$msg_unable_to_pkg_rquery_package_dependencies" f_device_shutdown media return $FAILURE fi + + f_show_info "$msg_getting_package_dependencies_via_pkg_rquery" + if ! eval "$( pkg rquery "%n-%v %dn-%dv" | awk ' + { rundeps[$1] = rundeps[$1] " " $2 } + END { + for (package in rundeps) + { + deps = rundeps[package] + sub(/^ /, "", deps) + gsub(/[^[:alnum:]_]/, "_", package) + printf "local _%s_rundeps=\"%s\";\n", package, deps + } + }' )"; then + f_show_err "$msg_unable_to_pkg_rquery_package_dependencies" + f_device_shutdown media + return $FAILURE + fi + + f_show_info "$msg_generating_index_from_pkg_database" + eval "$__var_to_set"='$( pkg rquery "$INDEX_FORMAT" | + while read LINE; do + package="${LINE%%|*}"; + f_str2varname "$package" varpkg; + eval f_replaceall \"\$LINE\" \"\|@CATEGORIES@\|\" \ + \"\|\$_${varpkg}_categories\|\" LINE + eval f_replaceall \"\$LINE\" \"\|@RUNDEPS@\|\" \ + \"\|\$_${varpkg}_rundeps\|\" LINE + echo "$LINE" + done + )' # always returns true (status of last item in pipe-chain) eval "$__var_to_set"='$( debug= f_getvar "$__var_to_set" | sort )' + # + # Attempt to create the persistant on-disk cache + # + + # Create a new temporary file to write to + local __tmpfile="$( mktemp -t "$pgm" )" + if [ "$__tmpfile" ]; then + # Write the temporary file contents + echo "$__sqlite_digest" > "$__tmpfile" + debug= f_getvar "$__var_to_set" >> "$__tmpfile" + + # Finally, move the temporary file into place + case "$PACKAGES_INDEX_CACHEFILE" in + */*) f_quietly mkdir -p "${PACKAGES_INDEX_CACHEFILE%/*}" + esac + f_quietly mv -f "$__tmpfile" "$PACKAGES_INDEX_CACHEFILE" + fi + f_show_info "$msg_located_index_now_reading_package_data_from_it" if ! f_index_read "$__var_to_set"; then - f_show_msg "$msg_io_or_format_error_on_index_file" "$__path" + f_show_err "$msg_io_or_format_error_on_index_file" return $FAILURE fi Modified: stable/10/usr.sbin/bsdconfig/share/packages/packages.subr ============================================================================== --- stable/10/usr.sbin/bsdconfig/share/packages/packages.subr Thu Nov 21 03:24:10 2013 (r258419) +++ stable/10/usr.sbin/bsdconfig/share/packages/packages.subr Thu Nov 21 03:38:47 2013 (r258420) @@ -53,7 +53,7 @@ f_include_lang $BSDCFG_LIBE/include/mess # # Package extensions to try # -PACKAGE_EXTENSIONS=".tbz .tbz2 .tgz" +PACKAGE_EXTENSIONS=".txz .tbz .tbz2 .tgz" # # Variables used to track runtime states @@ -164,24 +164,13 @@ f_package_deselect() # f_package_detect_installed # -# Detect installed packages. Currently this searches /var/db/pkg for directory +# Detect installed packages. Currently this uses pkg-query(8) for querying # entries and marks each entry as an installed/selected package. # f_package_detect_installed() { - local installed package varpkg - # - # XXX KLUDGE ALERT! This makes evil assumptions about how XXX - # packages register themselves and should *really* be done with - # `pkg_info -e ' except that this is too slow for an - # item check routine.. :-( - # - # NOTE: When transitioning to pkgng, make a single fork to `pkg' to - # produce a list of all installed packages and parse _that_ - # - installed=$( find -s /var/db/pkg -mindepth 1 -maxdepth 1 -type d | - sed -e 's:/var/db/pkg/::' ) - for package in $installed; do + local package varpkg + for package in $( pkg query "%n-%v" ); do f_str2varname $package varpkg export _mark_$varpkg=X # exported for awk(1) ENVIRON[] f_package_select $package @@ -582,12 +571,12 @@ f_package_menu_deselect() # f_package_review() { + local funcname=f_package_review local prompt # Calculated below local menu_list # Calculated below local hline="$hline_alnum_arrows_punc_tab_enter" - local fname=f_package_review - f_dprintf "%s: SELECTED_PACKAGES=[%s]" $fname "$SELECTED_PACKAGES" + f_dprintf "$funcname: SELECTED_PACKAGES=[%s]" "$SELECTED_PACKAGES" prompt=$( printf "$msg_reviewing_selected_packages" "$_All_nselected" ) @@ -639,7 +628,7 @@ f_package_review() f_str2varname "$package" varpkg debug= f_getvar _mark_$varpkg mark [ "$mark" = "I" ] || continue - f_dprintf "%s: Installing %s package" $fname "$package" + f_dprintf "$funcname: Installing %s package" "$package" f_package_add "$package" done for package in $SELECTED_PACKAGES; do @@ -647,7 +636,7 @@ f_package_review() f_str2varname "$package" varpkg debug= f_getvar _mark_$varpkg mark [ "$mark" = "R" ] || continue - f_dprintf "%s: Reinstalling %s package" $fname "$package" + f_dprintf "$funcname: Reinstalling %s package" "$package" f_package_reinstall "$package" done for package in $SELECTED_PACKAGES; do @@ -655,7 +644,7 @@ f_package_review() f_str2varname "$package" varpkg debug= f_getvar _mark_$varpkg mark [ "$mark" = "U" ] || continue - f_dprintf "%s: Uninstalling %s package" $fname "$package" + f_dprintf "$funcname: Uninstalling %s package" "$package" f_package_delete "$package" || continue f_package_deselect "$package" done @@ -954,11 +943,11 @@ f_package_add() # f_package_extract() { + local funcname=f_package_extract local device="$1" name="$2" depended="$3" - local fname=f_package_extract - f_dprintf "%s: device=[%s] name=[%s] depended=[%s]" \ - $fname "$device" "$name" "$depended" + f_dprintf "$funcname: device=[%s] name=[%s] depended=[%s]" \ + "$device" "$name" "$depended" # Check to make sure it's not already there local varpkg mark= @@ -982,35 +971,45 @@ f_package_extract() f_getvar $VAR_PKG_TMPDIR:-/var/tmp tmpdir f_quietly mkdir -p -m 1777 "$tmpdir" - local path + local path device_type + device_$device get type device_type case "$name" in */*) path="$name" ;; *) - case "$name" in - *-*|*_*) path="packages/All/$name" ;; - *) path="packages/Latest/$name" - esac + if [ "$device_type" = "$DEVICE_TYPE_HTTP" ]; then + path="$PKG_ABI/latest/All/$name" + else + path="packages/$PKG_ABI/All/$name" + fi esac - # We have a path, call the device strategy routine to get the file + # We have a path, call the device strategy routine to check the file local pkg_ext found= for pkg_ext in "" $PACKAGE_EXTENSIONS; do if f_device_get $device "$path$pkg_ext" $PROBE_EXIST; then path="$path$pkg_ext" - f_dprintf "%s: found path=[%s] dev=[%s]" \ - $fname "$path" "$device" + found=1 + break + elif [ "$device_type" = "$DEVICE_TYPE_HTTP" ] && + f_device_get $device \ + "packages/$PKG_ABI/All/$name$pkg_ext" $PROBE_EXIST + then + # Mirroring physical media over HTTP + path="packages/$PKG_ABI/All/$name$pkg_ext" found=1 break fi done + [ "$found" ] && f_dprintf "$funcname: found path=[%s] dev=[%s]" \ + "$path" "$device" local alert=f_show_msg no_confirm= f_getvar $VAR_NO_CONFIRM no_confirm [ "$no_confirm" ] && alert=f_show_info if [ ! "$found" ]; then - f_dprintf "%s: No such %s file on %s device" \ - $fname "$path" "$device" + f_dprintf "$funcname: No such %s file on %s device" \ + "$path" "$device" $alert "$msg_unable_to_fetch_package_from_selected_media" \ "$name" [ "$no_confirm" ] && sleep 2 @@ -1026,27 +1025,14 @@ f_package_extract() f_show_info "$msg_adding_package_from_media" "$name" "$devname" fi - # Get package data and pipe into pkg_add(1) while providing feedback - { - if ! f_device_get $device "$path"; then - $alert "$msg_io_error_while_reading_in_the_package" \ - "$name" \ - >&$DIALOG_TERMINAL_PASSTHRU_FD 2> /dev/null - [ "$no_confirm" ] && sleep 2 - else *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Nov 21 03:40:54 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 BEC214BE; Thu, 21 Nov 2013 03:40: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 AD13A2E80; Thu, 21 Nov 2013 03:40: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 rAL3esZV005273; Thu, 21 Nov 2013 03:40:54 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAL3eqKt005257; Thu, 21 Nov 2013 03:40:52 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201311210340.rAL3eqKt005257@svn.freebsd.org> From: Devin Teske Date: Thu, 21 Nov 2013 03:40:52 +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: r258421 - in stable/10/usr.sbin/bsdinstall: . scripts 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, 21 Nov 2013 03:40:54 -0000 Author: dteske Date: Thu Nov 21 03:40:52 2013 New Revision: 258421 URL: http://svnweb.freebsd.org/changeset/base/258421 Log: MFC Revisions: 256549: man-page updates 256551: .Dd bump in manpage 256553: bootenv -> ROOT fix 257842: monster list of fixes 257843: minor touchup 257844: copy install log 257845: fixup to last 257872: mdoc fixup 257939: debug check 258021: MBR bootcode fixup Reviewed by: many Discussed on: -current Approved by: re (hrs) Modified: stable/10/usr.sbin/bsdinstall/bsdinstall stable/10/usr.sbin/bsdinstall/bsdinstall.8 stable/10/usr.sbin/bsdinstall/scripts/auto stable/10/usr.sbin/bsdinstall/scripts/config stable/10/usr.sbin/bsdinstall/scripts/docsinstall stable/10/usr.sbin/bsdinstall/scripts/jail stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 stable/10/usr.sbin/bsdinstall/scripts/script stable/10/usr.sbin/bsdinstall/scripts/wlanconfig stable/10/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/10/usr.sbin/bsdinstall/ (props changed) Modified: stable/10/usr.sbin/bsdinstall/bsdinstall ============================================================================== --- stable/10/usr.sbin/bsdinstall/bsdinstall Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/bsdinstall Thu Nov 21 03:40:52 2013 (r258421) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,17 +26,62 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +# Delay processing of debug flags as the parent until MAIN. export'd to disable +# re-processing of flags (all children log to the parent's log file). +# +export DEBUG_SELF_INITIALIZE= + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +############################################################ GLOBALS -: ${BSDINSTALL_LOG="/tmp/bsdinstall_log"}; export BSDINSTALL_LOG : ${BSDINSTALL_TMPETC="/tmp/bsdinstall_etc"}; export BSDINSTALL_TMPETC : ${BSDINSTALL_TMPBOOT="/tmp/bsdinstall_boot"}; export BSDINSTALL_TMPBOOT : ${PATH_FSTAB="$BSDINSTALL_TMPETC/fstab"}; export PATH_FSTAB : ${BSDINSTALL_DISTDIR="/usr/freebsd-dist"}; export BSDINSTALL_DISTDIR : ${BSDINSTALL_CHROOT="/mnt"}; export BSDINSTALL_CHROOT -VERB=${1:-auto}; shift +export debugFile="${debugFile-${BSDINSTALL_LOG-/tmp/bsdinstall_log}}" + +############################################################ MAIN + +# +# Process command-line arguments +# +while getopts $GETOPTS_STDARGS ignored; do + : just skipping known flags +done +shift $(( $OPTIND - 1 )) + +# What are we here to do? +VERB="${1:-auto}"; shift [ -d "$BSDINSTALL_TMPETC" ] || mkdir -p "$BSDINSTALL_TMPETC" [ -d "$BSDINSTALL_TMPBOOT" ] || mkdir -p "$BSDINSTALL_TMPBOOT" -echo "Running installation step: $VERB $@" >> "$BSDINSTALL_LOG" -exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$BSDINSTALL_LOG" + +# Only enable debugging if debugFile is non-NULL and can be initialized +f_quietly f_debug_init +f_isset debugFile || debug= + +f_dprintf "Running installation step: %s %s" "$VERB" "$*" +if [ "$debug" ]; then + case "$debugFile" in + # If NULL, send errors to the bit-bucket + "") exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null ;; + # If begins with `+', send errors to both terminal and file (no `+') + +*) exec "/usr/libexec/bsdinstall/$VERB" "$@" \ + 2>&1 >&$TERMINAL_STDOUT_PASSTHRU | tee "${debugFile#+}" ;; + # Otherwise, just send errors to the file specified + *) exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$debugFile" + esac +else + exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null +fi + +################################################################################ +# END +################################################################################ Modified: stable/10/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- stable/10/usr.sbin/bsdinstall/bsdinstall.8 Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/bsdinstall.8 Thu Nov 21 03:40:52 2013 (r258421) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 6, 2013 +.Dd October 15, 2013 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -33,6 +33,7 @@ .Nd system installer .Sh SYNOPSIS .Nm +.Op Ar options .Op Ar target .Op Ar ... .Sh DESCRIPTION @@ -49,6 +50,18 @@ invoked with no arguments, it will invok target, which provides a standard interactive installation, invoking the others in sequence. To perform a scripted installation, these subtargets can be invoked separately by an installation script. +.Sh OPTIONS +.Nm +supports the following options, global to all targets: +.Bl -tag -width indent+ +.It Fl D Ar file +Provide a path for the installation log file +.Pq overrides Ev BSDINSTALL_LOG . +See +.Sx ENVIRONMENT VARIABLES +for more information on +.Ev BSDINSTALL_LOG . +.El .Sh TARGETS Most of the following targets are only useful for scripting the installer. For interactive use, most users will be interested only in the @@ -108,6 +121,21 @@ installations. Partitions disks, runs .Xr newfs 8 , and writes the new system's .Pa fstab . +.It Cm zfsboot +Provides the installer's +.Pq experimental +interactive/scriptable ZFS partitioner for multi-disk installations. +Creates a single +.Ic zpool +with datasets and writes to the new system's +.Pa rc.conf , +.Pa loader.conf , +and +.Pa fstab . +Supports +.Xr geli 8 , +.Xr gnop 8 , +and many other features. .It Cm partedit Provides the installer's interactive manual disk partitioner, with support for multi disk setups, non-UFS file systems, and manual selection of @@ -315,6 +343,15 @@ the preamble can contain a variable which is passed to the .Cm scriptedpart target to control disk setup. +Alternatively, +instead of +.Ev PARTITIONS , +the preamble can contain the variable +.Ev ZFSBOOT_DATASETS +which is parsed by the +.Pq experimental +.Cm zfsboot +target to control ZFS datasets/options of the boot pool setup. .Ss SETUP SCRIPT Following the preamble is an optional shell script, beginning with a #! declaration. This script will be run at the end of the installation process Modified: stable/10/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/auto Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/scripts/auto Thu Nov 21 03:40:52 2013 (r258421) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,8 +26,13 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 -echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +############################################################ FUNCTIONS error() { test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR @@ -41,6 +47,9 @@ error() { fi } +############################################################ MAIN + +f_dprintf "Began Installation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC @@ -126,7 +135,12 @@ case "$PARTMODE" in sh 2>&1 ;; "Manual") # Manual - bsdinstall partedit || error + if f_isset debugFile; then + # Give partedit the path to our logfile so it can append + BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error + else + bsdinstall partedit || error + fi bsdinstall mount || error ;; "ZFS") # ZFS @@ -247,5 +261,8 @@ fi bsdinstall entropy bsdinstall umount -echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG +f_dprintf "Installation Completed at %s" "$( date )" +################################################################################ +# END +################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/config ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/config Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/scripts/config Thu Nov 21 03:40:52 2013 (r258421) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,6 +26,8 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ MAIN cat $BSDINSTALL_TMPETC/rc.conf.* >> $BSDINSTALL_TMPETC/rc.conf rm $BSDINSTALL_TMPETC/rc.conf.* @@ -36,6 +39,11 @@ rm $BSDINSTALL_TMPBOOT/loader.conf.* cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHROOT/boot +[ "${debugFile#+}" ] && cp "${debugFile#+}" $BSDINSTALL_CHROOT/var/log/ + # Set up other things from installed config chroot $BSDINSTALL_CHROOT /usr/bin/newaliases +################################################################################ +# END +################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/docsinstall ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/docsinstall Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/scripts/docsinstall Thu Nov 21 03:40:52 2013 (r258421) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Marc Fonvieille +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,62 +26,137 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr +f_include $BSDCFG_SHARE/packages/packages.subr +############################################################ CONFIGURATION -exec 3>&1 -DOCS=$(dialog --backtitle "FreeBSD Installer" \ - --title "FreeBSD Documentation Installation" --separate-output \ - --checklist "This menu will allow you to install the whole documentation set -from the FreeBSD Documentation Project: Handbook, FAQ and articles.\n\n -Please select the language versions you wish to install. At minimum, -you should install the English version, this is the original version -of the documentation.\n\n -NB: This requires a working, configured network connection." 0 0 0 \ - bn "Bengali Documentation" ${DIST_DOC_BN:-off} \ - da "Danish Documentation" ${DIST_DOC_DA:-off} \ - de "German Documentation" ${DIST_DOC_DE:-off} \ - el "Greek Documentation" ${DIST_DOC_EL:-off} \ - en "English Documentation (recommended)" ${DIST_DOC_EN:-on} \ - es "Spanish Documentation" ${DIST_DOC_ES:-off} \ - fr "French Documentation" ${DIST_DOC_FR:-off} \ - hu "Hungarian Documentation" ${DIST_DOC_HU:-off} \ - it "Italian Documentation" ${DIST_DOC_IT:-off} \ - ja "Japanese Documentation" ${DIST_DOC_JA:-off} \ - mn "Mongolian Documentation" ${DIST_DOC_MN:-off} \ - nl "Dutch Documentation" ${DIST_DOC_NL:-off} \ - pl "Polish Documentation" ${DIST_DOC_PL:-off} \ - pt "Portuguese Documentation" ${DIST_DOC_PT:-off} \ - ru "Russian Documentation" ${DIST_DOC_RU:-off} \ - sr "Serbian Documentation" ${DIST_DOC_SR:-off} \ - tr "Turkish Documentation" ${DIST_DOC_TR:-off} \ - zh_cn "Simplified Chinese Documentation" ${DIST_DOC_ZH_CN:-off} \ - zh_tw "Traditional Chinese Documentation" ${DIST_DOC_ZH_TW:-off} \ -2>&1 1>&3) -test $? -eq 0 || exit 0 -exec 3>&- - -# Let pkg(8) be able to use name servers -cp ${BSDINSTALL_TMPETC}/resolv.conf ${BSDINSTALL_CHROOT}/etc - -error() { - dialog --backtitle "FreeBSD Installer" --title "Error" --msgbox \ - "Could not install package $1 (`tail -n 1 ${BSDINSTALL_LOG}`)" 0 0 - exit 1 +# +# List of languages to display (descriptions pulled from $msg_{lang}doc_desc) +# +: ${DOCSINSTALL_LANGS:=\ + bn da de el en es fr hu it ja mn nl pl pt ru sr tr zh_cn zh_tw \ } +############################################################ GLOBALS + +# +# Strings that should be moved to an i18n file and loaded with f_include_lang() +# +hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" +msg_bndoc_desc="Bengali Documentation" +msg_cancel="Cancel" +msg_dadoc_desc="Danish Documentation" +msg_dedoc_desc="German Documentation" +msg_docsinstall_menu_text="This menu allows you to install the whole documentation set from\nthe FreeBSD Documentation Project: Handbook, FAQ, and articles.\n\nPlease select the language versions you wish to install. At\nminimum, you should install the English version, the original\nversion of the documentation." +msg_eldoc_desc="Greek Documentation" +msg_endoc_desc="English Documentation (recommended)" +msg_esdoc_desc="Spanish Documentation" +msg_frdoc_desc="French Documentation" +msg_freebsd_documentation_installation="FreeBSD Documentation Installation" +msg_freebsd_installer="FreeBSD Installer" +msg_hudoc_desc="Hungarian Documentation" +msg_itdoc_desc="Italian Documentation" +msg_jadoc_desc="Japanese Documentation" +msg_mndoc_desc="Mongolian Documentation" +msg_nldoc_desc="Dutch Documentation" +msg_ok="OK" +msg_pldoc_desc="Polish Documentation" +msg_ptdoc_desc="Portuguese Documentation" +msg_rudoc_desc="Russian Documentation" +msg_srdoc_desc="Serbian Documentation" +msg_trdoc_desc="Turkish Documentation" +msg_zh_cndoc_desc="Simplified Chinese Documentation" +msg_zh_twdoc_desc="Traditional Chinese Documentation" + +############################################################ FUNCTIONS + +# dialog_menu_main +# +# Display the dialog(1)-based application main menu. +# +dialog_menu_main() +{ + local title="$DIALOG_TITLE" + local btitle="$DIALOG_BACKTITLE" + local prompt="$msg_docsinstall_menu_text" + local check_list= # Calculated below + local hline="$hline_arrows_space_tab_enter" + + local lang desc upper status + for lang in $DOCSINSTALL_LANGS; do + # Fetch the i18n description to display + f_getvar msg_${lang}doc_desc desc + f_shell_escape "$desc" desc + + # Get default status for each language + upper=$( echo "$lang" | awk '{print toupper($0)}' ) + case "$lang" in + en) f_getvar DIST_DOC_$upper:-on status ;; + *) f_getvar DIST_DOC_$upper:-off status + esac + + check_list="$check_list + '$lang' '$desc' '$status' + " # END-QUOTE + done + + local height width rows + eval f_dialog_checklist_size height width rows \ + \"\$title\" \ + \"\$btitle\" \ + \"\$prompt\" \ + \"\$hline\" \ + $check_list + local selected + selected=$( eval $DIALOG \ + --title \"\$title\" \ + --backtitle \"\$btitle\" \ + --hline \"\$hline\" \ + --ok-label \"\$msg_ok\" \ + --cancel-label \"\$msg_cancel\" \ + --checklist \"\$prompt\" \ + $height $width $rows \ + $check_list \ + 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD + ) + local retval=$? + f_dialog_menutag_store -s "$selected" + return $retval +} -clear -echo "FreeBSD Installer" -echo "========================" -echo - -echo "Please wait while the repository metadata is fetched." -echo "This may take a few moments." - -env ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install pkg \ - || error pkg - -for i in $DOCS; do - env ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install ${i}-freebsd-doc \ - || error $i-freebsd-doc +############################################################ MAIN + +# +# Initialize +# +f_dialog_title "$msg_freebsd_documentation_installation" +f_dialog_backtitle "$msg_freebsd_installer" +f_mustberoot_init + +# +# Launch application main menu +# +dialog_menu_main || f_die +f_dialog_menutag_fetch selected + +# Let pkg_add be able to use name servers +f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/ + +# +# Install each of the selected packages +# +for lang in $selected; do + f_package_add $lang-freebsd-doc || return $FAILURE done + +################################################################################ +# END +################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/jail ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/jail Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/scripts/jail Thu Nov 21 03:40:52 2013 (r258421) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,8 +26,15 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +############################################################ MAIN -echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +f_dprintf "Began Installation at %s" "$( date )" export BSDINSTALL_CHROOT=$1 error() { @@ -112,5 +120,8 @@ cp /etc/localtime $1/etc bsdinstall entropy -echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG +f_dprintf "Installation Completed at %s" "$(date)" +################################################################################ +# END +################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv4 Thu Nov 21 03:40:52 2013 (r258421) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,13 +26,15 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr -: ${DIALOG_OK=0} -: ${DIALOG_CANCEL=1} -: ${DIALOG_HELP=2} -: ${DIALOG_EXTRA=3} -: ${DIALOG_ITEM_HELP=4} -: ${DIALOG_ESC=255} +############################################################ MAIN INTERFACE=$1 IFCONFIG_PREFIX="$2" @@ -49,8 +52,9 @@ if [ $? -eq $DIALOG_OK ]; then if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0 - dhclient $INTERFACE 2>> $BSDINSTALL_LOG + err=$( dhclient $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then + f_dprintf "%s" "$err" dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0 exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" fi @@ -86,3 +90,6 @@ if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; t fi fi +################################################################################ +# END +################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/scripts/netconfig_ipv6 Thu Nov 21 03:40:52 2013 (r258421) @@ -1,8 +1,8 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn -# All rights reserved. # Copyright (c) 2011 The FreeBSD Foundation +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Portions of this software were developed by Bjoern Zeeb @@ -30,19 +30,21 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr + +############################################################ MAIN # # TODO: # - Add DHCPv6 support once FreeBSD ships with it. # -: ${DIALOG_OK=0} -: ${DIALOG_CANCEL=1} -: ${DIALOG_HELP=2} -: ${DIALOG_EXTRA=3} -: ${DIALOG_ITEM_HELP=4} -: ${DIALOG_ESC=255} - INTERFACE=$1 case "${INTERFACE}" in "") dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \ @@ -61,8 +63,9 @@ while : ; do dialog --backtitle 'FreeBSD Installer' \ --infobox "Sending Router Solicitation ..." 0 0 ifconfig ${INTERFACE} inet6 -ifdisabled accept_rtadv up - rtsol -F $INTERFACE 2>> $BSDINSTALL_LOG + err=$( rtsol -F $INTERFACE 2>&1 ) if [ $? -ne 0 ]; then + f_dprintf "%s" "$err" dialog --backtitle 'FreeBSD Installer' --msgbox "SLAAC failed." 0 0 AGAIN=" again" continue @@ -148,3 +151,6 @@ if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; t fi fi +################################################################################ +# END +################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/script Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/scripts/script Thu Nov 21 03:40:52 2013 (r258421) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2013 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,27 +26,55 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/variable.subr + +############################################################ CONFIGURATION # VARIABLES: # PARTITIONS # DISTRIBUTIONS # BSDINSTALL_DISTDIR -error() { - test -f $PATH_FSTAB && bsdinstall umount - echo "Installation Error!" - cat $BSDINSTALL_LOG - echo "Installation Error!" +############################################################ GLOBALS + +# +# Strings that should be moved to an i18n file and loaded with f_include_lang() +# +msg_installation_error="Installation Error!" + +############################################################ FUNCTIONS + +error() +{ + [ -f "$PATH_FSTAB" ] && bsdinstall umount + + local file + f_getvar "$VAR_DEBUG_FILE#+" file + if [ "$file" ]; then + f_dialog_title "$msg_installation_error" + f_dialog_textbox "$file" + # No need to restore title, pining for the fjords + fi + exit 1 } +############################################################ MAIN + set -e trap error EXIT SCRIPT="$1" shift -echo "Begun Installation at $(date)" > $BSDINSTALL_LOG +f_dprintf "Began Instalation at %s" "$( date )" rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC @@ -55,6 +84,14 @@ split -a 2 -p '^#!.*' "$SCRIPT" /tmp/bsd : ${DISTRIBUTIONS="kernel.txz base.txz"}; export DISTRIBUTIONS export BSDINSTALL_DISTDIR +# Re-initialize a new log if preamble changed BSDINSTALL_LOG +if [ "$BSDINSTALL_LOG" != "${debugFile#+}" ]; then + export debugFile="$BSDINSTALL_LOG" + f_quietly f_debug_init + # NB: Being scripted, let debug go to terminal for invalid debugFile + f_dprintf "Began Instalation at %s" "$( date )" +fi + # Make partitions rm -f $PATH_FSTAB touch $PATH_FSTAB @@ -86,6 +123,10 @@ fi bsdinstall entropy bsdinstall umount -echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG +f_dprintf "Installation Completed at %s" "$( date )" trap true EXIT + +################################################################################ +# END +################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/wlanconfig ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/wlanconfig Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/scripts/wlanconfig Thu Nov 21 03:40:52 2013 (r258421) @@ -1,6 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011 Nathan Whitehorn +# Copyright (c) 2013 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -25,6 +26,13 @@ # SUCH DAMAGE. # # $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +############################################################ MAIN echo -n > $BSDINSTALL_TMPETC/wpa_supplicant.conf chmod 0600 $BSDINSTALL_TMPETC/wpa_supplicant.conf @@ -50,7 +58,8 @@ if [ $? -ne 0 -a -z $BSDINSTALL_CONFIGCU exit 1 fi -wpa_cli scan >>$BSDINSTALL_LOG +output=$( wpa_cli scan 2>&1 ) +f_dprintf "%s" "$output" dialog --backtitle "FreeBSD Installer" --title "Scanning" --ok-label "Skip" \ --pause "Waiting 5 seconds to scan for wireless networks..." \ 9 40 5 || exit 1 @@ -132,6 +141,13 @@ echo "network={ }" >> $BSDINSTALL_TMPETC/wpa_supplicant.conf # Bring up new network -test ! -z $BSDINSTALL_CONFIGCURRENT && wpa_cli reconfigure >>$BSDINSTALL_LOG +if [ "$BSDINSTALL_CONFIGCURRENT" ]; then + output=$( wpa_cli reconfigure 2>&1 ) + f_dprintf "%s" "$output" +fi exit 0 + +################################################################################ +# END +################################################################################ Modified: stable/10/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Nov 21 03:38:47 2013 (r258420) +++ stable/10/usr.sbin/bsdinstall/scripts/zfsboot Thu Nov 21 03:40:52 2013 (r258421) @@ -47,7 +47,7 @@ f_include $BSDCFG_SHARE/variable.subr # # Default name for the boot environment parent dataset # -: ${ZFSBOOT_BEROOT_NAME:=bootenv} +: ${ZFSBOOT_BEROOT_NAME:=ROOT} # # Default name for the primany boot environment @@ -67,7 +67,7 @@ f_include $BSDCFG_SHARE/variable.subr # # Should we use geli(8) to encrypt the drives? # -: ${ZFSBOOT_GELI_ENCRYPTION:=} +: ${ZFSBOOT_GELI_ENCRYPTION=} # # Default name the unencrypted pool when using geli(8) to encrypt the drives @@ -101,7 +101,7 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_SWAP_SIZE:=2g} # -# Default ZFS layout for root zpool +# Default ZFS datasets for root zpool # # NOTE: Requires /tmp, /var/tmp, /$ZFSBOOT_BOOTFS_NAME/$ZFSBOOT_BOOTFS_NAME # NOTE: Anything after pound/hash character [#] is ignored as a comment. @@ -119,69 +119,110 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA # Don't mount /usr so that 'base' files go to the BEROOT /usr mountpoint=/usr,canmount=off - /usr/local # local files (i.e. from packages) separate from base system - # Home directories separated so they are common to all BEs - /usr/home setuid=off + /usr/home # NB: /home is a symlink to /usr/home # Ports tree /usr/ports compression=lz4,setuid=off - /usr/ports/distfiles compression=off,exec=off,setuid=off - /usr/ports/packages compression=off,exec=off,setuid=off # Source tree (compressed) /usr/src compression=lz4,exec=off,setuid=off - /usr/obj # Object files # Create /var and friends /var mountpoint=/var /var/crash compression=lz4,exec=off,setuid=off - /var/db exec=off,setuid=off - /var/db/pkg compression=lz4,exec=off,setuid=off - /var/empty exec=off,setuid=off /var/log compression=lz4,exec=off,setuid=off - /var/mail compression=lz4,exec=off,setuid=off - /var/run exec=off,setuid=off /var/tmp compression=lz4,exec=on,setuid=off " # END-QUOTE +# +# If interactive and the user has not explicitly chosen a vdev type or disks, +# make the user confirm scripted/default choices when proceeding to install. +# +: ${ZFSBOOT_CONFIRM_LAYOUT:=1} + ############################################################ GLOBALS # +# Format of a line in printf(1) syntax to add to fstab(5) +# +FSTAB_FMT="%s\t\t%s\t%s\t%s\t\t%s\t%s\n" + +# +# Command strings for various tasks +# +CHMOD_MODE='chmod %s "%s"' +DD_WITH_OPTIONS='dd if="%s" of="%s" %s' +ECHO_APPEND='echo "%s" >> "%s"' +GELI_ATTACH='geli attach -j - -k "%s" "%s"' +GELI_PASSWORD_INIT='geli init -b -B "%s" -e %s -J - -K "%s" -l 256 -s 4096 "%s"' +GNOP_CREATE='gnop create -S 4096 "%s"' +GPART_ADD='gpart add -t %s "%s"' +GPART_ADD_INDEX='gpart add -i %s -t %s "%s"' +GPART_ADD_INDEX_WITH_SIZE='gpart add -i %s -t %s -s %s "%s"' +GPART_ADD_LABEL='gpart add -l %s -t %s "%s"' +GPART_ADD_LABEL_WITH_SIZE='gpart add -l %s -t %s -s %s "%s"' +GPART_BOOTCODE='gpart bootcode -b "%s" "%s"' +GPART_BOOTCODE_PART='gpart bootcode -b "%s" -p "%s" -i %s "%s"' +GPART_CREATE='gpart create -s %s "%s"' +GPART_SET_ACTIVE='gpart set -a active -i %s "%s"' +LN_SF='ln -sf "%s" "%s"' +MKDIR_P='mkdir -p "%s"' +MOUNT_TYPE='mount -t %s "%s" "%s"' +PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\"" +PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"' +SHELL_TRUNCATE=':> "%s"' +ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"' +ZFS_SET='zfs set "%s" "%s"' +ZFS_UNMOUNT='zfs unmount "%s"' +ZPOOL_CREATE_WITH_OPTIONS='zpool create %s "%s" %s %s' +ZPOOL_EXPORT='zpool export "%s"' +ZPOOL_IMPORT_WITH_OPTIONS='zpool import %s "%s"' +ZPOOL_SET='zpool set %s "%s"' + +# # Strings that should be moved to an i18n file and loaded with f_include_lang() # hline_alnum_arrows_punc_tab_enter="Use alnum, arrows, punctuation, TAB or ENTER" hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER" hline_arrows_tab_enter="Press arrows, TAB or ENTER" +msg_an_unknown_error_occurred="An unknown error occurred" msg_back="Back" msg_cancel="Cancel" -msg_change="Change Selection" +msg_change_selection="Change Selection" msg_configure_options="Configure Options:" -msg_create="Install" -msg_create_desc="Proceed with Installation" -msg_create_help="Create ZFS boot pool with displayed options" msg_detailed_disk_info="gpart(8) show %s:\n%s\n\ncamcontrol(8) inquiry %s:\n%s\n\n\ncamcontrol(8) identify %s:\n%s\n" msg_disk_info="Disk Info" msg_disk_info_help="Get detailed information on disk device(s)" -msg_disks_to_use="Disks To Use" -msg_disks_to_use_help="Choose which disks to use for the Virtual Device (Required)" +msg_encrypt_disks="Encrypt Disks?" +msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions" +msg_error="Error" msg_force_4k_sectors="Force 4K Sectors?" msg_force_4k_sectors_help="Use gnop(8) to configure forced 4K sector alignment" msg_freebsd_installer="FreeBSD Installer" -msg_geli_encryption="Encrypt Disks?" -msg_geli_encryption_help="Use geli(8) to encrypt all data partitions" msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted" msg_geli_setup="Initializing encryption on the selected disks, this will take several seconds per disk" +msg_install="Install" +msg_install_desc="Proceed with Installation" +msg_install_help="Create ZFS boot pool with displayed options" +msg_invalid_disk_argument="Invalid disk argument \`%s'" +msg_invalid_geli_boot_size="Invalid geli(8) boot size \`%s'" +msg_invalid_index_argument="Invalid index argument \`%s'" +msg_invalid_swap_size="Invalid swap size \`%s'" msg_invalid_virtual_device_type="Invalid Virtual Device type \`%s'" -msg_invalid_virtual_device_type_help="Select another Virtual Device type or Cancel to\nreturn to the ZFS menu. From there you can select\nmore disks or rescan for additional devices." -msg_last_chance_are_you_sure="Last Chance! Are you sure you want to destroy the current contents of the following disks:\n%s" -msg_last_chance_are_you_sure_color="\\\\ZrLast Chance!\\\\ZR Are you \\\\Z1sure\\\\Zn you want to \\\\Zr\\\\Z1destroy\\\\Zn the current contents of the following disks:\n%s" +msg_last_chance_are_you_sure="Last Chance! Are you sure you want to destroy\nthe current contents of the following disks:\n\n %s" +msg_last_chance_are_you_sure_color='\\ZrLast Chance!\\ZR Are you \\Z1sure\\Zn you want to \\Zr\\Z1destroy\\Zn\nthe current contents of the following disks:\n\n %s' msg_mirror_desc="Mirror - n-Way Mirroring" msg_mirror_help="[2+ Disks] Mirroring provides the best performance, but the least storage" +msg_missing_disk_arguments="missing disk arguments" +msg_missing_one_or_more_scripted_disks="Missing one or more scripted disks!" msg_no="NO" msg_no_disks_present_to_configure="No disk(s) present to configure" msg_no_disks_selected="No disks selected." -msg_not_enough_disks_selected="Not enough disks selected. (%u < %u wanted)" +msg_not_enough_disks_selected="Not enough disks selected. (%u < %u minimum)" +msg_null_disk_argument="NULL disk argument" +msg_null_index_argument="NULL index argument" +msg_null_poolname="NULL poolname" msg_ok="OK" msg_partition_scheme="Partition Scheme" msg_partition_scheme_help="Toggle between GPT and MBR partitioning schemes" @@ -191,6 +232,8 @@ msg_please_select_one_or_more_disks="Ple msg_pool_name="Pool Name" msg_pool_name_cannot_be_empty="Pool name cannot be empty." msg_pool_name_help="Customize the name of the zpool to be created (Required)" +msg_pool_type_disks="Pool Type/Disks:" +msg_pool_type_disks_help="Choose type of ZFS Virtual Device and disks to use (Required)" msg_processing_selection="Processing selection..." msg_raidz1_desc="RAID-Z1 - Single Redundant RAID" msg_raidz1_help="[3+ Disks] Withstand failure of 1 disk. Recommended for: 3, 5 or 9 disks" @@ -207,11 +250,12 @@ msg_stripe_desc="Stripe - No Redundancy" msg_stripe_help="[1+ Disks] Striping provides maximum storage but no redundancy" msg_swap_size="Swap Size" msg_swap_size_help="Customize how much swap space is allocated to each selected disk" -msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or GELI (%s) partitions, which would take\n50%% or more (not recommended) of each of the following\nselected disk devices:\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." +msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices." +msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'" +msg_unsupported_partition_scheme="%s is an unsupported partition scheme" +msg_user_cancelled="User Cancelled." msg_yes="YES" msg_zfs_configuration="ZFS Configuration" -msg_zfs_vdev_type="ZFS VDev Type" -msg_zfs_vdev_type_help="Select type of ZFS Virtual Device to create" ############################################################ FUNCTIONS @@ -228,26 +272,26 @@ dialog_menu_main() local usegeli="$msg_no" [ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes" [ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes" + local disks n=$( set -- $ZFSBOOT_DISKS; echo $# ) + { [ $n -eq 1 ] && disks=disk; } || disks=disks # grammar local menu_list=" - '>>> $msg_create' '$msg_create_desc' - '$msg_create_help' + '>>> $msg_install' '$msg_install_desc' + '$msg_install_help' + 'T $msg_pool_type_disks' '$ZFSBOOT_VDEV_TYPE: $n $disks' + '$msg_pool_type_disks_help' '- $msg_rescan_devices' '*' '$msg_rescan_devices_help' '- $msg_disk_info' '*' '$msg_disk_info_help' - '1 $msg_pool_name' '$ZFSBOOT_POOL_NAME' + 'N $msg_pool_name' '$ZFSBOOT_POOL_NAME' '$msg_pool_name_help' - '2 $msg_disks_to_use' '$ZFSBOOT_DISKS' - '$msg_disks_to_use_help' - '3 $msg_zfs_vdev_type' '$ZFSBOOT_VDEV_TYPE' - '$msg_zfs_vdev_type_help' '4 $msg_force_4k_sectors' '$force4k' '$msg_force_4k_sectors_help' - '5 $msg_geli_encryption' '$usegeli' - '$msg_geli_encryption_help' - '6 $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME' + 'E $msg_encrypt_disks' '$usegeli' + '$msg_encrypt_disks_help' + 'P $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME' '$msg_partition_scheme_help' - '7 $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' + 'S $msg_swap_size' '$ZFSBOOT_SWAP_SIZE' '$msg_swap_size_help' " # END-QUOTE local defaultitem= # Calculated below @@ -284,158 +328,279 @@ dialog_menu_main() return $retval } -# dialog_edit_disks +# dialog_last_chance $disks ... # -# Edit the list of disks to be used by the ZFS boot pool. +# Display a list of the disks that the user is about to destroy. The default +# action is to return error status unless the user explicitly (non-default) +# selects "Yes" from the noyes dialog. # -dialog_edit_disks() +dialog_last_chance() { local title="$DIALOG_TITLE" local btitle="$DIALOG_BACKTITLE" - local prompt="$msg_please_select_one_or_more_disks" - local check_list= # Calculated below - local hline="$hline_arrows_space_tab_enter" - local dev vardev disks= + local prompt # Calculated below + local hline="$hline_arrows_tab_enter" - # - # Get a [new] list of disk devices - # - f_device_find "" $DEVICE_TYPE_DISK disks - if [ ! "$disks" ]; then - f_show_msg "$msg_no_disks_present_to_configure" - return $FAILURE + local height=8 width=50 prefix=" " + local plen=${#prefix} list= line= + local max_width=$(( $width - 3 - $plen )) + + local yes no defaultno extra_args format *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Nov 21 06:21:54 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 057C7BFF for ; Thu, 21 Nov 2013 06:21:54 +0000 (UTC) Received: from mail-vb0-x236.google.com (mail-vb0-x236.google.com [IPv6:2607:f8b0:400c:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B5870259E for ; Thu, 21 Nov 2013 06:21:53 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id p6so4395681vbe.27 for ; Wed, 20 Nov 2013 22:21:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=rbM1fGAeYUBQPVZxbzIE/Ec2gtHCJ8ltHy3Kmagdkbk=; b=mTfCKJ2Cue5Ac+GaKKgG2yuWn9tAdSHMiY6Bs823oae13RRFPhDkl6milgWrm1QO+I RifmS0uVz/akR+/oApEA7Sn0UCIYeu+7pveyZLiU0g98oRKlhP2QYBtF2gPc4RrY86bi zQvJmF6tTpoEKWxmFa8sHz5VcjMYCNWg+scCI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=rbM1fGAeYUBQPVZxbzIE/Ec2gtHCJ8ltHy3Kmagdkbk=; b=QQlvJ6/63KmdHPVJWjr780iHC2HNIJpR5hkpf3aKCVLTCGyJGRmbbGZ7dlmfIsihzV onbBCKKAhQxk9JmCfCVcN/M/l6ylez2+EYk7gkYB/cFQek6hEKHZ9GcQB97Ymud3lc2g qf1ctTwZgDaEscmUaycabhyGbg3ujFUtIIOjU7aQ/uXdAt3YVhNsT4MDN8SoTUu7JExN a3COocSYHh1B0zZBd8i7VM2FfK/ct6Oq9/YCKcOYSqpXp9z4b4OI5TK83lBq+wk7tbaW dexWC2PjV1+of3ZTHuNb+rsRLpmI9e012khr8KsUpwczW+uwwzMiO5ebgZZgYiOPdOrP 3tGg== X-Gm-Message-State: ALoCoQnbv4UVy1mW9wS02d4S7c6Hqxp9yZ9lKkwxqtAfxxta1v7dLSIh5ZgiYZ2So72I4CBBG8Xu MIME-Version: 1.0 X-Received: by 10.221.51.206 with SMTP id vj14mr4287733vcb.17.1385014912688; Wed, 20 Nov 2013 22:21:52 -0800 (PST) Received: by 10.220.167.74 with HTTP; Wed, 20 Nov 2013 22:21:52 -0800 (PST) In-Reply-To: <528D274E.5020007@freebsd.org> References: <201311202025.rAKKP0ce054293@svn.freebsd.org> <528D274E.5020007@freebsd.org> Date: Wed, 20 Nov 2013 22:21:52 -0800 Message-ID: Subject: Re: svn commit: r258398 - in stable/10: . include lib lib/libc lib/libc/iconv lib/libc_nonshared sys/sys From: Peter Wemm To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: svn-src-stable@freebsd.org, svn-src-all , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org 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, 21 Nov 2013 06:21:54 -0000 On Wed, Nov 20, 2013 at 1:19 PM, Julian Elischer wrote: > On 11/20/13, 12:25 PM, Peter Wemm wrote: > >> +int _iconv_version_compat = 0x0108; /* Magic - not used */ >> + >> >> can you illuminate this a bit more? is it magic, or is it not used? > libiconv has a unique, non-standard, private identifier for its version, 'extern int libiconv_version'. Ours acquired one via search/replace, by accident. In theory, nothing knows of "iconv_version", but in order to be ABI compatible with old 10-alpha/beta snapshots, I left it there via its .symdef alias. "Magic" refers to the old magic number that it had. Not that it does anything special. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV From owner-svn-src-stable@FreeBSD.ORG Thu Nov 21 20:09:45 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 E47B2318; Thu, 21 Nov 2013 20:09:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D1C4E21B0; Thu, 21 Nov 2013 20:09:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rALK9ir6038134; Thu, 21 Nov 2013 20:09:44 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rALK9iMu038131; Thu, 21 Nov 2013 20:09:44 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201311212009.rALK9iMu038131@svn.freebsd.org> From: John Baldwin Date: Thu, 21 Nov 2013 20:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r258442 - in stable/9/usr.bin: kdump truss 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, 21 Nov 2013 20:09:45 -0000 Author: jhb Date: Thu Nov 21 20:09:44 2013 New Revision: 258442 URL: http://svnweb.freebsd.org/changeset/base/258442 Log: MFC 226145,226147,226148,226150,226151,226153,226157,226158,226164,226246, 226262,226329,226344,226608: Merge most "infrastructure" changes to kdump to make other MFC's to add new decodings, etc. easier: - Some of the #defines or enums for which we auto-generate naming functions may be wider than int, so use intmax_t throughout. - Auto-generate kdump_subr.h. - Use a switch statement instead of a giant if-else. - Remove a lot of (void) casts. - Bring ioctlname() in line with all the other *name() functions, which actually print the name (or the numeric value, if they can't figure out the correct name) instead of just returning a pointer to it. Also, since ioctl numbers are not and probably never will be unique, drop support for using a switch statement instead of an if/else chain. - Mostly WARNS=6 clean. - Update mkioctls to still work with both kdump and truss. Deleted: stable/9/usr.bin/kdump/kdump_subr.h Modified: stable/9/usr.bin/kdump/Makefile stable/9/usr.bin/kdump/kdump.c stable/9/usr.bin/kdump/mkioctls stable/9/usr.bin/kdump/mksubr stable/9/usr.bin/truss/Makefile stable/9/usr.bin/truss/extern.h Directory Properties: stable/9/usr.bin/kdump/ (props changed) stable/9/usr.bin/truss/ (props changed) Modified: stable/9/usr.bin/kdump/Makefile ============================================================================== --- stable/9/usr.bin/kdump/Makefile Thu Nov 21 20:07:58 2013 (r258441) +++ stable/9/usr.bin/kdump/Makefile Thu Nov 21 20:09:44 2013 (r258442) @@ -8,23 +8,28 @@ SFX= 32 .PATH: ${.CURDIR}/../ktrace PROG= kdump -SRCS= kdump.c ioctl.c kdump_subr.c subr.c -CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. +SRCS= kdump_subr.c kdump.c ioctl.c subr.c +DPSRCS= kdump_subr.h +CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" SRCS+= linux_syscalls.c .endif -WARNS?= 0 +NO_WERROR?= YES -CLEANFILES= ioctl.c kdump_subr.c linux_syscalls.c +CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c ioctl.c: mkioctls - env CPP="${CPP}" \ - sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET} + env MACHINE=${MACHINE} CPP="${CPP}" \ + sh ${.CURDIR}/mkioctls print ${DESTDIR}/usr/include > ${.TARGET} -kdump_subr.c: mksubr - sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include > ${.TARGET} +kdump_subr.h: mksubr + sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \ + sed -n 's/^\([a-z].*)\)$$/void \1;/p' >${.TARGET} + +kdump_subr.c: mksubr kdump_subr.h + sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include >${.TARGET} linux_syscalls.c: /bin/sh ${.CURDIR}/../../sys/kern/makesyscalls.sh \ Modified: stable/9/usr.bin/kdump/kdump.c ============================================================================== --- stable/9/usr.bin/kdump/kdump.c Thu Nov 21 20:07:58 2013 (r258441) +++ stable/9/usr.bin/kdump/kdump.c Thu Nov 21 20:09:44 2013 (r258442) @@ -96,6 +96,8 @@ void ktrgenio(struct ktr_genio *, int); void ktrpsig(struct ktr_psig *); void ktrcsw(struct ktr_csw *); void ktrcsw_old(struct ktr_csw_old *); +void ktruser_malloc(unsigned char *); +void ktruser_rtld(int, unsigned char *); void ktruser(int, unsigned char *); void ktrsockaddr(struct sockaddr *); void ktrstat(struct stat *); @@ -103,8 +105,7 @@ void ktrstruct(char *, size_t); void ktrfault(struct ktr_fault *); void ktrfaultend(struct ktr_faultend *); void usage(void); -void sockfamilyname(int); -const char *ioctlname(u_long); +void ioctlname(unsigned long, int); int timestamp, decimal, fancy = 1, suppressdata, tail, threads, maxdata, resolv = 0, abiflag = 0; @@ -114,15 +115,15 @@ struct ktr_header ktr_header; #define TIME_FORMAT "%b %e %T %Y" #define eqs(s1, s2) (strcmp((s1), (s2)) == 0) -#define print_number(i,n,c) do { \ - if (decimal) \ - printf("%c%ld", c, (long)*i); \ - else \ - printf("%c%#lx", c, (long)*i); \ - i++; \ - n--; \ - c = ','; \ - } while (0); +#define print_number(i,n,c) do { \ + if (decimal) \ + printf("%c%jd", c, (intmax_t)*i); \ + else \ + printf("%c%#jx", c, (uintmax_t)(u_register_t)*i); \ + i++; \ + n--; \ + c = ','; \ +} while (0) #if defined(__amd64__) || defined(__i386__) @@ -168,10 +169,10 @@ main(int argc, char *argv[]) pid_t pid = 0; u_int sv_flags; - (void) setlocale(LC_CTYPE, ""); + setlocale(LC_CTYPE, ""); while ((ch = getopt(argc,argv,"f:dElm:np:AHRrsTt:")) != -1) - switch((char)ch) { + switch (ch) { case 'A': abiflag = 1; break; @@ -223,7 +224,7 @@ main(int argc, char *argv[]) if (argc > optind) usage(); - m = (void *)malloc(size = 1025); + m = malloc(size = 1025); if (m == NULL) errx(1, "%s", strerror(ENOMEM)); if (!freopen(tracefile, "r", stdin)) @@ -234,7 +235,7 @@ main(int argc, char *argv[]) if (ktr_header.ktr_type & KTR_DROP) { ktr_header.ktr_type &= ~KTR_DROP; if (!drop_logged && threads) { - (void)printf( + printf( "%6jd %6jd %-8.*s Events dropped.\n", (intmax_t)ktr_header.ktr_pid, ktr_header.ktr_tid > 0 ? @@ -242,7 +243,7 @@ main(int argc, char *argv[]) MAXCOMLEN, ktr_header.ktr_comm); drop_logged = 1; } else if (!drop_logged) { - (void)printf("%6jd %-8.*s Events dropped.\n", + printf("%6jd %-8.*s Events dropped.\n", (intmax_t)ktr_header.ktr_pid, MAXCOMLEN, ktr_header.ktr_comm); drop_logged = 1; @@ -255,7 +256,7 @@ main(int argc, char *argv[]) if ((ktrlen = ktr_header.ktr_len) < 0) errx(1, "bogus length 0x%x", ktrlen); if (ktrlen > size) { - m = (void *)realloc(m, ktrlen+1); + m = realloc(m, ktrlen+1); if (m == NULL) errx(1, "%s", strerror(ENOMEM)); size = ktrlen; @@ -321,7 +322,7 @@ main(int argc, char *argv[]) break; } if (tail) - (void)fflush(stdout); + fflush(stdout); } return 0; } @@ -332,7 +333,7 @@ fread_tail(void *buf, int size, int num) int i; while ((i = fread(buf, size, num, stdin)) == 0 && tail) { - (void)sleep(1); + sleep(1); clearerr(stdin); } return (i); @@ -462,7 +463,7 @@ dumpheader(struct ktr_header *kth) type = "PRET"; break; default: - (void)sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type); + sprintf(unknown, "UNKNOWN(%d)", kth->ktr_type); type = unknown; } @@ -475,11 +476,11 @@ dumpheader(struct ktr_header *kth) * negative tid's as 0. */ if (threads) - (void)printf("%6jd %6jd %-8.*s ", (intmax_t)kth->ktr_pid, + printf("%6jd %6jd %-8.*s ", (intmax_t)kth->ktr_pid, kth->ktr_tid > 0 ? (intmax_t)kth->ktr_tid : 0, MAXCOMLEN, kth->ktr_comm); else - (void)printf("%6jd %-8.*s ", (intmax_t)kth->ktr_pid, MAXCOMLEN, + printf("%6jd %-8.*s ", (intmax_t)kth->ktr_pid, MAXCOMLEN, kth->ktr_comm); if (timestamp) { if (timestamp == 3) { @@ -492,10 +493,10 @@ dumpheader(struct ktr_header *kth) timevalsub(&kth->ktr_time, &prevtime); prevtime = temp; } - (void)printf("%jd.%06ld ", (intmax_t)kth->ktr_time.tv_sec, + printf("%jd.%06ld ", (intmax_t)kth->ktr_time.tv_sec, kth->ktr_time.tv_usec); } - (void)printf("%s ", type); + printf("%s ", type); } #include @@ -512,465 +513,509 @@ ktrsyscall(struct ktr_syscall *ktr, u_in if ((flags != 0 && ((flags & SV_ABI_MASK) != SV_ABI_FREEBSD)) || (ktr->ktr_code >= nsyscalls || ktr->ktr_code < 0)) - (void)printf("[%d]", ktr->ktr_code); + printf("[%d]", ktr->ktr_code); else - (void)printf("%s", syscallnames[ktr->ktr_code]); + printf("%s", syscallnames[ktr->ktr_code]); ip = &ktr->ktr_args[0]; if (narg) { char c = '('; if (fancy && (flags == 0 || (flags & SV_ABI_MASK) == SV_ABI_FREEBSD)) { - if (ktr->ktr_code == SYS_ioctl) { - const char *cp; - print_number(ip,narg,c); - if ((cp = ioctlname(*ip)) != NULL) - (void)printf(",%s", cp); - else { - if (decimal) - (void)printf(",%ld", (long)*ip); - else - (void)printf(",%#lx ", (long)*ip); - } + switch (ktr->ktr_code) { + case SYS_ioctl: { + print_number(ip, narg, c); + putchar(c); + ioctlname(*ip, decimal); c = ','; ip++; narg--; - } else if (ktr->ktr_code == SYS_ptrace) { - (void)putchar('('); - ptraceopname ((int)*ip); + break; + } + case SYS_ptrace: + putchar('('); + ptraceopname(*ip); c = ','; ip++; narg--; - } else if (ktr->ktr_code == SYS_access || - ktr->ktr_code == SYS_eaccess) { - print_number(ip,narg,c); - (void)putchar(','); - accessmodename ((int)*ip); + break; + case SYS_access: + case SYS_eaccess: + print_number(ip, narg, c); + putchar(','); + accessmodename(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_open) { - int flags; - int mode; - print_number(ip,narg,c); - flags = *ip; - mode = *++ip; - (void)putchar(','); - flagsandmodename (flags, mode, decimal); - ip++; - narg-=2; - } else if (ktr->ktr_code == SYS_wait4) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - wait4optname ((int)*ip); + break; + case SYS_open: + print_number(ip, narg, c); + putchar(','); + flagsandmodename(ip[0], ip[1], decimal); + ip += 2; + narg -= 2; + break; + case SYS_wait4: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + wait4optname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_chmod || - ktr->ktr_code == SYS_fchmod || - ktr->ktr_code == SYS_lchmod) { - print_number(ip,narg,c); - (void)putchar(','); - modename ((int)*ip); + break; + case SYS_chmod: + case SYS_fchmod: + case SYS_lchmod: + print_number(ip, narg, c); + putchar(','); + modename(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_mknod) { - print_number(ip,narg,c); - (void)putchar(','); - modename ((int)*ip); + break; + case SYS_mknod: + print_number(ip, narg, c); + putchar(','); + modename(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_getfsstat) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - getfsstatflagsname ((int)*ip); + break; + case SYS_getfsstat: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + getfsstatflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_mount) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - mountflagsname ((int)*ip); + break; + case SYS_mount: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + mountflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_unmount) { - print_number(ip,narg,c); - (void)putchar(','); - mountflagsname ((int)*ip); + break; + case SYS_unmount: + print_number(ip, narg, c); + putchar(','); + mountflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_recvmsg || - ktr->ktr_code == SYS_sendmsg) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - sendrecvflagsname ((int)*ip); + break; + case SYS_recvmsg: + case SYS_sendmsg: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + sendrecvflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_recvfrom || - ktr->ktr_code == SYS_sendto) { - print_number(ip,narg,c); - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - sendrecvflagsname ((int)*ip); + break; + case SYS_recvfrom: + case SYS_sendto: + print_number(ip, narg, c); + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + sendrecvflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_chflags || - ktr->ktr_code == SYS_fchflags || - ktr->ktr_code == SYS_lchflags) { - print_number(ip,narg,c); - (void)putchar(','); - modename((int)*ip); + break; + case SYS_chflags: + case SYS_fchflags: + case SYS_lchflags: + print_number(ip, narg, c); + putchar(','); + modename(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_kill) { - print_number(ip,narg,c); - (void)putchar(','); - signame((int)*ip); + break; + case SYS_kill: + print_number(ip, narg, c); + putchar(','); + signame(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_reboot) { - (void)putchar('('); - rebootoptname((int)*ip); + break; + case SYS_reboot: + putchar('('); + rebootoptname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_umask) { - (void)putchar('('); - modename((int)*ip); + break; + case SYS_umask: + putchar('('); + modename(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_msync) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - msyncflagsname((int)*ip); + break; + case SYS_msync: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + msyncflagsname(*ip); ip++; narg--; + break; #ifdef SYS_freebsd6_mmap - } else if (ktr->ktr_code == SYS_freebsd6_mmap) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - mmapprotname ((int)*ip); - (void)putchar(','); + case SYS_freebsd6_mmap: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + mmapprotname(*ip); + putchar(','); ip++; narg--; - mmapflagsname ((int)*ip); + mmapflagsname(*ip); ip++; narg--; + break; #endif - } else if (ktr->ktr_code == SYS_mmap) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - mmapprotname ((int)*ip); - (void)putchar(','); + case SYS_mmap: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + mmapprotname(*ip); + putchar(','); ip++; narg--; - mmapflagsname ((int)*ip); + mmapflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_mprotect) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - mmapprotname ((int)*ip); + break; + case SYS_mprotect: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + mmapprotname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_madvise) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - madvisebehavname((int)*ip); + break; + case SYS_madvise: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + madvisebehavname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_setpriority) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - prioname((int)*ip); + break; + case SYS_setpriority: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + prioname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_fcntl) { - int cmd; - int arg; - print_number(ip,narg,c); - cmd = *ip; - arg = *++ip; - (void)putchar(','); - fcntlcmdname(cmd, arg, decimal); - ip++; - narg-=2; - } else if (ktr->ktr_code == SYS_socket) { + break; + case SYS_fcntl: + print_number(ip, narg, c); + putchar(','); + fcntlcmdname(ip[0], ip[1], decimal); + ip += 2; + narg -= 2; + break; + case SYS_socket: { int sockdomain; - (void)putchar('('); - sockdomain=(int)*ip; + putchar('('); + sockdomain = *ip; sockdomainname(sockdomain); ip++; narg--; - (void)putchar(','); - socktypename((int)*ip); + putchar(','); + socktypename(*ip); ip++; narg--; if (sockdomain == PF_INET || sockdomain == PF_INET6) { - (void)putchar(','); - sockipprotoname((int)*ip); + putchar(','); + sockipprotoname(*ip); ip++; narg--; } c = ','; - } else if (ktr->ktr_code == SYS_setsockopt || - ktr->ktr_code == SYS_getsockopt) { - print_number(ip,narg,c); - (void)putchar(','); - sockoptlevelname((int)*ip, decimal); - if ((int)*ip == SOL_SOCKET) { + break; + } + case SYS_setsockopt: + case SYS_getsockopt: + print_number(ip, narg, c); + putchar(','); + sockoptlevelname(*ip, decimal); + if (*ip == SOL_SOCKET) { ip++; narg--; - (void)putchar(','); - sockoptname((int)*ip); + putchar(','); + sockoptname(*ip); } ip++; narg--; + break; #ifdef SYS_freebsd6_lseek - } else if (ktr->ktr_code == SYS_freebsd6_lseek) { - print_number(ip,narg,c); + case SYS_freebsd6_lseek: + print_number(ip, narg, c); /* Hidden 'pad' argument, not in lseek(2) */ - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - whencename ((int)*ip); + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + whencename(*ip); ip++; narg--; + break; #endif - } else if (ktr->ktr_code == SYS_lseek) { - print_number(ip,narg,c); + case SYS_lseek: + print_number(ip, narg, c); /* Hidden 'pad' argument, not in lseek(2) */ - print_number(ip,narg,c); - (void)putchar(','); - whencename ((int)*ip); + print_number(ip, narg, c); + putchar(','); + whencename(*ip); ip++; narg--; - - } else if (ktr->ktr_code == SYS_flock) { - print_number(ip,narg,c); - (void)putchar(','); - flockname((int)*ip); + break; + case SYS_flock: + print_number(ip, narg, c); + putchar(','); + flockname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_mkfifo || - ktr->ktr_code == SYS_mkdir) { - print_number(ip,narg,c); - (void)putchar(','); - modename((int)*ip); + break; + case SYS_mkfifo: + case SYS_mkdir: + print_number(ip, narg, c); + putchar(','); + modename(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_shutdown) { - print_number(ip,narg,c); - (void)putchar(','); - shutdownhowname((int)*ip); + break; + case SYS_shutdown: + print_number(ip, narg, c); + putchar(','); + shutdownhowname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_socketpair) { - (void)putchar('('); - sockdomainname((int)*ip); + break; + case SYS_socketpair: + putchar('('); + sockdomainname(*ip); ip++; narg--; - (void)putchar(','); - socktypename((int)*ip); + putchar(','); + socktypename(*ip); ip++; narg--; c = ','; - } else if (ktr->ktr_code == SYS_getrlimit || - ktr->ktr_code == SYS_setrlimit) { - (void)putchar('('); - rlimitname((int)*ip); + break; + case SYS_getrlimit: + case SYS_setrlimit: + putchar('('); + rlimitname(*ip); ip++; narg--; c = ','; - } else if (ktr->ktr_code == SYS_quotactl) { - print_number(ip,narg,c); - (void)putchar(','); - quotactlname((int)*ip); + break; + case SYS_quotactl: + print_number(ip, narg, c); + putchar(','); + quotactlname(*ip); ip++; narg--; c = ','; - } else if (ktr->ktr_code == SYS_nfssvc) { - (void)putchar('('); - nfssvcname((int)*ip); + break; + case SYS_nfssvc: + putchar('('); + nfssvcname(*ip); ip++; narg--; c = ','; - } else if (ktr->ktr_code == SYS_rtprio) { - (void)putchar('('); - rtprioname((int)*ip); + break; + case SYS_rtprio: + putchar('('); + rtprioname(*ip); ip++; narg--; c = ','; - } else if (ktr->ktr_code == SYS___semctl) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - semctlname((int)*ip); + break; + case SYS___semctl: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + semctlname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_semget) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - semgetname((int)*ip); + break; + case SYS_semget: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + semgetname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_msgctl) { - print_number(ip,narg,c); - (void)putchar(','); - shmctlname((int)*ip); + break; + case SYS_msgctl: + print_number(ip, narg, c); + putchar(','); + shmctlname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_shmat) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - shmatname((int)*ip); + break; + case SYS_shmat: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + shmatname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_shmctl) { - print_number(ip,narg,c); - (void)putchar(','); - shmctlname((int)*ip); + break; + case SYS_shmctl: + print_number(ip, narg, c); + putchar(','); + shmctlname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_minherit) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - minheritname((int)*ip); + break; + case SYS_minherit: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + minheritname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_rfork) { - (void)putchar('('); - rforkname((int)*ip); + break; + case SYS_rfork: + putchar('('); + rforkname(*ip); ip++; narg--; c = ','; - } else if (ktr->ktr_code == SYS_lio_listio) { - (void)putchar('('); - lio_listioname((int)*ip); + break; + case SYS_lio_listio: + putchar('('); + lio_listioname(*ip); ip++; narg--; c = ','; - } else if (ktr->ktr_code == SYS_mlockall) { - (void)putchar('('); - mlockallname((int)*ip); + break; + case SYS_mlockall: + putchar('('); + mlockallname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_sched_setscheduler) { - print_number(ip,narg,c); - (void)putchar(','); - schedpolicyname((int)*ip); + break; + case SYS_sched_setscheduler: + print_number(ip, narg, c); + putchar(','); + schedpolicyname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_sched_get_priority_max || - ktr->ktr_code == SYS_sched_get_priority_min) { - (void)putchar('('); - schedpolicyname((int)*ip); - ip++; - narg--; - } else if (ktr->ktr_code == SYS_sendfile) { - print_number(ip,narg,c); - print_number(ip,narg,c); - print_number(ip,narg,c); - print_number(ip,narg,c); - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - sendfileflagsname((int)*ip); + break; + case SYS_sched_get_priority_max: + case SYS_sched_get_priority_min: + putchar('('); + schedpolicyname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_kldsym) { - print_number(ip,narg,c); - (void)putchar(','); - kldsymcmdname((int)*ip); + break; + case SYS_sendfile: + print_number(ip, narg, c); + print_number(ip, narg, c); + print_number(ip, narg, c); + print_number(ip, narg, c); + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + sendfileflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_sigprocmask) { - (void)putchar('('); - sigprocmaskhowname((int)*ip); + break; + case SYS_kldsym: + print_number(ip, narg, c); + putchar(','); + kldsymcmdname(*ip); + ip++; + narg--; + break; + case SYS_sigprocmask: + putchar('('); + sigprocmaskhowname(*ip); ip++; narg--; c = ','; - } else if (ktr->ktr_code == SYS___acl_get_file || - ktr->ktr_code == SYS___acl_set_file || - ktr->ktr_code == SYS___acl_get_fd || - ktr->ktr_code == SYS___acl_set_fd || - ktr->ktr_code == SYS___acl_delete_file || - ktr->ktr_code == SYS___acl_delete_fd || - ktr->ktr_code == SYS___acl_aclcheck_file || - ktr->ktr_code == SYS___acl_aclcheck_fd || - ktr->ktr_code == SYS___acl_get_link || - ktr->ktr_code == SYS___acl_set_link || - ktr->ktr_code == SYS___acl_delete_link || - ktr->ktr_code == SYS___acl_aclcheck_link) { - print_number(ip,narg,c); - (void)putchar(','); - acltypename((int)*ip); + break; + case SYS___acl_get_file: + case SYS___acl_set_file: + case SYS___acl_get_fd: + case SYS___acl_set_fd: + case SYS___acl_delete_file: + case SYS___acl_delete_fd: + case SYS___acl_aclcheck_file: + case SYS___acl_aclcheck_fd: + case SYS___acl_get_link: + case SYS___acl_set_link: + case SYS___acl_delete_link: + case SYS___acl_aclcheck_link: + print_number(ip, narg, c); + putchar(','); + acltypename(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_sigaction) { - (void)putchar('('); - signame((int)*ip); + break; + case SYS_sigaction: + putchar('('); + signame(*ip); ip++; narg--; c = ','; - } else if (ktr->ktr_code == SYS_extattrctl) { - print_number(ip,narg,c); - (void)putchar(','); - extattrctlname((int)*ip); + break; + case SYS_extattrctl: + print_number(ip, narg, c); + putchar(','); + extattrctlname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_nmount) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - mountflagsname ((int)*ip); + break; + case SYS_nmount: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + mountflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_thr_create) { - print_number(ip,narg,c); - print_number(ip,narg,c); - (void)putchar(','); - thrcreateflagsname ((int)*ip); + break; + case SYS_thr_create: + print_number(ip, narg, c); + print_number(ip, narg, c); + putchar(','); + thrcreateflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_thr_kill) { - print_number(ip,narg,c); - (void)putchar(','); - signame ((int)*ip); + break; + case SYS_thr_kill: + print_number(ip, narg, c); + putchar(','); + signame(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_kldunloadf) { - print_number(ip,narg,c); - (void)putchar(','); - kldunloadfflagsname ((int)*ip); + break; + case SYS_kldunloadf: + print_number(ip, narg, c); + putchar(','); + kldunloadfflagsname(*ip); ip++; narg--; - } else if (ktr->ktr_code == SYS_posix_fadvise) { - print_number(ip,narg,c); - print_number(ip,narg,c); - print_number(ip,narg,c); + break; + case SYS_posix_fadvise: + print_number(ip, narg, c); + print_number(ip, narg, c); + print_number(ip, narg, c); (void)putchar(','); fadvisebehavname((int)*ip); ip++; narg--; + break; } } while (narg > 0) { - print_number(ip,narg,c); + print_number(ip, narg, c); } - (void)putchar(')'); + putchar(')'); } - (void)putchar('\n'); + putchar('\n'); } void *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Nov 21 23:00:12 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 C3FE89EC; Thu, 21 Nov 2013 23:00:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B229B2E08; Thu, 21 Nov 2013 23:00:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rALN0Ci0096859; Thu, 21 Nov 2013 23:00:12 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rALN0A6x096839; Thu, 21 Nov 2013 23:00:10 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201311212300.rALN0A6x096839@svn.freebsd.org> From: Michael Tuexen Date: Thu, 21 Nov 2013 23:00: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: r258454 - in stable/10/sys: netinet netinet6 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, 21 Nov 2013 23:00:12 -0000 Author: tuexen Date: Thu Nov 21 23:00:09 2013 New Revision: 258454 URL: http://svnweb.freebsd.org/changeset/base/258454 Log: MFC r256556: Remove a buggy comparision when setting manually the path MTU. After fixing, the comparision would have become redundant. Thanks to Andrew Galante for reporting the issue. MFC r257272: Fix compilation if SCTP_DONT_DO_PRIVADDR_SCOPE is defined. The issue was reported by Andrew Galante. MFC r257274: Fix the value of *optlen when calling getsockopt() for SCTP_REMOTE_UDP_ENCAPS_PORT. This issue was reported by Andrew Galante. MFC r257359: Terminate a debug output with a \n. MFC r257555: Changes from upstream to improve compilation when INET or INET6 or none of them is defined. MFC r257574: Unlock the lock before destroying it. This issue was reported by Andrew Galante. MFC r257800: Use htons()/ntohs() appropriately. These issues were reported by Andrew Galante. MFC r257803: Make sure that we don't try to build an ASCONF-ACK chunk larger than what fits in the the mbuf cluster. This issue was reported by Andrew Galante. MFC r257804: Get rid of the artification limitation enforced by SCTP_AUTH_RANDOM_SIZE_MAX. This was suggested by Andrew Galante. MFC r258221: Cleanups which result in fixes which have been made upstream and where partially suggested by Andrew Galante. There is no functional change in FreeBSD. MFC r258224: When determining if an address belongs to an stcb, take the address family into account for wildcard bound endpoints. MFC r258228: Remove a stray write operation. MFC r258235: Use SCTP_PR_SCTP_TTL when the user provides a positive timetolive in sctp_sendmsg(). Approved by: re@ Modified: stable/10/sys/netinet/sctp_asconf.c stable/10/sys/netinet/sctp_auth.c stable/10/sys/netinet/sctp_auth.h stable/10/sys/netinet/sctp_bsd_addr.c stable/10/sys/netinet/sctp_constants.h stable/10/sys/netinet/sctp_indata.c stable/10/sys/netinet/sctp_output.c stable/10/sys/netinet/sctp_pcb.c stable/10/sys/netinet/sctp_timer.c stable/10/sys/netinet/sctp_usrreq.c stable/10/sys/netinet/sctputil.c stable/10/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/netinet/sctp_asconf.c ============================================================================== --- stable/10/sys/netinet/sctp_asconf.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_asconf.c Thu Nov 21 23:00:09 2013 (r258454) @@ -150,7 +150,12 @@ sctp_process_asconf_add_ip(struct sockad struct mbuf *m_reply = NULL; struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; - uint16_t param_type, param_length, aparam_length; + uint16_t param_type, aparam_length; + +#if defined(INET) || defined(INET6) + uint16_t param_length; + +#endif struct sockaddr *sa; int zero_address = 0; int bad_address = 0; @@ -169,8 +174,9 @@ sctp_process_asconf_add_ip(struct sockad aparam_length = ntohs(aph->ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph->param_type); +#if defined(INET) || defined(INET6) param_length = ntohs(ph->param_length); - +#endif sa = (struct sockaddr *)&sa_store; switch (param_type) { #ifdef INET @@ -298,7 +304,12 @@ sctp_process_asconf_delete_ip(struct soc struct mbuf *m_reply = NULL; struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; - uint16_t param_type, param_length, aparam_length; + uint16_t param_type, aparam_length; + +#if defined(INET) || defined(INET6) + uint16_t param_length; + +#endif struct sockaddr *sa; int zero_address = 0; int result; @@ -317,8 +328,9 @@ sctp_process_asconf_delete_ip(struct soc aparam_length = ntohs(aph->ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph->param_type); +#if defined(INET) || defined(INET6) param_length = ntohs(ph->param_length); - +#endif sa = (struct sockaddr *)&sa_store; switch (param_type) { #ifdef INET @@ -427,7 +439,12 @@ sctp_process_asconf_set_primary(struct s struct mbuf *m_reply = NULL; struct sockaddr_storage sa_store; struct sctp_paramhdr *ph; - uint16_t param_type, param_length, aparam_length; + uint16_t param_type, aparam_length; + +#if defined(INET) || defined(INET6) + uint16_t param_length; + +#endif struct sockaddr *sa; int zero_address = 0; @@ -445,8 +462,9 @@ sctp_process_asconf_set_primary(struct s aparam_length = ntohs(aph->ph.param_length); ph = (struct sctp_paramhdr *)(aph + 1); param_type = ntohs(ph->param_type); +#if defined(INET) || defined(INET6) param_length = ntohs(ph->param_length); - +#endif sa = (struct sockaddr *)&sa_store; switch (param_type) { #ifdef INET @@ -860,10 +878,12 @@ sctp_asconf_addr_match(struct sctp_ascon static uint32_t sctp_addr_match(struct sctp_paramhdr *ph, struct sockaddr *sa) { +#if defined(INET) || defined(INET6) uint16_t param_type, param_length; param_type = ntohs(ph->param_type); param_length = ntohs(ph->param_length); +#endif switch (sa->sa_family) { #ifdef INET6 case AF_INET6: @@ -874,7 +894,7 @@ sctp_addr_match(struct sctp_paramhdr *ph v6addr = (struct sctp_ipv6addr_param *)ph; if ((param_type == SCTP_IPV6_ADDRESS) && - param_length == sizeof(struct sctp_ipv6addr_param) && + (param_length == sizeof(struct sctp_ipv6addr_param)) && (memcmp(&v6addr->addr, &sin6->sin6_addr, sizeof(struct in6_addr)) == 0)) { return (1); @@ -890,7 +910,7 @@ sctp_addr_match(struct sctp_paramhdr *ph v4addr = (struct sctp_ipv4addr_param *)ph; if ((param_type == SCTP_IPV4_ADDRESS) && - param_length == sizeof(struct sctp_ipv4addr_param) && + (param_length == sizeof(struct sctp_ipv4addr_param)) && (memcmp(&v4addr->addr, &sin->sin_addr, sizeof(struct in_addr)) == 0)) { return (1); @@ -2596,7 +2616,8 @@ sctp_compose_asconf(struct sctp_tcb *stc /* get the parameter length */ p_length = SCTP_SIZE32(aa->ap.aph.ph.param_length); /* will it fit in current chunk? */ - if (SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) { + if ((SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) || + (SCTP_BUF_LEN(m_asconf) + p_length > MCLBYTES)) { /* won't fit, so we're done with this chunk */ break; } @@ -2717,7 +2738,7 @@ sctp_compose_asconf(struct sctp_tcb *stc /* chain it all together */ SCTP_BUF_NEXT(m_asconf_chk) = m_asconf; *retlen = SCTP_BUF_LEN(m_asconf_chk) + SCTP_BUF_LEN(m_asconf); - acp->ch.chunk_length = ntohs(*retlen); + acp->ch.chunk_length = htons(*retlen); return (m_asconf_chk); } Modified: stable/10/sys/netinet/sctp_auth.c ============================================================================== --- stable/10/sys/netinet/sctp_auth.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_auth.c Thu Nov 21 23:00:09 2013 (r258454) @@ -333,10 +333,6 @@ sctp_generate_random_key(uint32_t keylen { sctp_key_t *new_key; - /* validate keylen */ - if (keylen > SCTP_AUTH_RANDOM_SIZE_MAX) - keylen = SCTP_AUTH_RANDOM_SIZE_MAX; - new_key = sctp_alloc_key(keylen); if (new_key == NULL) { /* out of memory */ @@ -374,7 +370,7 @@ sctp_compare_key(sctp_key_t * key1, sctp uint32_t i; uint32_t key1len, key2len; uint8_t *key_1, *key_2; - uint8_t temp[SCTP_AUTH_RANDOM_SIZE_MAX]; + uint8_t val1, val2; /* sanity/length check */ key1len = sctp_get_keylen(key1); @@ -386,38 +382,24 @@ sctp_compare_key(sctp_key_t * key1, sctp else if (key2len == 0) return (1); - if (key1len != key2len) { - if (key1len >= key2len) - maxlen = key1len; - else - maxlen = key2len; - bzero(temp, maxlen); - if (key1len < maxlen) { - /* prepend zeroes to key1 */ - bcopy(key1->key, temp + (maxlen - key1len), key1len); - key_1 = temp; - key_2 = key2->key; - } else { - /* prepend zeroes to key2 */ - bcopy(key2->key, temp + (maxlen - key2len), key2len); - key_1 = key1->key; - key_2 = temp; - } + if (key1len < key2len) { + maxlen = key2len; } else { maxlen = key1len; - key_1 = key1->key; - key_2 = key2->key; } - + key_1 = key1->key; + key_2 = key2->key; + /* check for numeric equality */ for (i = 0; i < maxlen; i++) { - if (*key_1 > *key_2) + /* left-pad with zeros */ + val1 = (i < (maxlen - key1len)) ? 0 : *(key_1++); + val2 = (i < (maxlen - key2len)) ? 0 : *(key_2++); + if (val1 > val2) { return (1); - else if (*key_1 < *key_2) + } else if (val1 < val2) { return (-1); - key_1++; - key_2++; + } } - /* keys are equal value, so check lengths */ if (key1len == key2len) return (0); Modified: stable/10/sys/netinet/sctp_auth.h ============================================================================== --- stable/10/sys/netinet/sctp_auth.h Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_auth.h Thu Nov 21 23:00:09 2013 (r258454) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); /* random sizes */ #define SCTP_AUTH_RANDOM_SIZE_DEFAULT 32 #define SCTP_AUTH_RANDOM_SIZE_REQUIRED 32 -#define SCTP_AUTH_RANDOM_SIZE_MAX 256 /* union of all supported HMAC algorithm contexts */ typedef union sctp_hash_context { Modified: stable/10/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/10/sys/netinet/sctp_bsd_addr.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_bsd_addr.c Thu Nov 21 23:00:09 2013 (r258454) @@ -96,22 +96,12 @@ sctp_iterator_thread(void *v SCTP_UNUSED void sctp_startup_iterator(void) { - static int called = 0; - int ret; - - if (called) { + if (sctp_it_ctl.thread_proc) { /* You only get one */ return; } - /* init the iterator head */ - called = 1; - sctp_it_ctl.iterator_running = 0; - sctp_it_ctl.iterator_flags = 0; - sctp_it_ctl.cur_it = NULL; - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); TAILQ_INIT(&sctp_it_ctl.iteratorhead); - ret = kproc_create(sctp_iterator_thread, + kproc_create(sctp_iterator_thread, (void *)NULL, &sctp_it_ctl.thread_proc, RFPROC, Modified: stable/10/sys/netinet/sctp_constants.h ============================================================================== --- stable/10/sys/netinet/sctp_constants.h Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_constants.h Thu Nov 21 23:00:09 2013 (r258454) @@ -726,7 +726,6 @@ __FBSDID("$FreeBSD$"); /* small chunk store for looking at chunk_list in auth */ #define SCTP_SMALL_CHUNK_STORE 260 -#define SCTP_DEFAULT_MINSEGMENT 512 /* MTU size ... if no mtu disc */ #define SCTP_HOW_MANY_SECRETS 2 /* how many secrets I keep */ #define SCTP_NUMBER_OF_SECRETS 8 /* or 8 * 4 = 32 octets */ Modified: stable/10/sys/netinet/sctp_indata.c ============================================================================== --- stable/10/sys/netinet/sctp_indata.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_indata.c Thu Nov 21 23:00:09 2013 (r258454) @@ -1787,7 +1787,6 @@ failed_express_del: asoc->highest_tsn_inside_nr_map = tsn; } SCTP_STAT_INCR(sctps_recvexpressm); - control->sinfo_tsn = tsn; asoc->tsn_last_delivered = tsn; asoc->fragment_flags = chunk_flags; asoc->tsn_of_pdapi_last_delivered = tsn; Modified: stable/10/sys/netinet/sctp_output.c ============================================================================== --- stable/10/sys/netinet/sctp_output.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_output.c Thu Nov 21 23:00:09 2013 (r258454) @@ -1937,10 +1937,13 @@ sctp_is_address_in_scope(struct sctp_ifa static struct mbuf * sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa, uint16_t * len) { +#if defined(INET) || defined(INET6) struct sctp_paramhdr *parmh; struct mbuf *mret; uint16_t plen; +#endif + switch (ifa->address.sa.sa_family) { #ifdef INET case AF_INET: @@ -1955,6 +1958,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, st default: return (m); } +#if defined(INET) || defined(INET6) if (M_TRAILINGSPACE(m) >= plen) { /* easy side we just drop it on the end */ parmh = (struct sctp_paramhdr *)(SCTP_BUF_AT(m, SCTP_BUF_LEN(m))); @@ -2015,6 +2019,7 @@ sctp_add_addr_to_mbuf(struct mbuf *m, st *len += plen; } return (mret); +#endif } @@ -3384,7 +3389,11 @@ sctp_find_cmsg(int c_type, void *data, s return (found); } m_copydata(control, at + CMSG_ALIGN(sizeof(cmh)), sizeof(struct sctp_prinfo), (caddr_t)&prinfo); - sndrcvinfo->sinfo_timetolive = prinfo.pr_value; + if (prinfo.pr_policy != SCTP_PR_SCTP_NONE) { + sndrcvinfo->sinfo_timetolive = prinfo.pr_value; + } else { + sndrcvinfo->sinfo_timetolive = 0; + } sndrcvinfo->sinfo_flags |= prinfo.pr_policy; break; case SCTP_AUTHINFO: @@ -3855,8 +3864,11 @@ sctp_lowlevel_chunk_output(struct sctp_i struct sctphdr *sctphdr; int packet_length; int ret; + +#if defined(INET) || defined(INET6) uint32_t vrf_id; +#endif #if defined(INET) || defined(INET6) struct mbuf *o_pak; sctp_route_t *ro = NULL; @@ -3875,12 +3887,13 @@ sctp_lowlevel_chunk_output(struct sctp_i sctp_m_freem(m); return (EFAULT); } +#if defined(INET) || defined(INET6) if (stcb) { vrf_id = stcb->asoc.vrf_id; } else { vrf_id = inp->def_vrf_id; } - +#endif /* fill in the HMAC digest for any AUTH chunk in the packet */ if ((auth != NULL) && (stcb != NULL)) { sctp_fill_hmac_digest_m(m, auth_offset, auth, stcb, auth_keyid); @@ -6069,13 +6082,13 @@ sctp_set_prsctp_policy(struct sctp_strea { /* * We assume that the user wants PR_SCTP_TTL if the user provides a - * positive lifetime but does not specify any PR_SCTP policy. This - * is a BAD assumption and causes problems at least with the - * U-Vancovers MPI folks. I will change this to be no policy means - * NO PR-SCTP. + * positive lifetime but does not specify any PR_SCTP policy. */ if (PR_SCTP_ENABLED(sp->sinfo_flags)) { sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); + } else if (sp->timetolive > 0) { + sp->sinfo_flags |= SCTP_PR_SCTP_TTL; + sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); } else { return; } @@ -10798,8 +10811,12 @@ sctp_send_resp_msg(struct sockaddr *src, struct sctphdr *shout; struct sctp_chunkhdr *ch; struct udphdr *udp; - int len, cause_len, padding_len, ret; + int len, cause_len, padding_len; +#if defined(INET) || defined(INET6) + int ret; + +#endif #ifdef INET struct sockaddr_in *src_sin, *dst_sin; struct ip *ip; Modified: stable/10/sys/netinet/sctp_pcb.c ============================================================================== --- stable/10/sys/netinet/sctp_pcb.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_pcb.c Thu Nov 21 23:00:09 2013 (r258454) @@ -827,18 +827,30 @@ out_now: static int sctp_does_stcb_own_this_addr(struct sctp_tcb *stcb, struct sockaddr *to) { - int loopback_scope, ipv4_local_scope, local_scope, site_scope; - int ipv4_addr_legal, ipv6_addr_legal; + int loopback_scope; + +#if defined(INET) + int ipv4_local_scope, ipv4_addr_legal; + +#endif +#if defined(INET6) + int local_scope, site_scope, ipv6_addr_legal; + +#endif struct sctp_vrf *vrf; struct sctp_ifn *sctp_ifn; struct sctp_ifa *sctp_ifa; loopback_scope = stcb->asoc.scope.loopback_scope; +#if defined(INET) ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope; + ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; +#endif +#if defined(INET6) local_scope = stcb->asoc.scope.local_scope; site_scope = stcb->asoc.scope.site_scope; - ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal; +#endif SCTP_IPI_ADDR_RLOCK(); vrf = sctp_find_vrf(stcb->asoc.vrf_id); @@ -863,6 +875,9 @@ sctp_does_stcb_own_this_addr(struct sctp */ continue; } + if (sctp_ifa->address.sa.sa_family != to->sa_family) { + continue; + } switch (sctp_ifa->address.sa.sa_family) { #ifdef INET case AF_INET: @@ -1971,8 +1986,13 @@ sctp_findassociation_special_addr(struct struct sockaddr *dst) { struct sctp_paramhdr *phdr, parm_buf; + +#if defined(INET) || defined(INET6) struct sctp_tcb *stcb; - uint32_t ptype, plen; + uint16_t ptype; + +#endif + uint16_t plen; #ifdef INET struct sockaddr_in sin4; @@ -1996,13 +2016,14 @@ sctp_findassociation_special_addr(struct sin6.sin6_port = sh->src_port; #endif - stcb = NULL; offset += sizeof(struct sctp_init_chunk); phdr = sctp_get_next_param(m, offset, &parm_buf, sizeof(parm_buf)); while (phdr != NULL) { /* now we must see if we want the parameter */ +#if defined(INET) || defined(INET6) ptype = ntohs(phdr->param_type); +#endif plen = ntohs(phdr->param_length); if (plen == 0) { break; @@ -3740,7 +3761,7 @@ sctp_add_remote_addr(struct sctp_tcb *st sin->sin_len = sizeof(struct sockaddr_in); if (set_scope) { #ifdef SCTP_DONT_DO_PRIVADDR_SCOPE - stcb->ipv4_local_scope = 1; + stcb->asoc.scope.ipv4_local_scope = 1; #else if (IN4_ISPRIVATE_ADDRESS(&sin->sin_addr)) { stcb->asoc.scope.ipv4_local_scope = 1; @@ -4314,6 +4335,7 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, asoc->nr_mapping_array = NULL; } SCTP_DECR_ASOC_COUNT(); + SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); LIST_REMOVE(stcb, sctp_tcbasocidhash); @@ -5116,6 +5138,7 @@ sctp_free_assoc(struct sctp_inpcb *inp, /* Insert new items here :> */ /* Get rid of LOCK */ + SCTP_TCB_UNLOCK(stcb); SCTP_TCB_LOCK_DESTROY(stcb); SCTP_TCB_SEND_LOCK_DESTROY(stcb); if (from_inpcbfree == SCTP_NORMAL_PROC) { @@ -5841,7 +5864,8 @@ sctp_pcb_init() for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } - + SCTP_ITERATOR_LOCK_INIT(); + SCTP_IPI_ITERATOR_WQ_INIT(); sctp_startup_iterator(); #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) @@ -5870,35 +5894,31 @@ sctp_pcb_finish(void) struct sctp_tagblock *twait_block, *prev_twait_block; struct sctp_laddr *wi, *nwi; int i; + struct sctp_iterator *it, *nit; /* - * Free BSD the it thread never exits but we do clean up. The only - * way freebsd reaches here if we have VRF's but we still add the - * ifdef to make it compile on old versions. + * In FreeBSD the iterator thread never exits but we do clean up. + * The only way FreeBSD reaches here is if we have VRF's but we + * still add the ifdef to make it compile on old versions. */ - { - struct sctp_iterator *it, *nit; - - SCTP_IPI_ITERATOR_WQ_LOCK(); - TAILQ_FOREACH_SAFE(it, &sctp_it_ctl.iteratorhead, sctp_nxt_itr, nit) { - if (it->vn != curvnet) { - continue; - } - TAILQ_REMOVE(&sctp_it_ctl.iteratorhead, it, sctp_nxt_itr); - if (it->function_atend != NULL) { - (*it->function_atend) (it->pointer, it->val); - } - SCTP_FREE(it, SCTP_M_ITER); - } - SCTP_IPI_ITERATOR_WQ_UNLOCK(); - SCTP_ITERATOR_LOCK(); - if ((sctp_it_ctl.cur_it) && - (sctp_it_ctl.cur_it->vn == curvnet)) { - sctp_it_ctl.iterator_flags |= SCTP_ITERATOR_STOP_CUR_IT; + SCTP_IPI_ITERATOR_WQ_LOCK(); + TAILQ_FOREACH_SAFE(it, &sctp_it_ctl.iteratorhead, sctp_nxt_itr, nit) { + if (it->vn != curvnet) { + continue; } - SCTP_ITERATOR_UNLOCK(); + TAILQ_REMOVE(&sctp_it_ctl.iteratorhead, it, sctp_nxt_itr); + if (it->function_atend != NULL) { + (*it->function_atend) (it->pointer, it->val); + } + SCTP_FREE(it, SCTP_M_ITER); } - + SCTP_IPI_ITERATOR_WQ_UNLOCK(); + SCTP_ITERATOR_LOCK(); + if ((sctp_it_ctl.cur_it) && + (sctp_it_ctl.cur_it->vn == curvnet)) { + sctp_it_ctl.iterator_flags |= SCTP_ITERATOR_STOP_CUR_IT; + } + SCTP_ITERATOR_UNLOCK(); SCTP_OS_TIMER_STOP(&SCTP_BASE_INFO(addr_wq_timer.timer)); SCTP_WQ_ADDR_LOCK(); LIST_FOREACH_SAFE(wi, &SCTP_BASE_INFO(addr_wq), sctp_nxt_addr, nwi) { Modified: stable/10/sys/netinet/sctp_timer.c ============================================================================== --- stable/10/sys/netinet/sctp_timer.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_timer.c Thu Nov 21 23:00:09 2013 (r258454) @@ -552,7 +552,7 @@ start_again: TAILQ_FOREACH_SAFE(chk, &stcb->asoc.sent_queue, sctp_next, nchk) { if (SCTP_TSN_GE(stcb->asoc.last_acked_seq, chk->rec.data.TSN_seq)) { /* Strange case our list got out of order? */ - SCTP_PRINTF("Our list is out of order? last_acked:%x chk:%x", + SCTP_PRINTF("Our list is out of order? last_acked:%x chk:%x\n", (unsigned int)stcb->asoc.last_acked_seq, (unsigned int)chk->rec.data.TSN_seq); recovery_cnt++; #ifdef INVARIANTS Modified: stable/10/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/10/sys/netinet/sctp_usrreq.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctp_usrreq.c Thu Nov 21 23:00:09 2013 (r258454) @@ -1120,9 +1120,17 @@ sctp_fill_up_addresses_vrf(struct sctp_i { struct sctp_ifn *sctp_ifn; struct sctp_ifa *sctp_ifa; - int loopback_scope, ipv4_local_scope, local_scope, site_scope; size_t actual; - int ipv4_addr_legal, ipv6_addr_legal; + int loopback_scope; + +#if defined(INET) + int ipv4_local_scope, ipv4_addr_legal; + +#endif +#if defined(INET6) + int local_scope, site_scope, ipv6_addr_legal; + +#endif struct sctp_vrf *vrf; actual = 0; @@ -1132,27 +1140,43 @@ sctp_fill_up_addresses_vrf(struct sctp_i if (stcb) { /* Turn on all the appropriate scope */ loopback_scope = stcb->asoc.scope.loopback_scope; +#if defined(INET) ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope; + ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; +#endif +#if defined(INET6) local_scope = stcb->asoc.scope.local_scope; site_scope = stcb->asoc.scope.site_scope; - ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal; +#endif } else { /* Use generic values for endpoints. */ loopback_scope = 1; +#if defined(INET) ipv4_local_scope = 1; +#endif +#if defined(INET6) local_scope = 1; site_scope = 1; +#endif if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { +#if defined(INET6) ipv6_addr_legal = 1; +#endif +#if defined(INET) if (SCTP_IPV6_V6ONLY(inp)) { ipv4_addr_legal = 0; } else { ipv4_addr_legal = 1; } +#endif } else { +#if defined(INET6) ipv6_addr_legal = 0; +#endif +#if defined(INET) ipv4_addr_legal = 1; +#endif } } vrf = sctp_find_vrf(vrf_id); @@ -3281,7 +3305,7 @@ flags_out: } } if (error == 0) { - *optsize = sizeof(struct sctp_paddrparams); + *optsize = sizeof(struct sctp_udpencaps); } break; } @@ -4796,11 +4820,9 @@ sctp_setopt(struct socket *so, int optna SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); } net->dest_state |= SCTP_ADDR_NO_PMTUD; - if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) { - net->mtu = paddrp->spp_pathmtu + ovh; - if (net->mtu < stcb->asoc.smallest_mtu) { - sctp_pathmtu_adjustment(stcb, net->mtu); - } + net->mtu = paddrp->spp_pathmtu + ovh; + if (net->mtu < stcb->asoc.smallest_mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); } } if (paddrp->spp_flags & SPP_PMTUD_ENABLE) { @@ -4920,11 +4942,9 @@ sctp_setopt(struct socket *so, int optna SCTP_FROM_SCTP_USRREQ + SCTP_LOC_10); } net->dest_state |= SCTP_ADDR_NO_PMTUD; - if (paddrp->spp_pathmtu > SCTP_DEFAULT_MINSEGMENT) { - net->mtu = paddrp->spp_pathmtu + ovh; - if (net->mtu < stcb->asoc.smallest_mtu) { - sctp_pathmtu_adjustment(stcb, net->mtu); - } + net->mtu = paddrp->spp_pathmtu + ovh; + if (net->mtu < stcb->asoc.smallest_mtu) { + sctp_pathmtu_adjustment(stcb, net->mtu); } } sctp_stcb_feature_on(inp, stcb, SCTP_PCB_FLAGS_DO_NOT_PMTUD); Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet/sctputil.c Thu Nov 21 23:00:09 2013 (r258454) @@ -2602,7 +2602,7 @@ sctp_notify_assoc_change(uint16_t state, if (sctp_stcb_is_feature_on(stcb->sctp_ep, stcb, SCTP_PCB_FLAGS_RECVASSOCEVNT)) { notif_len = sizeof(struct sctp_assoc_change); if (abort != NULL) { - abort_len = htons(abort->ch.chunk_length); + abort_len = ntohs(abort->ch.chunk_length); } else { abort_len = 0; } @@ -3474,7 +3474,7 @@ sctp_notify_remote_error(struct sctp_tcb return; } if (chunk != NULL) { - chunk_len = htons(chunk->ch.chunk_length); + chunk_len = ntohs(chunk->ch.chunk_length); } else { chunk_len = 0; } @@ -6612,8 +6612,16 @@ sctp_bindx_delete_address(struct sctp_in int sctp_local_addr_count(struct sctp_tcb *stcb) { - int loopback_scope, ipv4_local_scope, local_scope, site_scope; - int ipv4_addr_legal, ipv6_addr_legal; + int loopback_scope; + +#if defined(INET) + int ipv4_local_scope, ipv4_addr_legal; + +#endif +#if defined (INET6) + int local_scope, site_scope, ipv6_addr_legal; + +#endif struct sctp_vrf *vrf; struct sctp_ifn *sctp_ifn; struct sctp_ifa *sctp_ifa; @@ -6621,11 +6629,15 @@ sctp_local_addr_count(struct sctp_tcb *s /* Turn on all the appropriate scopes */ loopback_scope = stcb->asoc.scope.loopback_scope; +#if defined(INET) ipv4_local_scope = stcb->asoc.scope.ipv4_local_scope; + ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; +#endif +#if defined(INET6) local_scope = stcb->asoc.scope.local_scope; site_scope = stcb->asoc.scope.site_scope; - ipv4_addr_legal = stcb->asoc.scope.ipv4_addr_legal; ipv6_addr_legal = stcb->asoc.scope.ipv6_addr_legal; +#endif SCTP_IPI_ADDR_RLOCK(); vrf = sctp_find_vrf(stcb->asoc.vrf_id); if (vrf == NULL) { Modified: stable/10/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/10/sys/netinet6/sctp6_usrreq.c Thu Nov 21 23:00:00 2013 (r258453) +++ stable/10/sys/netinet6/sctp6_usrreq.c Thu Nov 21 23:00:09 2013 (r258454) @@ -839,16 +839,18 @@ sctp6_connect(struct socket *so, struct uint32_t vrf_id; int error = 0; struct sctp_inpcb *inp; - struct in6pcb *inp6; struct sctp_tcb *stcb; #ifdef INET + struct in6pcb *inp6; struct sockaddr_in6 *sin6; struct sockaddr_storage ss; #endif +#ifdef INET inp6 = (struct in6pcb *)so->so_pcb; +#endif inp = (struct sctp_inpcb *)so->so_pcb; if (inp == NULL) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, ECONNRESET); From owner-svn-src-stable@FreeBSD.ORG Fri Nov 22 00:26:22 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 79D3EA63; Fri, 22 Nov 2013 00:26:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 682F924B4; Fri, 22 Nov 2013 00:26:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAM0QMuT028247; Fri, 22 Nov 2013 00:26:22 GMT (envelope-from davidcs@svn.freebsd.org) Received: (from davidcs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAM0QLIS028243; Fri, 22 Nov 2013 00:26:21 GMT (envelope-from davidcs@svn.freebsd.org) Message-Id: <201311220026.rAM0QLIS028243@svn.freebsd.org> From: David C Somayajulu Date: Fri, 22 Nov 2013 00:26:21 +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: r258457 - in stable/10/sys/dev: qlxgbe qlxge 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, 22 Nov 2013 00:26:22 -0000 Author: davidcs Date: Fri Nov 22 00:26:21 2013 New Revision: 258457 URL: http://svnweb.freebsd.org/changeset/base/258457 Log: MFC r258155 ql_hw.[c,h]: set minimum thresholds on pkt size for lro path. ql_ioctl.c: validate the length and address of buffer passed to QL_RD_FW_DUMP MFC r258156 qls_ioctl.c: Validate the buffer and its length passed to QLA_MPI_DUMP. copyout dump only if qls_mpi_core_dump() is successful. (like to credit x90c for pointing the issue) Approved by: re (delphij) Modified: stable/10/sys/dev/qlxgbe/ql_hw.c stable/10/sys/dev/qlxgbe/ql_hw.h stable/10/sys/dev/qlxgbe/ql_ioctl.c stable/10/sys/dev/qlxge/qls_ioctl.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/dev/qlxgbe/ql_hw.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.c Fri Nov 22 00:06:11 2013 (r258456) +++ stable/10/sys/dev/qlxgbe/ql_hw.c Fri Nov 22 00:26:21 2013 (r258457) @@ -212,6 +212,12 @@ ql_hw_add_sysctls(qla_host_t *ha) "Number of Rcv Rings Entries to post before updating" " RDS Ring Producer Index"); + ha->hw.min_lro_pkt_size = 512; + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "min_lro_pkt_size", CTLFLAG_RD, &ha->hw.min_lro_pkt_size, + ha->hw.min_lro_pkt_size, "minimum packet size to trigger lro"); + ha->hw.mdump_active = 0; SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), @@ -1069,6 +1075,11 @@ qla_config_fw_lro(qla_host_t *ha, uint16 fw_lro->cntxt_id = cntxt_id; + if (ha->hw.min_lro_pkt_size) { + fw_lro->flags |= Q8_MBX_FW_LRO_LOW_THRESHOLD; + fw_lro->low_threshold = ha->hw.min_lro_pkt_size; + } + if (qla_mbx_cmd(ha, (uint32_t *)fw_lro, (sizeof (q80_config_fw_lro_t) >> 2), ha->hw.mbox, (sizeof (q80_config_fw_lro_rsp_t) >> 2), 0)) { Modified: stable/10/sys/dev/qlxgbe/ql_hw.h ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_hw.h Fri Nov 22 00:06:11 2013 (r258456) +++ stable/10/sys/dev/qlxgbe/ql_hw.h Fri Nov 22 00:26:21 2013 (r258457) @@ -568,9 +568,13 @@ typedef struct _q80_config_fw_lro { #define Q8_MBX_FW_LRO_IPV6 0x2 #define Q8_MBX_FW_LRO_IPV4_WO_DST_IP_CHK 0x4 #define Q8_MBX_FW_LRO_IPV6_WO_DST_IP_CHK 0x8 +#define Q8_MBX_FW_LRO_LOW_THRESHOLD 0x10 uint8_t rsrvd; uint16_t cntxt_id; + + uint16_t low_threshold; + uint16_t rsrvd0; } __packed q80_config_fw_lro_t; typedef struct _q80_config_fw_lro_rsp { @@ -1521,6 +1525,7 @@ typedef struct _qla_hw { uint32_t health_count; uint32_t max_tx_segs; + uint32_t min_lro_pkt_size; /* Flash Descriptor Table */ qla_flash_desc_table_t fdt; Modified: stable/10/sys/dev/qlxgbe/ql_ioctl.c ============================================================================== --- stable/10/sys/dev/qlxgbe/ql_ioctl.c Fri Nov 22 00:06:11 2013 (r258456) +++ stable/10/sys/dev/qlxgbe/ql_ioctl.c Fri Nov 22 00:26:21 2013 (r258457) @@ -223,6 +223,13 @@ ql_eioctl(struct cdev *dev, u_long cmd, } fw_dump = (qla_rd_fw_dump_t *)data; + + if ((fw_dump->md_template == NULL) || + (fw_dump->template_size != ha->hw.dma_buf.minidump.size)) { + rval = EINVAL; + break; + } + if ((rval = copyout(ha->hw.dma_buf.minidump.dma_b, fw_dump->md_template, fw_dump->template_size))) rval = ENXIO; Modified: stable/10/sys/dev/qlxge/qls_ioctl.c ============================================================================== --- stable/10/sys/dev/qlxge/qls_ioctl.c Fri Nov 22 00:06:11 2013 (r258456) +++ stable/10/sys/dev/qlxge/qls_ioctl.c Fri Nov 22 00:26:21 2013 (r258457) @@ -100,13 +100,16 @@ qls_eioctl(struct cdev *dev, u_long cmd, if (mpi_dump->size == 0) { mpi_dump->size = sizeof (qls_mpi_coredump_t); } else { - if (mpi_dump->size < sizeof (qls_mpi_coredump_t)) + if ((mpi_dump->size != sizeof (qls_mpi_coredump_t)) || + (mpi_dump->dbuf == NULL)) rval = EINVAL; else { - qls_mpi_core_dump(ha); - rval = copyout( &ql_mpi_coredump, - mpi_dump->dbuf, - mpi_dump->size); + if (qls_mpi_core_dump(ha) == 0) { + rval = copyout(&ql_mpi_coredump, + mpi_dump->dbuf, + mpi_dump->size); + } else + rval = ENXIO; if (rval) { device_printf(ha->pci_dev, From owner-svn-src-stable@FreeBSD.ORG Fri Nov 22 12:51:55 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 DDD77123; Fri, 22 Nov 2013 12:51:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CD72A22C0; Fri, 22 Nov 2013 12:51:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAMCptem083554; Fri, 22 Nov 2013 12:51:55 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAMCptns083553; Fri, 22 Nov 2013 12:51:55 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201311221251.rAMCptns083553@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 22 Nov 2013 12:51:55 +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: r258470 - 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, 22 Nov 2013 12:51:55 -0000 Author: tijl Date: Fri Nov 22 12:51:55 2013 New Revision: 258470 URL: http://svnweb.freebsd.org/changeset/base/258470 Log: MFC r258318: Also delete lib32 libiconv. Reported by: Tomoaki AOKI MFC r258345: One more BIND remnant: /etc/mtree/BIND.chroot.dist Discussed with: des Approved by: re (kib) Modified: stable/10/ObsoleteFiles.inc (contents, props changed) Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Fri Nov 22 12:09:15 2013 (r258469) +++ stable/10/ObsoleteFiles.inc Fri Nov 22 12:51:55 2013 (r258470) @@ -47,6 +47,10 @@ OLD_FILES+=usr/lib/libiconv.a OLD_FILES+=usr/lib/libiconv.so OLD_FILES+=usr/lib/libiconv.so.3 OLD_FILES+=usr/lib/libiconv_p.a +OLD_FILES+=usr/lib32/libiconv.a +OLD_FILES+=usr/lib32/libiconv.so +OLD_FILES+=usr/lib32/libiconv.so.3 +OLD_FILES+=usr/lib32/libiconv_p.a # 20131030: /etc/keys moved to /usr/share/keys OLD_DIRS+=etc/keys OLD_DIRS+=etc/keys/pkg @@ -91,6 +95,7 @@ OLD_FILES+=usr/bin/gnu-ranlib OLD_FILES+=usr/share/man/man1/gnu-ar.1.gz OLD_FILES+=usr/share/man/man1/gnu-ranlib.1.gz # 20130930: BIND removed from base +OLD_FILES+=etc/mtree/BIND.chroot.dist OLD_FILES+=etc/namedb OLD_FILES+=etc/periodic/daily/470.status-named OLD_FILES+=usr/bin/dig From owner-svn-src-stable@FreeBSD.ORG Fri Nov 22 19:26:04 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 E8A6F7AE; Fri, 22 Nov 2013 19:26:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D7053291F; Fri, 22 Nov 2013 19:26:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAMJQ42T016992; Fri, 22 Nov 2013 19:26:04 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAMJQ4xe016989; Fri, 22 Nov 2013 19:26:04 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311221926.rAMJQ4xe016989@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 22 Nov 2013 19:26:04 +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: r258481 - in 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: Fri, 22 Nov 2013 19:26:05 -0000 Author: glebius Date: Fri Nov 22 19:26:04 2013 New Revision: 258481 URL: http://svnweb.freebsd.org/changeset/base/258481 Log: Merge r256769 by des from head: Last few remnants of BIND (hopefully...) Approved by: re (kib) Modified: stable/10/ObsoleteFiles.inc (contents, props changed) stable/10/etc/mtree/BSD.usr.dist Directory Properties: stable/10/etc/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Fri Nov 22 19:22:26 2013 (r258480) +++ stable/10/ObsoleteFiles.inc Fri Nov 22 19:26:04 2013 (r258481) @@ -117,7 +117,7 @@ OLD_FILES+=usr/include/lwres/result.h OLD_FILES+=usr/include/lwres/version.h OLD_FILES+=usr/lib/liblwres.a OLD_FILES+=usr/lib/liblwres.so -OLD_LIBS+=usr/lib/liblwres.so.50 +OLD_LIBS+=usr/lib/liblwres.so.90 OLD_FILES+=usr/lib/liblwres_p.a OLD_FILES+=usr/sbin/arpaname OLD_FILES+=usr/sbin/ddns-confgen @@ -127,6 +127,7 @@ OLD_FILES+=usr/sbin/dnssec-keygen OLD_FILES+=usr/sbin/dnssec-revoke OLD_FILES+=usr/sbin/dnssec-settime OLD_FILES+=usr/sbin/dnssec-signzone +OLD_FILES+=usr/sbin/dnssec-verify OLD_FILES+=usr/sbin/genrandom OLD_FILES+=usr/sbin/isc-hmac-fixup OLD_FILES+=usr/sbin/lwresd Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Fri Nov 22 19:22:26 2013 (r258480) +++ stable/10/etc/mtree/BSD.usr.dist Fri Nov 22 19:26:04 2013 (r258481) @@ -169,12 +169,6 @@ .. atm .. - bind9 - arm - .. - misc - .. - .. legal intel_ipw .. From owner-svn-src-stable@FreeBSD.ORG Fri Nov 22 19:26:52 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 DB70F8F0; Fri, 22 Nov 2013 19:26: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 CA24A292C; Fri, 22 Nov 2013 19:26: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 rAMJQqbJ017097; Fri, 22 Nov 2013 19:26:52 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAMJQqc3017096; Fri, 22 Nov 2013 19:26:52 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311221926.rAMJQqc3017096@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 22 Nov 2013 19:26:52 +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: r258482 - stable/10/share/man/man4 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, 22 Nov 2013 19:26:52 -0000 Author: glebius Date: Fri Nov 22 19:26:52 2013 New Revision: 258482 URL: http://svnweb.freebsd.org/changeset/base/258482 Log: Merge r258122 from head: Emphasize that pf(4) in FreeBSD doesn't match pf(4) in OpenBSD 4.5, but is derived from it, and got some important local changes. Approved by: re (kib) Modified: stable/10/share/man/man4/pf.4 Directory Properties: stable/10/share/man/ (props changed) stable/10/share/man/man4/ (props changed) Modified: stable/10/share/man/man4/pf.4 ============================================================================== --- stable/10/share/man/man4/pf.4 Fri Nov 22 19:26:04 2013 (r258481) +++ stable/10/share/man/man4/pf.4 Fri Nov 22 19:26:52 2013 (r258482) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 18 2012 +.Dd November 14, 2013 .Dt PF 4 .Os .Sh NAME @@ -1181,5 +1181,8 @@ packet filtering mechanism first appeare and then .Fx 5.2 . .Pp -This implementation matches +This implementation is derived from .Ox 4.5 . +It has been heavily modified to be capable of running in multithreaded +.Fx +kernel and scale its performance on multiple CPUs. From owner-svn-src-stable@FreeBSD.ORG Fri Nov 22 19:27:18 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 2522CA26; Fri, 22 Nov 2013 19:27:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 137292933; Fri, 22 Nov 2013 19:27: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 rAMJRHtE017189; Fri, 22 Nov 2013 19:27:17 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAMJRHbe017188; Fri, 22 Nov 2013 19:27:17 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201311221927.rAMJRHbe017188@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 22 Nov 2013 19:27:17 +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: r258483 - stable/10/sys/kern 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, 22 Nov 2013 19:27:18 -0000 Author: glebius Date: Fri Nov 22 19:27:17 2013 New Revision: 258483 URL: http://svnweb.freebsd.org/changeset/base/258483 Log: Merge r258128 from head: Fix a very bad typo from r248887. Approved by: re (kib) Modified: stable/10/sys/kern/uipc_mbuf.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/kern/uipc_mbuf.c ============================================================================== --- stable/10/sys/kern/uipc_mbuf.c Fri Nov 22 19:26:52 2013 (r258482) +++ stable/10/sys/kern/uipc_mbuf.c Fri Nov 22 19:27:17 2013 (r258483) @@ -1196,6 +1196,7 @@ m_split(struct mbuf *m0, int len0, int w remain = m->m_len - len; if (m0->m_flags & M_PKTHDR && remain == 0) { n = m_gethdr(wait, m0->m_type); + if (n == NULL) return (NULL); n->m_next = m->m_next; m->m_next = NULL; From owner-svn-src-stable@FreeBSD.ORG Sat Nov 23 01:20:18 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 3B0D2F25; Sat, 23 Nov 2013 01:20:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1B9AD298B; Sat, 23 Nov 2013 01:20: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 rAN1KHYX058679; Sat, 23 Nov 2013 01:20:17 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAN1KHoZ058676; Sat, 23 Nov 2013 01:20:17 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <201311230120.rAN1KHoZ058676@svn.freebsd.org> From: Craig Rodrigues Date: Sat, 23 Nov 2013 01:20:17 +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: r258493 - in stable/10/release/doc/en_US.ISO8859-1: errata hardware 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: Sat, 23 Nov 2013 01:20:18 -0000 Author: rodrigc Date: Sat Nov 23 01:20:17 2013 New Revision: 258493 URL: http://svnweb.freebsd.org/changeset/base/258493 Log: MFC r258432, r258433 Update text related to Intel CPU support and Apple hardware support. Update copyrights Submitted by: skreuzer Approved by: re (hrs, delphij) Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Directory Properties: stable/10/release/ (props changed) stable/10/release/doc/ (props changed) Modified: stable/10/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Sat Nov 23 00:28:18 2013 (r258492) +++ stable/10/release/doc/en_US.ISO8859-1/errata/article.xml Sat Nov 23 01:20:17 2013 (r258493) @@ -32,6 +32,14 @@ 2003 2004 2005 + 2006 + 2007 + 2008 + 2009 + 2010 + 2011 + 2012 + 2013 The &os; Documentation Project Modified: stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Sat Nov 23 00:28:18 2013 (r258492) +++ stable/10/release/doc/en_US.ISO8859-1/hardware/article.xml Sat Nov 23 01:20:17 2013 (r258493) @@ -178,9 +178,7 @@ the &a.smp; may yield some clues. &os; will take advantage of HyperThreading (HTT) support - on &intel; CPUs that support this feature. A kernel with the - options SMP feature enabled will - automatically detect the additional logical processors. The + on &intel; CPUs that support this feature. The default &os; scheduler treats the logical processors the same as additional physical processors; in other words, no attempt is made to optimize scheduling decisions given the shared @@ -303,63 +301,12 @@ powerpc - This section describes the systems currently known to be - supported by &os; on the PowerPC platform. This list is not - exhaustive. - - In general, all New World architecture Apple hardware - is supported, as well a limited selection of non-Apple - machines. - - All systems listed below are fully supported, with the - exception that software fan control is currently missing on - some Power Macintosh G5 models. SMP is supported on all systems - with more than 1 processor. + All Apple PowerPC machines with built-in USB are supported, + as well a limited selection of non-Apple machines, + including KVM on POWER7 - - - Apple iMac G3 - - - Apple iMac G4 - - - Apple iMac G5 - - - Apple Power Macintosh G3 (Blue & White) - - - Apple Power Macintosh G4 - - - Apple Power Macintosh G5 - - - Apple iBook G3 - - - Apple iBook G4 - - - Apple PowerBook G3 (Lombard and Pismo) - - - Apple PowerBook G4 - - - Apple XServe G4 - - - Apple XServe G5 - - - Apple Mac Mini - - - Embedded boards based on MPC85XX - - + SMP is supported on all systems with more than + 1 processor. @@ -367,10 +314,7 @@ This section describes the systems currently known to be supported by &os; on the Fujitsu &sparc64; and Sun &ultrasparc; - platforms. For - background information on the various hardware designs see the - Sun System - Handbook. + platforms. SMP is supported on all systems with more than 1 processor. Modified: stable/10/release/doc/en_US.ISO8859-1/readme/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Sat Nov 23 00:28:18 2013 (r258492) +++ stable/10/release/doc/en_US.ISO8859-1/readme/article.xml Sat Nov 23 01:20:17 2013 (r258493) @@ -30,6 +30,11 @@ 2006 2007 2008 + 2009 + 2010 + 2011 + 2012 + 2013 The &os; Documentation Project From owner-svn-src-stable@FreeBSD.ORG Sat Nov 23 12:17: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 64AA3C93; Sat, 23 Nov 2013 12:17: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 5453B2568; Sat, 23 Nov 2013 12:17: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 rANCH67t085741; Sat, 23 Nov 2013 12:17:06 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rANCH6LX085740; Sat, 23 Nov 2013 12:17:06 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201311231217.rANCH6LX085740@svn.freebsd.org> From: Tijl Coosemans Date: Sat, 23 Nov 2013 12:17:06 +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: r258496 - stable/10/lib/libiconv_modules/UTF7 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, 23 Nov 2013 12:17:06 -0000 Author: tijl Date: Sat Nov 23 12:17:05 2013 New Revision: 258496 URL: http://svnweb.freebsd.org/changeset/base/258496 Log: MFC r258316: Bug fixes in iconv(3) UTF-7 support. - Add ' to the list of directly encoded characters and * to the list of optionally directly encoded characters as per RFC 2152. - In _citrus_UTF7_mbtoutf16 on end of input when the next output character has only been partially decoded, save a copy of the buffer of input characters (not just its length). On the next call with more input characters this buffer is reprocessed together with the new input to form a fully decoded output character. - At the end of a base64 encoded sequence fully discard '-' (BASE64_OUT) by decrementing psenc->chlen and i. This is needed to make room in psenc->ch (input buffer) in case the next input character starts a new base64 encoded sequence. And also, if this is the end of input and no output character can be returned, this brings the encoder in the initial state as indicated by _citrus_UTF7_stdenc_get_state_desc_generic which is used by the caller to distinguish between no output and partial output. - In _citrus_UTF7_mbrtowc_priv pass the s parameter (input pointer) directly to _citrus_UTF7_mbtoutf16 instead of a copy (s0). This way s is updated correctly in case of errors. - In _citrus_UTF7_mbrtowc_priv when called with psenc->surrogate set (previous call did not have enough input), retrieve the previously decoded UTF-16 character from (psenc->cache >> psenc->bits) instead of (psenc->cache >> 2). Approved by: re (kib) Modified: stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c Directory Properties: stable/10/lib/libiconv_modules/ (props changed) Modified: stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c ============================================================================== --- stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c Sat Nov 23 11:46:13 2013 (r258495) +++ stable/10/lib/libiconv_modules/UTF7/citrus_utf7.c Sat Nov 23 12:17:05 2013 (r258496) @@ -113,9 +113,9 @@ static const char base64[] = static const char direct[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" - "0123456789(),-./:?"; + "0123456789'(),-./:?"; -static const char option[] = "!\"#$%&';<=>@[]^_`{|}"; +static const char option[] = "!\"#$%&*;<=>@[]^_`{|}"; static const char spaces[] = " \t\r\n"; #define BASE64_BIT 6 @@ -165,6 +165,7 @@ _citrus_UTF7_mbtoutf16(_UTF7EncodingInfo *nresult = (size_t)-2; *s = s0; sv.chlen = psenc->chlen; + memcpy(sv.ch, psenc->ch, sizeof(sv.ch)); *psenc = sv; return (0); } @@ -202,6 +203,9 @@ _citrus_UTF7_mbtoutf16(_UTF7EncodingInfo goto ilseq; *u16 = (uint16_t)psenc->ch[i]; done = 1; + } else { + psenc->chlen--; + i--; } } else { psenc->cache = @@ -241,7 +245,6 @@ _citrus_UTF7_mbrtowc_priv(_UTF7EncodingI wchar_t * __restrict pwc, const char ** __restrict s, size_t n, _UTF7State * __restrict psenc, size_t * __restrict nresult) { - const char *s0; uint32_t u32; uint16_t hi, lo; size_t nr, siz; @@ -252,14 +255,13 @@ _citrus_UTF7_mbrtowc_priv(_UTF7EncodingI *nresult = (size_t)_ENCODING_IS_STATE_DEPENDENT; return (0); } - s0 = *s; if (psenc->surrogate) { - hi = (psenc->cache >> 2) & UTF16_MAX; + hi = (psenc->cache >> psenc->bits) & UTF16_MAX; if (hi < HISRG_MIN || hi > HISRG_MAX) return (EINVAL); siz = 0; } else { - err = _citrus_UTF7_mbtoutf16(ei, &hi, &s0, n, psenc, &nr); + err = _citrus_UTF7_mbtoutf16(ei, &hi, s, n, psenc, &nr); if (nr == (size_t)-1 || nr == (size_t)-2) { *nresult = nr; return (err); @@ -274,7 +276,7 @@ _citrus_UTF7_mbrtowc_priv(_UTF7EncodingI } psenc->surrogate = 1; } - err = _citrus_UTF7_mbtoutf16(ei, &lo, &s0, n, psenc, &nr); + err = _citrus_UTF7_mbtoutf16(ei, &lo, s, n, psenc, &nr); if (nr == (size_t)-1 || nr == (size_t)-2) { *nresult = nr; return (err); @@ -286,7 +288,6 @@ _citrus_UTF7_mbrtowc_priv(_UTF7EncodingI u32 = (hi << 10 | lo) + SRG_BASE; siz += nr; done: - *s = s0; if (pwc != NULL) *pwc = (wchar_t)u32; if (u32 == (uint32_t)0) { From owner-svn-src-stable@FreeBSD.ORG Sat Nov 23 23:54:38 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 DF055D8C; Sat, 23 Nov 2013 23:54: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 CDAFB2286; Sat, 23 Nov 2013 23:54: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 rANNscMl020927; Sat, 23 Nov 2013 23:54:38 GMT (envelope-from mjg@svn.freebsd.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rANNscU0020926; Sat, 23 Nov 2013 23:54:38 GMT (envelope-from mjg@svn.freebsd.org) Message-Id: <201311232354.rANNscU0020926@svn.freebsd.org> From: Mateusz Guzik Date: Sat, 23 Nov 2013 23:54:38 +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: r258505 - stable/10/sys/geom/nop 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, 23 Nov 2013 23:54:39 -0000 Author: mjg Date: Sat Nov 23 23:54:38 2013 New Revision: 258505 URL: http://svnweb.freebsd.org/changeset/base/258505 Log: MFC r256951: gnop: make sure that newly allocated memory for softc is zeroed This prevents mtx_init from encountering non-zeros and panicking the kernel as a result. Approved by: re Modified: stable/10/sys/geom/nop/g_nop.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/geom/nop/g_nop.c ============================================================================== --- stable/10/sys/geom/nop/g_nop.c Sat Nov 23 18:58:17 2013 (r258504) +++ stable/10/sys/geom/nop/g_nop.c Sat Nov 23 23:54:38 2013 (r258505) @@ -214,7 +214,7 @@ g_nop_create(struct gctl_req *req, struc } } gp = g_new_geomf(mp, "%s", name); - sc = g_malloc(sizeof(*sc), M_WAITOK); + sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); sc->sc_offset = offset; sc->sc_explicitsize = explicitsize; sc->sc_error = ioerror;