From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 11:34:49 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C2AEC106566C; Mon, 20 Aug 2012 11:34:49 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD8978FC08; Mon, 20 Aug 2012 11:34:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KBYnKu028031; Mon, 20 Aug 2012 11:34:49 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KBYnxq028028; Mon, 20 Aug 2012 11:34:49 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <201208201134.q7KBYnxq028028@svn.freebsd.org> From: Colin Percival Date: Mon, 20 Aug 2012 11:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239412 - in stable/9/sys: amd64/conf i386/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 11:34:49 -0000 Author: cperciva Date: Mon Aug 20 11:34:49 2012 New Revision: 239412 URL: http://svn.freebsd.org/changeset/base/239412 Log: MFC r239228: Build modules along with the XENHVM kernels. Modified: stable/9/sys/amd64/conf/XENHVM stable/9/sys/i386/conf/XENHVM Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/conf/XENHVM ============================================================================== --- stable/9/sys/amd64/conf/XENHVM Mon Aug 20 11:29:24 2012 (r239411) +++ stable/9/sys/amd64/conf/XENHVM Mon Aug 20 11:34:49 2012 (r239412) @@ -6,8 +6,6 @@ include GENERIC ident XENHVM -makeoptions MODULES_OVERRIDE="" - # # Adaptive locks rely on a lock-free pointer read to determine the run state # of the thread holding a lock when under contention; under a virtualisation Modified: stable/9/sys/i386/conf/XENHVM ============================================================================== --- stable/9/sys/i386/conf/XENHVM Mon Aug 20 11:29:24 2012 (r239411) +++ stable/9/sys/i386/conf/XENHVM Mon Aug 20 11:34:49 2012 (r239412) @@ -6,8 +6,6 @@ include GENERIC ident XENHVM -makeoptions MODULES_OVERRIDE="" - # # Adaptive locks rely on a lock-free pointer read to determine the run state # of the thread holding a lock when under contention; under a virtualisation From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 12:07:11 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66ACE106564A; Mon, 20 Aug 2012 12:07:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5144A8FC12; Mon, 20 Aug 2012 12:07:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KC7B2k031528; Mon, 20 Aug 2012 12:07:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KC7Bnp031526; Mon, 20 Aug 2012 12:07:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208201207.q7KC7Bnp031526@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 20 Aug 2012 12:07:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239414 - stable/9/sys/kern X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 12:07:11 -0000 Author: kib Date: Mon Aug 20 12:07:10 2012 New Revision: 239414 URL: http://svn.freebsd.org/changeset/base/239414 Log: MFC r232197 (on behalf of phk): Also call the low-level driver if ->c_iflag & (IXON|IXOFF|IXANY) changes. Uftdi(4) examines (c_iflag & (IXON|IXOFF)) to control hw XON-XOFF support. This is obviously no good, if changes to those bits are not communicated down the stack. Modified: stable/9/sys/kern/tty.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/tty.c ============================================================================== --- stable/9/sys/kern/tty.c Mon Aug 20 11:51:49 2012 (r239413) +++ stable/9/sys/kern/tty.c Mon Aug 20 12:07:10 2012 (r239414) @@ -1498,6 +1498,8 @@ tty_generic_ioctl(struct tty *tp, u_long */ if ((t->c_cflag & CIGNORE) == 0 && (tp->t_termios.c_cflag != t->c_cflag || + ((tp->t_termios.c_iflag ^ t->c_iflag) & + (IXON|IXOFF|IXANY)) || tp->t_termios.c_ispeed != t->c_ispeed || tp->t_termios.c_ospeed != t->c_ospeed)) { error = ttydevsw_param(tp, t); From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 12:09:02 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C362106564A; Mon, 20 Aug 2012 12:09:02 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76F788FC14; Mon, 20 Aug 2012 12:09:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KC92hb031821; Mon, 20 Aug 2012 12:09:02 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KC92Zl031819; Mon, 20 Aug 2012 12:09:02 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201208201209.q7KC92Zl031819@svn.freebsd.org> From: Alexander Motin Date: Mon, 20 Aug 2012 12:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239415 - stable/9/sys/dev/mps X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 12:09:02 -0000 Author: mav Date: Mon Aug 20 12:09:02 2012 New Revision: 239415 URL: http://svn.freebsd.org/changeset/base/239415 Log: MFC r238969: Fix kernel panic on `camcontrol reset` for specific target, caused by uninitialized cm_targ in mpssas_action_resetdev(). Modified: stable/9/sys/dev/mps/mps_sas.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mps/mps_sas.c ============================================================================== --- stable/9/sys/dev/mps/mps_sas.c Mon Aug 20 12:07:10 2012 (r239414) +++ stable/9/sys/dev/mps/mps_sas.c Mon Aug 20 12:09:02 2012 (r239415) @@ -3003,6 +3003,7 @@ mpssas_action_resetdev(struct mpssas_sof tm->cm_desc.HighPriority.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY; tm->cm_complete = mpssas_resetdev_complete; tm->cm_complete_data = ccb; + tm->cm_targ = targ; mps_map_command(sc, tm); } From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 13:06:52 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6218B106566C; Mon, 20 Aug 2012 13:06:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32AE38FC14; Mon, 20 Aug 2012 13:06:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KD6qoH037914; Mon, 20 Aug 2012 13:06:52 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KD6pml037912; Mon, 20 Aug 2012 13:06:51 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201208201306.q7KD6pml037912@svn.freebsd.org> From: Glen Barber Date: Mon, 20 Aug 2012 13:06:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239419 - stable/9/cddl/contrib/opensolaris/cmd/zfs X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 13:06:52 -0000 Author: gjb (doc,ports committer) Date: Mon Aug 20 13:06:51 2012 New Revision: 239419 URL: http://svn.freebsd.org/changeset/base/239419 Log: MFC r239216, r239217: r239216: - Remove a leading space that breaks rendering r239217: - Fix source dataset snapshot name in Example 15. - Bump date. Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Aug 20 12:53:29 2012 (r239418) +++ stable/9/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Mon Aug 20 13:06:51 2012 (r239419) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 26, 2011 +.Dd August 12, 2012 .Dt ZFS 8 .Os .Sh NAME @@ -2241,7 +2241,7 @@ properties, and current snapshot and fil is received. If the .Fl F flag is specified when this stream is received, snapshots and file systems that - do not exist on the sending side are destroyed. +do not exist on the sending side are destroyed. .It Fl D Generate a deduplicated stream. Blocks which would have been sent multiple times in the send stream will only be sent once. The receiving system must @@ -3021,9 +3021,9 @@ a new snapshot, as follows: .Li # Ic zfs destroy -r pool/users@7daysago .Li # Ic zfs rename -r pool/users@6daysago @7daysago .Li # Ic zfs rename -r pool/users@5daysago @6daysago -.Li # Ic zfs rename -r pool/users@yesterday @5daysago -.Li # Ic zfs rename -r pool/users@yesterday @4daysago -.Li # Ic zfs rename -r pool/users@yesterday @3daysago +.Li # Ic zfs rename -r pool/users@4daysago @5daysago +.Li # Ic zfs rename -r pool/users@3daysago @4daysago +.Li # Ic zfs rename -r pool/users@2daysago @3daysago .Li # Ic zfs rename -r pool/users@yesterday @2daysago .Li # Ic zfs rename -r pool/users@today @yesterday .Li # Ic zfs snapshot -r pool/users@today From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 13:59:23 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3D701065795; Mon, 20 Aug 2012 13:59:23 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84BEC8FC18; Mon, 20 Aug 2012 13:59:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KDxNec043455; Mon, 20 Aug 2012 13:59:23 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KDxNoo043453; Mon, 20 Aug 2012 13:59:23 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201359.q7KDxNoo043453@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 13:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239422 - stable/9/sys/net X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 13:59:23 -0000 Author: emaste Date: Mon Aug 20 13:59:22 2012 New Revision: 239422 URL: http://svn.freebsd.org/changeset/base/239422 Log: MFC r238183: Implement SIOCGIFMEDIA for if_tap(4) Appease certain if_tap(4) consumers by providing simulated Ethernet media status. DragonFly commit 70d9a675bf5441cc854a843ead702d08928c37f3 Obtained from: DragonFly BSD Sponsored by: ADARA Networks Modified: stable/9/sys/net/if_tap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/net/if_tap.c ============================================================================== --- stable/9/sys/net/if_tap.c Mon Aug 20 13:08:37 2012 (r239421) +++ stable/9/sys/net/if_tap.c Mon Aug 20 13:59:22 2012 (r239422) @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -602,7 +603,8 @@ tapifioctl(struct ifnet *ifp, u_long cmd struct tap_softc *tp = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; struct ifstat *ifs = NULL; - int dummy; + struct ifmediareq *ifmr = NULL; + int dummy, error = 0; switch (cmd) { case SIOCSIFFLAGS: /* XXX -- just like vmnet does */ @@ -610,6 +612,22 @@ tapifioctl(struct ifnet *ifp, u_long cmd case SIOCDELMULTI: break; + case SIOCGIFMEDIA: + ifmr = (struct ifmediareq *)data; + dummy = ifmr->ifm_count; + ifmr->ifm_count = 1; + ifmr->ifm_status = IFM_AVALID; + ifmr->ifm_active = IFM_ETHER; + if (tp->tap_flags & TAP_OPEN) + ifmr->ifm_status |= IFM_ACTIVE; + ifmr->ifm_current = ifmr->ifm_active; + if (dummy >= 1) { + int media = IFM_ETHER; + error = copyout(&media, ifmr->ifm_ulist, + sizeof(int)); + } + break; + case SIOCSIFMTU: ifp->if_mtu = ifr->ifr_mtu; break; @@ -626,11 +644,11 @@ tapifioctl(struct ifnet *ifp, u_long cmd break; default: - return (ether_ioctl(ifp, cmd, data)); - /* NOT REACHED */ + error = ether_ioctl(ifp, cmd, data); + break; } - return (0); + return (error); } /* tapifioctl */ From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:05:19 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92597106566C; Mon, 20 Aug 2012 14:05:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C7D78FC1C; Mon, 20 Aug 2012 14:05:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KE5J41044137; Mon, 20 Aug 2012 14:05:19 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KE5Jof044135; Mon, 20 Aug 2012 14:05:19 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201405.q7KE5Jof044135@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:05:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239423 - stable/9/lib/libc/string X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:05:19 -0000 Author: emaste Date: Mon Aug 20 14:05:19 2012 New Revision: 239423 URL: http://svn.freebsd.org/changeset/base/239423 Log: MFC r238183: Correct BUGS description of static buffer use Since r142667 strerror has unconditionally returned a pointer to a static buffer. Modified: stable/9/lib/libc/string/strerror.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/string/strerror.3 ============================================================================== --- stable/9/lib/libc/string/strerror.3 Mon Aug 20 13:59:22 2012 (r239422) +++ stable/9/lib/libc/string/strerror.3 Mon Aug 20 14:05:19 2012 (r239423) @@ -174,10 +174,10 @@ function was implemented in by .An Wes Peters Aq wes@FreeBSD.org . .Sh BUGS -For unknown error numbers, the +The .Fn strerror -function will return its result in a static buffer which -may be overwritten by subsequent calls. +function returns its result in a static buffer which +will be overwritten by subsequent calls. .Pp The return type for .Fn strerror From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:12:24 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A48F8106566B; Mon, 20 Aug 2012 14:12:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EEAB8FC15; Mon, 20 Aug 2012 14:12:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KECO2r044933; Mon, 20 Aug 2012 14:12:24 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KECO5q044931; Mon, 20 Aug 2012 14:12:24 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201412.q7KECO5q044931@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239425 - stable/9/sys/dev/usb/quirk X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:12:24 -0000 Author: emaste Date: Mon Aug 20 14:12:24 2012 New Revision: 239425 URL: http://svn.freebsd.org/changeset/base/239425 Log: MFC r238718: Quirk MS keyboard so that function keys work The function keys on a Microsoft Natural Egronomic Keyboard 4000 have been repurposed as "Help", "Undo", "Redo" etc., and a special "F Lock" key is required to return them to their normal purpose. This change enables the UQ_KBD_BOOTPROTO quirk for the MS Natural 4000 keyboard to get the keys working again. More extensive changes to the USB keyboard infrastructure would be needed to fully support the "F Lock" mode and the extended keys on this keyboard. PR: usb/116947 Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Mon Aug 20 14:10:00 2012 (r239424) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Mon Aug 20 14:12:24 2012 (r239425) @@ -123,6 +123,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(METAGEEK2, WISPYDBX, 0x0000, 0xffff, UQ_KBD_IGNORE, UQ_HID_IGNORE), USB_QUIRK(TENX, UAUDIO0, 0x0101, 0x0101, UQ_AUDIO_SWAP_LR), /* MS keyboards do weird things */ + USB_QUIRK(MICROSOFT, NATURAL4000, 0x0000, 0xFFFF, UQ_KBD_BOOTPROTO), USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), /* umodem(4) device quirks */ USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA), From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:26:17 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50C7A1065675; Mon, 20 Aug 2012 14:26:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3AB818FC20; Mon, 20 Aug 2012 14:26:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KEQHAc046466; Mon, 20 Aug 2012 14:26:17 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KEQHj8046464; Mon, 20 Aug 2012 14:26:17 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201426.q7KEQHj8046464@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239427 - stable/9/contrib/ntp/ntpd X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:26:17 -0000 Author: emaste Date: Mon Aug 20 14:26:16 2012 New Revision: 239427 URL: http://svn.freebsd.org/changeset/base/239427 Log: MFC r232844: Remove extraneous log message When ntp switched between PLL and FLL mode it produced a log message "kernel time sync status change %04x". This issue is reported in ntp bug 452[1] which claims that this behaviour is normal and the log message isn't necessary. I'm not sure exactly when it was removed, but it's gone in the latest ntp release (4.2.6p5). [1] http://bugs.ntp.org/show_bug.cgi?id=452 Modified: stable/9/contrib/ntp/ntpd/ntp_loopfilter.c Directory Properties: stable/9/contrib/ntp/ (props changed) Modified: stable/9/contrib/ntp/ntpd/ntp_loopfilter.c ============================================================================== --- stable/9/contrib/ntp/ntpd/ntp_loopfilter.c Mon Aug 20 14:14:19 2012 (r239426) +++ stable/9/contrib/ntp/ntpd/ntp_loopfilter.c Mon Aug 20 14:26:16 2012 (r239427) @@ -646,12 +646,6 @@ local_clock( msyslog(LOG_NOTICE, "kernel time sync error %04x", ntv.status); ntv.status &= ~(STA_PPSFREQ | STA_PPSTIME); - } else { - if ((ntv.status ^ pll_status) & ~STA_FLL) - NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT) - msyslog(LOG_NOTICE, - "kernel time sync status change %04x", - ntv.status); } pll_status = ntv.status; #ifdef STA_NANO From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:34:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF9521065670; Mon, 20 Aug 2012 14:34:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA0738FC14; Mon, 20 Aug 2012 14:34:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KEYUZU047502; Mon, 20 Aug 2012 14:34:30 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KEYUUt047499; Mon, 20 Aug 2012 14:34:30 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201434.q7KEYUUt047499@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239428 - stable/9/share/examples/kld/dyn_sysctl X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:34:31 -0000 Author: emaste Date: Mon Aug 20 14:34:30 2012 New Revision: 239428 URL: http://svn.freebsd.org/changeset/base/239428 Log: MFC r239130: Minor style(9) improvement Modified: stable/9/share/examples/kld/dyn_sysctl/dyn_sysctl.c Directory Properties: stable/9/share/examples/kld/dyn_sysctl/ (props changed) Modified: stable/9/share/examples/kld/dyn_sysctl/dyn_sysctl.c ============================================================================== --- stable/9/share/examples/kld/dyn_sysctl/dyn_sysctl.c Mon Aug 20 14:26:16 2012 (r239427) +++ stable/9/share/examples/kld/dyn_sysctl/dyn_sysctl.c Mon Aug 20 14:34:30 2012 (r239428) @@ -59,7 +59,7 @@ load(module_t mod, int cmd, void *arg) error = 0; switch (cmd) { - case MOD_LOAD : + case MOD_LOAD: /* Initialize the contexts */ printf("Initializing contexts and creating subtrees.\n\n"); sysctl_ctx_init(&clist); @@ -123,7 +123,7 @@ load(module_t mod, int cmd, void *arg) OID_AUTO, "string_c", CTLFLAG_RD, c, 0, "shouldn't panic"); printf("3. (%p) /kern/dyn_sysctl bad (WRONG!)\n", &clist2); break; - case MOD_UNLOAD : + case MOD_UNLOAD: printf("1. Try to free ctx1 (%p): ", &clist); if (sysctl_ctx_free(&clist) != 0) printf("failed: expected. Need to remove ctx3 first.\n"); @@ -153,7 +153,7 @@ load(module_t mod, int cmd, void *arg) } else printf("Ok\n"); break; - default : + default: error = EOPNOTSUPP; break; } From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:37:51 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 836EA1065692; Mon, 20 Aug 2012 14:37:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E7868FC2F; Mon, 20 Aug 2012 14:37:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KEbp7x047875; Mon, 20 Aug 2012 14:37:51 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KEbpSh047873; Mon, 20 Aug 2012 14:37:51 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201437.q7KEbpSh047873@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239429 - stable/9/sys/netgraph X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:37:51 -0000 Author: emaste Date: Mon Aug 20 14:37:50 2012 New Revision: 239429 URL: http://svn.freebsd.org/changeset/base/239429 Log: MFC r238844: Add version so others can depend on this module Modified: stable/9/sys/netgraph/ng_ether.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netgraph/ng_ether.c ============================================================================== --- stable/9/sys/netgraph/ng_ether.c Mon Aug 20 14:34:30 2012 (r239428) +++ stable/9/sys/netgraph/ng_ether.c Mon Aug 20 14:37:50 2012 (r239429) @@ -71,6 +71,8 @@ #include #include +MODULE_VERSION(ng_ether, 1); + #define IFP2NG(ifp) (IFP2AC((ifp))->ac_netgraph) /* Per-node private data */ From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:42:29 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B75D1106566B; Mon, 20 Aug 2012 14:42:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A15578FC14; Mon, 20 Aug 2012 14:42:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KEgT8T048393; Mon, 20 Aug 2012 14:42:29 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KEgTgl048391; Mon, 20 Aug 2012 14:42:29 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201442.q7KEgTgl048391@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239430 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:42:29 -0000 Author: emaste Date: Mon Aug 20 14:42:29 2012 New Revision: 239430 URL: http://svn.freebsd.org/changeset/base/239430 Log: MFC r236157: Add IPPROTO_MPLS (rfc4023) IP protocol definition There are currently no in-tree consumers; I'm adding it now for use by vendor code. This matches the change OpenBSD made while implementing MPLS in gif(4). Modified: stable/9/sys/netinet/in.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/in.h ============================================================================== --- stable/9/sys/netinet/in.h Mon Aug 20 14:37:50 2012 (r239429) +++ stable/9/sys/netinet/in.h Mon Aug 20 14:42:29 2012 (r239430) @@ -241,6 +241,7 @@ __END_DECLS #define IPPROTO_PIM 103 /* Protocol Independent Mcast */ #define IPPROTO_CARP 112 /* CARP */ #define IPPROTO_PGM 113 /* PGM */ +#define IPPROTO_MPLS 137 /* MPLS-in-IP */ #define IPPROTO_PFSYNC 240 /* PFSYNC */ /* 255: Reserved */ /* BSD Private, local use, namespace incursion, no longer used */ From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:49:06 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8CE19106566C; Mon, 20 Aug 2012 14:49:06 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 779B68FC12; Mon, 20 Aug 2012 14:49:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KEn6fQ049156; Mon, 20 Aug 2012 14:49:06 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KEn6ZK049154; Mon, 20 Aug 2012 14:49:06 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201449.q7KEn6ZK049154@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:49:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239431 - stable/9/usr.sbin/crashinfo X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:49:06 -0000 Author: emaste Date: Mon Aug 20 14:49:06 2012 New Revision: 239431 URL: http://svn.freebsd.org/changeset/base/239431 Log: MFC r232666: Improve multi-line kernel ident parsing Instead of blindly grabbing the line with 'Version string' and the following one from the core info file, take all lines after 'Version string' until the one one that matches the field format in the core info file. This provides compatibility with VendorBSD modifications that have a different kernel ident format. Modified: stable/9/usr.sbin/crashinfo/crashinfo.sh Directory Properties: stable/9/usr.sbin/crashinfo/ (props changed) Modified: stable/9/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- stable/9/usr.sbin/crashinfo/crashinfo.sh Mon Aug 20 14:42:29 2012 (r239430) +++ stable/9/usr.sbin/crashinfo/crashinfo.sh Mon Aug 20 14:49:06 2012 (r239431) @@ -45,10 +45,11 @@ find_kernel() nextline=1 next } - // { - if (nextline) { - print + nextline==1 { + if ($0 ~ "^ [A-Za-z ]+: ") { nextline=0 + } else { + print } }' $INFO) From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:52:44 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F45D106566B; Mon, 20 Aug 2012 14:52:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 79CC68FC15; Mon, 20 Aug 2012 14:52:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KEqiTU049576; Mon, 20 Aug 2012 14:52:44 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KEqidU049573; Mon, 20 Aug 2012 14:52:44 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201452.q7KEqidU049573@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239432 - stable/9/libexec/tftpd X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:52:44 -0000 Author: emaste Date: Mon Aug 20 14:52:43 2012 New Revision: 239432 URL: http://svn.freebsd.org/changeset/base/239432 Log: MFC r231973: Avoid error log for transfer stop w/o error code. A number of tftp clients, including the one in Intel's pxe boot loader, may intentionally stop a transfer using error code 0 (i.e., EUNDEF). These are not real errors. Avoid spamming log files with these by logging them at level LOG_DEBUG instead. Discussed on -hackers with an initial patch proposal; this change is an improved approach suggested by kan@. Modified: stable/9/libexec/tftpd/tftp-io.c Directory Properties: stable/9/libexec/tftpd/ (props changed) Modified: stable/9/libexec/tftpd/tftp-io.c ============================================================================== --- stable/9/libexec/tftpd/tftp-io.c Mon Aug 20 14:49:06 2012 (r239431) +++ stable/9/libexec/tftpd/tftp-io.c Mon Aug 20 14:52:43 2012 (r239432) @@ -463,7 +463,8 @@ receive_packet(int peer, char *data, int } if (pkt->th_opcode == ERROR) { - tftp_log(LOG_ERR, "Got ERROR packet: %s", pkt->th_msg); + tftp_log(pkt->th_code == EUNDEF ? LOG_DEBUG : LOG_ERR, + "Got ERROR packet: %s", pkt->th_msg); return (RP_ERROR); } From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:54:31 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3B0C106564A; Mon, 20 Aug 2012 14:54:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE8448FC16; Mon, 20 Aug 2012 14:54:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KEsUn1049801; Mon, 20 Aug 2012 14:54:30 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KEsUng049799; Mon, 20 Aug 2012 14:54:30 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208201454.q7KEsUng049799@svn.freebsd.org> From: Ed Maste Date: Mon, 20 Aug 2012 14:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239433 - stable/9/sys/dev/hwpmc X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:54:31 -0000 Author: emaste Date: Mon Aug 20 14:54:30 2012 New Revision: 239433 URL: http://svn.freebsd.org/changeset/base/239433 Log: MFC r230636: pmc_*_initialize may return NULL if the CPU is not supported, so check that md is not null before dereferencing it. PR: kern/156540 Modified: stable/9/sys/dev/hwpmc/hwpmc_x86.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/hwpmc/hwpmc_x86.c ============================================================================== --- stable/9/sys/dev/hwpmc/hwpmc_x86.c Mon Aug 20 14:52:43 2012 (r239432) +++ stable/9/sys/dev/hwpmc/hwpmc_x86.c Mon Aug 20 14:54:30 2012 (r239433) @@ -252,7 +252,7 @@ pmc_md_initialize() return (NULL); /* disallow sampling if we do not have an LAPIC */ - if (!lapic_enable_pmc()) + if (md != NULL && !lapic_enable_pmc()) for (i = 0; i < md->pmd_nclass; i++) { if (i == PMC_CLASS_INDEX_SOFT) continue; From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 14:56:44 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDF341065674 for ; Mon, 20 Aug 2012 14:56:44 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta03.emeryville.ca.mail.comcast.net (qmta03.emeryville.ca.mail.comcast.net [76.96.30.32]) by mx1.freebsd.org (Postfix) with ESMTP id CD6738FC1D for ; Mon, 20 Aug 2012 14:56:41 +0000 (UTC) Received: from omta16.emeryville.ca.mail.comcast.net ([76.96.30.72]) by qmta03.emeryville.ca.mail.comcast.net with comcast id ozqZ1j0081ZMdJ4A32whZF; Mon, 20 Aug 2012 14:56:41 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta16.emeryville.ca.mail.comcast.net with comcast id p2wg1j0074NgCEG8c2wgXC; Mon, 20 Aug 2012 14:56:41 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q7KEucgL021085; Mon, 20 Aug 2012 08:56:38 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Konstantin Belousov In-Reply-To: <201208201207.q7KC7Bnp031526@svn.freebsd.org> References: <201208201207.q7KC7Bnp031526@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Mon, 20 Aug 2012 08:56:38 -0600 Message-ID: <1345474598.27688.313.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r239414 - stable/9/sys/kern X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 14:56:45 -0000 On Mon, 2012-08-20 at 12:07 +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Aug 20 12:07:10 2012 > New Revision: 239414 > URL: http://svn.freebsd.org/changeset/base/239414 > > Log: > MFC r232197 (on behalf of phk): > Also call the low-level driver if ->c_iflag & (IXON|IXOFF|IXANY) changes. > > Uftdi(4) examines (c_iflag & (IXON|IXOFF)) to control hw XON-XOFF support. > This is obviously no good, if changes to those bits are not communicated > down the stack. > > Modified: > stable/9/sys/kern/tty.c > Directory Properties: > stable/9/sys/ (props changed) > > Modified: stable/9/sys/kern/tty.c > ============================================================================== > --- stable/9/sys/kern/tty.c Mon Aug 20 11:51:49 2012 (r239413) > +++ stable/9/sys/kern/tty.c Mon Aug 20 12:07:10 2012 (r239414) > @@ -1498,6 +1498,8 @@ tty_generic_ioctl(struct tty *tp, u_long > */ > if ((t->c_cflag & CIGNORE) == 0 && > (tp->t_termios.c_cflag != t->c_cflag || > + ((tp->t_termios.c_iflag ^ t->c_iflag) & > + (IXON|IXOFF|IXANY)) || > tp->t_termios.c_ispeed != t->c_ispeed || > tp->t_termios.c_ospeed != t->c_ospeed)) { > error = ttydevsw_param(tp, t); I think this is the wrong fix for this problem. The correct fix is to get the uftdi driver and hardware out of the business of managing software flow control, because it cannot do so properly. For example, the hardware has no support for the concept of IXANY. Also, this change is insufficient for communicating changes of the VSTART and VSTOP chars to the hardware. When I was working on the uftdi driver recently I saw situations where the hardware and software (tty layer) got out of sync on the state of flow control when the driver/hardware were doing the XON/XOFF handling, locking up comms until the device was closed and reopened (and that may have un-wedged things primarily because the ftdi driver inappropriately does a reset of the hardware on open(2)). I have a large set of fixes and enhancements to the uftdi driver, I've just had too many irons in the fire recently to get them packaged up and submitted for review. I guess maybe it's time to get that done. -- Ian From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 15:03:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E8D6106566C for ; Mon, 20 Aug 2012 15:03:08 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from qmta02.emeryville.ca.mail.comcast.net (qmta02.emeryville.ca.mail.comcast.net [76.96.30.24]) by mx1.freebsd.org (Postfix) with ESMTP id 2E8568FC18 for ; Mon, 20 Aug 2012 15:03:08 +0000 (UTC) Received: from omta07.emeryville.ca.mail.comcast.net ([76.96.30.59]) by qmta02.emeryville.ca.mail.comcast.net with comcast id p11J1j0051GXsucA23325P; Mon, 20 Aug 2012 15:03:02 +0000 Received: from damnhippie.dyndns.org ([24.8.232.202]) by omta07.emeryville.ca.mail.comcast.net with comcast id p3311j00B4NgCEG8U331dC; Mon, 20 Aug 2012 15:03:02 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q7KF2xN1021095; Mon, 20 Aug 2012 09:02:59 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Ed Maste In-Reply-To: <201208201426.q7KEQHj8046464@svn.freebsd.org> References: <201208201426.q7KEQHj8046464@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Mon, 20 Aug 2012 09:02:59 -0600 Message-ID: <1345474979.27688.317.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r239427 - stable/9/contrib/ntp/ntpd X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 15:03:08 -0000 On Mon, 2012-08-20 at 14:26 +0000, Ed Maste wrote: > Author: emaste > Date: Mon Aug 20 14:26:16 2012 > New Revision: 239427 > URL: http://svn.freebsd.org/changeset/base/239427 > > Log: > MFC r232844: Remove extraneous log message > > When ntp switched between PLL and FLL mode it produced a log message > "kernel time sync status change %04x". This issue is reported in ntp > bug 452[1] which claims that this behaviour is normal and the log > message isn't necessary. I'm not sure exactly when it was removed, but > it's gone in the latest ntp release (4.2.6p5). > > [1] http://bugs.ntp.org/show_bug.cgi?id=452 > > Modified: > stable/9/contrib/ntp/ntpd/ntp_loopfilter.c > Directory Properties: > stable/9/contrib/ntp/ (props changed) > > Modified: stable/9/contrib/ntp/ntpd/ntp_loopfilter.c > ============================================================================== > --- stable/9/contrib/ntp/ntpd/ntp_loopfilter.c Mon Aug 20 14:14:19 2012 (r239426) > +++ stable/9/contrib/ntp/ntpd/ntp_loopfilter.c Mon Aug 20 14:26:16 2012 (r239427) > @@ -646,12 +646,6 @@ local_clock( > msyslog(LOG_NOTICE, > "kernel time sync error %04x", ntv.status); > ntv.status &= ~(STA_PPSFREQ | STA_PPSTIME); > - } else { > - if ((ntv.status ^ pll_status) & ~STA_FLL) > - NLOG(NLOG_SYNCEVENT | NLOG_SYSEVENT) > - msyslog(LOG_NOTICE, > - "kernel time sync status change %04x", > - ntv.status); > } > pll_status = ntv.status; > #ifdef STA_NANO The other piece of this change should be to remove the "maxpoll 9" from src/etc/ntp.conf. It was added only to prevent the ntpd steering loop from transitioning from PLL to FLL operation on the transition from 512 to 1024 second poll/update cycles (effectively squelching the log spewage by preventing ntpd from operating normally). Removing the mythology that "FreeBSD requires maxpoll 9 in ntp.conf" from the web will be a much harder change. :) -- Ian From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 15:08:22 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4B3D1065673; Mon, 20 Aug 2012 15:08:22 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D5448FC1A; Mon, 20 Aug 2012 15:08:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KF8MxP051345; Mon, 20 Aug 2012 15:08:22 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KF8Mw1051343; Mon, 20 Aug 2012 15:08:22 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201208201508.q7KF8Mw1051343@svn.freebsd.org> From: Alexander Kabaev Date: Mon, 20 Aug 2012 15:08:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239435 - stable/9/libexec/rtld-elf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 15:08:22 -0000 Author: kan Date: Mon Aug 20 15:08:22 2012 New Revision: 239435 URL: http://svn.freebsd.org/changeset/base/239435 Log: MFC r239019: Parse notes only after object structure had been allocated. Modified: stable/9/libexec/rtld-elf/map_object.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/map_object.c ============================================================================== --- stable/9/libexec/rtld-elf/map_object.c Mon Aug 20 15:05:29 2012 (r239434) +++ stable/9/libexec/rtld-elf/map_object.c Mon Aug 20 15:08:22 2012 (r239435) @@ -153,7 +153,6 @@ map_object(int fd, const char *path, con break; note_start = (Elf_Addr)(char *)hdr + phdr->p_offset; note_end = note_start + phdr->p_filesz; - digest_notes(obj, note_start, note_end); break; } @@ -291,7 +290,8 @@ map_object(int fd, const char *path, con obj->stack_flags = stack_flags; obj->relro_page = obj->relocbase + trunc_page(relro_page); obj->relro_size = round_page(relro_size); - + if (note_start < note_end) + digest_notes(obj, note_start, note_end); munmap(hdr, PAGE_SIZE); return (obj); From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 15:16:44 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F9C5106564A; Mon, 20 Aug 2012 15:16:44 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED3B28FC14; Mon, 20 Aug 2012 15:16:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KFGh82052300; Mon, 20 Aug 2012 15:16:43 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KFGhmQ052298; Mon, 20 Aug 2012 15:16:43 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201208201516.q7KFGhmQ052298@svn.freebsd.org> From: Alexander Kabaev Date: Mon, 20 Aug 2012 15:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239436 - stable/9/sys/kern X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 15:16:44 -0000 Author: kan Date: Mon Aug 20 15:16:43 2012 New Revision: 239436 URL: http://svn.freebsd.org/changeset/base/239436 Log: MFC r239095: Do not add handler to event handlers list until ithread is created. In rare event when fast and ithread interrupts share the same vector and the fast handler was registered first, we can end up trying to schedule the ithread that is not created yet. The kernel built with INVARIANTS then triggers an assertion. Change the order to create the ithread first and only then add the handler that needs it to the interrupt event handlers list. Reviewed by: jhb Modified: stable/9/sys/kern/kern_intr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_intr.c ============================================================================== --- stable/9/sys/kern/kern_intr.c Mon Aug 20 15:08:22 2012 (r239435) +++ stable/9/sys/kern/kern_intr.c Mon Aug 20 15:16:43 2012 (r239436) @@ -545,17 +545,6 @@ intr_event_add_handler(struct intr_event } } - /* Add the new handler to the event in priority order. */ - TAILQ_FOREACH(temp_ih, &ie->ie_handlers, ih_next) { - if (temp_ih->ih_pri > ih->ih_pri) - break; - } - if (temp_ih == NULL) - TAILQ_INSERT_TAIL(&ie->ie_handlers, ih, ih_next); - else - TAILQ_INSERT_BEFORE(temp_ih, ih, ih_next); - intr_event_update(ie); - /* Create a thread if we need one. */ while (ie->ie_thread == NULL && handler != NULL) { if (ie->ie_flags & IE_ADDING_THREAD) @@ -572,6 +561,18 @@ intr_event_add_handler(struct intr_event wakeup(ie); } } + + /* Add the new handler to the event in priority order. */ + TAILQ_FOREACH(temp_ih, &ie->ie_handlers, ih_next) { + if (temp_ih->ih_pri > ih->ih_pri) + break; + } + if (temp_ih == NULL) + TAILQ_INSERT_TAIL(&ie->ie_handlers, ih, ih_next); + else + TAILQ_INSERT_BEFORE(temp_ih, ih, ih_next); + intr_event_update(ie); + CTR3(KTR_INTR, "%s: added %s to %s", __func__, ih->ih_name, ie->ie_name); mtx_unlock(&ie->ie_lock); @@ -618,23 +619,12 @@ intr_event_add_handler(struct intr_event } } - /* Add the new handler to the event in priority order. */ - TAILQ_FOREACH(temp_ih, &ie->ie_handlers, ih_next) { - if (temp_ih->ih_pri > ih->ih_pri) - break; - } - if (temp_ih == NULL) - TAILQ_INSERT_TAIL(&ie->ie_handlers, ih, ih_next); - else - TAILQ_INSERT_BEFORE(temp_ih, ih, ih_next); - intr_event_update(ie); - /* For filtered handlers, create a private ithread to run on. */ - if (filter != NULL && handler != NULL) { + if (filter != NULL && handler != NULL) { mtx_unlock(&ie->ie_lock); - it = ithread_create("intr: newborn", ih); + it = ithread_create("intr: newborn", ih); mtx_lock(&ie->ie_lock); - it->it_event = ie; + it->it_event = ie; ih->ih_thread = it; ithread_update(it); // XXX - do we really need this?!?!? } else { /* Create the global per-event thread if we need one. */ @@ -654,6 +644,18 @@ intr_event_add_handler(struct intr_event } } } + + /* Add the new handler to the event in priority order. */ + TAILQ_FOREACH(temp_ih, &ie->ie_handlers, ih_next) { + if (temp_ih->ih_pri > ih->ih_pri) + break; + } + if (temp_ih == NULL) + TAILQ_INSERT_TAIL(&ie->ie_handlers, ih, ih_next); + else + TAILQ_INSERT_BEFORE(temp_ih, ih, ih_next); + intr_event_update(ie); + CTR3(KTR_INTR, "%s: added %s to %s", __func__, ih->ih_name, ie->ie_name); mtx_unlock(&ie->ie_lock); From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 15:34:07 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CA28106566B; Mon, 20 Aug 2012 15:34:07 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D64A8FC08; Mon, 20 Aug 2012 15:34:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KFY7Qm054395; Mon, 20 Aug 2012 15:34:07 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KFY7Wd054393; Mon, 20 Aug 2012 15:34:07 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201208201534.q7KFY7Wd054393@svn.freebsd.org> From: Alexander Kabaev Date: Mon, 20 Aug 2012 15:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239439 - stable/9/libexec/rtld-elf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 15:34:07 -0000 Author: kan Date: Mon Aug 20 15:34:06 2012 New Revision: 239439 URL: http://svn.freebsd.org/changeset/base/239439 Log: MFC r239253: Pospone the DF_1_NODELETE processing until object DAG is fully loaded. Trying to up the reference from the load loop risks missing dependencies that have not been loaded yet. Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Mon Aug 20 15:30:26 2012 (r239438) +++ stable/9/libexec/rtld-elf/rtld.c Mon Aug 20 15:34:06 2012 (r239439) @@ -1589,6 +1589,26 @@ init_dag(Obj_Entry *root) root->dag_inited = true; } +static void +process_nodelete(Obj_Entry *root) +{ + const Objlist_Entry *elm; + + /* + * Walk over object DAG and process every dependent object that + * is marked as DF_1_NODELETE. They need to grow their own DAG, + * which then should have its reference upped separately. + */ + STAILQ_FOREACH(elm, &root->dagmembers, link) { + if (elm->obj != NULL && elm->obj->z_nodelete && + !elm->obj->ref_nodel) { + dbg("obj %s nodelete", elm->obj->path); + init_dag(elm->obj); + ref_dag(elm->obj); + elm->obj->ref_nodel = true; + } + } +} /* * Initialize the dynamic linker. The argument is the address at which * the dynamic linker has been mapped into memory. The primary task of @@ -1777,12 +1797,6 @@ process_needed(Obj_Entry *obj, Needed_En flags & ~RTLD_LO_NOLOAD); if (obj1 == NULL && !ld_tracing && (flags & RTLD_LO_FILTEES) == 0) return (-1); - if (obj1 != NULL && obj1->z_nodelete && !obj1->ref_nodel) { - dbg("obj %s nodelete", obj1->path); - init_dag(obj1); - ref_dag(obj1); - obj1->ref_nodel = true; - } } return (0); } @@ -2678,8 +2692,14 @@ dlopen_object(const char *name, int fd, /* Make list of init functions to call. */ initlist_add_objects(obj, &obj->next, &initlist); } + /* + * Process all no_delete objects here, given them own + * DAGs to prevent their dependencies from being unloaded. + * This has to be done after we have loaded all of the + * dependencies, so that we do not miss any. + */ + process_nodelete(obj); } else { - /* * Bump the reference counts for objects on this DAG. If * this is the first dlopen() call for the object that was From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 16:11:14 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7AD2A1065700; Mon, 20 Aug 2012 16:11:14 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 644AC8FC0C; Mon, 20 Aug 2012 16:11:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KGBEu7059381; Mon, 20 Aug 2012 16:11:14 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KGBEve059379; Mon, 20 Aug 2012 16:11:14 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201208201611.q7KGBEve059379@svn.freebsd.org> From: Jim Harris Date: Mon, 20 Aug 2012 16:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239441 - stable/9/sys/geom/virstor X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 16:11:14 -0000 Author: jimharris Date: Mon Aug 20 16:11:13 2012 New Revision: 239441 URL: http://svn.freebsd.org/changeset/base/239441 Log: MFC r239021: In virstor_ctl_stop(), check for a valid softc before trying to update metadata. Modified: stable/9/sys/geom/virstor/g_virstor.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/virstor/g_virstor.c ============================================================================== --- stable/9/sys/geom/virstor/g_virstor.c Mon Aug 20 16:00:33 2012 (r239440) +++ stable/9/sys/geom/virstor/g_virstor.c Mon Aug 20 16:11:13 2012 (r239441) @@ -234,6 +234,12 @@ virstor_ctl_stop(struct gctl_req *req, s return; } sc = virstor_find_geom(cp, name); + if (sc == NULL) { + gctl_error(req, "Don't know anything about '%s'", name); + g_topology_unlock(); + return; + } + LOG_MSG(LVL_INFO, "Stopping %s by the userland command", sc->geom->name); update_metadata(sc); From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 16:31:23 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0BB9106564A; Mon, 20 Aug 2012 16:31:23 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB4508FC08; Mon, 20 Aug 2012 16:31:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KGVNPb061614; Mon, 20 Aug 2012 16:31:23 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KGVNAX061612; Mon, 20 Aug 2012 16:31:23 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201208201631.q7KGVNAX061612@svn.freebsd.org> From: Warren Block Date: Mon, 20 Aug 2012 16:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239443 - stable/9/usr.sbin/lpr/lpd X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 16:31:23 -0000 Author: wblock (doc committer) Date: Mon Aug 20 16:31:23 2012 New Revision: 239443 URL: http://svn.freebsd.org/changeset/base/239443 Log: MFC r239233: Correct description of minfree to kilobytes rather than blocks. PR: 125921 Submitted by: Andre Albsmeier Modified: stable/9/usr.sbin/lpr/lpd/lpd.8 Directory Properties: stable/9/usr.sbin/lpr/lpd/ (props changed) Modified: stable/9/usr.sbin/lpr/lpd/lpd.8 ============================================================================== --- stable/9/usr.sbin/lpr/lpd/lpd.8 Mon Aug 20 16:13:16 2012 (r239442) +++ stable/9/usr.sbin/lpr/lpd/lpd.8 Mon Aug 20 16:31:23 2012 (r239443) @@ -152,7 +152,7 @@ machine with the printer. .Pp The file .Em minfree -in each spool directory contains the number of disk blocks to leave free +in each spool directory contains the number of kilobytes to leave free so that the line printer queue will not completely fill the disk. The .Em minfree From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 16:42:45 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4B66106567A; Mon, 20 Aug 2012 16:42:45 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F25D8FC1A; Mon, 20 Aug 2012 16:42:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KGgjxj063073; Mon, 20 Aug 2012 16:42:45 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KGgjBh063071; Mon, 20 Aug 2012 16:42:45 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201208201642.q7KGgjBh063071@svn.freebsd.org> From: Michael Tuexen Date: Mon, 20 Aug 2012 16:42:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239447 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 16:42:45 -0000 Author: tuexen Date: Mon Aug 20 16:42:45 2012 New Revision: 239447 URL: http://svn.freebsd.org/changeset/base/239447 Log: MFC r239041: Fix a bug reported by Simon L. B. Nielsen: If an SCTP endpoint receives an ASCONF with a wildcard lookup address and incorrect verification tag, the system crashes. This bug was found by Shaun Colley. Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Mon Aug 20 16:40:15 2012 (r239446) +++ stable/9/sys/netinet/sctp_pcb.c Mon Aug 20 16:42:45 2012 (r239447) @@ -2048,8 +2048,6 @@ sctp_findassoc_by_vtag(struct sockaddr * struct sctp_nets *net; struct sctp_tcb *stcb; - *netp = NULL; - *inp_p = NULL; SCTP_INP_INFO_RLOCK(); head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(vtag, SCTP_BASE_INFO(hashasocmark))]; From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 16:45:47 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1AB9106564A; Mon, 20 Aug 2012 16:45:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBE548FC16; Mon, 20 Aug 2012 16:45:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KGjkjU063429; Mon, 20 Aug 2012 16:45:46 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KGjkct063427; Mon, 20 Aug 2012 16:45:46 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201208201645.q7KGjkct063427@svn.freebsd.org> From: Michael Tuexen Date: Mon, 20 Aug 2012 16:45:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239448 - stable/9/sys/netinet X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 16:45:47 -0000 Author: tuexen Date: Mon Aug 20 16:45:46 2012 New Revision: 239448 URL: http://svn.freebsd.org/changeset/base/239448 Log: MFC r239052: Fix a refcount issue. The caller only decrements if stcb is NULL. Modified: stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Mon Aug 20 16:42:45 2012 (r239447) +++ stable/9/sys/netinet/sctp_pcb.c Mon Aug 20 16:45:46 2012 (r239448) @@ -2417,10 +2417,9 @@ sctp_findassociation_ep_asconf(struct mb if (zero_address) { stcb = sctp_findassoc_by_vtag(NULL, to, ntohl(sh->v_tag), inp_p, netp, sh->src_port, sh->dest_port, 1, vrf_id, 0); - /* - * SCTP_PRINTF("findassociation_ep_asconf: zero lookup - * address finds stcb 0x%x\n", (uint32_t)stcb); - */ + if (stcb != NULL) { + SCTP_INP_DECR_REF(*inp_p); + } } else { stcb = sctp_findassociation_ep_addr(inp_p, (struct sockaddr *)&remote_store, netp, From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 17:46:23 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15ABA106564A; Mon, 20 Aug 2012 17:46:23 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36688FC0C; Mon, 20 Aug 2012 17:46:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KHkMF9070229; Mon, 20 Aug 2012 17:46:22 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KHkM9f070227; Mon, 20 Aug 2012 17:46:22 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201208201746.q7KHkM9f070227@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 20 Aug 2012 17:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239453 - stable/9/lib/libpam/modules/pam_ssh X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 17:46:23 -0000 Author: des Date: Mon Aug 20 17:46:22 2012 New Revision: 239453 URL: http://svn.freebsd.org/changeset/base/239453 Log: MFH r236106: avoid segfault with SSH 1 keys Modified: stable/9/lib/libpam/modules/pam_ssh/pam_ssh.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_ssh/pam_ssh.c ============================================================================== --- stable/9/lib/libpam/modules/pam_ssh/pam_ssh.c Mon Aug 20 17:36:10 2012 (r239452) +++ stable/9/lib/libpam/modules/pam_ssh/pam_ssh.c Mon Aug 20 17:46:22 2012 (r239453) @@ -110,7 +110,7 @@ pam_ssh_load_key(const char *dir, const * with an empty passphrase, and if the key is not encrypted, * accept only an empty passphrase. */ - key = key_load_private(fn, NULL, &comment); + key = key_load_private(fn, "", &comment); if (key != NULL && !(*passphrase == '\0' && nullok)) { key_free(key); return (NULL); From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 18:01:18 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 10EDC106564A; Mon, 20 Aug 2012 18:01:18 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEFBE8FC16; Mon, 20 Aug 2012 18:01:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KI1H2Z071917; Mon, 20 Aug 2012 18:01:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KI1Hpe071915; Mon, 20 Aug 2012 18:01:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201208201801.q7KI1Hpe071915@svn.freebsd.org> From: Xin LI Date: Mon, 20 Aug 2012 18:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239455 - stable/9/sys/dev/mlx X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 18:01:18 -0000 Author: delphij Date: Mon Aug 20 18:01:17 2012 New Revision: 239455 URL: http://svn.freebsd.org/changeset/base/239455 Log: MFC r238997: Correct a typo. Reported by: Sascha Wildner Reviewed by: scottl Modified: stable/9/sys/dev/mlx/mlxvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mlx/mlxvar.h ============================================================================== --- stable/9/sys/dev/mlx/mlxvar.h Mon Aug 20 17:50:20 2012 (r239454) +++ stable/9/sys/dev/mlx/mlxvar.h Mon Aug 20 18:01:17 2012 (r239455) @@ -47,7 +47,7 @@ * making that fit cleanly without crossing page boundaries requires rounding up * to the next power of two. */ -#define MLX_MAXPHYS (128 * 124) +#define MLX_MAXPHYS (128 * 1024) #define MLX_NSEG 64 #define MLX_NSLOTS 256 /* max number of command slots */ From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 18:19:07 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 575071065670; Mon, 20 Aug 2012 18:19:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 267FE8FC16; Mon, 20 Aug 2012 18:19:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KIJ74G074123; Mon, 20 Aug 2012 18:19:07 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KIJ6ie074120; Mon, 20 Aug 2012 18:19:06 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201208201819.q7KIJ6ie074120@svn.freebsd.org> From: Xin LI Date: Mon, 20 Aug 2012 18:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239458 - in stable/9: share/man/man4 sys/dev/hptiop X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 18:19:07 -0000 Author: delphij Date: Mon Aug 20 18:19:06 2012 New Revision: 239458 URL: http://svn.freebsd.org/changeset/base/239458 Log: MFC r239084: Add PCI IDs for various new High Point RocketRAID 43xx and 3xxx devices. Obtained from: FreeNAS Modified: stable/9/share/man/man4/hptiop.4 stable/9/sys/dev/hptiop/hptiop.c Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/share/man/man4/hptiop.4 ============================================================================== --- stable/9/share/man/man4/hptiop.4 Mon Aug 20 18:16:39 2012 (r239457) +++ stable/9/share/man/man4/hptiop.4 Mon Aug 20 18:19:06 2012 (r239458) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 1, 2011 +.Dd August 5, 2012 .Dt HPTIOP 4 .Os .Sh NAME @@ -58,34 +58,46 @@ driver supports the following SAS and SA .Pp .Bl -bullet -compact .It -HighPoint RocketRAID 4320 +HighPoint RocketRAID 4322 .It HighPoint RocketRAID 4321 .It -HighPoint RocketRAID 4322 +HighPoint RocketRAID 4320 .It -HighPoint RocketRAID 3220 +HighPoint RocketRAID 4311 .It -HighPoint RocketRAID 3320 +HighPoint RocketRAID 4310 .It -HighPoint RocketRAID 3410 +HighPoint RocketRAID 4211 .It -HighPoint RocketRAID 3520 +HighPoint RocketRAID 4210 .It -HighPoint RocketRAID 3510 +HighPoint RocketRAID 3560 .It -HighPoint RocketRAID 3511 +HighPoint RocketRAID 3540 .It -HighPoint RocketRAID 3521 +HighPoint RocketRAID 3530 .It HighPoint RocketRAID 3522 .It -HighPoint RocketRAID 3540 +HighPoint RocketRAID 3521 .It -HighPoint RocketRAID 3120 +HighPoint RocketRAID 3520 +.It +HighPoint RocketRAID 3511 +.It +HighPoint RocketRAID 3510 +.It +HighPoint RocketRAID 3410 +.It +HighPoint RocketRAID 3320 +.It +HighPoint RocketRAID 3220 .It HighPoint RocketRAID 3122 .It +HighPoint RocketRAID 3120 +.It HighPoint RocketRAID 3020 .El .Sh NOTES Modified: stable/9/sys/dev/hptiop/hptiop.c ============================================================================== --- stable/9/sys/dev/hptiop/hptiop.c Mon Aug 20 18:16:39 2012 (r239457) +++ stable/9/sys/dev/hptiop/hptiop.c Mon Aug 20 18:19:06 2012 (r239458) @@ -1284,9 +1284,13 @@ static int hptiop_probe(device_t dev) id = pci_get_device(dev); switch (id) { - case 0x4322: - case 0x4321: + case 0x4210: + case 0x4211: + case 0x4310: + case 0x4311: case 0x4320: + case 0x4321: + case 0x4322: sas = 1; case 0x3220: case 0x3320: @@ -1296,12 +1300,14 @@ static int hptiop_probe(device_t dev) case 0x3511: case 0x3521: case 0x3522: + case 0x3530: case 0x3540: + case 0x3560: ops = &hptiop_itl_ops; break; + case 0x3020: case 0x3120: case 0x3122: - case 0x3020: ops = &hptiop_mv_ops; break; default: From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 18:26:17 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A6C810656D3; Mon, 20 Aug 2012 18:26:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A5578FC21; Mon, 20 Aug 2012 18:26:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KIQHZF074981; Mon, 20 Aug 2012 18:26:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KIQHAF074978; Mon, 20 Aug 2012 18:26:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201208201826.q7KIQHAF074978@svn.freebsd.org> From: Xin LI Date: Mon, 20 Aug 2012 18:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239459 - in stable: 7/contrib/opie/libopie 8/contrib/opie/libopie 9/contrib/opie/libopie X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 18:26:17 -0000 Author: delphij Date: Mon Aug 20 18:26:16 2012 New Revision: 239459 URL: http://svn.freebsd.org/changeset/base/239459 Log: MFC r239169: RFC 2289 requires all hashes be stored in little endian format before folding to 64 bits, while SHA1 code is big endian. Therefore, a bswap32 is required before using the value. Without this change, the implementation does not conform to test vector found in RFC 2289. PR: bin/170519 Submitted by: Arthur Mesh (with changes) Modified: stable/9/contrib/opie/libopie/hash.c stable/9/contrib/opie/libopie/hashlen.c Directory Properties: stable/9/contrib/opie/ (props changed) Changes in other areas also in this revision: Modified: stable/7/contrib/opie/libopie/hash.c stable/7/contrib/opie/libopie/hashlen.c stable/8/contrib/opie/libopie/hash.c stable/8/contrib/opie/libopie/hashlen.c Directory Properties: stable/7/contrib/opie/ (props changed) stable/8/contrib/opie/ (props changed) Modified: stable/9/contrib/opie/libopie/hash.c ============================================================================== --- stable/9/contrib/opie/libopie/hash.c Mon Aug 20 18:19:06 2012 (r239458) +++ stable/9/contrib/opie/libopie/hash.c Mon Aug 20 18:26:16 2012 (r239459) @@ -17,6 +17,8 @@ you didn't get a copy, you may request o $FreeBSD$ */ +#include + #include "opie_cfg.h" #include "opie.h" @@ -39,6 +41,13 @@ unsigned algorithm) SHA1_Final((unsigned char *)digest, &sha); results[0] = digest[0] ^ digest[2] ^ digest[4]; results[1] = digest[1] ^ digest[3]; + + /* + * RFC2289 mandates that we convert SHA1 digest from big-endian to little + * see Appendix A. + */ + results[0] = bswap32(results[0]); + results[1] = bswap32(results[1]); }; break; case 4: Modified: stable/9/contrib/opie/libopie/hashlen.c ============================================================================== --- stable/9/contrib/opie/libopie/hashlen.c Mon Aug 20 18:19:06 2012 (r239458) +++ stable/9/contrib/opie/libopie/hashlen.c Mon Aug 20 18:26:16 2012 (r239459) @@ -14,6 +14,8 @@ you didn't get a copy, you may request o $FreeBSD$ */ +#include + #include "opie_cfg.h" #include "opie.h" @@ -36,6 +38,13 @@ VOIDPTR in AND struct opie_otpkey *out A SHA1_Final((unsigned char *)digest, &sha); results[0] = digest[0] ^ digest[2] ^ digest[4]; results[1] = digest[1] ^ digest[3]; + + /* + * RFC2289 mandates that we convert SHA1 digest from big-endian to little + * see Appendix A. + */ + results[0] = bswap32(results[0]); + results[1] = bswap32(results[1]); break; } case 4: { From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 18:33:23 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E55801065787; Mon, 20 Aug 2012 18:33:23 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB4108FC14; Mon, 20 Aug 2012 18:33:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KIXNim075942; Mon, 20 Aug 2012 18:33:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KIXNLc075940; Mon, 20 Aug 2012 18:33:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201208201833.q7KIXNLc075940@svn.freebsd.org> From: Xin LI Date: Mon, 20 Aug 2012 18:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239463 - in stable: 7/share/man/man5 8/share/man/man5 9/share/man/man5 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 18:33:24 -0000 Author: delphij Date: Mon Aug 20 18:33:23 2012 New Revision: 239463 URL: http://svn.freebsd.org/changeset/base/239463 Log: MFC r238631: Import an updated version of moduli(5) manual page from OpenBSD. Modified: stable/9/share/man/man5/moduli.5 Directory Properties: stable/9/share/man/man5/ (props changed) Changes in other areas also in this revision: Modified: stable/7/share/man/man5/moduli.5 stable/8/share/man/man5/moduli.5 Directory Properties: stable/7/share/man/man5/ (props changed) stable/8/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/moduli.5 ============================================================================== --- stable/9/share/man/man5/moduli.5 Mon Aug 20 18:33:03 2012 (r239462) +++ stable/9/share/man/man5/moduli.5 Mon Aug 20 18:33:23 2012 (r239463) @@ -1,159 +1,125 @@ -.\" $OpenBSD: moduli.5,v 1.3 2001/06/24 18:50:52 provos Exp $ +.\" $OpenBSD: moduli.5,v 1.16 2011/11/28 08:46:27 eric Exp $ .\" -.\" Copyright 1997, 2000 William Allen Simpson -.\" All rights reserved. +.\" Copyright (c) 2008 Damien Miller .\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software designed by William Allen Simpson. -.\" 4. The name of the author may not be used to endorse or promote products -.\" derived from this software without specific prior written permission. +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. .\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" $FreeBSD$ .\" -.Dd July 28, 1997 +.Dd July 19, 2012 .Dt MODULI 5 .Os .Sh NAME .Nm moduli -.Nd system moduli file +.Nd Diffie-Hellman moduli .Sh DESCRIPTION The -.Nm -file contains the system-wide Diffie-Hellman prime moduli for the -.Xr photurisd 8 -and +.Pa /etc/ssh/moduli +file contains prime numbers and generators for use by .Xr sshd 8 -programs. +in the Diffie-Hellman Group Exchange key exchange method. .Pp -Each line in this file contains the following fields: -.Va Time , Type , Tests , Tries , Size , Generator , -and -.Va Modulus . -The fields are separated by white space (tab or blank). -.Bl -tag -width indent -.It Va Time Pq Vt yyyymmddhhmmss -Specifies the system time that the line was appended to the file. -The value 00000000000000 means unknown (historic). -.\"The file is sorted in ascending order. -.It Va Type Pq Vt decimal -Specifies the internal structure of the prime modulus. +New moduli may be generated with +.Xr ssh-keygen 1 +using a two-step process. +An initial +.Em candidate generation +pass, using +.Ic ssh-keygen -G , +calculates numbers that are likely to be useful. +A second +.Em primality testing +pass, using +.Ic ssh-keygen -T , +provides a high degree of assurance that the numbers are prime and are +safe for use in Diffie-Hellman operations by +.Xr sshd 8 . +This +.Nm +format is used as the output from each pass. .Pp -.Bl -tag -width indent -compact -.It 0 -unknown; -often learned from peer during protocol operation, -and saved for later analysis. -.It 1 -unstructured; -a common large number. -.It 2 -safe (p = 2q + 1); -meets basic structural requirements. -.It 3 -Schnorr. -.It 4 -Sophie-Germaine (q = (p-1)/2); -usually generated in the process of testing safe or strong primes. -.It 5 -strong; -useful for RSA public key generation. -.El -.It Xo -.Va Tests Pq Vt decimal -(bit field) -.Xc -Specifies the methods used in checking for primality. -Usually, more than one test is used. +The file consists of newline-separated records, one per modulus, +containing seven space-separated fields. +These fields are as follows: +.Bl -tag -width Description -offset indent +.It timestamp +The time that the modulus was last processed as YYYYMMDDHHMMSS. +.It type +Decimal number specifying the internal structure of the prime modulus. +Supported types are: .Pp -.Bl -tag -width indent -compact +.Bl -tag -width 0x00 -compact .It 0 -not tested; -often learned from peer during protocol operation, -and saved for later analysis. -.It 1 -composite; -failed one or more tests. -In this case, the highest bit specifies the test that failed. +Unknown, not tested. .It 2 -sieve; -checked for division by a range of smaller primes. +"Safe" prime; (p-1)/2 is also prime. .It 4 -Miller-Rabin. -.It 8 -Jacobi. -.It 16 -Elliptic Curve. +Sophie Germain; 2p+1 is also prime. .El -.It Va Tries Pq Vt decimal -Depends on the value of the highest valid Test bit, -where the method specified is: .Pp -.Bl -tag -width indent -compact -.It 0 -not tested -(always zero). -.It 1 -composite -(irrelevant). -.It 2 -sieve; -number of primes sieved. -Commonly on the order of 32,000,000. -.It 4 -Miller-Rabin; -number of M-R iterations. -Commonly on the order of 32 to 64. -.It 8 -Jacobi; -unknown -(always zero). -.It 16 -Elliptic Curve; -unused -(always zero). -.El -.It Va Size Pq Vt decimal -Specifies the number of significant bits. -.It Va Generator Pq Vt "hex string" -Specifies the best generator for a Diffie-Hellman exchange. -0 = unknown or variable, -2, 3, 5, etc. -.It Va Modulus Pq Vt "hex string" -The prime modulus. +Moduli candidates initially produced by +.Xr ssh-keygen 1 +are Sophie Germain primes (type 4). +Further primality testing with +.Xr ssh-keygen 1 +produces safe prime moduli (type 2) that are ready for use in +.Xr sshd 8 . +Other types are not used by OpenSSH. +.It tests +Decimal number indicating the type of primality tests that the number +has been subjected to represented as a bitmask of the following values: +.Pp +.Bl -tag -width 0x00 -compact +.It 0x00 +Not tested. +.It 0x01 +Composite number \(en not prime. +.It 0x02 +Sieve of Eratosthenes. +.It 0x04 +Probabilistic Miller-Rabin primality tests. .El .Pp -The file is searched for moduli that meet the appropriate -.Va Time , Size -and -.Va Generator -criteria. -When more than one meet the criteria, -the selection should be weighted toward newer moduli, -without completely disqualifying older moduli. -.Sh FILES -.Bl -tag -width ".Pa /etc/ssh/moduli" -compact -.It Pa /etc/ssh/moduli +The +.Xr ssh-keygen 1 +moduli candidate generation uses the Sieve of Eratosthenes (flag 0x02). +Subsequent +.Xr ssh-keygen 1 +primality tests are Miller-Rabin tests (flag 0x04). +.It trials +Decimal number indicating the number of primality trials +that have been performed on the modulus. +.It size +Decimal number indicating the size of the prime in bits. +.It generator +The recommended generator for use with this modulus (hexadecimal). +.It modulus +The modulus itself in hexadecimal. .El +.Pp +When performing Diffie-Hellman Group Exchange, +.Xr sshd 8 +first estimates the size of the modulus required to produce enough +Diffie-Hellman output to sufficiently key the selected symmetric cipher. +.Xr sshd 8 +then randomly selects a modulus from +.Fa /etc/ssh/moduli +that best meets the size requirement. .Sh SEE ALSO -.Xr photurisd 8 , +.Xr ssh-keygen 1 , .Xr sshd 8 +.Rs +.%R RFC 4419 +.%T "Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer Protocol" +.%D 2006 +.Re From owner-svn-src-stable-9@FreeBSD.ORG Mon Aug 20 23:47:25 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82080106564A; Mon, 20 Aug 2012 23:47:25 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8ED8FC16; Mon, 20 Aug 2012 23:47:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7KNlP72016323; Mon, 20 Aug 2012 23:47:25 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7KNlPZe016321; Mon, 20 Aug 2012 23:47:25 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <201208202347.q7KNlPZe016321@svn.freebsd.org> From: Alexander Kabaev Date: Mon, 20 Aug 2012 23:47:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239471 - stable/9/libexec/rtld-elf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 23:47:25 -0000 Author: kan Date: Mon Aug 20 23:47:24 2012 New Revision: 239471 URL: http://svn.freebsd.org/changeset/base/239471 Log: MFC r239470: Do not call process_nodelete with NULL object pointer. The place where the function is called can be reached if object loading and relocation fails too, in which case obj pointer will be NULL. Do not call process_nodelete then, or crash will follow. Pointy hat to: kan Modified: stable/9/libexec/rtld-elf/rtld.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.c ============================================================================== --- stable/9/libexec/rtld-elf/rtld.c Mon Aug 20 23:43:03 2012 (r239470) +++ stable/9/libexec/rtld-elf/rtld.c Mon Aug 20 23:47:24 2012 (r239471) @@ -2698,7 +2698,8 @@ dlopen_object(const char *name, int fd, * This has to be done after we have loaded all of the * dependencies, so that we do not miss any. */ - process_nodelete(obj); + if (obj != NULL) + process_nodelete(obj); } else { /* * Bump the reference counts for objects on this DAG. If From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 00:03:04 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E88E4106566C; Tue, 21 Aug 2012 00:03:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D026F8FC08; Tue, 21 Aug 2012 00:03:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7L034oZ018610; Tue, 21 Aug 2012 00:03:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7L0342r018598; Tue, 21 Aug 2012 00:03:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201208210003.q7L0342r018598@svn.freebsd.org> From: Ed Maste Date: Tue, 21 Aug 2012 00:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239472 - in stable/9/sys: dev/virtio dev/virtio/balloon dev/virtio/block dev/virtio/network dev/virtio/pci modules modules/virtio X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 00:03:05 -0000 Author: emaste Date: Tue Aug 21 00:03:04 2012 New Revision: 239472 URL: http://svn.freebsd.org/changeset/base/239472 Log: MFC r227652, r228301, r234270, r234349 Sync Bryan Venteicher's virtio base, PCI front-end, and net/block/balloon drivers from HEAD. Added: stable/9/sys/dev/virtio/ - copied from r227652, head/sys/dev/virtio/ stable/9/sys/modules/virtio/ - copied from r227652, head/sys/modules/virtio/ Modified: stable/9/sys/dev/virtio/balloon/virtio_balloon.c stable/9/sys/dev/virtio/balloon/virtio_balloon.h stable/9/sys/dev/virtio/block/virtio_blk.c stable/9/sys/dev/virtio/block/virtio_blk.h stable/9/sys/dev/virtio/network/if_vtnet.c stable/9/sys/dev/virtio/network/if_vtnetvar.h stable/9/sys/dev/virtio/network/virtio_net.h stable/9/sys/dev/virtio/pci/virtio_pci.c stable/9/sys/dev/virtio/pci/virtio_pci.h stable/9/sys/dev/virtio/virtio.h stable/9/sys/dev/virtio/virtio_ring.h stable/9/sys/dev/virtio/virtqueue.c stable/9/sys/dev/virtio/virtqueue.h stable/9/sys/modules/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/dev/virtio/balloon/virtio_balloon.c ============================================================================== --- head/sys/dev/virtio/balloon/virtio_balloon.c Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/balloon/virtio_balloon.c Tue Aug 21 00:03:04 2012 (r239472) @@ -122,6 +122,9 @@ static void vtballoon_add_sysctl(struct */ #define VTBALLOON_PAGES_PER_REQUEST 256 +/* Must be able to fix all pages frames in one page (segment). */ +CTASSERT(VTBALLOON_PAGES_PER_REQUEST * sizeof(uint32_t) <= PAGE_SIZE); + #define VTBALLOON_MTX(_sc) &(_sc)->vtballoon_mtx #define VTBALLOON_LOCK_INIT(_sc, _name) mtx_init(VTBALLOON_MTX((_sc)), _name, \ "VirtIO Balloon Lock", MTX_SPIN) @@ -138,7 +141,7 @@ static device_method_t vtballoon_methods /* VirtIO methods. */ DEVMETHOD(virtio_config_change, vtballoon_config_change), - { 0, 0 } + DEVMETHOD_END }; static driver_t vtballoon_driver = { @@ -402,13 +405,13 @@ vtballoon_send_page_frames(struct vtball error = virtqueue_enqueue(vq, vq, &sg, 1, 0); KASSERT(error == 0, ("error enqueuing page frames to virtqueue")); + virtqueue_notify(vq); /* * Inflate and deflate operations are done synchronously. The * interrupt handler will wake us up. */ VTBALLOON_LOCK(sc); - virtqueue_notify(vq); while ((c = virtqueue_dequeue(vq, NULL)) == NULL) msleep_spin(sc, VTBALLOON_MTX(sc), "vtbspf", 0); @@ -475,7 +478,6 @@ vtballoon_update_size(struct vtballoon_s virtio_write_dev_config_4(sc->vtballoon_dev, offsetof(struct virtio_balloon_config, actual), htole32(sc->vtballoon_current_npages)); - } static int Modified: stable/9/sys/dev/virtio/balloon/virtio_balloon.h ============================================================================== --- head/sys/dev/virtio/balloon/virtio_balloon.h Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/balloon/virtio_balloon.h Tue Aug 21 00:03:04 2012 (r239472) @@ -1,7 +1,30 @@ -/* +/*- * This header is BSD licensed so anyone can use the definitions to implement * compatible drivers/servers. * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of IBM nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 IBM 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$ */ Modified: stable/9/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- head/sys/dev/virtio/block/virtio_blk.c Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/block/virtio_blk.c Tue Aug 21 00:03:04 2012 (r239472) @@ -70,8 +70,8 @@ struct vtblk_softc { uint32_t vtblk_flags; #define VTBLK_FLAG_INDIRECT 0x0001 #define VTBLK_FLAG_READONLY 0x0002 -#define VTBLK_FLAG_DETACHING 0x0004 -#define VTBLK_FLAG_SUSPENDED 0x0008 +#define VTBLK_FLAG_DETACH 0x0004 +#define VTBLK_FLAG_SUSPEND 0x0008 #define VTBLK_FLAG_DUMPING 0x0010 struct virtqueue *vtblk_vq; @@ -82,14 +82,12 @@ struct vtblk_softc { TAILQ_HEAD(, vtblk_request) vtblk_req_free; TAILQ_HEAD(, vtblk_request) - vtblk_req_ready; + vtblk_req_ready; struct taskqueue *vtblk_tq; struct task vtblk_intr_task; - int vtblk_sector_size; int vtblk_max_nsegs; - int vtblk_unit; int vtblk_request_count; struct vtblk_request vtblk_dump_request; @@ -118,6 +116,13 @@ static int vtblk_suspend(device_t); static int vtblk_resume(device_t); static int vtblk_shutdown(device_t); +static int vtblk_open(struct disk *); +static int vtblk_close(struct disk *); +static int vtblk_ioctl(struct disk *, u_long, void *, int, + struct thread *); +static int vtblk_dump(void *, void *, vm_offset_t, off_t, size_t); +static void vtblk_strategy(struct bio *); + static void vtblk_negotiate_features(struct vtblk_softc *); static int vtblk_maximum_segments(struct vtblk_softc *, struct virtio_blk_config *); @@ -126,13 +131,7 @@ static void vtblk_alloc_disk(struct vtbl struct virtio_blk_config *); static void vtblk_create_disk(struct vtblk_softc *); -static int vtblk_open(struct disk *); -static int vtblk_close(struct disk *); -static int vtblk_ioctl(struct disk *, u_long, void *, int, - struct thread *); -static int vtblk_dump(void *, void *, vm_offset_t, off_t, size_t); -static void vtblk_strategy(struct bio *); - +static int vtblk_quiesce(struct vtblk_softc *); static void vtblk_startio(struct vtblk_softc *); static struct vtblk_request * vtblk_bio_request(struct vtblk_softc *); static int vtblk_execute_request(struct vtblk_softc *, @@ -150,6 +149,7 @@ static int vtblk_flush_dump(struct vtblk static int vtblk_poll_request(struct vtblk_softc *, struct vtblk_request *); +static void vtblk_finish_completed(struct vtblk_softc *); static void vtblk_drain_vq(struct vtblk_softc *, int); static void vtblk_drain(struct vtblk_softc *); @@ -163,7 +163,8 @@ static struct vtblk_request * vtblk_dequ static void vtblk_enqueue_ready(struct vtblk_softc *, struct vtblk_request *); -static void vtblk_bio_error(struct bio *, int); +static int vtblk_request_error(struct vtblk_request *); +static void vtblk_finish_bio(struct bio *, int); /* Tunables. */ static int vtblk_no_ident = 0; @@ -185,16 +186,14 @@ TUNABLE_INT("hw.vtblk.no_ident", &vtblk_ mtx_init(VTBLK_MTX((_sc)), (_name), \ "VTBLK Lock", MTX_DEF) #define VTBLK_LOCK(_sc) mtx_lock(VTBLK_MTX((_sc))) -#define VTBLK_TRYLOCK(_sc) mtx_trylock(VTBLK_MTX((_sc))) #define VTBLK_UNLOCK(_sc) mtx_unlock(VTBLK_MTX((_sc))) #define VTBLK_LOCK_DESTROY(_sc) mtx_destroy(VTBLK_MTX((_sc))) #define VTBLK_LOCK_ASSERT(_sc) mtx_assert(VTBLK_MTX((_sc)), MA_OWNED) #define VTBLK_LOCK_ASSERT_NOTOWNED(_sc) \ mtx_assert(VTBLK_MTX((_sc)), MA_NOTOWNED) -#define VTBLK_BIO_SEGMENTS(_bp) sglist_count((_bp)->bio_data, (_bp)->bio_bcount) - #define VTBLK_DISK_NAME "vtbd" +#define VTBLK_QUIESCE_TIMEOUT (30 * hz) /* * Each block request uses at least two segments - one for the header @@ -213,7 +212,7 @@ static device_method_t vtblk_methods[] = DEVMETHOD(device_resume, vtblk_resume), DEVMETHOD(device_shutdown, vtblk_shutdown), - { 0, 0 } + DEVMETHOD_END }; static driver_t vtblk_driver = { @@ -281,7 +280,6 @@ vtblk_attach(device_t dev) sc = device_get_softc(dev); sc->vtblk_dev = dev; - sc->vtblk_unit = device_get_unit(dev); VTBLK_LOCK_INIT(sc, device_get_nameunit(dev)); @@ -299,13 +297,8 @@ vtblk_attach(device_t dev) sc->vtblk_flags |= VTBLK_FLAG_READONLY; /* Get local copy of config. */ - if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY) == 0) { - bzero(&blkcfg, sizeof(struct virtio_blk_config)); - virtio_read_device_config(dev, 0, &blkcfg, - offsetof(struct virtio_blk_config, physical_block_exp)); - } else - virtio_read_device_config(dev, 0, &blkcfg, - sizeof(struct virtio_blk_config)); + virtio_read_device_config(dev, 0, &blkcfg, + sizeof(struct virtio_blk_config)); /* * With the current sglist(9) implementation, it is not easy @@ -323,11 +316,13 @@ vtblk_attach(device_t dev) } sc->vtblk_max_nsegs = vtblk_maximum_segments(sc, &blkcfg); + if (sc->vtblk_max_nsegs <= VTBLK_MIN_SEGMENTS) { + error = EINVAL; + device_printf(dev, "fewer than minimum number of segments " + "allowed: %d\n", sc->vtblk_max_nsegs); + goto fail; + } - /* - * Allocate working sglist. The number of segments may be too - * large to safely store on the stack. - */ sc->vtblk_sglist = sglist_alloc(sc->vtblk_max_nsegs, M_NOWAIT); if (sc->vtblk_sglist == NULL) { error = ENOMEM; @@ -385,7 +380,7 @@ vtblk_detach(device_t dev) sc = device_get_softc(dev); VTBLK_LOCK(sc); - sc->vtblk_flags |= VTBLK_FLAG_DETACHING; + sc->vtblk_flags |= VTBLK_FLAG_DETACH; if (device_is_attached(dev)) vtblk_stop(sc); VTBLK_UNLOCK(sc); @@ -417,15 +412,19 @@ static int vtblk_suspend(device_t dev) { struct vtblk_softc *sc; + int error; sc = device_get_softc(dev); VTBLK_LOCK(sc); - sc->vtblk_flags |= VTBLK_FLAG_SUSPENDED; - /* TODO Wait for any inflight IO to complete? */ + sc->vtblk_flags |= VTBLK_FLAG_SUSPEND; + /* XXX BMV: virtio_stop(), etc needed here? */ + error = vtblk_quiesce(sc); + if (error) + sc->vtblk_flags &= ~VTBLK_FLAG_SUSPEND; VTBLK_UNLOCK(sc); - return (0); + return (error); } static int @@ -436,8 +435,9 @@ vtblk_resume(device_t dev) sc = device_get_softc(dev); VTBLK_LOCK(sc); - sc->vtblk_flags &= ~VTBLK_FLAG_SUSPENDED; - /* TODO Resume IO? */ + /* XXX BMV: virtio_reinit(), etc needed here? */ + sc->vtblk_flags &= ~VTBLK_FLAG_SUSPEND; + vtblk_startio(sc); VTBLK_UNLOCK(sc); return (0); @@ -458,7 +458,7 @@ vtblk_open(struct disk *dp) if ((sc = dp->d_drv1) == NULL) return (ENXIO); - return (sc->vtblk_flags & VTBLK_FLAG_DETACHING ? ENXIO : 0); + return (sc->vtblk_flags & VTBLK_FLAG_DETACH ? ENXIO : 0); } static int @@ -498,11 +498,7 @@ vtblk_dump(void *arg, void *virtual, vm_ if ((sc = dp->d_drv1) == NULL) return (ENXIO); - if (VTBLK_TRYLOCK(sc) == 0) { - device_printf(sc->vtblk_dev, - "softc already locked, cannot dump...\n"); - return (EBUSY); - } + VTBLK_LOCK(sc); if ((sc->vtblk_flags & VTBLK_FLAG_DUMPING) == 0) { vtblk_prepare_dump(sc); @@ -513,6 +509,10 @@ vtblk_dump(void *arg, void *virtual, vm_ error = vtblk_write_dump(sc, virtual, offset, length); else if (virtual == NULL && offset == 0) error = vtblk_flush_dump(sc); + else { + error = EINVAL; + sc->vtblk_flags &= ~VTBLK_FLAG_DUMPING; + } VTBLK_UNLOCK(sc); @@ -525,7 +525,7 @@ vtblk_strategy(struct bio *bp) struct vtblk_softc *sc; if ((sc = bp->bio_disk->d_drv1) == NULL) { - vtblk_bio_error(bp, EINVAL); + vtblk_finish_bio(bp, EINVAL); return; } @@ -535,29 +535,37 @@ vtblk_strategy(struct bio *bp) */ if (sc->vtblk_flags & VTBLK_FLAG_READONLY && (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_FLUSH)) { - vtblk_bio_error(bp, EROFS); + vtblk_finish_bio(bp, EROFS); return; } +#ifdef INVARIANTS /* * Prevent read/write buffers spanning too many segments from * getting into the queue. This should only trip if d_maxsize * was incorrectly set. */ if (bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE) { - KASSERT(VTBLK_BIO_SEGMENTS(bp) <= sc->vtblk_max_nsegs - - VTBLK_MIN_SEGMENTS, + int nsegs, max_nsegs; + + nsegs = sglist_count(bp->bio_data, bp->bio_bcount); + max_nsegs = sc->vtblk_max_nsegs - VTBLK_MIN_SEGMENTS; + + KASSERT(nsegs <= max_nsegs, ("bio spanned too many segments: %d, max: %d", - VTBLK_BIO_SEGMENTS(bp), - sc->vtblk_max_nsegs - VTBLK_MIN_SEGMENTS)); + nsegs, max_nsegs)); } +#endif VTBLK_LOCK(sc); - if ((sc->vtblk_flags & VTBLK_FLAG_DETACHING) == 0) { + if (sc->vtblk_flags & VTBLK_FLAG_DETACH) + vtblk_finish_bio(bp, ENXIO); + else { bioq_disksort(&sc->vtblk_bioq, bp); - vtblk_startio(sc); - } else - vtblk_bio_error(bp, ENXIO); + + if ((sc->vtblk_flags & VTBLK_FLAG_SUSPEND) == 0) + vtblk_startio(sc); + } VTBLK_UNLOCK(sc); } @@ -622,7 +630,7 @@ vtblk_alloc_disk(struct vtblk_softc *sc, dp->d_ioctl = vtblk_ioctl; dp->d_strategy = vtblk_strategy; dp->d_name = VTBLK_DISK_NAME; - dp->d_unit = sc->vtblk_unit; + dp->d_unit = device_get_unit(dev); dp->d_drv1 = sc; if ((sc->vtblk_flags & VTBLK_FLAG_READONLY) == 0) @@ -632,10 +640,9 @@ vtblk_alloc_disk(struct vtblk_softc *sc, dp->d_mediasize = blkcfg->capacity * 512; if (virtio_with_feature(dev, VIRTIO_BLK_F_BLK_SIZE)) - sc->vtblk_sector_size = blkcfg->blk_size; + dp->d_sectorsize = blkcfg->blk_size; else - sc->vtblk_sector_size = 512; - dp->d_sectorsize = sc->vtblk_sector_size; + dp->d_sectorsize = 512; /* * The VirtIO maximum I/O size is given in terms of segments. @@ -685,6 +692,26 @@ vtblk_create_disk(struct vtblk_softc *sc disk_create(dp, DISK_VERSION); } +static int +vtblk_quiesce(struct vtblk_softc *sc) +{ + int error; + + error = 0; + + VTBLK_LOCK_ASSERT(sc); + + while (!virtqueue_empty(sc->vtblk_vq)) { + if (mtx_sleep(&sc->vtblk_vq, VTBLK_MTX(sc), PRIBIO, "vtblkq", + VTBLK_QUIESCE_TIMEOUT) == EWOULDBLOCK) { + error = EBUSY; + break; + } + } + + return (error); +} + static void vtblk_startio(struct vtblk_softc *sc) { @@ -697,9 +724,6 @@ vtblk_startio(struct vtblk_softc *sc) VTBLK_LOCK_ASSERT(sc); - if (sc->vtblk_flags & VTBLK_FLAG_SUSPENDED) - return; - while (!virtqueue_full(vq)) { if ((req = vtblk_dequeue_ready(sc)) == NULL) req = vtblk_bio_request(sc); @@ -752,9 +776,8 @@ vtblk_bio_request(struct vtblk_softc *sc req->vbr_hdr.sector = bp->bio_offset / 512; break; default: - KASSERT(0, ("bio with unhandled cmd: %d", bp->bio_cmd)); - req->vbr_hdr.type = -1; - break; + panic("%s: bio with unhandled cmd: %d", __FUNCTION__, + bp->bio_cmd); } if (bp->bio_flags & BIO_ORDERED) @@ -768,7 +791,7 @@ vtblk_execute_request(struct vtblk_softc { struct sglist *sg; struct bio *bp; - int writable, error; + int readable, writable, error; sg = sc->vtblk_sglist; bp = req->vbr_bp; @@ -799,10 +822,9 @@ vtblk_execute_request(struct vtblk_softc KASSERT(sg->sg_nseg >= VTBLK_MIN_SEGMENTS, ("fewer than min segments: %d", sg->sg_nseg)); - error = virtqueue_enqueue(sc->vtblk_vq, req, sg, - sg->sg_nseg - writable, writable); + readable = sg->sg_nseg - writable; - return (error); + return (virtqueue_enqueue(sc->vtblk_vq, req, sg, readable, writable)); } static int @@ -822,37 +844,23 @@ static void vtblk_intr_task(void *arg, int pending) { struct vtblk_softc *sc; - struct vtblk_request *req; struct virtqueue *vq; - struct bio *bp; sc = arg; vq = sc->vtblk_vq; VTBLK_LOCK(sc); - if (sc->vtblk_flags & VTBLK_FLAG_DETACHING) { + if (sc->vtblk_flags & VTBLK_FLAG_DETACH) { VTBLK_UNLOCK(sc); return; } - while ((req = virtqueue_dequeue(vq, NULL)) != NULL) { - bp = req->vbr_bp; + vtblk_finish_completed(sc); - if (req->vbr_ack == VIRTIO_BLK_S_OK) - bp->bio_resid = 0; - else { - bp->bio_flags |= BIO_ERROR; - if (req->vbr_ack == VIRTIO_BLK_S_UNSUPP) - bp->bio_error = ENOTSUP; - else - bp->bio_error = EIO; - } - - biodone(bp); - vtblk_enqueue_request(sc, req); - } - - vtblk_startio(sc); + if ((sc->vtblk_flags & VTBLK_FLAG_SUSPEND) == 0) + vtblk_startio(sc); + else + wakeup(&sc->vtblk_vq); if (virtqueue_enable_intr(vq) != 0) { virtqueue_disable_intr(vq); @@ -905,9 +913,10 @@ vtblk_get_ident(struct vtblk_softc *sc) VTBLK_LOCK(sc); error = vtblk_poll_request(sc, req); - vtblk_enqueue_request(sc, req); VTBLK_UNLOCK(sc); + vtblk_enqueue_request(sc, req); + if (error) { device_printf(sc->vtblk_dev, "error getting device identifier: %d\n", error); @@ -1006,17 +1015,35 @@ vtblk_poll_request(struct vtblk_softc *s r = virtqueue_poll(vq, NULL); KASSERT(r == req, ("unexpected request response")); - if (req->vbr_ack != VIRTIO_BLK_S_OK) { - error = req->vbr_ack == VIRTIO_BLK_S_UNSUPP ? ENOTSUP : EIO; - if (bootverbose) - device_printf(dev, - "vtblk_poll_request: IO error: %d\n", error); + error = vtblk_request_error(req); + if (error && bootverbose) { + device_printf(dev, "vtblk_poll_request: IO error: %d\n", + error); } return (error); } static void +vtblk_finish_completed(struct vtblk_softc *sc) +{ + struct vtblk_request *req; + struct bio *bp; + int error; + + while ((req = virtqueue_dequeue(sc->vtblk_vq, NULL)) != NULL) { + bp = req->vbr_bp; + + error = vtblk_request_error(req); + if (error) + disk_err(bp, "hard error", -1, 1); + + vtblk_finish_bio(bp, error); + vtblk_enqueue_request(sc, req); + } +} + +static void vtblk_drain_vq(struct vtblk_softc *sc, int skip_done) { struct virtqueue *vq; @@ -1028,7 +1055,7 @@ vtblk_drain_vq(struct vtblk_softc *sc, i while ((req = virtqueue_drain(vq, &last)) != NULL) { if (!skip_done) - vtblk_bio_error(req->vbr_bp, ENXIO); + vtblk_finish_bio(req->vbr_bp, ENXIO); vtblk_enqueue_request(sc, req); } @@ -1045,17 +1072,19 @@ vtblk_drain(struct vtblk_softc *sc) bioq = &sc->vtblk_bioq; - if (sc->vtblk_vq != NULL) + if (sc->vtblk_vq != NULL) { + vtblk_finish_completed(sc); vtblk_drain_vq(sc, 0); + } while ((req = vtblk_dequeue_ready(sc)) != NULL) { - vtblk_bio_error(req->vbr_bp, ENXIO); + vtblk_finish_bio(req->vbr_bp, ENXIO); vtblk_enqueue_request(sc, req); } while (bioq_first(bioq) != NULL) { bp = bioq_takefirst(bioq); - vtblk_bio_error(bp, ENXIO); + vtblk_finish_bio(bp, ENXIO); } vtblk_free_requests(sc); @@ -1065,9 +1094,9 @@ static int vtblk_alloc_requests(struct vtblk_softc *sc) { struct vtblk_request *req; - int i, size; + int i, nreqs; - size = virtqueue_size(sc->vtblk_vq); + nreqs = virtqueue_size(sc->vtblk_vq); /* * Preallocate sufficient requests to keep the virtqueue full. Each @@ -1075,9 +1104,9 @@ vtblk_alloc_requests(struct vtblk_softc * the number allocated when indirect descriptors are not available. */ if ((sc->vtblk_flags & VTBLK_FLAG_INDIRECT) == 0) - size /= VTBLK_MIN_SEGMENTS; + nreqs /= VTBLK_MIN_SEGMENTS; - for (i = 0; i < size; i++) { + for (i = 0; i < nreqs; i++) { req = uma_zalloc(vtblk_req_zone, M_NOWAIT); if (req == NULL) return (ENOMEM); @@ -1094,6 +1123,9 @@ vtblk_free_requests(struct vtblk_softc * { struct vtblk_request *req; + KASSERT(TAILQ_EMPTY(&sc->vtblk_req_ready), + ("ready requests left on queue")); + while ((req = vtblk_dequeue_request(sc)) != NULL) { sc->vtblk_request_count--; uma_zfree(vtblk_req_zone, req); @@ -1141,9 +1173,35 @@ vtblk_enqueue_ready(struct vtblk_softc * TAILQ_INSERT_HEAD(&sc->vtblk_req_ready, req, vbr_link); } +static int +vtblk_request_error(struct vtblk_request *req) +{ + int error; + + switch (req->vbr_ack) { + case VIRTIO_BLK_S_OK: + error = 0; + break; + case VIRTIO_BLK_S_UNSUPP: + error = ENOTSUP; + break; + default: + error = EIO; + break; + } + + return (error); +} + static void -vtblk_bio_error(struct bio *bp, int error) +vtblk_finish_bio(struct bio *bp, int error) { - biofinish(bp, NULL, error); + if (error) { + bp->bio_resid = bp->bio_bcount; + bp->bio_error = error; + bp->bio_flags |= BIO_ERROR; + } + + biodone(bp); } Modified: stable/9/sys/dev/virtio/block/virtio_blk.h ============================================================================== --- head/sys/dev/virtio/block/virtio_blk.h Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/block/virtio_blk.h Tue Aug 21 00:03:04 2012 (r239472) @@ -1,7 +1,30 @@ -/* +/*- * This header is BSD licensed so anyone can use the definitions to implement * compatible drivers/servers. * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of IBM nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 IBM 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$ */ @@ -39,16 +62,6 @@ struct virtio_blk_config { /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ uint32_t blk_size; - - /* the next 4 entries are guarded by VIRTIO_BLK_F_TOPOLOGY */ - /* exponent for physical block per logical block. */ - uint8_t physical_block_exp; - /* alignment offset in logical blocks. */ - uint8_t alignment_offset; - /* minimum I/O size without performance penalty in logical blocks. */ - uint16_t min_io_size; - /* optimal sustained I/O size in logical blocks. */ - uint32_t opt_io_size; } __packed; /* Modified: stable/9/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- head/sys/dev/virtio/network/if_vtnet.c Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/network/if_vtnet.c Tue Aug 21 00:03:04 2012 (r239472) @@ -223,7 +223,7 @@ static device_method_t vtnet_methods[] = /* VirtIO methods. */ DEVMETHOD(virtio_config_change, vtnet_config_change), - { 0, 0 } + DEVMETHOD_END }; static driver_t vtnet_driver = { @@ -317,8 +317,20 @@ vtnet_attach(device_t dev) if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VQ)) { sc->vtnet_flags |= VTNET_FLAG_CTRL_VQ; - if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_RX)) + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_RX)) { + sc->vtnet_mac_filter = malloc( + sizeof(struct vtnet_mac_filter), M_DEVBUF, + M_NOWAIT | M_ZERO); + if (sc->vtnet_mac_filter == NULL) { + device_printf(dev, + "cannot allocate mac filter table\n"); + error = ENOMEM; + goto fail; + } + sc->vtnet_flags |= VTNET_FLAG_CTRL_RX; + } + if (virtio_with_feature(dev, VIRTIO_NET_F_CTRL_VLAN)) sc->vtnet_flags |= VTNET_FLAG_VLAN_FILTER; } @@ -505,7 +517,12 @@ vtnet_detach(device_t dev) sc->vtnet_vlan_detach = NULL; } - if (ifp) { + if (sc->vtnet_mac_filter != NULL) { + free(sc->vtnet_mac_filter, M_DEVBUF); + sc->vtnet_mac_filter = NULL; + } + + if (ifp != NULL) { if_free(ifp); sc->vtnet_ifp = NULL; } @@ -742,17 +759,11 @@ vtnet_update_link_status(struct vtnet_so if (link && ((sc->vtnet_flags & VTNET_FLAG_LINK) == 0)) { sc->vtnet_flags |= VTNET_FLAG_LINK; - if (bootverbose) - device_printf(dev, "Link is up\n"); - if_link_state_change(ifp, LINK_STATE_UP); if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) vtnet_start_locked(ifp); } else if (!link && (sc->vtnet_flags & VTNET_FLAG_LINK)) { sc->vtnet_flags &= ~VTNET_FLAG_LINK; - if (bootverbose) - device_printf(dev, "Link is down\n"); - if_link_state_change(ifp, LINK_STATE_DOWN); } } @@ -1105,7 +1116,7 @@ vtnet_alloc_rxbuf(struct vtnet_softc *sc KASSERT(sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG, ("chained Rx mbuf requested without LRO_NOMRG")); - for (i = 0; i < nbufs - 1; i++) { + for (i = 1; i < nbufs; i++) { m = m_getjcl(M_DONTWAIT, MT_DATA, 0, clsize); if (m == NULL) goto fail; @@ -1143,9 +1154,8 @@ vtnet_replace_rxbuf(struct vtnet_softc * clsize = sc->vtnet_rx_mbuf_size; nreplace = 0; - if (m->m_next != NULL) - KASSERT(sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG, - ("chained Rx mbuf without LRO_NOMRG")); + KASSERT(sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG || + m->m_next == NULL, ("chained Rx mbuf without LRO_NOMRG")); /* * Since LRO_NOMRG mbuf chains are so large, we want to avoid @@ -1275,8 +1285,8 @@ vtnet_enqueue_rxbuf(struct vtnet_softc * int offset, error; VTNET_LOCK_ASSERT(sc); - if ((sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG) == 0) - KASSERT(m->m_next == NULL, ("chained Rx mbuf")); + KASSERT(sc->vtnet_flags & VTNET_FLAG_LRO_NOMRG || + m->m_next == NULL, ("chained Rx mbuf without LRO_NOMRG")); sglist_init(&sg, VTNET_MAX_RX_SEGS, segs); @@ -1688,7 +1698,8 @@ vtnet_rxeof(struct vtnet_softc *sc, int break; } - virtqueue_notify(vq); + if (deq > 0) + virtqueue_notify(vq); if (rx_npktsp != NULL) *rx_npktsp = rx_npkts; @@ -1946,9 +1957,14 @@ vtnet_encap(struct vtnet_softc *sc, stru struct mbuf *m; int error; + m = *m_head; + txhdr = uma_zalloc(vtnet_tx_header_zone, M_NOWAIT | M_ZERO); - if (txhdr == NULL) + if (txhdr == NULL) { + *m_head = NULL; + m_freem(m); return (ENOMEM); + } /* * Always use the non-mergeable header to simplify things. When @@ -1957,21 +1973,22 @@ vtnet_encap(struct vtnet_softc *sc, stru * the correct header size to the host. */ hdr = &txhdr->vth_uhdr.hdr; - m = *m_head; - - error = ENOBUFS; if (m->m_flags & M_VLANTAG) { m = ether_vlanencap(m, m->m_pkthdr.ether_vtag); - if ((*m_head = m) == NULL) + if ((*m_head = m) == NULL) { + error = ENOBUFS; goto fail; + } m->m_flags &= ~M_VLANTAG; } if (m->m_pkthdr.csum_flags != 0) { m = vtnet_tx_offload(sc, m, hdr); - if ((*m_head = m) == NULL) + if ((*m_head = m) == NULL) { + error = ENOBUFS; goto fail; + } } error = vtnet_enqueue_txbuf(sc, m_head, txhdr); @@ -2387,6 +2404,7 @@ vtnet_rx_filter_mac(struct vtnet_softc * uint8_t ack; ifp = sc->vtnet_ifp; + filter = sc->vtnet_mac_filter; ucnt = 0; mcnt = 0; promisc = 0; @@ -2397,19 +2415,6 @@ vtnet_rx_filter_mac(struct vtnet_softc * KASSERT(sc->vtnet_flags & VTNET_FLAG_CTRL_RX, ("CTRL_RX feature not negotiated")); - /* - * Allocate the MAC filtering table. Note we could do this - * at attach time, but it is probably not worth keeping it - * around for an infrequent occurrence. - */ - filter = malloc(sizeof(struct vtnet_mac_filter), M_DEVBUF, - M_NOWAIT | M_ZERO); - if (filter == NULL) { - device_printf(sc->vtnet_dev, - "cannot allocate MAC address filtering table\n"); - return; - } - /* Unicast MAC addresses: */ if_addr_rlock(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { @@ -2481,8 +2486,6 @@ vtnet_rx_filter_mac(struct vtnet_softc * if_printf(ifp, "error setting host MAC filter table\n"); out: - free(filter, M_DEVBUF); - if (promisc) if (vtnet_set_promisc(sc, 1) != 0) if_printf(ifp, "cannot enable promiscuous mode\n"); Modified: stable/9/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- head/sys/dev/virtio/network/if_vtnetvar.h Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/network/if_vtnetvar.h Tue Aug 21 00:03:04 2012 (r239472) @@ -99,6 +99,7 @@ struct vtnet_softc { #define VTNET_MEDIATYPE (IFM_ETHER | IFM_1000_T | IFM_FDX) char vtnet_hwaddr[ETHER_ADDR_LEN]; + struct vtnet_mac_filter *vtnet_mac_filter; /* * During reset, the host's VLAN filtering table is lost. The * array below is used to restore all the VLANs configured on Modified: stable/9/sys/dev/virtio/network/virtio_net.h ============================================================================== --- head/sys/dev/virtio/network/virtio_net.h Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/network/virtio_net.h Tue Aug 21 00:03:04 2012 (r239472) @@ -1,7 +1,30 @@ -/* +/*- * This header is BSD licensed so anyone can use the definitions to implement * compatible drivers/servers. * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of IBM nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 IBM 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$ */ Modified: stable/9/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- head/sys/dev/virtio/pci/virtio_pci.c Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/pci/virtio_pci.c Tue Aug 21 00:03:04 2012 (r239472) @@ -189,7 +189,7 @@ static device_method_t vtpci_methods[] = DEVMETHOD(virtio_bus_read_device_config, vtpci_read_dev_config), DEVMETHOD(virtio_bus_write_device_config, vtpci_write_dev_config), - { 0, 0 } + DEVMETHOD_END }; static driver_t vtpci_driver = { Modified: stable/9/sys/dev/virtio/pci/virtio_pci.h ============================================================================== --- head/sys/dev/virtio/pci/virtio_pci.h Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/pci/virtio_pci.h Tue Aug 21 00:03:04 2012 (r239472) @@ -1,4 +1,4 @@ -/* +/*- * Copyright IBM Corp. 2007 * * Authors: @@ -7,6 +7,29 @@ * This header is BSD licensed so anyone can use the definitions to implement * compatible drivers/servers. * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of IBM nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 IBM 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$ */ Modified: stable/9/sys/dev/virtio/virtio.h ============================================================================== --- head/sys/dev/virtio/virtio.h Fri Nov 18 05:43:43 2011 (r227652) +++ stable/9/sys/dev/virtio/virtio.h Tue Aug 21 00:03:04 2012 (r239472) @@ -1,7 +1,30 @@ -/* +/*- * This header is BSD licensed so anyone can use the definitions to implement * compatible drivers/servers. * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of IBM nor the names of its contributors + * may be used to endorse or promote products derived from this software *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 02:17:07 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E99D1065672; Tue, 21 Aug 2012 02:17:07 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6FFF88FC16; Tue, 21 Aug 2012 02:17:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7L2H7SK038797; Tue, 21 Aug 2012 02:17:07 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7L2H7xY038795; Tue, 21 Aug 2012 02:17:07 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201208210217.q7L2H7xY038795@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 21 Aug 2012 02:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239474 - stable/9/sys/netinet/khelp X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 02:17:07 -0000 Author: lstewart Date: Tue Aug 21 02:17:06 2012 New Revision: 239474 URL: http://svn.freebsd.org/changeset/base/239474 Log: MFC r239346: The TCP PAWS fix for kernels with fast tick rates (r231767) changed the TCP timestamp related stack variables to reference ms directly instead of ticks. The h_ertt(4) Khelp module relies on TCP timestamp information in order to calculate its enhanced RTT estimates, but was not updated as part of r231767. Consequently, h_ertt has not been calculating correct RTT estimates since r231767 was comitted, which in turn broke all delay-based congestion control algorithms because they rely on the h_ertt RTT estimates. Fix the breakage by switching h_ertt to use tcp_ts_getticks() in place of all previous uses of the ticks variable. This ensures all timestamp related variables in h_ertt use the same units as the TCP stack and therefore results in meaningful comparisons and RTT estimate calculations. Reported & tested by: Naeem Khademi (naeemk at ifi uio no) Discussed with: bz Modified: stable/9/sys/netinet/khelp/h_ertt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/khelp/h_ertt.c ============================================================================== --- stable/9/sys/netinet/khelp/h_ertt.c Tue Aug 21 00:05:44 2012 (r239473) +++ stable/9/sys/netinet/khelp/h_ertt.c Tue Aug 21 02:17:06 2012 (r239474) @@ -151,11 +151,13 @@ marked_packet_rtt(struct txseginfo *txsi *prtt_bytes_adjust += *pmeasurenext_len; } else { if (mflag & FORCED_MEASUREMENT) { - e_t->markedpkt_rtt = ticks - *pmeasurenext + 1; + e_t->markedpkt_rtt = tcp_ts_getticks() - + *pmeasurenext + 1; e_t->bytes_tx_in_marked_rtt = e_t->bytes_tx_in_rtt + *pmeasurenext_len - *prtt_bytes_adjust; } else { - e_t->markedpkt_rtt = ticks - txsi->tx_ts + 1; + e_t->markedpkt_rtt = tcp_ts_getticks() - + txsi->tx_ts + 1; e_t->bytes_tx_in_marked_rtt = e_t->bytes_tx_in_rtt - *prtt_bytes_adjust; } @@ -349,7 +351,7 @@ ertt_packet_measurement_hook(int hhook_t */ if (!e_t->dlyack_rx || multiack || new_sacked_bytes) { /* Make an accurate new measurement. */ - e_t->rtt = ticks - txsi->tx_ts + 1; + e_t->rtt = tcp_ts_getticks() - txsi->tx_ts + 1; if (e_t->rtt < e_t->minrtt || e_t->minrtt == 0) e_t->minrtt = e_t->rtt; @@ -477,7 +479,7 @@ ertt_add_tx_segment_info_hook(int hhook_ tp->ts_offset; txsi->rx_ts = ntohl(to->to_tsecr); } else { - txsi->tx_ts = ticks; + txsi->tx_ts = tcp_ts_getticks(); txsi->rx_ts = 0; /* No received time stamp. */ } TAILQ_INSERT_TAIL(&e_t->txsegi_q, txsi, txsegi_lnk); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 06:09:43 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A98EC106566C; Tue, 21 Aug 2012 06:09:43 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9446F8FC12; Tue, 21 Aug 2012 06:09:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7L69hLf075112; Tue, 21 Aug 2012 06:09:43 GMT (envelope-from avatar@svn.freebsd.org) Received: (from avatar@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7L69hHS075110; Tue, 21 Aug 2012 06:09:43 GMT (envelope-from avatar@svn.freebsd.org) Message-Id: <201208210609.q7L69hHS075110@svn.freebsd.org> From: Tai-hwa Liang Date: Tue, 21 Aug 2012 06:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239476 - stable/9 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 06:09:43 -0000 Author: avatar Date: Tue Aug 21 06:09:43 2012 New Revision: 239476 URL: http://svn.freebsd.org/changeset/base/239476 Log: MFC r238562: Removing bsd{ar,ranlib} found on my ancient installation. Modified: stable/9/ObsoleteFiles.inc (contents, props changed) Modified: stable/9/ObsoleteFiles.inc ============================================================================== --- stable/9/ObsoleteFiles.inc Tue Aug 21 02:52:25 2012 (r239475) +++ stable/9/ObsoleteFiles.inc Tue Aug 21 06:09:43 2012 (r239476) @@ -1216,6 +1216,11 @@ OLD_FILES+=usr/share/man/man2/kse_thr_in OLD_FILES+=usr/share/man/man2/kse_wakeup.2.gz OLD_FILES+=usr/lib32/libkse.so OLD_LIBS+=usr/lib32/libkse.so.3 +# 20080225: bsdar/bsdranlib rename to ar/ranlib +OLD_FILES+=usr/bin/bsdar +OLD_FILES+=usr/bin/bsdranlib +OLD_FILES+=usr/share/man/man1/bsdar.1.gz +OLD_FILES+=usr/share/man/man1/bsdranlib.1.gz # 20080220: geom_lvm rename to geom_linux_lvm OLD_FILES+=usr/share/man/man4/geom_lvm.4.gz # 20080126: oldcard.4 removal From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 09:10:15 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64DFC106567B; Tue, 21 Aug 2012 09:10:15 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 457918FC18; Tue, 21 Aug 2012 09:10:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7L9AFVK002201; Tue, 21 Aug 2012 09:10:15 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7L9AFE1002198; Tue, 21 Aug 2012 09:10:15 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201208210910.q7L9AFE1002198@svn.freebsd.org> From: Marius Strobl Date: Tue, 21 Aug 2012 09:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239483 - in stable/9/sys/sparc64: include sparc64 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 09:10:15 -0000 Author: marius Date: Tue Aug 21 09:10:14 2012 New Revision: 239483 URL: http://svn.freebsd.org/changeset/base/239483 Log: MFC: r239079 Merge r236494 from x86: Isolate the global TTE list lock from data and other locks to prevent false sharing within the cache. Modified: stable/9/sys/sparc64/include/pmap.h stable/9/sys/sparc64/sparc64/pmap.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/sparc64/include/pmap.h ============================================================================== --- stable/9/sys/sparc64/include/pmap.h Tue Aug 21 09:05:23 2012 (r239482) +++ stable/9/sys/sparc64/include/pmap.h Tue Aug 21 09:10:14 2012 (r239483) @@ -68,6 +68,11 @@ struct pmap { struct pmap_statistics pm_stats; }; +struct tte_list_lock { + struct rwlock lock; + char padding[CACHE_LINE_SIZE - sizeof(struct rwlock)]; +}; + #define PMAP_LOCK(pmap) mtx_lock(&(pmap)->pm_mtx) #define PMAP_LOCK_ASSERT(pmap, type) \ mtx_assert(&(pmap)->pm_mtx, (type)) @@ -102,7 +107,8 @@ void pmap_set_kctx(void); extern struct pmap kernel_pmap_store; #define kernel_pmap (&kernel_pmap_store) -extern struct rwlock tte_list_global_lock; +extern struct tte_list_lock tte_list_global; +#define tte_list_global_lock tte_list_global.lock extern vm_paddr_t phys_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; Modified: stable/9/sys/sparc64/sparc64/pmap.c ============================================================================== --- stable/9/sys/sparc64/sparc64/pmap.c Tue Aug 21 09:05:23 2012 (r239482) +++ stable/9/sys/sparc64/sparc64/pmap.c Tue Aug 21 09:10:14 2012 (r239483) @@ -135,9 +135,11 @@ vm_offset_t vm_max_kernel_address; struct pmap kernel_pmap_store; /* - * Global tte list lock + * Isolate the global TTE list lock from data and other locks to prevent + * false sharing within the cache (see also the declaration of struct + * tte_list_lock). */ -struct rwlock tte_list_global_lock; +struct tte_list_lock tte_list_global __aligned(CACHE_LINE_SIZE); /* * Allocate physical memory for use in pmap_bootstrap. @@ -672,7 +674,7 @@ pmap_bootstrap(u_int cpu_impl) pm->pm_context[i] = TLB_CTX_KERNEL; CPU_FILL(&pm->pm_active); - /* + /* * Initialize the global tte list lock. */ rw_init(&tte_list_global_lock, "tte list global"); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 11:40:32 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6502B10656AE; Tue, 21 Aug 2012 11:40:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45C328FC12; Tue, 21 Aug 2012 11:40:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LBeW9O027705; Tue, 21 Aug 2012 11:40:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LBeWIP027703; Tue, 21 Aug 2012 11:40:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201208211140.q7LBeWIP027703@svn.freebsd.org> From: Alexander Motin Date: Tue, 21 Aug 2012 11:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239494 - stable/9/sys/dev/ata X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 11:40:32 -0000 Author: mav Date: Tue Aug 21 11:40:31 2012 New Revision: 239494 URL: http://svn.freebsd.org/changeset/base/239494 Log: MFC r238673: Use 16bit PIO instead of 32bit in case of misaligned buffer. It fixes kernel panic during CD write with cdrecord on sparc64. Modified: stable/9/sys/dev/ata/ata-lowlevel.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ata/ata-lowlevel.c ============================================================================== --- stable/9/sys/dev/ata/ata-lowlevel.c Tue Aug 21 11:35:54 2012 (r239493) +++ stable/9/sys/dev/ata/ata-lowlevel.c Tue Aug 21 11:40:31 2012 (r239494) @@ -836,23 +836,21 @@ static void ata_pio_read(struct ata_request *request, int length) { struct ata_channel *ch = device_get_softc(request->parent); + uint8_t *addr; int size = min(request->transfersize, length); int resid; uint8_t buf[2]; - if (ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t))) { - ATA_IDX_INSW_STRM(ch, ATA_DATA, - (void*)((uintptr_t)request->data+request->donecount), - size / sizeof(int16_t)); + addr = (uint8_t *)request->data + request->donecount; + if (ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t)) || + ((uintptr_t)addr % sizeof(int32_t))) { + ATA_IDX_INSW_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int16_t)); if (size & 1) { ATA_IDX_INSW_STRM(ch, ATA_DATA, (void*)buf, 1); - ((uint8_t *)request->data + request->donecount + - (size & ~1))[0] = buf[0]; + (addr + (size & ~1))[0] = buf[0]; } } else - ATA_IDX_INSL_STRM(ch, ATA_DATA, - (void*)((uintptr_t)request->data+request->donecount), - size / sizeof(int32_t)); + ATA_IDX_INSL_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int32_t)); if (request->transfersize < length) { device_printf(request->parent, "WARNING - %s read data overrun %d>%d\n", @@ -867,23 +865,21 @@ static void ata_pio_write(struct ata_request *request, int length) { struct ata_channel *ch = device_get_softc(request->parent); + uint8_t *addr; int size = min(request->transfersize, length); int resid; uint8_t buf[2]; - if (ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t))) { - ATA_IDX_OUTSW_STRM(ch, ATA_DATA, - (void*)((uintptr_t)request->data+request->donecount), - size / sizeof(int16_t)); + addr = (uint8_t *)request->data + request->donecount; + if (ch->flags & ATA_USE_16BIT || (size % sizeof(int32_t)) || + ((uintptr_t)addr % sizeof(int32_t))) { + ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int16_t)); if (size & 1) { - buf[0] = ((uint8_t *)request->data + request->donecount + - (size & ~1))[0]; + buf[0] = (addr + (size & ~1))[0]; ATA_IDX_OUTSW_STRM(ch, ATA_DATA, (void*)buf, 1); } } else - ATA_IDX_OUTSL_STRM(ch, ATA_DATA, - (void*)((uintptr_t)request->data+request->donecount), - size / sizeof(int32_t)); + ATA_IDX_OUTSL_STRM(ch, ATA_DATA, (void*)addr, size / sizeof(int32_t)); if (request->transfersize < length) { device_printf(request->parent, "WARNING - %s write data underrun %d>%d\n", From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 18:45:56 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52CE2106564A; Tue, 21 Aug 2012 18:45:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D8848FC18; Tue, 21 Aug 2012 18:45:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LIju6I085428; Tue, 21 Aug 2012 18:45:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LIju1F085425; Tue, 21 Aug 2012 18:45:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211845.q7LIju1F085425@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 18:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239516 - stable/9/sbin/camcontrol X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 18:45:56 -0000 Author: dim Date: Tue Aug 21 18:45:55 2012 New Revision: 239516 URL: http://svn.freebsd.org/changeset/base/239516 Log: MFC r239059: In sbin/camcontrol/camcontrol.c, function smpcmd(), initialize the 'error' variable to zero, to avoid returning garbage in several cases. Modified: stable/9/sbin/camcontrol/camcontrol.c Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Tue Aug 21 18:41:38 2012 (r239515) +++ stable/9/sbin/camcontrol/camcontrol.c Tue Aug 21 18:45:55 2012 (r239516) @@ -4463,7 +4463,7 @@ static int smpcmd(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout) { - int c, error; + int c, error = 0; union ccb *ccb; uint8_t *smp_request = NULL, *smp_response = NULL; int request_size = 0, response_size = 0; From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 18:55:20 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C2CD106566C; Tue, 21 Aug 2012 18:55:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 074C28FC0C; Tue, 21 Aug 2012 18:55:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LItJRc086856; Tue, 21 Aug 2012 18:55:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LItJcR086854; Tue, 21 Aug 2012 18:55:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211855.q7LItJcR086854@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 18:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239517 - stable/9/usr.bin/make X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 18:55:20 -0000 Author: dim Date: Tue Aug 21 18:55:19 2012 New Revision: 239517 URL: http://svn.freebsd.org/changeset/base/239517 Log: MFC r239071: In usr.bin/make/var.c, function ParseModifier(), initialize the 'error' variable to NULL, to avoid using it uninitialized in certain cases. Modified: stable/9/usr.bin/make/var.c Directory Properties: stable/9/usr.bin/make/ (props changed) Modified: stable/9/usr.bin/make/var.c ============================================================================== --- stable/9/usr.bin/make/var.c Tue Aug 21 18:45:55 2012 (r239516) +++ stable/9/usr.bin/make/var.c Tue Aug 21 18:55:19 2012 (r239517) @@ -1765,7 +1765,7 @@ ParseModifier(VarParser *vp, char startc if ((vp->ptr[0] == 's') && (vp->ptr[1] == 'h') && (vp->ptr[2] == endc || vp->ptr[2] == ':')) { - const char *error; + const char *error = NULL; if (vp->execute) { newStr = Buf_Peel( From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 19:03:04 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDF381065673; Tue, 21 Aug 2012 19:03:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3CED8FC26; Tue, 21 Aug 2012 19:03:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LJ340s088019; Tue, 21 Aug 2012 19:03:04 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LJ34uo088017; Tue, 21 Aug 2012 19:03:04 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211903.q7LJ34uo088017@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 19:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239518 - stable/9/usr.sbin/ctladm X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 19:03:04 -0000 Author: dim Date: Tue Aug 21 19:03:04 2012 New Revision: 239518 URL: http://svn.freebsd.org/changeset/base/239518 Log: MFC r239074: In usr.sbin/ctladm/ctladm.c, function cctl_error_inject(), initialize the 'retval' variable to zero, to avoid returning garbage in several cases. Modified: stable/9/usr.sbin/ctladm/ctladm.c Directory Properties: stable/9/usr.sbin/ctladm/ (props changed) Modified: stable/9/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/9/usr.sbin/ctladm/ctladm.c Tue Aug 21 18:55:19 2012 (r239517) +++ stable/9/usr.sbin/ctladm/ctladm.c Tue Aug 21 19:03:04 2012 (r239518) @@ -1026,7 +1026,7 @@ static int cctl_error_inject(int fd, uint32_t target, uint32_t lun, int argc, char **argv, char *combinedopt) { - int retval; + int retval = 0; struct ctl_error_desc err_desc; uint64_t lba = 0; uint32_t len = 0; From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 19:11:13 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 354D6106566C; Tue, 21 Aug 2012 19:11:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F8A88FC0A; Tue, 21 Aug 2012 19:11:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LJBC34089141; Tue, 21 Aug 2012 19:11:12 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LJBC1U089139; Tue, 21 Aug 2012 19:11:12 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211911.q7LJBC1U089139@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 19:11:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239520 - stable/9/lib/libpam/modules/pam_krb5 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 19:11:13 -0000 Author: dim Date: Tue Aug 21 19:11:12 2012 New Revision: 239520 URL: http://svn.freebsd.org/changeset/base/239520 Log: MFC r239099: Fix two instances in pam_krb5(8), where the variable 'princ_name' could be used uninitialized. Found by: clang 3.2 Reviewed by: des Modified: stable/9/lib/libpam/modules/pam_krb5/pam_krb5.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_krb5/pam_krb5.c ============================================================================== --- stable/9/lib/libpam/modules/pam_krb5/pam_krb5.c Tue Aug 21 19:07:28 2012 (r239519) +++ stable/9/lib/libpam/modules/pam_krb5/pam_krb5.c Tue Aug 21 19:11:12 2012 (r239520) @@ -320,11 +320,11 @@ cleanup: PAM_LOG("Done cleanup"); cleanup2: krb5_free_principal(pam_context, princ); - PAM_LOG("Done cleanup2"); -cleanup3: if (princ_name) free(princ_name); + PAM_LOG("Done cleanup2"); +cleanup3: krb5_free_context(pam_context); PAM_LOG("Done cleanup3"); @@ -779,11 +779,11 @@ cleanup: PAM_LOG("Done cleanup"); cleanup2: krb5_free_principal(pam_context, princ); - PAM_LOG("Done cleanup2"); -cleanup3: if (princ_name) free(princ_name); + PAM_LOG("Done cleanup2"); +cleanup3: krb5_free_context(pam_context); PAM_LOG("Done cleanup3"); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 19:13:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C9D5106566C; Tue, 21 Aug 2012 19:13:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 149868FC0A; Tue, 21 Aug 2012 19:13:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LJDrnT089540; Tue, 21 Aug 2012 19:13:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LJDrGd089538; Tue, 21 Aug 2012 19:13:53 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211913.q7LJDrGd089538@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 19:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239521 - stable/9/lib/libpam/modules/pam_unix X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 19:13:54 -0000 Author: dim Date: Tue Aug 21 19:13:53 2012 New Revision: 239521 URL: http://svn.freebsd.org/changeset/base/239521 Log: MFC r239100: Fix an instance in pam_krb5(8), where the variable 'user' could be used uninitialized. Found by: clang 3.2 Reviewed by: des Modified: stable/9/lib/libpam/modules/pam_unix/pam_unix.c Directory Properties: stable/9/lib/libpam/ (props changed) Modified: stable/9/lib/libpam/modules/pam_unix/pam_unix.c ============================================================================== --- stable/9/lib/libpam/modules/pam_unix/pam_unix.c Tue Aug 21 19:11:12 2012 (r239520) +++ stable/9/lib/libpam/modules/pam_unix/pam_unix.c Tue Aug 21 19:13:53 2012 (r239521) @@ -96,13 +96,13 @@ pam_sm_authenticate(pam_handle_t *pamh, const char *pass, *user, *realpw, *prompt; if (openpam_get_option(pamh, PAM_OPT_AUTH_AS_SELF)) { - pwd = getpwnam(getlogin()); + user = getlogin(); } else { retval = pam_get_user(pamh, &user, NULL); if (retval != PAM_SUCCESS) return (retval); - pwd = getpwnam(user); } + pwd = getpwnam(user); PAM_LOG("Got user: %s", user); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 19:19:29 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5EA81065670; Tue, 21 Aug 2012 19:19:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 908478FC14; Tue, 21 Aug 2012 19:19:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LJJTCx090333; Tue, 21 Aug 2012 19:19:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LJJTSV090330; Tue, 21 Aug 2012 19:19:29 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211919.q7LJJTSV090330@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 19:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239522 - stable/9/sys/dev/cxgb/ulp/iw_cxgb X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 19:19:29 -0000 Author: dim Date: Tue Aug 21 19:19:29 2012 New Revision: 239522 URL: http://svn.freebsd.org/changeset/base/239522 Log: MFC r239101: In cxgb(4), in function iwch_reregister_phys_mem(), initialize the 'npages' variable to zero, to avoid using it uninitialized in certain cases. Found by: clang 3.2 Reviewed by: np Modified: stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c ============================================================================== --- stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Tue Aug 21 19:13:53 2012 (r239521) +++ stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Tue Aug 21 19:19:29 2012 (r239522) @@ -487,7 +487,7 @@ static int iwch_reregister_phys_mem(stru __be64 *page_list = NULL; int shift = 0; u64 total_size; - int npages; + int npages = 0; int ret; CTR3(KTR_IW_CXGB, "%s ib_mr %p ib_pd %p", __FUNCTION__, mr, pd); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 19:21:46 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE6851065672; Tue, 21 Aug 2012 19:21:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C956C8FC14; Tue, 21 Aug 2012 19:21:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LJLk6Q090681; Tue, 21 Aug 2012 19:21:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LJLk4H090679; Tue, 21 Aug 2012 19:21:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211921.q7LJLk4H090679@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 19:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239523 - stable/9/sys/dev/cxgbe/firmware X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 19:21:47 -0000 Author: dim Date: Tue Aug 21 19:21:46 2012 New Revision: 239523 URL: http://svn.freebsd.org/changeset/base/239523 Log: MFC r239102: In sys/dev/cxgbe/firmware/t4fw_interface.h, change the enum 'fw_hdr_intfver' into an anonymous enum, which avoids a clang 3.2 warning about all the enum values being the same value. Reviewed by: np Modified: stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h ============================================================================== --- stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h Tue Aug 21 19:19:29 2012 (r239522) +++ stable/9/sys/dev/cxgbe/firmware/t4fw_interface.h Tue Aug 21 19:21:46 2012 (r239523) @@ -7413,7 +7413,7 @@ enum fw_hdr_chip { #define G_FW_HDR_FW_VER_BUILD(x) \ (((x) >> S_FW_HDR_FW_VER_BUILD) & M_FW_HDR_FW_VER_BUILD) -enum fw_hdr_intfver { +enum { FW_HDR_INTFVER_NIC = 0x00, FW_HDR_INTFVER_VNIC = 0x00, FW_HDR_INTFVER_OFLD = 0x00, From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 19:24:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5CA61065677; Tue, 21 Aug 2012 19:24:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A001C8FC1E; Tue, 21 Aug 2012 19:24:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LJOdQ7091108; Tue, 21 Aug 2012 19:24:39 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LJOdEd091105; Tue, 21 Aug 2012 19:24:39 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211924.q7LJOdEd091105@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 19:24:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239524 - stable/9/sys/dev/aic7xxx X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 19:24:39 -0000 Author: dim Date: Tue Aug 21 19:24:39 2012 New Revision: 239524 URL: http://svn.freebsd.org/changeset/base/239524 Log: MFC r239104: In sys/dev/aic7xxx/aic79xx_osm.c, function ahd_attach(), initialize the 'path' variable to NULL, to avoid using it uninitialized in certain cases. Found by: clang 3.2 Modified: stable/9/sys/dev/aic7xxx/aic79xx_osm.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/aic7xxx/aic79xx_osm.c ============================================================================== --- stable/9/sys/dev/aic7xxx/aic79xx_osm.c Tue Aug 21 19:21:46 2012 (r239523) +++ stable/9/sys/dev/aic7xxx/aic79xx_osm.c Tue Aug 21 19:24:39 2012 (r239524) @@ -222,6 +222,7 @@ ahd_attach(struct ahd_softc *ahd) count = 0; devq = NULL; sim = NULL; + path = NULL; /* * Create a thread to perform all recovery. From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 19:26:50 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A02B106566B; Tue, 21 Aug 2012 19:26:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 345038FC12; Tue, 21 Aug 2012 19:26:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LJQoH6091437; Tue, 21 Aug 2012 19:26:50 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LJQoeH091435; Tue, 21 Aug 2012 19:26:50 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211926.q7LJQoeH091435@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 19:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239525 - stable/9/sbin/ggate/shared X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 19:26:50 -0000 Author: dim Date: Tue Aug 21 19:26:49 2012 New Revision: 239525 URL: http://svn.freebsd.org/changeset/base/239525 Log: MFC r239106: Make sure the compiler knows g_gate_xvlog() and g_gate_xlog() do not return. This silences a warning from clang 3.2 about uninitialized use of the variable 'mediasize' in sbin/ggate/shared/ggate.c. Reviewed by: pjd Modified: stable/9/sbin/ggate/shared/ggate.h Directory Properties: stable/9/sbin/ (props changed) Modified: stable/9/sbin/ggate/shared/ggate.h ============================================================================== --- stable/9/sbin/ggate/shared/ggate.h Tue Aug 21 19:24:39 2012 (r239524) +++ stable/9/sbin/ggate/shared/ggate.h Tue Aug 21 19:26:49 2012 (r239525) @@ -95,8 +95,8 @@ struct g_gate_hdr { void g_gate_vlog(int priority, const char *message, va_list ap); void g_gate_log(int priority, const char *message, ...); -void g_gate_xvlog(const char *message, va_list ap); -void g_gate_xlog(const char *message, ...); +void g_gate_xvlog(const char *message, va_list ap) __dead2; +void g_gate_xlog(const char *message, ...) __dead2; off_t g_gate_mediasize(int fd); unsigned g_gate_sectorsize(int fd); void g_gate_open_device(void); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 19:32:55 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D17D01065670; Tue, 21 Aug 2012 19:32:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A41598FC22; Tue, 21 Aug 2012 19:32:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LJWt7o092517; Tue, 21 Aug 2012 19:32:55 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LJWtis092516; Tue, 21 Aug 2012 19:32:55 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211932.q7LJWtis092516@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 19:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239526 - in stable/9/sbin: . ggate X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 19:32:56 -0000 Author: dim Date: Tue Aug 21 19:32:55 2012 New Revision: 239526 URL: http://svn.freebsd.org/changeset/base/239526 Log: Move erroneous Subversion merge info for r239106 from sbin to sbin/ggate. Modified: Directory Properties: stable/9/sbin/ (props changed) stable/9/sbin/ggate/ (props changed) From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 19:45:49 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BD9311065688; Tue, 21 Aug 2012 19:45:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D8778FC17; Tue, 21 Aug 2012 19:45:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LJjmkh094424; Tue, 21 Aug 2012 19:45:48 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LJjmr1094417; Tue, 21 Aug 2012 19:45:48 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201208211945.q7LJjmr1094417@svn.freebsd.org> From: Dimitry Andric Date: Tue, 21 Aug 2012 19:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239529 - stable/9/lib/msun/src X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 19:45:49 -0000 Author: dim Date: Tue Aug 21 19:45:48 2012 New Revision: 239529 URL: http://svn.freebsd.org/changeset/base/239529 Log: MFC r239192: Change a few extern inline functions in libm to static inline, since they need to refer to static constants, which C99 does not allow for extern inline functions. While here, change a comment in e_rem_pio2f.c to mention the correct number of bits. Reviewed by: bde MFC r239195: Add __always_inline to __ieee754_rem_pio2() and __ieee754_rem_pio2f(), since some older versions of gcc refuse to inline these otherwise. Requested by: bde Modified: stable/9/lib/msun/src/e_rem_pio2.c stable/9/lib/msun/src/e_rem_pio2f.c stable/9/lib/msun/src/k_cosf.c stable/9/lib/msun/src/k_sinf.c stable/9/lib/msun/src/k_tanf.c stable/9/lib/msun/src/math_private.h Directory Properties: stable/9/lib/msun/ (props changed) Modified: stable/9/lib/msun/src/e_rem_pio2.c ============================================================================== --- stable/9/lib/msun/src/e_rem_pio2.c Tue Aug 21 19:45:19 2012 (r239528) +++ stable/9/lib/msun/src/e_rem_pio2.c Tue Aug 21 19:45:48 2012 (r239529) @@ -48,10 +48,10 @@ pio2_2t = 2.02226624879595063154e-21, / pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */ -#ifndef INLINE_REM_PIO2 -extern +#ifdef INLINE_REM_PIO2 +static __inline __always_inline #endif -__inline int +int __ieee754_rem_pio2(double x, double *y) { double z,w,t,r,fn; Modified: stable/9/lib/msun/src/e_rem_pio2f.c ============================================================================== --- stable/9/lib/msun/src/e_rem_pio2f.c Tue Aug 21 19:45:19 2012 (r239528) +++ stable/9/lib/msun/src/e_rem_pio2f.c Tue Aug 21 19:45:48 2012 (r239529) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); /* * invpio2: 53 bits of 2/pi - * pio2_1: first 33 bit of pi/2 + * pio2_1: first 25 bits of pi/2 * pio2_1t: pi/2 - pio2_1 */ @@ -40,10 +40,10 @@ invpio2 = 6.36619772367581382433e-01, / pio2_1 = 1.57079631090164184570e+00, /* 0x3FF921FB, 0x50000000 */ pio2_1t = 1.58932547735281966916e-08; /* 0x3E5110b4, 0x611A6263 */ -#ifndef INLINE_REM_PIO2F -extern +#ifdef INLINE_REM_PIO2F +static __inline __always_inline #endif -__inline int +int __ieee754_rem_pio2f(float x, double *y) { double w,r,fn; Modified: stable/9/lib/msun/src/k_cosf.c ============================================================================== --- stable/9/lib/msun/src/k_cosf.c Tue Aug 21 19:45:19 2012 (r239528) +++ stable/9/lib/msun/src/k_cosf.c Tue Aug 21 19:45:48 2012 (r239529) @@ -30,10 +30,10 @@ C1 = 0x155553e1053a42.0p-57, /* 0.041 C2 = -0x16c087e80f1e27.0p-62, /* -0.00138867637746099294692 */ C3 = 0x199342e0ee5069.0p-68; /* 0.0000243904487962774090654 */ -#ifndef INLINE_KERNEL_COSDF -extern +#ifdef INLINE_KERNEL_COSDF +static __inline #endif -__inline float +float __kernel_cosdf(double x) { double r, w, z; Modified: stable/9/lib/msun/src/k_sinf.c ============================================================================== --- stable/9/lib/msun/src/k_sinf.c Tue Aug 21 19:45:19 2012 (r239528) +++ stable/9/lib/msun/src/k_sinf.c Tue Aug 21 19:45:48 2012 (r239529) @@ -29,10 +29,10 @@ S2 = 0x111110896efbb2.0p-59, /* 0.0083 S3 = -0x1a00f9e2cae774.0p-65, /* -0.000198393348360966317347 */ S4 = 0x16cd878c3b46a7.0p-71; /* 0.0000027183114939898219064 */ -#ifndef INLINE_KERNEL_SINDF -extern +#ifdef INLINE_KERNEL_SINDF +static __inline #endif -__inline float +float __kernel_sindf(double x) { double r, s, w, z; Modified: stable/9/lib/msun/src/k_tanf.c ============================================================================== --- stable/9/lib/msun/src/k_tanf.c Tue Aug 21 19:45:19 2012 (r239528) +++ stable/9/lib/msun/src/k_tanf.c Tue Aug 21 19:45:48 2012 (r239529) @@ -32,10 +32,10 @@ T[] = { 0x1362b9bf971bcd.0p-59, /* 0.00946564784943673166728 */ }; -#ifndef INLINE_KERNEL_TANDF -extern +#ifdef INLINE_KERNEL_TANDF +static __inline #endif -__inline float +float __kernel_tandf(double x, int iy) { double z,r,w,s,t,u; Modified: stable/9/lib/msun/src/math_private.h ============================================================================== --- stable/9/lib/msun/src/math_private.h Tue Aug 21 19:45:19 2012 (r239528) +++ stable/9/lib/msun/src/math_private.h Tue Aug 21 19:45:48 2012 (r239529) @@ -371,31 +371,26 @@ irint(double x) int __kernel_rem_pio2(double*,double*,int,int,int); /* double precision kernel functions */ -#ifdef INLINE_REM_PIO2 -__inline -#endif +#ifndef INLINE_REM_PIO2 int __ieee754_rem_pio2(double,double*); +#endif double __kernel_sin(double,double,int); double __kernel_cos(double,double); double __kernel_tan(double,double,int); /* float precision kernel functions */ -#ifdef INLINE_REM_PIO2F -__inline -#endif +#ifndef INLINE_REM_PIO2F int __ieee754_rem_pio2f(float,double*); -#ifdef INLINE_KERNEL_SINDF -__inline #endif +#ifndef INLINE_KERNEL_SINDF float __kernel_sindf(double); -#ifdef INLINE_KERNEL_COSDF -__inline #endif +#ifndef INLINE_KERNEL_COSDF float __kernel_cosdf(double); -#ifdef INLINE_KERNEL_TANDF -__inline #endif +#ifndef INLINE_KERNEL_TANDF float __kernel_tandf(double,int); +#endif /* long double precision kernel functions */ long double __kernel_sinl(long double, long double, int); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 21:00:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C01FB106566B; Tue, 21 Aug 2012 21:00:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 901648FC17; Tue, 21 Aug 2012 21:00:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LL0YKN005015; Tue, 21 Aug 2012 21:00:34 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LL0YsY005010; Tue, 21 Aug 2012 21:00:34 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201208212100.q7LL0YsY005010@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 21 Aug 2012 21:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239534 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 21:00:34 -0000 Author: pfg Date: Tue Aug 21 21:00:33 2012 New Revision: 239534 URL: http://svn.freebsd.org/changeset/base/239534 Log: MFC r238509: Use libc's strndup() instead of Dtrace's reimplementation. Corresponds partially to OpenSolaris change: PSARC 2010/299 GNU/Linux/BSD compatibility functions 6901783 strndup would be nice. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.h Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c Tue Aug 21 20:40:12 2012 (r239533) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.c Tue Aug 21 21:00:33 2012 (r239534) @@ -29,23 +29,6 @@ #include #include -#include - -/* - * Create a copy of string s, but only duplicate the first n bytes. - */ -char * -strndup(const char *s, size_t n) -{ - char *s2 = malloc(n + 1); - - if (s2 == NULL) - longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); - - (void) strncpy(s2, s, n); - s2[n] = '\0'; - return (s2); -} /* * Transform string s inline, converting each embedded C escape sequence string Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.h ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.h Tue Aug 21 20:40:12 2012 (r239533) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_string.h Tue Aug 21 21:00:33 2012 (r239534) @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,14 +19,12 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _DT_STRING_H #define _DT_STRING_H -#pragma ident "%Z%%M% %I% %E% SMI" #include #include @@ -36,7 +33,6 @@ extern "C" { #endif -extern char *strndup(const char *, size_t); extern size_t stresc2chr(char *); extern char *strchr2esc(const char *, size_t); extern const char *strbasename(const char *); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 21:06:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 108781065674; Tue, 21 Aug 2012 21:06:08 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC6BF8FC14; Tue, 21 Aug 2012 21:06:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LL67Xh005904; Tue, 21 Aug 2012 21:06:07 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LL67fn005900; Tue, 21 Aug 2012 21:06:07 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201208212106.q7LL67fn005900@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 21 Aug 2012 21:06:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239536 - in stable/9/cddl/contrib/opensolaris: cmd/dtrace/test/tst/common/include cmd/dtrace/test/tst/common/pragma lib/libdtrace/common X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 21:06:08 -0000 Author: pfg Date: Tue Aug 21 21:06:07 2012 New Revision: 239536 URL: http://svn.freebsd.org/changeset/base/239536 Log: MFC r238558: Dtrace: improve handling of library paths. Merge changes from illumos 906 dtrace depends_on pragma should search all library paths, not just the current one 949 dtrace should only include the first instance of a library found on its library path Obtained from: Illumos Added: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/include/ - copied from r238558, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/include/ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.libdepsepdir.ksh - copied unchanged from r238558, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.libdepsepdir.ksh Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.libdepsepdir.ksh (from r238558, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.libdepsepdir.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.libdepsepdir.ksh Tue Aug 21 21:06:07 2012 (r239536, copy of r238558, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.libdepsepdir.ksh) @@ -0,0 +1,76 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2011, Joyent Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Test to catch that we properly look for libraries dependencies in +# our full library parth +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +libdira=${TMPDIR:-/tmp}/libdepa.$$ +libdirb=${TMPDIR:-/tmp}/libdepb.$$ +libdirc=${TMPDIR:-/tmp}/libdepc.$$ +dtrace=$1 + +setup_libs() +{ + mkdir $libdira + mkdir $libdirb + mkdir $libdirc + cat > $libdira/liba.$$.d < $libdirb/libb.$$.d < $libdirb/libc.$$.d < $libdirb/libd.$$.d < $libdirc/libe.$$.d < $libdirc/libf.$$.d <dt_lib_dep); dld != NULL; + dld = dt_list_next(dld)) { + end = strrchr(dld->dtld_library, '/'); + /* dt_lib_depend_add ensures this */ + assert(end != NULL); + if (strcmp(end + 1, dp->d_name) == 0) + break; + } + + if (dld != NULL) { + dt_dprintf("skipping library %s, already processed " + "library with the same name: %s", dp->d_name, + dld->dtld_library); + continue; + } + dtp->dt_filetag = fname; if (dt_lib_depend_add(dtp, &dtp->dt_lib_dep, fname) != 0) - goto err; + return (-1); /* preserve dt_errno */ rv = dt_compile(dtp, DT_CTX_DPROG, DTRACE_PROBESPEC_NAME, NULL, @@ -2203,7 +2221,7 @@ dt_load_libs_dir(dtrace_hdl_t *dtp, cons if (rv != NULL && dtp->dt_errno && (dtp->dt_errno != EDT_COMPILER || dtp->dt_errtag != dt_errtag(D_PRAGMA_DEPEND))) - goto err; + return (-1); /* preserve dt_errno */ if (dtp->dt_errno) dt_dprintf("error parsing library %s: %s\n", @@ -2214,6 +2232,27 @@ dt_load_libs_dir(dtrace_hdl_t *dtp, cons } (void) closedir(dirp); + + return (0); +} + +/* + * Perform a topological sorting of all the libraries found across the entire + * dt_lib_path. Once sorted, compile each one in topological order to cache its + * inlines and translators, etc. We silently ignore any missing directories and + * other files found therein. We only fail (and thereby fail dt_load_libs()) if + * we fail to compile a library and the error is something other than #pragma D + * depends_on. Dependency errors are silently ignored to permit a library + * directory to contain libraries which may not be accessible depending on our + * privileges. + */ +static int +dt_load_libs_sort(dtrace_hdl_t *dtp) +{ + dtrace_prog_t *pgp; + FILE *fp; + dt_lib_depend_t *dld; + /* * Finish building the graph containing the library dependencies * and perform a topological sort to generate an ordered list @@ -2274,7 +2313,14 @@ dt_load_libs(dtrace_hdl_t *dtp) dtp->dt_cflags |= DTRACE_C_NOLIBS; - for (dirp = dt_list_next(&dtp->dt_lib_path); + /* + * /usr/lib/dtrace is always at the head of the list. The rest of the + * list is specified in the precedence order the user requested. Process + * everything other than the head first. DTRACE_C_NOLIBS has already + * been spcified so dt_vopen will ensure that there is always one entry + * in dt_lib_path. + */ + for (dirp = dt_list_next(dt_list_next(&dtp->dt_lib_path)); dirp != NULL; dirp = dt_list_next(dirp)) { if (dt_load_libs_dir(dtp, dirp->dir_path) != 0) { dtp->dt_cflags &= ~DTRACE_C_NOLIBS; @@ -2282,6 +2328,16 @@ dt_load_libs(dtrace_hdl_t *dtp) } } + /* Handle /usr/lib/dtrace */ + dirp = dt_list_next(&dtp->dt_lib_path); + if (dt_load_libs_dir(dtp, dirp->dir_path) != 0) { + dtp->dt_cflags &= ~DTRACE_C_NOLIBS; + return (-1); /* errno is set for us */ + } + + if (dt_load_libs_sort(dtp) < 0) + return (-1); /* errno is set for us */ + return (0); } Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Tue Aug 21 21:01:24 2012 (r239535) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Tue Aug 21 21:06:07 2012 (r239536) @@ -21,7 +21,7 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2011, Joyent Inc. All rights reserved. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -31,9 +31,13 @@ #if defined(sun) #include #endif +#include #include #include +#include +#include + #include #include #include @@ -201,6 +205,29 @@ dt_pragma_binding(const char *prname, dt dtp->dt_globals->dh_defer = &dt_pragma_apply; } +static void +dt_pragma_depends_finddep(dtrace_hdl_t *dtp, const char *lname, char *lib, + size_t len) +{ + dt_dirpath_t *dirp; + struct stat sbuf; + int found = 0; + + for (dirp = dt_list_next(&dtp->dt_lib_path); dirp != NULL; + dirp = dt_list_next(dirp)) { + (void) snprintf(lib, len, "%s/%s", dirp->dir_path, lname); + + if (stat(lib, &sbuf) == 0) { + found = 1; + break; + } + } + + if (!found) + xyerror(D_PRAGMA_DEPEND, + "failed to find dependency in libpath: %s", lname); +} + /* * The #pragma depends_on directive can be used to express a dependency on a * module, provider or library which if not present will cause processing to @@ -230,16 +257,13 @@ dt_pragma_depends(const char *prname, dt if (yypcb->pcb_cflags & DTRACE_C_CTL) { assert(dtp->dt_filetag != NULL); - /* - * We have the file we are working on in dtp->dt_filetag - * so find that node and add the dependency in. - */ + dt_pragma_depends_finddep(dtp, nnp->dn_string, lib, + sizeof (lib)); + dld = dt_lib_depend_lookup(&dtp->dt_lib_dep, dtp->dt_filetag); assert(dld != NULL); - (void) snprintf(lib, sizeof (lib), "%s%s", - dld->dtld_libpath, nnp->dn_string); if ((dt_lib_depend_add(dtp, &dld->dtld_dependencies, lib)) != 0) { xyerror(D_PRAGMA_DEPEND, @@ -261,8 +285,8 @@ dt_pragma_depends(const char *prname, dt dtp->dt_filetag); assert(dld != NULL); - (void) snprintf(lib, sizeof (lib), "%s%s", - dld->dtld_libpath, nnp->dn_string); + dt_pragma_depends_finddep(dtp, nnp->dn_string, lib, + sizeof (lib)); dld = dt_lib_depend_lookup(&dtp->dt_lib_dep_sorted, lib); assert(dld != NULL); From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 21:11:36 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 442DD1065679; Tue, 21 Aug 2012 21:11:36 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CBCD8FC17; Tue, 21 Aug 2012 21:11:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LLBawq007025; Tue, 21 Aug 2012 21:11:36 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LLBZg5007023; Tue, 21 Aug 2012 21:11:35 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201208212111.q7LLBZg5007023@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 21 Aug 2012 21:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239538 - in stable/9/cddl/contrib/opensolaris: cmd/dtrace/test/tst/common/sizeof lib/libdtrace/common X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 21:11:36 -0000 Author: pfg Date: Tue Aug 21 21:11:35 2012 New Revision: 239538 URL: http://svn.freebsd.org/changeset/base/239538 Log: MFC 238457: 1458 D compiler fails to generate error on sizeof() an undefined struct Reference: https://www.illumos.org/issues/1458 Obtained from: Illumos Added: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d - copied unchanged from r238457, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d (from r238457, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d Tue Aug 21 21:11:35 2012 (r239538, copy of r238457, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/err.D_SIZEOF_TYPE.badstruct.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent Inc. All rights reserved. + */ + +BEGIN +{ + trace(sizeof (struct suckitlarry)); + exit(0); +} Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Tue Aug 21 21:06:17 2012 (r239537) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Tue Aug 21 21:11:35 2012 (r239538) @@ -22,7 +22,7 @@ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2011, Joyent Inc. All rights reserved. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -725,12 +725,19 @@ dt_node_type_name(const dt_node_t *dnp, size_t dt_node_type_size(const dt_node_t *dnp) { + ctf_id_t base; + if (dnp->dn_kind == DT_NODE_STRING) return (strlen(dnp->dn_string) + 1); if (dt_node_is_dynamic(dnp) && dnp->dn_ident != NULL) return (dt_ident_size(dnp->dn_ident)); + base = ctf_type_resolve(dnp->dn_ctfp, dnp->dn_type); + + if (ctf_type_kind(dnp->dn_ctfp, base) == CTF_K_FORWARD) + return (0); + return (ctf_type_size(dnp->dn_ctfp, dnp->dn_type)); } From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 21:21:30 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89D43106564A; Tue, 21 Aug 2012 21:21:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 743198FC0C; Tue, 21 Aug 2012 21:21:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LLLUOx008524; Tue, 21 Aug 2012 21:21:30 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LLLUC5008522; Tue, 21 Aug 2012 21:21:30 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201208212121.q7LLLUC5008522@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 21 Aug 2012 21:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239540 - stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 21:21:30 -0000 Author: pfg Date: Tue Aug 21 21:21:29 2012 New Revision: 239540 URL: http://svn.freebsd.org/changeset/base/239540 Log: MFC 237817: Bump dtrace_helper_actions_max from 32 to 128 Dave Pacheco from Joyent (and Dtrace.org) bumped the cap to 1024 but, according to his blog, 128 is the recommended minimum. For now bump it safely to 128 although we may have to bump it further if there is demand in the future. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Aug 21 21:11:59 2012 (r239539) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Aug 21 21:21:29 2012 (r239540) @@ -157,7 +157,7 @@ dtrace_optval_t dtrace_dof_maxsize = (25 size_t dtrace_global_maxsize = (16 * 1024); size_t dtrace_actions_max = (16 * 1024); size_t dtrace_retain_max = 1024; -dtrace_optval_t dtrace_helper_actions_max = 32; +dtrace_optval_t dtrace_helper_actions_max = 128; dtrace_optval_t dtrace_helper_providers_max = 32; dtrace_optval_t dtrace_dstate_defsize = (1 * 1024 * 1024); size_t dtrace_strsize_default = 256; From owner-svn-src-stable-9@FreeBSD.ORG Tue Aug 21 21:46:02 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3093A106566C; Tue, 21 Aug 2012 21:46:02 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B9098FC0C; Tue, 21 Aug 2012 21:46:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7LLk1Ig011909; Tue, 21 Aug 2012 21:46:01 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7LLk1Hp011907; Tue, 21 Aug 2012 21:46:01 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201208212146.q7LLk1Hp011907@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 21 Aug 2012 21:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239542 - stable/9/bin/sh X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 21:46:02 -0000 Author: pfg Date: Tue Aug 21 21:46:01 2012 New Revision: 239542 URL: http://svn.freebsd.org/changeset/base/239542 Log: MFC r238377: Merge libedit adjustment from NetBSD. On recent versions of NetBSD's libedit, el_gets now sets el_len to -1 on error so we can distinguish between a NULL string and an error. This fixes sh from exiting with newer versions of libedit now allowing EINTR to return. Obtained from: NetBSD Reviewed by: jilles MFC after: 3 weeks Modified: stable/9/bin/sh/input.c Directory Properties: stable/9/bin/sh/ (props changed) Modified: stable/9/bin/sh/input.c ============================================================================== --- stable/9/bin/sh/input.c Tue Aug 21 21:21:51 2012 (r239541) +++ stable/9/bin/sh/input.c Tue Aug 21 21:46:01 2012 (r239542) @@ -186,7 +186,7 @@ retry: if (rl_cp == NULL) rl_cp = el_gets(el, &el_len); if (rl_cp == NULL) - nr = 0; + nr = el_len == 0 ? 0 : -1; else { nr = el_len; if (nr > BUFSIZ - 1) From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 00:59:18 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50DDB106566C; Wed, 22 Aug 2012 00:59:18 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B3698FC0C; Wed, 22 Aug 2012 00:59:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7M0xIxO037942; Wed, 22 Aug 2012 00:59:18 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7M0xIXC037940; Wed, 22 Aug 2012 00:59:18 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201208220059.q7M0xIXC037940@svn.freebsd.org> From: Kevin Lo Date: Wed, 22 Aug 2012 00:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239549 - stable/9/lib/libc/stdlib X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 00:59:18 -0000 Author: kevlo Date: Wed Aug 22 00:59:17 2012 New Revision: 239549 URL: http://svn.freebsd.org/changeset/base/239549 Log: MFC r239345: Make 'junk' volatile so that compilers won't be tempted to optimize Reviewed by: ache Modified: stable/9/lib/libc/stdlib/random.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/random.c ============================================================================== --- stable/9/lib/libc/stdlib/random.c Tue Aug 21 23:55:29 2012 (r239548) +++ stable/9/lib/libc/stdlib/random.c Wed Aug 22 00:59:17 2012 (r239549) @@ -315,7 +315,7 @@ srandomdev() if (!done) { struct timeval tv; - unsigned long junk; + volatile unsigned long junk; gettimeofday(&tv, NULL); srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk); From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 05:15:21 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0CFD1065815; Wed, 22 Aug 2012 05:15:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAD848FC14; Wed, 22 Aug 2012 05:15:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7M5FLRm071032; Wed, 22 Aug 2012 05:15:21 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7M5FL0o071023; Wed, 22 Aug 2012 05:15:21 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208220515.q7M5FL0o071023@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 05:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239554 - in stable/9/sys: fs/nfsclient fs/nwfs fs/smbfs nfsclient vm X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 05:15:22 -0000 Author: kib Date: Wed Aug 22 05:15:21 2012 New Revision: 239554 URL: http://svn.freebsd.org/changeset/base/239554 Log: MFC r239040: Reduce code duplication and exposure of direct access to struct vm_page oflags by providing helper function vm_page_readahead_finish(), which handles completed reads for pages with indexes other then the requested one, for VOP_GETPAGES(). MFC r239246: Do not leave invalid pages in the object after the short read for a network file systems (not only NFS proper). Short reads cause pages other then the requested one, which were not filled by read response, to stay invalid. Change the vm_page_readahead_finish() interface to not take the error code, but instead to make a decision to free or to (de)activate the page only by its validity. As result, not requested invalid pages are freed even if the read RPC indicated success. Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c stable/9/sys/fs/nwfs/nwfs_io.c stable/9/sys/fs/smbfs/smbfs_io.c stable/9/sys/nfsclient/nfs_bio.c stable/9/sys/vm/vm_page.c stable/9/sys/vm/vm_page.h stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clbio.c Wed Aug 22 05:14:59 2012 (r239553) +++ stable/9/sys/fs/nfsclient/nfs_clbio.c Wed Aug 22 05:15:21 2012 (r239554) @@ -217,42 +217,18 @@ ncl_getpages(struct vop_getpages_args *a ("nfs_getpages: page %p is dirty", m)); } else { /* - * Read operation was short. If no error occured - * we may have hit a zero-fill section. We simply - * leave valid set to 0. + * Read operation was short. If no error + * occured we may have hit a zero-fill + * section. We leave valid set to 0, and page + * is freed by vm_page_readahead_finish() if + * its index is not equal to requested, or + * page is zeroed and set valid by + * vm_pager_get_pages() for requested page. */ ; } - if (i != ap->a_reqpage) { - /* - * Whether or not to leave the page activated is up in - * the air, but we should put the page on a page queue - * somewhere (it already is in the object). Result: - * It appears that emperical results show that - * deactivating pages is best. - */ - - /* - * Just in case someone was asking for this page we - * now tell them that it is ok to use. - */ - if (!error) { - if (m->oflags & VPO_WANTED) { - vm_page_lock(m); - vm_page_activate(m); - vm_page_unlock(m); - } else { - vm_page_lock(m); - vm_page_deactivate(m); - vm_page_unlock(m); - } - vm_page_wakeup(m); - } else { - vm_page_lock(m); - vm_page_free(m); - vm_page_unlock(m); - } - } + if (i != ap->a_reqpage) + vm_page_readahead_finish(m); } VM_OBJECT_UNLOCK(object); return (0); Modified: stable/9/sys/fs/nwfs/nwfs_io.c ============================================================================== --- stable/9/sys/fs/nwfs/nwfs_io.c Wed Aug 22 05:14:59 2012 (r239553) +++ stable/9/sys/fs/nwfs/nwfs_io.c Wed Aug 22 05:15:21 2012 (r239554) @@ -457,36 +457,8 @@ nwfs_getpages(ap) ("nwfs_getpages: page %p is dirty", m)); } - if (i != ap->a_reqpage) { - /* - * Whether or not to leave the page activated is up in - * the air, but we should put the page on a page queue - * somewhere (it already is in the object). Result: - * It appears that emperical results show that - * deactivating pages is best. - */ - - /* - * Just in case someone was asking for this page we - * now tell them that it is ok to use. - */ - if (!error) { - if (m->oflags & VPO_WANTED) { - vm_page_lock(m); - vm_page_activate(m); - vm_page_unlock(m); - } else { - vm_page_lock(m); - vm_page_deactivate(m); - vm_page_unlock(m); - } - vm_page_wakeup(m); - } else { - vm_page_lock(m); - vm_page_free(m); - vm_page_unlock(m); - } - } + if (i != ap->a_reqpage) + vm_page_readahead_finish(m); } VM_OBJECT_UNLOCK(object); return 0; Modified: stable/9/sys/fs/smbfs/smbfs_io.c ============================================================================== --- stable/9/sys/fs/smbfs/smbfs_io.c Wed Aug 22 05:14:59 2012 (r239553) +++ stable/9/sys/fs/smbfs/smbfs_io.c Wed Aug 22 05:15:21 2012 (r239554) @@ -521,36 +521,8 @@ smbfs_getpages(ap) ; } - if (i != reqpage) { - /* - * Whether or not to leave the page activated is up in - * the air, but we should put the page on a page queue - * somewhere (it already is in the object). Result: - * It appears that emperical results show that - * deactivating pages is best. - */ - - /* - * Just in case someone was asking for this page we - * now tell them that it is ok to use. - */ - if (!error) { - if (m->oflags & VPO_WANTED) { - vm_page_lock(m); - vm_page_activate(m); - vm_page_unlock(m); - } else { - vm_page_lock(m); - vm_page_deactivate(m); - vm_page_unlock(m); - } - vm_page_wakeup(m); - } else { - vm_page_lock(m); - vm_page_free(m); - vm_page_unlock(m); - } - } + if (i != reqpage) + vm_page_readahead_finish(m); } VM_OBJECT_UNLOCK(object); return 0; Modified: stable/9/sys/nfsclient/nfs_bio.c ============================================================================== --- stable/9/sys/nfsclient/nfs_bio.c Wed Aug 22 05:14:59 2012 (r239553) +++ stable/9/sys/nfsclient/nfs_bio.c Wed Aug 22 05:15:21 2012 (r239554) @@ -211,42 +211,18 @@ nfs_getpages(struct vop_getpages_args *a ("nfs_getpages: page %p is dirty", m)); } else { /* - * Read operation was short. If no error occured - * we may have hit a zero-fill section. We simply - * leave valid set to 0. + * Read operation was short. If no error + * occured we may have hit a zero-fill + * section. We leave valid set to 0, and page + * is freed by vm_page_readahead_finish() if + * its index is not equal to requested, or + * page is zeroed and set valid by + * vm_pager_get_pages() for requested page. */ ; } - if (i != ap->a_reqpage) { - /* - * Whether or not to leave the page activated is up in - * the air, but we should put the page on a page queue - * somewhere (it already is in the object). Result: - * It appears that emperical results show that - * deactivating pages is best. - */ - - /* - * Just in case someone was asking for this page we - * now tell them that it is ok to use. - */ - if (!error) { - if (m->oflags & VPO_WANTED) { - vm_page_lock(m); - vm_page_activate(m); - vm_page_unlock(m); - } else { - vm_page_lock(m); - vm_page_deactivate(m); - vm_page_unlock(m); - } - vm_page_wakeup(m); - } else { - vm_page_lock(m); - vm_page_free(m); - vm_page_unlock(m); - } - } + if (i != ap->a_reqpage) + vm_page_readahead_finish(m); } VM_OBJECT_UNLOCK(object); return (0); Modified: stable/9/sys/vm/vm_page.c ============================================================================== --- stable/9/sys/vm/vm_page.c Wed Aug 22 05:14:59 2012 (r239553) +++ stable/9/sys/vm/vm_page.c Wed Aug 22 05:15:21 2012 (r239554) @@ -754,6 +754,45 @@ vm_page_free_zero(vm_page_t m) } /* + * Unbusy and handle the page queueing for a page from the VOP_GETPAGES() + * array which is not the request page. + */ +void +vm_page_readahead_finish(vm_page_t m) +{ + + if (m->valid != 0) { + /* + * Since the page is not the requested page, whether + * it should be activated or deactivated is not + * obvious. Empirical results have shown that + * deactivating the page is usually the best choice, + * unless the page is wanted by another thread. + */ + if (m->oflags & VPO_WANTED) { + vm_page_lock(m); + vm_page_activate(m); + vm_page_unlock(m); + } else { + vm_page_lock(m); + vm_page_deactivate(m); + vm_page_unlock(m); + } + vm_page_wakeup(m); + } else { + /* + * Free the completely invalid page. Such page state + * occurs due to the short read operation which did + * not covered our page at all, or in case when a read + * error happens. + */ + vm_page_lock(m); + vm_page_free(m); + vm_page_unlock(m); + } +} + +/* * vm_page_sleep: * * Sleep and release the page and page queues locks. Modified: stable/9/sys/vm/vm_page.h ============================================================================== --- stable/9/sys/vm/vm_page.h Wed Aug 22 05:14:59 2012 (r239553) +++ stable/9/sys/vm/vm_page.h Wed Aug 22 05:15:21 2012 (r239554) @@ -386,6 +386,7 @@ vm_page_t vm_page_next(vm_page_t m); int vm_page_pa_tryrelock(pmap_t, vm_paddr_t, vm_paddr_t *); vm_page_t vm_page_prev(vm_page_t m); void vm_page_putfake(vm_page_t m); +void vm_page_readahead_finish(vm_page_t m); void vm_page_reference(vm_page_t m); void vm_page_remove (vm_page_t); void vm_page_rename (vm_page_t, vm_object_t, vm_pindex_t); Modified: stable/9/sys/vm/vnode_pager.c ============================================================================== --- stable/9/sys/vm/vnode_pager.c Wed Aug 22 05:14:59 2012 (r239553) +++ stable/9/sys/vm/vnode_pager.c Wed Aug 22 05:15:21 2012 (r239554) @@ -983,37 +983,8 @@ vnode_pager_generic_getpages(vp, m, byte mt)); } - if (i != reqpage) { - - /* - * whether or not to leave the page activated is up in - * the air, but we should put the page on a page queue - * somewhere. (it already is in the object). Result: - * It appears that empirical results show that - * deactivating pages is best. - */ - - /* - * just in case someone was asking for this page we - * now tell them that it is ok to use - */ - if (!error) { - if (mt->oflags & VPO_WANTED) { - vm_page_lock(mt); - vm_page_activate(mt); - vm_page_unlock(mt); - } else { - vm_page_lock(mt); - vm_page_deactivate(mt); - vm_page_unlock(mt); - } - vm_page_wakeup(mt); - } else { - vm_page_lock(mt); - vm_page_free(mt); - vm_page_unlock(mt); - } - } + if (i != reqpage) + vm_page_readahead_finish(mt); } VM_OBJECT_UNLOCK(object); if (error) { From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 05:18:39 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69446106564A; Wed, 22 Aug 2012 05:18:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 534878FC08; Wed, 22 Aug 2012 05:18:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7M5IdWu071496; Wed, 22 Aug 2012 05:18:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7M5IdIL071494; Wed, 22 Aug 2012 05:18:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208220518.q7M5IdIL071494@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 05:18:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239555 - stable/9/sys/kern X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 05:18:39 -0000 Author: kib Date: Wed Aug 22 05:18:38 2012 New Revision: 239555 URL: http://svn.freebsd.org/changeset/base/239555 Log: MFC r239135: Always initialize pl_event. Modified: stable/9/sys/kern/sys_process.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sys_process.c ============================================================================== --- stable/9/sys/kern/sys_process.c Wed Aug 22 05:15:21 2012 (r239554) +++ stable/9/sys/kern/sys_process.c Wed Aug 22 05:18:38 2012 (r239555) @@ -1112,6 +1112,7 @@ kern_ptrace(struct thread *td, int req, #endif pl = addr; pl->pl_lwpid = td2->td_tid; + pl->pl_event = PL_EVENT_NONE; pl->pl_flags = 0; if (td2->td_dbgflags & TDB_XSIG) { pl->pl_event = PL_EVENT_SIGNAL; From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 05:26:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B02661065686; Wed, 22 Aug 2012 05:26:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A62D8FC0A; Wed, 22 Aug 2012 05:26:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7M5Qs9q072624; Wed, 22 Aug 2012 05:26:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7M5QsfP072622; Wed, 22 Aug 2012 05:26:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208220526.q7M5QsfP072622@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 05:26:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239557 - stable/9/sys/dev/md X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 05:26:54 -0000 Author: kib Date: Wed Aug 22 05:26:54 2012 New Revision: 239557 URL: http://svn.freebsd.org/changeset/base/239557 Log: MFC r239038: Remove verbose unused commented out debugging printf. Modified: stable/9/sys/dev/md/md.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/md/md.c ============================================================================== --- stable/9/sys/dev/md/md.c Wed Aug 22 05:23:56 2012 (r239556) +++ stable/9/sys/dev/md/md.c Wed Aug 22 05:26:54 2012 (r239557) @@ -723,12 +723,6 @@ mdstart_swap(struct md_s *sc, struct bio /* Actions on further pages start at offset 0 */ p += PAGE_SIZE - offs; offs = 0; -#if 0 -if (bootverbose || bp->bio_offset / PAGE_SIZE < 17) -printf("wire_count %d busy %d flags %x hold_count %d act_count %d queue %d valid %d dirty %d @ %d\n", - m->wire_count, m->busy, - m->flags, m->hold_count, m->act_count, m->queue, m->valid, m->dirty, i); -#endif } vm_object_pip_subtract(sc->object, 1); VM_OBJECT_UNLOCK(sc->object); From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 05:30:52 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 218EB106564A; Wed, 22 Aug 2012 05:30:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BCB28FC0C; Wed, 22 Aug 2012 05:30:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7M5UpIs073232; Wed, 22 Aug 2012 05:30:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7M5Upk7073229; Wed, 22 Aug 2012 05:30:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208220530.q7M5Upk7073229@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 05:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239559 - stable/9/sbin/fsck_ffs X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 05:30:52 -0000 Author: kib Date: Wed Aug 22 05:30:51 2012 New Revision: 239559 URL: http://svn.freebsd.org/changeset/base/239559 Log: MFC r238984: fsck_ffs shall accept the configured journal size, and not refuse to operate on it if journal size is greater then SUJ_MAX. The later constant is only to select maximal journal size when user did not specified size explicitely. Modified: stable/9/sbin/fsck_ffs/suj.c Directory Properties: stable/9/sbin/fsck_ffs/ (props changed) Modified: stable/9/sbin/fsck_ffs/suj.c ============================================================================== --- stable/9/sbin/fsck_ffs/suj.c Wed Aug 22 05:28:55 2012 (r239558) +++ stable/9/sbin/fsck_ffs/suj.c Wed Aug 22 05:30:51 2012 (r239559) @@ -2383,7 +2383,7 @@ suj_verifyino(union dinode *ip) return (-1); } - if (DIP(ip, di_size) < SUJ_MIN || DIP(ip, di_size) > SUJ_MAX) { + if (DIP(ip, di_size) < SUJ_MIN) { printf("Invalid size %jd for journal inode %d\n", DIP(ip, di_size), sujino); return (-1); From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 05:36:11 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4276E106564A; Wed, 22 Aug 2012 05:36:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CD1E8FC12; Wed, 22 Aug 2012 05:36:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7M5aBcd073965; Wed, 22 Aug 2012 05:36:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7M5aAQM073963; Wed, 22 Aug 2012 05:36:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208220536.q7M5aAQM073963@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 05:36:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239560 - stable/9/sys/amd64/amd64 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 05:36:11 -0000 Author: kib Date: Wed Aug 22 05:36:10 2012 New Revision: 239560 URL: http://svn.freebsd.org/changeset/base/239560 Log: MFC r239125: Do not apply errata 721 workaround when under hypervisor, since typical hypervisor does not implement access to the required MSR, causing #GP on boot. Modified: stable/9/sys/amd64/amd64/initcpu.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/9/sys/amd64/amd64/initcpu.c Wed Aug 22 05:30:51 2012 (r239559) +++ stable/9/sys/amd64/amd64/initcpu.c Wed Aug 22 05:36:10 2012 (r239560) @@ -91,11 +91,17 @@ init_amd(void) * * http://support.amd.com/us/Processor_TechDocs/41322_10h_Rev_Gd.pdf * http://support.amd.com/us/Processor_TechDocs/44739_12h_Rev_Gd.pdf + * + * Hypervisors do not provide access to the errata MSR, + * causing #GP exception on attempt to apply the errata. The + * MSR write shall be done on host and persist globally + * anyway, so do not try to do it when under virtualization. */ switch (CPUID_TO_FAMILY(cpu_id)) { case 0x10: case 0x12: - wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); + if ((cpu_feature2 & CPUID2_HV) == 0) + wrmsr(0xc0011029, rdmsr(0xc0011029) | 1); break; } } From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 17:13:01 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A56D2106566B; Wed, 22 Aug 2012 17:13:01 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8683D8FC0C; Wed, 22 Aug 2012 17:13:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MHD10p065366; Wed, 22 Aug 2012 17:13:01 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MHD1oc065361; Wed, 22 Aug 2012 17:13:01 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201208221713.q7MHD1oc065361@svn.freebsd.org> From: Matthew D Fleming Date: Wed, 22 Aug 2012 17:13:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239565 - in stable/9/sys: kern vm X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 17:13:01 -0000 Author: mdf Date: Wed Aug 22 17:13:00 2012 New Revision: 239565 URL: http://svn.freebsd.org/changeset/base/239565 Log: MFC r238502: Fix a bug with memguard(9) on 32-bit architectures without a VM_KMEM_MAX_SIZE. The code was not taking into account the size of the kernel_map, which the kmem_map is allocated from, so it could produce a sub-map size too large to fit. The simplest solution is to ignore VM_KMEM_MAX entirely and base the memguard map's size off the kernel_map's size, since this is always relevant and always smaller. Found by: Justin Hibbits Modified: stable/9/sys/kern/kern_malloc.c stable/9/sys/vm/memguard.c stable/9/sys/vm/memguard.h stable/9/sys/vm/vm_map.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/kern/kern_malloc.c ============================================================================== --- stable/9/sys/kern/kern_malloc.c Wed Aug 22 13:53:37 2012 (r239564) +++ stable/9/sys/kern/kern_malloc.c Wed Aug 22 17:13:00 2012 (r239565) @@ -707,7 +707,7 @@ kmeminit(void *dummy) vm_kmem_size = 2 * mem_size * PAGE_SIZE; #ifdef DEBUG_MEMGUARD - tmp = memguard_fudge(vm_kmem_size, vm_kmem_size_max); + tmp = memguard_fudge(vm_kmem_size, kernel_map); #else tmp = vm_kmem_size; #endif Modified: stable/9/sys/vm/memguard.c ============================================================================== --- stable/9/sys/vm/memguard.c Wed Aug 22 13:53:37 2012 (r239564) +++ stable/9/sys/vm/memguard.c Wed Aug 22 17:13:00 2012 (r239565) @@ -156,16 +156,18 @@ SYSCTL_ULONG(_vm_memguard, OID_AUTO, fre * the kmem_map. The memguard memory will be a submap. */ unsigned long -memguard_fudge(unsigned long km_size, unsigned long km_max) +memguard_fudge(unsigned long km_size, const struct vm_map *parent_map) { - u_long mem_pgs = cnt.v_page_count; + u_long mem_pgs, parent_size; vm_memguard_divisor = 10; TUNABLE_INT_FETCH("vm.memguard.divisor", &vm_memguard_divisor); + parent_size = vm_map_max(parent_map) - vm_map_min(parent_map) + + PAGE_SIZE; /* Pick a conservative value if provided value sucks. */ if ((vm_memguard_divisor <= 0) || - ((km_size / vm_memguard_divisor) == 0)) + ((parent_size / vm_memguard_divisor) == 0)) vm_memguard_divisor = 10; /* * Limit consumption of physical pages to @@ -174,21 +176,19 @@ memguard_fudge(unsigned long km_size, un * This prevents memguard's page promotions from completely * using up memory, since most malloc(9) calls are sub-page. */ + mem_pgs = cnt.v_page_count; memguard_physlimit = (mem_pgs / vm_memguard_divisor) * PAGE_SIZE; /* * We want as much KVA as we can take safely. Use at most our - * allotted fraction of kmem_max. Limit this to twice the - * physical memory to avoid using too much memory as pagetable - * pages. + * allotted fraction of the parent map's size. Limit this to + * twice the physical memory to avoid using too much memory as + * pagetable pages (size must be multiple of PAGE_SIZE). */ - memguard_mapsize = km_max / vm_memguard_divisor; - /* size must be multiple of PAGE_SIZE */ - memguard_mapsize = round_page(memguard_mapsize); - if (memguard_mapsize == 0 || - memguard_mapsize / (2 * PAGE_SIZE) > mem_pgs) + memguard_mapsize = round_page(parent_size / vm_memguard_divisor); + if (memguard_mapsize / (2 * PAGE_SIZE) > mem_pgs) memguard_mapsize = mem_pgs * 2 * PAGE_SIZE; - if (km_max > 0 && km_size + memguard_mapsize > km_max) - return (km_max); + if (km_size + memguard_mapsize > parent_size) + memguard_mapsize = 0; return (km_size + memguard_mapsize); } Modified: stable/9/sys/vm/memguard.h ============================================================================== --- stable/9/sys/vm/memguard.h Wed Aug 22 13:53:37 2012 (r239564) +++ stable/9/sys/vm/memguard.h Wed Aug 22 17:13:00 2012 (r239565) @@ -35,7 +35,7 @@ struct malloc_type; struct vm_map; #ifdef DEBUG_MEMGUARD -unsigned long memguard_fudge(unsigned long, unsigned long); +unsigned long memguard_fudge(unsigned long, const struct vm_map *); void memguard_init(struct vm_map *); void *memguard_alloc(unsigned long, int); void *memguard_realloc(void *, unsigned long, struct malloc_type *, int); Modified: stable/9/sys/vm/vm_map.h ============================================================================== --- stable/9/sys/vm/vm_map.h Wed Aug 22 13:53:37 2012 (r239564) +++ stable/9/sys/vm/vm_map.h Wed Aug 22 17:13:00 2012 (r239565) @@ -200,13 +200,13 @@ struct vm_map { #ifdef _KERNEL static __inline vm_offset_t -vm_map_max(vm_map_t map) +vm_map_max(const struct vm_map *map) { return (map->max_offset); } static __inline vm_offset_t -vm_map_min(vm_map_t map) +vm_map_min(const struct vm_map *map) { return (map->min_offset); } From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:27:18 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2606B1065670; Wed, 22 Aug 2012 19:27:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 108BB8FC08; Wed, 22 Aug 2012 19:27:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJRHAC083867; Wed, 22 Aug 2012 19:27:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJRHEr083865; Wed, 22 Aug 2012 19:27:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221927.q7MJRHEr083865@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239573 - stable/9/sys/vm X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:27:18 -0000 Author: kib Date: Wed Aug 22 19:27:17 2012 New Revision: 239573 URL: http://svn.freebsd.org/changeset/base/239573 Log: MFC r239247: Adjust the r205536, by allowing a non-zero offset for anonymous mappings for a.out binaries. Apparently, a.out ld.so from FreeBSD 1.1.5.1 can issue such requests. Modified: stable/9/sys/vm/vm_mmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Wed Aug 22 19:25:57 2012 (r239572) +++ stable/9/sys/vm/vm_mmap.c Wed Aug 22 19:27:17 2012 (r239573) @@ -208,11 +208,23 @@ sys_mmap(td, uap) fp = NULL; - /* Make sure mapping fits into numeric range, etc. */ - if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && - curproc->p_osrel >= P_OSREL_MAP_ANON) || - ((flags & MAP_ANON) && (uap->fd != -1 || pos != 0))) - return (EINVAL); + /* + * Enforce the constraints. + * Mapping of length 0 is only allowed for old binaries. + * Anonymous mapping shall specify -1 as filedescriptor and + * zero position for new code. Be nice to ancient a.out + * binaries and correct pos for anonymous mapping, since old + * ld.so sometimes issues anonymous map requests with non-zero + * pos. + */ + if (!SV_CURPROC_FLAG(SV_AOUT)) { + if ((uap->len == 0 && curproc->p_osrel >= P_OSREL_MAP_ANON) || + ((flags & MAP_ANON) != 0 && (uap->fd != -1 || pos != 0))) + return (EINVAL); + } else { + if ((flags & MAP_ANON) != 0) + pos = 0; + } if (flags & MAP_STACK) { if ((uap->fd != -1) || From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:29:23 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 830AC10656D3; Wed, 22 Aug 2012 19:29:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E2788FC1F; Wed, 22 Aug 2012 19:29:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJTNQq084219; Wed, 22 Aug 2012 19:29:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJTNBp084217; Wed, 22 Aug 2012 19:29:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221929.q7MJTNBp084217@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:29:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239575 - stable/9/sys/compat/freebsd32 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:29:23 -0000 Author: kib Date: Wed Aug 22 19:29:22 2012 New Revision: 239575 URL: http://svn.freebsd.org/changeset/base/239575 Log: MFC r239248: Implement the old mmap syscall for compat32, when COMPAT_43 option is enabled. The syscall is used by FreeBSD 1.1.5.1 dynamic linker. Modified: stable/9/sys/compat/freebsd32/syscalls.master Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/9/sys/compat/freebsd32/syscalls.master Wed Aug 22 19:27:42 2012 (r239574) +++ stable/9/sys/compat/freebsd32/syscalls.master Wed Aug 22 19:29:22 2012 (r239575) @@ -168,7 +168,8 @@ 68 AUE_NULL OBSOL vwrite 69 AUE_SBRK NOPROTO { int sbrk(int incr); } 70 AUE_SSTK NOPROTO { int sstk(int incr); } -71 AUE_MMAP OBSOL ommap +71 AUE_MMAP COMPAT|NOPROTO { int mmap(void *addr, int len, \ + int prot, int flags, int fd, int pos); } 72 AUE_O_VADVISE NOPROTO { int ovadvise(int anom); } vadvise \ ovadvise_args int 73 AUE_MUNMAP NOPROTO { int munmap(void *addr, size_t len); } From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:31:28 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE8A81065672; Wed, 22 Aug 2012 19:31:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B88608FC1A; Wed, 22 Aug 2012 19:31:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJVSgD084519; Wed, 22 Aug 2012 19:31:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJVSdA084514; Wed, 22 Aug 2012 19:31:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221931.q7MJVSdA084514@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239576 - stable/9/sys/compat/freebsd32 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:31:28 -0000 Author: kib Date: Wed Aug 22 19:31:28 2012 New Revision: 239576 URL: http://svn.freebsd.org/changeset/base/239576 Log: Regen. Modified: stable/9/sys/compat/freebsd32/freebsd32_proto.h stable/9/sys/compat/freebsd32/freebsd32_syscall.h stable/9/sys/compat/freebsd32/freebsd32_syscalls.c stable/9/sys/compat/freebsd32/freebsd32_sysent.c Modified: stable/9/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_proto.h Wed Aug 22 19:29:22 2012 (r239575) +++ stable/9/sys/compat/freebsd32/freebsd32_proto.h Wed Aug 22 19:31:28 2012 (r239576) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 229723 2012-01-06 19:29:16Z jhb + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239575 2012-08-22 19:29:22Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: stable/9/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscall.h Wed Aug 22 19:29:22 2012 (r239575) +++ stable/9/sys/compat/freebsd32/freebsd32_syscall.h Wed Aug 22 19:31:28 2012 (r239576) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 229723 2012-01-06 19:29:16Z jhb + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239575 2012-08-22 19:29:22Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -77,7 +77,7 @@ /* 68 is obsolete vwrite */ #define FREEBSD32_SYS_sbrk 69 #define FREEBSD32_SYS_sstk 70 - /* 71 is obsolete ommap */ + /* 71 is old mmap */ #define FREEBSD32_SYS_vadvise 72 #define FREEBSD32_SYS_munmap 73 #define FREEBSD32_SYS_freebsd32_mprotect 74 Modified: stable/9/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Wed Aug 22 19:29:22 2012 (r239575) +++ stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Wed Aug 22 19:31:28 2012 (r239576) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 229723 2012-01-06 19:29:16Z jhb + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239575 2012-08-22 19:29:22Z kib */ const char *freebsd32_syscallnames[] = { @@ -81,7 +81,7 @@ const char *freebsd32_syscallnames[] = { "obs_vwrite", /* 68 = obsolete vwrite */ "sbrk", /* 69 = sbrk */ "sstk", /* 70 = sstk */ - "obs_ommap", /* 71 = obsolete ommap */ + "compat.mmap", /* 71 = old mmap */ "vadvise", /* 72 = vadvise */ "munmap", /* 73 = munmap */ "freebsd32_mprotect", /* 74 = freebsd32_mprotect */ Modified: stable/9/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_sysent.c Wed Aug 22 19:29:22 2012 (r239575) +++ stable/9/sys/compat/freebsd32/freebsd32_sysent.c Wed Aug 22 19:31:28 2012 (r239576) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 229723 2012-01-06 19:29:16Z jhb + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239575 2012-08-22 19:29:22Z kib */ #include "opt_compat.h" @@ -118,7 +118,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 68 = obsolete vwrite */ { AS(sbrk_args), (sy_call_t *)sys_sbrk, AUE_SBRK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 69 = sbrk */ { AS(sstk_args), (sy_call_t *)sys_sstk, AUE_SSTK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 70 = sstk */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 71 = obsolete ommap */ + { compat(AS(ommap_args),mmap), AUE_MMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 71 = old mmap */ { AS(ovadvise_args), (sy_call_t *)sys_ovadvise, AUE_O_VADVISE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 72 = vadvise */ { AS(munmap_args), (sy_call_t *)sys_munmap, AUE_MUNMAP, NULL, 0, 0, 0, SY_THR_STATIC }, /* 73 = munmap */ { AS(freebsd32_mprotect_args), (sy_call_t *)freebsd32_mprotect, AUE_MPROTECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 74 = freebsd32_mprotect */ From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:34:02 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4B26106566C; Wed, 22 Aug 2012 19:34:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C01668FC08; Wed, 22 Aug 2012 19:34:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJY2gd084917; Wed, 22 Aug 2012 19:34:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJY21W084915; Wed, 22 Aug 2012 19:34:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221934.q7MJY21W084915@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:34:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239577 - stable/9/sys/vm X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:34:03 -0000 Author: kib Date: Wed Aug 22 19:34:02 2012 New Revision: 239577 URL: http://svn.freebsd.org/changeset/base/239577 Log: MFC r239250: For old mmap syscall, when executing on amd64 or ia64, enforce the PROT_EXEC if prot is non-zero, process is 32bit and kern.elf32.i386_read_exec syscal is enabled. Modified: stable/9/sys/vm/vm_mmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Wed Aug 22 19:31:28 2012 (r239576) +++ stable/9/sys/vm/vm_mmap.c Wed Aug 22 19:34:02 2012 (r239577) @@ -454,6 +454,13 @@ ommap(td, uap) nargs.addr = uap->addr; nargs.len = uap->len; nargs.prot = cvtbsdprot[uap->prot & 0x7]; +#ifdef COMPAT_FREEBSD32 +#if defined(__amd64__) || defined(__ia64__) + if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32) && + nargs.prot != 0) + nargs.prot |= PROT_EXEC; +#endif +#endif nargs.flags = 0; if (uap->flags & OMAP_ANON) nargs.flags |= MAP_ANON; From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:36:47 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDD8C1065675; Wed, 22 Aug 2012 19:36:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FA058FC19; Wed, 22 Aug 2012 19:36:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJalxo085312; Wed, 22 Aug 2012 19:36:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJalJq085309; Wed, 22 Aug 2012 19:36:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221936.q7MJalJq085309@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:36:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239578 - stable/9/sys/amd64/ia32 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:36:47 -0000 Author: kib Date: Wed Aug 22 19:36:47 2012 New Revision: 239578 URL: http://svn.freebsd.org/changeset/base/239578 Log: MFC r239251: Real hardware, as opposed to QEMU, does not allow to have a call gate in long mode which transfers control to 32bit code segment. Unbreak the lcall $7,$0 implementation on amd64 by putting the 64bit user code segment' selector into call gate, and execute the 64bit trampoline which converts the return frame into 32bit format and switches back to 32bit mode for executing int $0x80 trampoline. Modified: stable/9/sys/amd64/ia32/ia32_sigtramp.S stable/9/sys/amd64/ia32/ia32_syscall.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/ia32/ia32_sigtramp.S ============================================================================== --- stable/9/sys/amd64/ia32/ia32_sigtramp.S Wed Aug 22 19:34:02 2012 (r239577) +++ stable/9/sys/amd64/ia32/ia32_sigtramp.S Wed Aug 22 19:36:47 2012 (r239578) @@ -91,8 +91,29 @@ ia32_osigcode: */ ALIGN_TEXT lcall_tramp: + .code64 + /* + * There, we are in 64bit mode and need to return to 32bit. + * First, convert call frame from 64 to 32 bit format. + */ + pushq %rax + movl 16(%rsp),%eax + movl %eax,20(%rsp) /* ret %cs */ + movl 8(%rsp),%eax + movl %eax,16(%rsp) /* ret %rip -> %eip */ + popq %rax + addq $8,%rsp + /* Now return to 32bit */ + pushq $0x33 /* _ucode32sel UPL */ + callq 1f +1: + addq $2f-1b,(%rsp) + lretq +2: + /* Back in 32bit mode */ + .code32 cmpl $SYS_vfork,%eax - je 2f + je 4f pushl %ebp movl %esp,%ebp pushl 0x24(%ebp) /* arg 6 */ @@ -101,19 +122,19 @@ lcall_tramp: pushl 0x18(%ebp) pushl 0x14(%ebp) pushl 0x10(%ebp) /* arg 1 */ - pushl 0xc(%ebp) /* gap */ + pushl 0xc(%ebp) /* gap */ int $0x80 leavel -1: +3: lretl -2: +4: /* * vfork handling is special and relies on the libc stub saving * the return ip in %ecx. If vfork failed, then there is no * child which can corrupt the frame created by call gate. */ int $0x80 - jb 1b + jb 3b addl $8,%esp jmpl *%ecx #endif Modified: stable/9/sys/amd64/ia32/ia32_syscall.c ============================================================================== --- stable/9/sys/amd64/ia32/ia32_syscall.c Wed Aug 22 19:34:02 2012 (r239577) +++ stable/9/sys/amd64/ia32/ia32_syscall.c Wed Aug 22 19:36:47 2012 (r239578) @@ -244,7 +244,7 @@ setup_lcall_gate(void) bzero(ssd, sizeof(*ssd)); ssd->gd_looffset = lcall_addr; ssd->gd_hioffset = lcall_addr >> 16; - ssd->gd_selector = _ucode32sel; + ssd->gd_selector = _ucodesel; ssd->gd_type = SDT_SYSCGT; ssd->gd_dpl = SEL_UPL; ssd->gd_p = 1; From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:41:37 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3831106566C; Wed, 22 Aug 2012 19:41:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 851308FC14; Wed, 22 Aug 2012 19:41:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJfbSS085996; Wed, 22 Aug 2012 19:41:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJfb6m085994; Wed, 22 Aug 2012 19:41:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221941.q7MJfb6m085994@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239579 - stable/9/sys/amd64/amd64 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:41:37 -0000 Author: kib Date: Wed Aug 22 19:41:36 2012 New Revision: 239579 URL: http://svn.freebsd.org/changeset/base/239579 Log: MFC r239252: Add a hackish debugging facility to provide a bit of information about reason for generated trap. The dump of basic signal information and 8 bytes of the faulting instruction are printed on the controlling terminal of the process, if the machdep.uprintf_signal syscal is enabled. Modified: stable/9/sys/amd64/amd64/trap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Wed Aug 22 19:36:47 2012 (r239578) +++ stable/9/sys/amd64/amd64/trap.c Wed Aug 22 19:41:36 2012 (r239579) @@ -176,9 +176,14 @@ static int panic_on_nmi = 1; SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RW, &panic_on_nmi, 0, "Panic on NMI"); TUNABLE_INT("machdep.panic_on_nmi", &panic_on_nmi); -static int prot_fault_translation = 0; +static int prot_fault_translation; SYSCTL_INT(_machdep, OID_AUTO, prot_fault_translation, CTLFLAG_RW, - &prot_fault_translation, 0, "Select signal to deliver on protection fault"); + &prot_fault_translation, 0, + "Select signal to deliver on protection fault"); +static int uprintf_signal; +SYSCTL_INT(_machdep, OID_AUTO, uprintf_signal, CTLFLAG_RW, + &uprintf_signal, 0, + "Print debugging information on trap signal to ctty"); /* * Exception, fault, and trap interface to the FreeBSD kernel. @@ -609,6 +614,19 @@ trap(struct trapframe *frame) ksi.ksi_code = ucode; ksi.ksi_trapno = type; ksi.ksi_addr = (void *)addr; + if (uprintf_signal) { + uprintf("pid %d comm %s: signal %d err %lx code %d type %d " + "addr 0x%lx <%02x %02x %02x %02x %02x %02x %02x %02x>\n", + p->p_pid, p->p_comm, i, frame->tf_err, ucode, type, addr, + fubyte((void *)(frame->tf_rip + 0)), + fubyte((void *)(frame->tf_rip + 1)), + fubyte((void *)(frame->tf_rip + 2)), + fubyte((void *)(frame->tf_rip + 3)), + fubyte((void *)(frame->tf_rip + 4)), + fubyte((void *)(frame->tf_rip + 5)), + fubyte((void *)(frame->tf_rip + 6)), + fubyte((void *)(frame->tf_rip + 7))); + } trapsignal(td, &ksi); user: From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:43:47 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42C8B106566C; Wed, 22 Aug 2012 19:43:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA5C8FC14; Wed, 22 Aug 2012 19:43:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJhlTN086339; Wed, 22 Aug 2012 19:43:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJhkXC086336; Wed, 22 Aug 2012 19:43:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221943.q7MJhkXC086336@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:43:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239580 - stable/9/sys/compat/freebsd32 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:43:47 -0000 Author: kib Date: Wed Aug 22 19:43:46 2012 New Revision: 239580 URL: http://svn.freebsd.org/changeset/base/239580 Log: MFC r239296: Provide 32bit compat for old truncate(2) and ftruncate(2). Modified: stable/9/sys/compat/freebsd32/syscalls.master Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/9/sys/compat/freebsd32/syscalls.master Wed Aug 22 19:41:36 2012 (r239579) +++ stable/9/sys/compat/freebsd32/syscalls.master Wed Aug 22 19:43:46 2012 (r239580) @@ -257,8 +257,9 @@ 126 AUE_SETREUID NOPROTO { int setreuid(int ruid, int euid); } 127 AUE_SETREGID NOPROTO { int setregid(int rgid, int egid); } 128 AUE_RENAME NOPROTO { int rename(char *from, char *to); } -129 AUE_TRUNCATE OBSOL otruncate -130 AUE_FTRUNCATE OBSOL ftruncate +129 AUE_TRUNCATE COMPAT|NOPROTO { int truncate(char *path, \ + int length); } +130 AUE_FTRUNCATE COMPAT|NOPROTO { int ftruncate(int fd, int length); } 131 AUE_FLOCK NOPROTO { int flock(int fd, int how); } 132 AUE_MKFIFO NOPROTO { int mkfifo(char *path, int mode); } 133 AUE_SENDTO NOPROTO { int sendto(int s, caddr_t buf, \ From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:45:19 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 317E4106566C; Wed, 22 Aug 2012 19:45:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11CDC8FC15; Wed, 22 Aug 2012 19:45:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJjIir086637; Wed, 22 Aug 2012 19:45:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJjINK086632; Wed, 22 Aug 2012 19:45:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221945.q7MJjINK086632@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239581 - stable/9/sys/compat/freebsd32 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:45:19 -0000 Author: kib Date: Wed Aug 22 19:45:18 2012 New Revision: 239581 URL: http://svn.freebsd.org/changeset/base/239581 Log: Regen. Modified: stable/9/sys/compat/freebsd32/freebsd32_proto.h stable/9/sys/compat/freebsd32/freebsd32_syscall.h stable/9/sys/compat/freebsd32/freebsd32_syscalls.c stable/9/sys/compat/freebsd32/freebsd32_sysent.c Modified: stable/9/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_proto.h Wed Aug 22 19:43:46 2012 (r239580) +++ stable/9/sys/compat/freebsd32/freebsd32_proto.h Wed Aug 22 19:45:18 2012 (r239581) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239575 2012-08-22 19:29:22Z kib + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239580 2012-08-22 19:43:46Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: stable/9/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscall.h Wed Aug 22 19:43:46 2012 (r239580) +++ stable/9/sys/compat/freebsd32/freebsd32_syscall.h Wed Aug 22 19:45:18 2012 (r239581) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239575 2012-08-22 19:29:22Z kib + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239580 2012-08-22 19:43:46Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -132,8 +132,8 @@ #define FREEBSD32_SYS_setreuid 126 #define FREEBSD32_SYS_setregid 127 #define FREEBSD32_SYS_rename 128 - /* 129 is obsolete otruncate */ - /* 130 is obsolete ftruncate */ + /* 129 is old truncate */ + /* 130 is old ftruncate */ #define FREEBSD32_SYS_flock 131 #define FREEBSD32_SYS_mkfifo 132 #define FREEBSD32_SYS_sendto 133 Modified: stable/9/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Wed Aug 22 19:43:46 2012 (r239580) +++ stable/9/sys/compat/freebsd32/freebsd32_syscalls.c Wed Aug 22 19:45:18 2012 (r239581) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239575 2012-08-22 19:29:22Z kib + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239580 2012-08-22 19:43:46Z kib */ const char *freebsd32_syscallnames[] = { @@ -139,8 +139,8 @@ const char *freebsd32_syscallnames[] = { "setreuid", /* 126 = setreuid */ "setregid", /* 127 = setregid */ "rename", /* 128 = rename */ - "obs_otruncate", /* 129 = obsolete otruncate */ - "obs_ftruncate", /* 130 = obsolete ftruncate */ + "compat.truncate", /* 129 = old truncate */ + "compat.ftruncate", /* 130 = old ftruncate */ "flock", /* 131 = flock */ "mkfifo", /* 132 = mkfifo */ "sendto", /* 133 = sendto */ Modified: stable/9/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/9/sys/compat/freebsd32/freebsd32_sysent.c Wed Aug 22 19:43:46 2012 (r239580) +++ stable/9/sys/compat/freebsd32/freebsd32_sysent.c Wed Aug 22 19:45:18 2012 (r239581) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239575 2012-08-22 19:29:22Z kib + * created from FreeBSD: stable/9/sys/compat/freebsd32/syscalls.master 239580 2012-08-22 19:43:46Z kib */ #include "opt_compat.h" @@ -176,8 +176,8 @@ struct sysent freebsd32_sysent[] = { { AS(setreuid_args), (sy_call_t *)sys_setreuid, AUE_SETREUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 126 = setreuid */ { AS(setregid_args), (sy_call_t *)sys_setregid, AUE_SETREGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 127 = setregid */ { AS(rename_args), (sy_call_t *)sys_rename, AUE_RENAME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 128 = rename */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 129 = obsolete otruncate */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 130 = obsolete ftruncate */ + { compat(AS(otruncate_args),truncate), AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 129 = old truncate */ + { compat(AS(oftruncate_args),ftruncate), AUE_FTRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 130 = old ftruncate */ { AS(flock_args), (sy_call_t *)sys_flock, AUE_FLOCK, NULL, 0, 0, 0, SY_THR_STATIC }, /* 131 = flock */ { AS(mkfifo_args), (sy_call_t *)sys_mkfifo, AUE_MKFIFO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 132 = mkfifo */ { AS(sendto_args), (sy_call_t *)sys_sendto, AUE_SENDTO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 133 = sendto */ From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:53:34 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22C371065670; Wed, 22 Aug 2012 19:53:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C6018FC19; Wed, 22 Aug 2012 19:53:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJrX3S087843; Wed, 22 Aug 2012 19:53:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJrXRG087835; Wed, 22 Aug 2012 19:53:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221953.q7MJrXRG087835@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:53:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239582 - in stable/9/sys: kern nlm sys X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:53:34 -0000 Author: kib Date: Wed Aug 22 19:53:33 2012 New Revision: 239582 URL: http://svn.freebsd.org/changeset/base/239582 Log: MFC r239301: Add a sysctl kern.pid_max, which limits the maximum pid the system is allowed to allocate, and corresponding tunable with the same name. Note that existing processes with higher pids are left intact. MFC r239328: Fix grammar. MFC r239329: As a safety measure, disable lowering pid_max too much. Modified: stable/9/sys/kern/init_main.c stable/9/sys/kern/kern_fork.c stable/9/sys/kern/kern_mib.c stable/9/sys/kern/kern_thread.c stable/9/sys/kern/subr_param.c stable/9/sys/nlm/nlm_advlock.c stable/9/sys/sys/proc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/init_main.c ============================================================================== --- stable/9/sys/kern/init_main.c Wed Aug 22 19:45:18 2012 (r239581) +++ stable/9/sys/kern/init_main.c Wed Aug 22 19:53:33 2012 (r239582) @@ -476,6 +476,7 @@ proc0_init(void *dummy __unused) knlist_init_mtx(&p->p_klist, &p->p_mtx); STAILQ_INIT(&p->p_ktr); p->p_nice = NZERO; + /* pid_max cannot be greater than PID_MAX */ td->td_tid = PID_MAX + 1; LIST_INSERT_HEAD(TIDHASH(td->td_tid), td, td_hash); td->td_state = TDS_RUNNING; Modified: stable/9/sys/kern/kern_fork.c ============================================================================== --- stable/9/sys/kern/kern_fork.c Wed Aug 22 19:45:18 2012 (r239581) +++ stable/9/sys/kern/kern_fork.c Wed Aug 22 19:53:33 2012 (r239582) @@ -209,8 +209,8 @@ sysctl_kern_randompid(SYSCTL_HANDLER_ARG pid = randompid; error = sysctl_handle_int(oidp, &pid, 0, req); if (error == 0 && req->newptr != NULL) { - if (pid < 0 || pid > PID_MAX - 100) /* out of range */ - pid = PID_MAX - 100; + if (pid < 0 || pid > pid_max - 100) /* out of range */ + pid = pid_max - 100; else if (pid < 2) /* NOP */ pid = 0; else if (pid < 100) /* Make it reasonable */ @@ -259,8 +259,8 @@ retry: * restart somewhat above 0, as the low-numbered procs * tend to include daemons that don't exit. */ - if (trypid >= PID_MAX) { - trypid = trypid % PID_MAX; + if (trypid >= pid_max) { + trypid = trypid % pid_max; if (trypid < 100) trypid += 100; pidchecked = 0; Modified: stable/9/sys/kern/kern_mib.c ============================================================================== --- stable/9/sys/kern/kern_mib.c Wed Aug 22 19:45:18 2012 (r239581) +++ stable/9/sys/kern/kern_mib.c Wed Aug 22 19:53:33 2012 (r239582) @@ -499,6 +499,34 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, vnod SYSCTL_INT(_debug_sizeof, OID_AUTO, proc, CTLFLAG_RD, 0, sizeof(struct proc), "sizeof(struct proc)"); +static int +sysctl_kern_pid_max(SYSCTL_HANDLER_ARGS) +{ + int error, pm; + + pm = pid_max; + error = sysctl_handle_int(oidp, &pm, 0, req); + if (error || !req->newptr) + return (error); + sx_xlock(&proctree_lock); + sx_xlock(&allproc_lock); + + /* + * Only permit the values less then PID_MAX. + * As a safety measure, do not allow to limit the pid_max too much. + */ + if (pm < 300 || pm > PID_MAX) + error = EINVAL; + else + pid_max = pm; + sx_xunlock(&allproc_lock); + sx_xunlock(&proctree_lock); + return (error); +} +SYSCTL_PROC(_kern, OID_AUTO, pid_max, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_TUN | + CTLFLAG_MPSAFE, 0, 0, sysctl_kern_pid_max, "I", + "Maximum allowed pid"); + #include #include SYSCTL_INT(_debug_sizeof, OID_AUTO, bio, CTLFLAG_RD, Modified: stable/9/sys/kern/kern_thread.c ============================================================================== --- stable/9/sys/kern/kern_thread.c Wed Aug 22 19:45:18 2012 (r239581) +++ stable/9/sys/kern/kern_thread.c Wed Aug 22 19:53:33 2012 (r239582) @@ -266,7 +266,11 @@ threadinit(void) { mtx_init(&tid_lock, "TID lock", NULL, MTX_DEF); - /* leave one number for thread0 */ + + /* + * pid_max cannot be greater than PID_MAX. + * leave one number for thread0. + */ tid_unrhdr = new_unrhdr(PID_MAX + 2, INT_MAX, &tid_lock); thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), Modified: stable/9/sys/kern/subr_param.c ============================================================================== --- stable/9/sys/kern/subr_param.c Wed Aug 22 19:45:18 2012 (r239581) +++ stable/9/sys/kern/subr_param.c Wed Aug 22 19:53:33 2012 (r239582) @@ -41,12 +41,13 @@ __FBSDID("$FreeBSD$"); #include "opt_msgbuf.h" #include "opt_maxusers.h" -#include #include #include #include -#include +#include #include +#include +#include #include #include @@ -92,6 +93,7 @@ int ncallout; /* maximum # of timer ev int nbuf; int ngroups_max; /* max # groups per process */ int nswbuf; +pid_t pid_max = PID_MAX; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ long maxpipekva; /* Limit on pipe KVA */ @@ -250,6 +252,16 @@ init_param1(void) TUNABLE_INT_FETCH("kern.ngroups", &ngroups_max); if (ngroups_max < NGROUPS_MAX) ngroups_max = NGROUPS_MAX; + + /* + * Only allow to lower the maximal pid. + * Prevent setting up a non-bootable system if pid_max is too low. + */ + TUNABLE_INT_FETCH("kern.pid_max", &pid_max); + if (pid_max > PID_MAX) + pid_max = PID_MAX; + else if (pid_max < 300) + pid_max = 300; } /* Modified: stable/9/sys/nlm/nlm_advlock.c ============================================================================== --- stable/9/sys/nlm/nlm_advlock.c Wed Aug 22 19:45:18 2012 (r239581) +++ stable/9/sys/nlm/nlm_advlock.c Wed Aug 22 19:53:33 2012 (r239582) @@ -98,6 +98,7 @@ nlm_client_init(void *dummy) int i; mtx_init(&nlm_svid_lock, "NLM svid lock", NULL, MTX_DEF); + /* pid_max cannot be greater than PID_MAX */ nlm_svid_allocator = new_unrhdr(PID_MAX + 2, INT_MAX, &nlm_svid_lock); for (i = 0; i < NLM_SVID_HASH_SIZE; i++) LIST_INIT(&nlm_file_svids[i]); Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Wed Aug 22 19:45:18 2012 (r239581) +++ stable/9/sys/sys/proc.h Wed Aug 22 19:53:33 2012 (r239582) @@ -693,11 +693,12 @@ MALLOC_DECLARE(M_SUBPROC); #define FIRST_THREAD_IN_PROC(p) TAILQ_FIRST(&(p)->p_threads) /* - * We use process IDs <= PID_MAX; PID_MAX + 1 must also fit in a pid_t, - * as it is used to represent "no process group". + * We use process IDs <= pid_max <= PID_MAX; PID_MAX + 1 must also fit + * in a pid_t, as it is used to represent "no process group". */ #define PID_MAX 99999 #define NO_PID 100000 +extern pid_t pid_max; #define SESS_LEADER(p) ((p)->p_session->s_leader == (p)) From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 19:56:41 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB4EB1065672; Wed, 22 Aug 2012 19:56:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB9E28FC15; Wed, 22 Aug 2012 19:56:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MJufW9088291; Wed, 22 Aug 2012 19:56:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MJuf63088288; Wed, 22 Aug 2012 19:56:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208221956.q7MJuf63088288@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 22 Aug 2012 19:56:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239583 - stable/9/share/man/man4 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 19:56:41 -0000 Author: kib Date: Wed Aug 22 19:56:41 2012 New Revision: 239583 URL: http://svn.freebsd.org/changeset/base/239583 Log: MFC r239302: Add a short man page describing how to run a.out binaries on the current kernels. MFC r239305 (by joel): Minor mdoc fixes and language tweaks. MFC r239306: Small tweaks. Added: stable/9/share/man/man4/aout.4 - copied, changed from r239302, head/share/man/man4/aout.4 Modified: stable/9/share/man/man4/Makefile Directory Properties: stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Wed Aug 22 19:53:33 2012 (r239582) +++ stable/9/share/man/man4/Makefile Wed Aug 22 19:56:41 2012 (r239583) @@ -40,6 +40,7 @@ MAN= aac.4 \ ${_bxe.4} \ amr.4 \ an.4 \ + ${_aout.4} \ ${_apic.4} \ arcmsr.4 \ ${_asmc.4} \ @@ -699,6 +700,7 @@ _acpi_sony.4= acpi_sony.4 _acpi_toshiba.4=acpi_toshiba.4 _acpi_wmi.4= acpi_wmi.4 _aesni.4= aesni.4 +_aout.4= aout.4 _apic.4= apic.4 _atrtc.4= atrtc.4 _attimer.4= attimer.4 Copied and modified: stable/9/share/man/man4/aout.4 (from r239302, head/share/man/man4/aout.4) ============================================================================== --- head/share/man/man4/aout.4 Wed Aug 15 16:01:45 2012 (r239302, copy source) +++ stable/9/share/man/man4/aout.4 Wed Aug 22 19:56:41 2012 (r239583) @@ -35,16 +35,15 @@ kldload a.out .Sh DESCRIPTION The .Xr a.out 5 -executable format was used by -.Fx -of versions \*(Lt 3.0. -Since only i386 architecture was supported at that time, the +executable format was used before the release of +.Fx 3.0 . +Since i386 was the only supported architecture at that time, .Xr a.out 5 -executables can only be activated on the platforms that support -execution of i386 code, which are i386, amd64 and (partially) ia64. +executables can only be activated on platforms that support +execution of i386 code, such as i386, amd64 and (partially) ia64. .Pp To add kernel support for old syscalls and old syscall invocation methods, -you need to place the following options in the kernel configuration file: +place the following options in the kernel configuration file: .Bd -ragged -offset indent .Cd "options COMPAT_43" .br @@ -57,14 +56,16 @@ option is only required on 64-bit CPU ar .Pp The .Va aout.ko -module must be loaded to get support for +module needs to be loaded with the +.Xr kldload 8 +utility in order to support the .Xr a.out 5 -image activator. -Use the command +image activator: .Bd -ragged -offset indent .Ic kldload aout .Ed -or put the following line in +.Pp +Alternatively, to load the module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent aout_load="YES" @@ -72,10 +73,10 @@ aout_load="YES" .Pp The .Xr a.out 5 -format was mainstream quite long time ago. -The reasonable default settings and security requirements of the -modern OS contradict to the default environment of that time and -require adjustments of the system to mimic natural environment for +format was mainstream quite a long time ago. +Reasonable default settings and security requirements of +modern operating systems today contradict the default environment of that time +and require adjustments of the system to mimic natural environment for old binaries. .Pp The following @@ -84,24 +85,24 @@ tunables are useful for this: .Bl -tag -offset indent -width "XXXXXXXXXXXXXXXXXXXXXXXXX" .It Xo Va security.bsd.map_at_zero .Xc -Set to 1 to allow the mapping of process pages at the address 0. +Set to 1 to allow mapping of process pages at address 0. Some very old .Va ZMAGIC -executable images require the text mapping at the address 0. +executable images require text mapping at address 0. .It Xo Va kern.pid_max .Xc Old versions of .Fx -used 16-bit types for +used signed 16-bit type for .Vt pid_t . Current kernels use 32-bit type for .Vt pid_t , -and allow the process id's up to 99999. +and allow process id's up to 99999. Such values cannot be represented by old .Vt pid_t , -mostly causing issues for the processes using +mostly causing issues for processes using .Xr wait 2 -syscalls, for instance, shells. +syscalls, for example shells. Set the sysctl to 30000 to work around the problem. .It Xo Va kern.elf32.read_exec .Xc @@ -109,7 +110,7 @@ Set to 1 to force any accessible memory process to allow execution, see .Xr mmap 2 . Old i386 CPUs did not have a bit in PTE which disallowed execution -from the page, so many old programs did not specified +from the page, so many old programs did not specify .Va PROT_EXEC even for mapping of executable code. The sysctl forces @@ -123,8 +124,6 @@ non-executable mappings. .Xr a.out 5 , .Xr elf 5 , .Xr sysctl 8 . -.Sh BUGS -On 64bit architectures, not all wrappers for older syscalls are implemented. .Sh HISTORY The .Xr a.out 5 @@ -132,7 +131,7 @@ executable format was used on ancient .At and served as the main executable format for .Fx -from inception up to +from the beginning up to .Fx 2.2.9 . In .Fx 3.0 @@ -143,3 +142,5 @@ The .Nm manual page was written by .An Konstantin Belousov Aq kib@FreeBSD.org . +.Sh BUGS +On 64bit architectures, not all wrappers for older syscalls are implemented. From owner-svn-src-stable-9@FreeBSD.ORG Wed Aug 22 20:07:00 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61CCE10658D3; Wed, 22 Aug 2012 20:07:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4332E8FC0A; Wed, 22 Aug 2012 20:07:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7MK70pS090049; Wed, 22 Aug 2012 20:07:00 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7MK70v6090038; Wed, 22 Aug 2012 20:07:00 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201208222007.q7MK70v6090038@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 22 Aug 2012 20:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239589 - stable/9/lib/libedit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Aug 2012 20:07:00 -0000 Author: pfg Date: Wed Aug 22 20:06:59 2012 New Revision: 239589 URL: http://svn.freebsd.org/changeset/base/239589 Log: MFC r238178, 238624, 238810: Re-merge a couple of changes from NetBSD libedit. bin/sh has been taught about el_gets setting the count to -1 on error, so now we can partially revert r238173 to reduce differences with NetBSD's implementation. Also fix some warnings to be more in sync with NetBSD. Obtained from: NetBSD Modified: stable/9/lib/libedit/chared.c stable/9/lib/libedit/chared.h stable/9/lib/libedit/editline.3 stable/9/lib/libedit/el.h stable/9/lib/libedit/makelist stable/9/lib/libedit/read.c stable/9/lib/libedit/sig.c stable/9/lib/libedit/sig.h stable/9/lib/libedit/tokenizer.c Directory Properties: stable/9/lib/libedit/ (props changed) Modified: stable/9/lib/libedit/chared.c ============================================================================== --- stable/9/lib/libedit/chared.c Wed Aug 22 20:05:34 2012 (r239588) +++ stable/9/lib/libedit/chared.c Wed Aug 22 20:06:59 2012 (r239589) @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $NetBSD: chared.c,v 1.25 2005/08/08 01:41:30 christos Exp $ + * $NetBSD: chared.c,v 1.27 2009/02/15 21:55:23 christos Exp $ */ #if !defined(lint) && !defined(SCCSID) @@ -59,12 +59,12 @@ cv_undo(EditLine *el) { c_undo_t *vu = &el->el_chared.c_undo; c_redo_t *r = &el->el_chared.c_redo; - unsigned int size; + size_t size; /* Save entire line for undo */ size = el->el_line.lastchar - el->el_line.buffer; vu->len = size; - vu->cursor = el->el_line.cursor - el->el_line.buffer; + vu->cursor = (int)(el->el_line.cursor - el->el_line.buffer); memcpy(vu->buf, el->el_line.buffer, size); /* save command info for redo */ @@ -83,7 +83,7 @@ cv_yank(EditLine *el, const char *ptr, i { c_kill_t *k = &el->el_chared.c_kill; - memcpy(k->buf, ptr, size +0u); + memcpy(k->buf, ptr, (size_t)size); k->last = k->buf + size; } @@ -97,7 +97,7 @@ c_insert(EditLine *el, int num) char *cp; if (el->el_line.lastchar + num >= el->el_line.limit) { - if (!ch_enlargebufs(el, num +0u)) + if (!ch_enlargebufs(el, (size_t)num)) return; /* can't go past end of buffer */ } @@ -118,7 +118,7 @@ c_delafter(EditLine *el, int num) { if (el->el_line.cursor + num > el->el_line.lastchar) - num = el->el_line.lastchar - el->el_line.cursor; + num = (int)(el->el_line.lastchar - el->el_line.cursor); if (el->el_map.current != el->el_map.emacs) { cv_undo(el); @@ -159,7 +159,7 @@ c_delbefore(EditLine *el, int num) { if (el->el_line.cursor - num < el->el_line.buffer) - num = el->el_line.cursor - el->el_line.buffer; + num = (int)(el->el_line.cursor - el->el_line.buffer); if (el->el_map.current != el->el_map.emacs) { cv_undo(el); @@ -375,7 +375,7 @@ cv_delfini(EditLine *el) /* sanity */ return; - size = el->el_line.cursor - el->el_chared.c_vcmd.pos; + size = (int)(el->el_line.cursor - el->el_chared.c_vcmd.pos); if (size == 0) size = 1; el->el_line.cursor = el->el_chared.c_vcmd.pos; @@ -529,8 +529,7 @@ ch_reset(EditLine *el, int mclear) } private void -ch__clearmacro(el) - EditLine *el; +ch__clearmacro(EditLine *el) { c_macro_t *ma = &el->el_chared.c_macro; while (ma->level >= 0) @@ -542,9 +541,7 @@ ch__clearmacro(el) * Returns 1 if successful, 0 if not. */ protected int -ch_enlargebufs(el, addlen) - EditLine *el; - size_t addlen; +ch_enlargebufs(EditLine *el, size_t addlen) { size_t sz, newsz; char *newbuffer, *oldbuf, *oldkbuf; @@ -695,12 +692,12 @@ protected int c_gets(EditLine *el, char *buf, const char *prompt) { char ch; - int len; + ssize_t len; char *cp = el->el_line.buffer; if (prompt) { len = strlen(prompt); - memcpy(cp, prompt, len + 0u); + memcpy(cp, prompt, (size_t)len); cp += len; } len = 0; @@ -721,7 +718,7 @@ c_gets(EditLine *el, char *buf, const ch case '\010': /* Delete and backspace */ case '\177': - if (len <= 0) { + if (len == 0) { len = -1; break; } @@ -749,7 +746,7 @@ c_gets(EditLine *el, char *buf, const ch el->el_line.buffer[0] = '\0'; el->el_line.lastchar = el->el_line.buffer; el->el_line.cursor = el->el_line.buffer; - return len; + return (int)len; } @@ -771,6 +768,6 @@ c_hpos(EditLine *el) ptr >= el->el_line.buffer && *ptr != '\n'; ptr--) continue; - return (el->el_line.cursor - ptr - 1); + return (int)(el->el_line.cursor - ptr - 1); } } Modified: stable/9/lib/libedit/chared.h ============================================================================== --- stable/9/lib/libedit/chared.h Wed Aug 22 20:05:34 2012 (r239588) +++ stable/9/lib/libedit/chared.h Wed Aug 22 20:06:59 2012 (r239589) @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * @(#)chared.h 8.1 (Berkeley) 6/4/93 - * $NetBSD: chared.h,v 1.17 2006/03/06 21:11:56 christos Exp $ + * $NetBSD: chared.h,v 1.18 2009/02/15 21:55:23 christos Exp $ * $FreeBSD$ */ @@ -70,7 +70,7 @@ typedef struct c_macro_t { * Undo information for vi - no undo in emacs (yet) */ typedef struct c_undo_t { - int len; /* length of saved line */ + ssize_t len; /* length of saved line */ int cursor; /* position of saved cursor */ char *buf; /* full saved text */ } c_undo_t; Modified: stable/9/lib/libedit/editline.3 ============================================================================== --- stable/9/lib/libedit/editline.3 Wed Aug 22 20:05:34 2012 (r239588) +++ stable/9/lib/libedit/editline.3 Wed Aug 22 20:06:59 2012 (r239589) @@ -162,6 +162,11 @@ is modified to contain the number of cha Returns the line read if successful, or .Dv NULL if no characters were read or if an error occurred. +If an error occurred, +.Fa count +is set to \-1 and +.Dv errno +contains the error code that caused it. The return value may not remain valid across calls to .Fn el_gets and must be copied if the data is to be retained. Modified: stable/9/lib/libedit/el.h ============================================================================== --- stable/9/lib/libedit/el.h Wed Aug 22 20:05:34 2012 (r239588) +++ stable/9/lib/libedit/el.h Wed Aug 22 20:06:59 2012 (r239589) @@ -115,6 +115,7 @@ struct editline { FILE *el_errfile; /* Stdio stuff */ int el_infd; /* Input file descriptor */ int el_flags; /* Various flags. */ + int el_errno; /* Local copy of errno */ coord_t el_cursor; /* Cursor location */ char **el_display; /* Real screen image = what is there */ char **el_vdisplay; /* Virtual screen image = what we see */ Modified: stable/9/lib/libedit/makelist ============================================================================== --- stable/9/lib/libedit/makelist Wed Aug 22 20:05:34 2012 (r239588) +++ stable/9/lib/libedit/makelist Wed Aug 22 20:06:59 2012 (r239589) @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: makelist,v 1.10 2005/08/08 14:04:49 christos Exp $ +# $NetBSD: makelist,v 1.11 2005/10/22 16:45:03 christos Exp $ # $FreeBSD$ # # Copyright (c) 1992, 1993 @@ -141,7 +141,7 @@ case $FLAG in # -fh) cat $FILES | $AWK '/el_action_t/ { print $3 }' | \ - sort | LC_ALL=C tr 'a-z' 'A-Z' | $AWK ' + sort | LC_ALL=C tr '[:lower:]' '[:upper:]' | $AWK ' BEGIN { printf("/* Automatically generated file, do not edit */\n"); printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n"); Modified: stable/9/lib/libedit/read.c ============================================================================== --- stable/9/lib/libedit/read.c Wed Aug 22 20:05:34 2012 (r239588) +++ stable/9/lib/libedit/read.c Wed Aug 22 20:06:59 2012 (r239589) @@ -235,9 +235,12 @@ read_getcmd(EditLine *el, el_action_t *c el_action_t cmd; int num; + el->el_errno = 0; do { - if ((num = el_getc(el, ch)) != 1) /* if EOF or error */ + if ((num = el_getc(el, ch)) != 1) { /* if EOF or error */ + el->el_errno = num == 0 ? 0 : errno; return (num); + } #ifdef KANJI if ((*ch & 0200)) { @@ -289,14 +292,21 @@ read_char(EditLine *el, char *cp) ssize_t num_read; int tried = 0; - while ((num_read = read(el->el_infd, cp, 1)) == -1) + again: + el->el_signal->sig_no = 0; + while ((num_read = read(el->el_infd, cp, 1)) == -1) { + if (el->el_signal->sig_no == SIGCONT) { + sig_set(el); + el_set(el, EL_REFRESH); + goto again; + } if (!tried && read__fixio(el->el_infd, errno) == 0) tried = 1; else { *cp = '\0'; return (-1); } - + } return (int)num_read; } @@ -403,10 +413,13 @@ el_gets(EditLine *el, int *nread) int num; /* how many chars we have read at NL */ char ch; int crlf = 0; + int nrb; #ifdef FIONREAD c_macro_t *ma = &el->el_chared.c_macro; #endif /* FIONREAD */ + if (nread == NULL) + nread = &nrb; *nread = 0; if (el->el_flags & NO_TTY) { @@ -427,12 +440,13 @@ el_gets(EditLine *el, int *nread) if (cp[-1] == '\r' || cp[-1] == '\n') break; } + if (num == -1) + el->el_errno = errno; el->el_line.cursor = el->el_line.lastchar = cp; *cp = '\0'; - if (nread) - *nread = (int)(el->el_line.cursor - el->el_line.buffer); - return (*nread ? el->el_line.buffer : NULL); + *nread = (int)(el->el_line.cursor - el->el_line.buffer); + goto done; } @@ -443,8 +457,8 @@ el_gets(EditLine *el, int *nread) (void) ioctl(el->el_infd, FIONREAD, (ioctl_t) & chrs); if (chrs == 0) { if (tty_rawmode(el) < 0) { - if (nread) - *nread = 0; + errno = 0; + *nread = 0; return (NULL); } } @@ -457,6 +471,7 @@ el_gets(EditLine *el, int *nread) if (el->el_flags & EDIT_DISABLED) { char *cp; size_t idx; + if ((el->el_flags & UNBUFFERED) == 0) cp = el->el_line.buffer; else @@ -480,11 +495,13 @@ el_gets(EditLine *el, int *nread) break; } + if (num == -1) { + el->el_errno = errno; + } + el->el_line.cursor = el->el_line.lastchar = cp; *cp = '\0'; - if (nread) - *nread = (int)(el->el_line.cursor - el->el_line.buffer); - return (*nread ? el->el_line.buffer : NULL); + goto done; } for (num = OKCMD; num == OKCMD;) { /* while still editing this @@ -617,12 +634,17 @@ el_gets(EditLine *el, int *nread) /* make sure the tty is set up correctly */ if ((el->el_flags & UNBUFFERED) == 0) { read_finish(el); - if (nread) - *nread = num; + *nread = num != -1 ? num : 0; } else { - if (nread) - *nread = - (int)(el->el_line.lastchar - el->el_line.buffer); + *nread = (int)(el->el_line.lastchar - el->el_line.buffer); } - return (num ? el->el_line.buffer : NULL); +done: + if (*nread == 0) { + if (num == -1) { + *nread = -1; + errno = el->el_errno; + } + return NULL; + } else + return el->el_line.buffer; } Modified: stable/9/lib/libedit/sig.c ============================================================================== --- stable/9/lib/libedit/sig.c Wed Aug 22 20:05:34 2012 (r239588) +++ stable/9/lib/libedit/sig.c Wed Aug 22 20:06:59 2012 (r239589) @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $NetBSD: sig.c,v 1.14 2009/02/18 15:04:40 christos Exp $ + * $NetBSD: sig.c,v 1.15 2009/02/19 15:20:22 christos Exp $ */ #if !defined(lint) && !defined(SCCSID) @@ -73,6 +73,8 @@ sig_handler(int signo) (void) sigaddset(&nset, signo); (void) sigprocmask(SIG_BLOCK, &nset, &oset); + sel->el_signal->sig_no = signo; + switch (signo) { case SIGCONT: tty_rawmode(sel); @@ -158,12 +160,12 @@ sig_set(EditLine *el) struct sigaction osa, nsa; nsa.sa_handler = sig_handler; + nsa.sa_flags = 0; sigemptyset(&nsa.sa_mask); (void) sigprocmask(SIG_BLOCK, &el->el_signal->sig_set, &oset); for (i = 0; sighdl[i] != -1; i++) { - nsa.sa_flags = SIGINT ? 0 : SA_RESTART; /* This could happen if we get interrupted */ if (sigaction(sighdl[i], &nsa, &osa) != -1 && osa.sa_handler != sig_handler) Modified: stable/9/lib/libedit/sig.h ============================================================================== --- stable/9/lib/libedit/sig.h Wed Aug 22 20:05:34 2012 (r239588) +++ stable/9/lib/libedit/sig.h Wed Aug 22 20:06:59 2012 (r239589) @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * @(#)sig.h 8.1 (Berkeley) 6/4/93 - * $NetBSD: sig.h,v 1.7 2009/02/15 21:25:01 christos Exp $ + * $NetBSD: sig.h,v 1.8 2009/02/19 15:20:22 christos Exp $ * $FreeBSD$ */ @@ -61,6 +61,7 @@ typedef struct { struct sigaction sig_action[ALLSIGSNO]; sigset_t sig_set; + volatile sig_atomic_t sig_no; } *el_signal_t; protected void sig_end(EditLine*); Modified: stable/9/lib/libedit/tokenizer.c ============================================================================== --- stable/9/lib/libedit/tokenizer.c Wed Aug 22 20:05:34 2012 (r239588) +++ stable/9/lib/libedit/tokenizer.c Wed Aug 22 20:06:59 2012 (r239589) @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $NetBSD: tokenizer.c,v 1.14 2003/12/05 13:37:48 lukem Exp $ + * $NetBSD: tokenizer.c,v 1.15 2009/02/15 21:55:23 christos Exp $ */ #if !defined(lint) && !defined(SCCSID) @@ -198,7 +198,7 @@ tok_line(Tokenizer *tok, const LineInfo ptr = ""; if (ptr == line->cursor) { cc = tok->argc; - co = tok->wptr - tok->wstart; + co = (int)(tok->wptr - tok->wstart); } switch (*ptr) { case '\'': @@ -417,7 +417,7 @@ tok_line(Tokenizer *tok, const LineInfo tok_line_outok: if (cc == -1 && co == -1) { cc = tok->argc; - co = tok->wptr - tok->wstart; + co = (int)(tok->wptr - tok->wstart); } if (cursorc != NULL) *cursorc = cc; From owner-svn-src-stable-9@FreeBSD.ORG Thu Aug 23 00:39:08 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5AB4106564A; Thu, 23 Aug 2012 00:39:08 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF4608FC15; Thu, 23 Aug 2012 00:39:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7N0d8Te025769; Thu, 23 Aug 2012 00:39:08 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7N0d8tO025767; Thu, 23 Aug 2012 00:39:08 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201208230039.q7N0d8tO025767@svn.freebsd.org> From: Xin LI Date: Thu, 23 Aug 2012 00:39:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239600 - in stable: 8/etc 9/etc X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2012 00:39:09 -0000 Author: delphij Date: Thu Aug 23 00:39:08 2012 New Revision: 239600 URL: http://svn.freebsd.org/changeset/base/239600 Log: MFC r239464: As of r232844 we no longer need the maxpoll 9 workaround. Modified: stable/9/etc/ntp.conf Directory Properties: stable/9/etc/ (props changed) Changes in other areas also in this revision: Modified: stable/8/etc/ntp.conf Directory Properties: stable/8/etc/ (props changed) Modified: stable/9/etc/ntp.conf ============================================================================== --- stable/9/etc/ntp.conf Wed Aug 22 23:44:12 2012 (r239599) +++ stable/9/etc/ntp.conf Thu Aug 23 00:39:08 2012 (r239600) @@ -18,12 +18,11 @@ # to the pool. See http://www.pool.ntp.org/join.html if you are interested. # # The option `iburst' is used for faster initial synchronisation. -# The option `maxpoll 9' is used to prevent PLL/FLL flipping on FreeBSD. # -server 0.freebsd.pool.ntp.org iburst maxpoll 9 -server 1.freebsd.pool.ntp.org iburst maxpoll 9 -server 2.freebsd.pool.ntp.org iburst maxpoll 9 -#server 3.freebsd.pool.ntp.org iburst maxpoll 9 +server 0.freebsd.pool.ntp.org iburst +server 1.freebsd.pool.ntp.org iburst +server 2.freebsd.pool.ntp.org iburst +#server 3.freebsd.pool.ntp.org iburst # # If you want to pick yourself which country's public NTP server @@ -31,9 +30,9 @@ server 2.freebsd.pool.ntp.org iburst max # the next ones and replace CC with the country's abbreviation. # Make sure that the hostnames resolve to a proper IP address! # -# server 0.CC.pool.ntp.org iburst maxpoll 9 -# server 1.CC.pool.ntp.org iburst maxpoll 9 -# server 2.CC.pool.ntp.org iburst maxpoll 9 +# server 0.CC.pool.ntp.org iburst +# server 1.CC.pool.ntp.org iburst +# server 2.CC.pool.ntp.org iburst # # Security: Only accept NTP traffic from the following hosts. From owner-svn-src-stable-9@FreeBSD.ORG Thu Aug 23 17:09:53 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3688106566C; Thu, 23 Aug 2012 17:09:52 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C66F48FC08; Thu, 23 Aug 2012 17:09:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7NH9q9V063453; Thu, 23 Aug 2012 17:09:52 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7NH9qi5063451; Thu, 23 Aug 2012 17:09:52 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201208231709.q7NH9qi5063451@svn.freebsd.org> From: Bernhard Schmidt Date: Thu, 23 Aug 2012 17:09:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239615 - stable/9/sys/net80211 X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2012 17:09:53 -0000 Author: bschmidt Date: Thu Aug 23 17:09:52 2012 New Revision: 239615 URL: http://svn.freebsd.org/changeset/base/239615 Log: MFC r231187: Update the 802.11s IE numbers to represent the latest 802.11 amendment standard. This update breaks compatibility with older mesh setups but is necessary as the previous IDs are used by another amendment leading to unexpected results when trying to associate with an accesspoint using the affected IDs. Discussed with: re Tested by: honestqiao at gmail dot com Modified: stable/9/sys/net80211/ieee80211.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/net80211/ieee80211.h ============================================================================== --- stable/9/sys/net80211/ieee80211.h Thu Aug 23 17:08:07 2012 (r239614) +++ stable/9/sys/net80211/ieee80211.h Thu Aug 23 17:09:52 2012 (r239615) @@ -709,27 +709,32 @@ enum { IEEE80211_ELEMID_VENDOR = 221, /* vendor private */ /* - * 802.11s IEs based on D3.03 spec and were not assigned by - * ANA. Beware changing them because some of them are being - * kept compatible with Linux. + * 802.11s IEs + * NB: On vanilla Linux still IEEE80211_ELEMID_MESHPEER = 55, + * but they defined a new with id 117 called PEER_MGMT. + * NB: complies with open80211 */ - IEEE80211_ELEMID_MESHCONF = 51, - IEEE80211_ELEMID_MESHID = 52, - IEEE80211_ELEMID_MESHLINK = 35, - IEEE80211_ELEMID_MESHCNGST = 36, - IEEE80211_ELEMID_MESHPEER = 55, - IEEE80211_ELEMID_MESHCSA = 38, - IEEE80211_ELEMID_MESHTIM = 39, - IEEE80211_ELEMID_MESHAWAKEW = 40, - IEEE80211_ELEMID_MESHBEACONT = 41, - IEEE80211_ELEMID_MESHPANN = 48, - IEEE80211_ELEMID_MESHRANN = 49, - IEEE80211_ELEMID_MESHPREQ = 68, - IEEE80211_ELEMID_MESHPREP = 69, - IEEE80211_ELEMID_MESHPERR = 70, - IEEE80211_ELEMID_MESHPXU = 53, - IEEE80211_ELEMID_MESHPXUC = 54, - IEEE80211_ELEMID_MESHAH = 60, /* Abbreviated Handshake */ + IEEE80211_ELEMID_MESHCONF = 113, + IEEE80211_ELEMID_MESHID = 114, + IEEE80211_ELEMID_MESHLINK = 115, + IEEE80211_ELEMID_MESHCNGST = 116, + IEEE80211_ELEMID_MESHPEER = 117, + IEEE80211_ELEMID_MESHCSA = 118, + IEEE80211_ELEMID_MESHTIM = 39, /* XXX: remove */ + IEEE80211_ELEMID_MESHAWAKEW = 119, + IEEE80211_ELEMID_MESHBEACONT = 120, + /* 121-124 MMCAOP not implemented yet */ + IEEE80211_ELEMID_MESHPANN = 125, /* XXX: is GANN now, not used */ + IEEE80211_ELEMID_MESHRANN = 126, + /* 127 Extended Capabilities */ + /* 128-129 reserved */ + IEEE80211_ELEMID_MESHPREQ = 130, + IEEE80211_ELEMID_MESHPREP = 131, + IEEE80211_ELEMID_MESHPERR = 132, + /* 133-136 reserved */ + IEEE80211_ELEMID_MESHPXU = 137, + IEEE80211_ELEMID_MESHPXUC = 138, + IEEE80211_ELEMID_MESHAH = 60, /* XXX: remove */ }; struct ieee80211_tim_ie { From owner-svn-src-stable-9@FreeBSD.ORG Fri Aug 24 09:58:15 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95E80106566C; Fri, 24 Aug 2012 09:58:15 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 66DC98FC08; Fri, 24 Aug 2012 09:58:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7O9wFSt010503; Fri, 24 Aug 2012 09:58:15 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7O9wF82010501; Fri, 24 Aug 2012 09:58:15 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201208240958.q7O9wF82010501@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 24 Aug 2012 09:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239645 - stable/9/sys/vm X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2012 09:58:15 -0000 Author: des Date: Fri Aug 24 09:58:14 2012 New Revision: 239645 URL: http://svn.freebsd.org/changeset/base/239645 Log: MFH (r239327): warn when too much swap is configured, and avoid flooding the console when running out of space for metadata. Modified: stable/9/sys/vm/swap_pager.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/swap_pager.c ============================================================================== --- stable/9/sys/vm/swap_pager.c Fri Aug 24 09:28:22 2012 (r239644) +++ stable/9/sys/vm/swap_pager.c Fri Aug 24 09:58:14 2012 (r239645) @@ -1804,6 +1804,7 @@ restart: static void swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk) { + static volatile int exhausted; struct swblock *swap; struct swblock **pswap; int idx; @@ -1847,7 +1848,9 @@ retry: mtx_unlock(&swhash_mtx); VM_OBJECT_UNLOCK(object); if (uma_zone_exhausted(swap_zone)) { - printf("swap zone exhausted, increase kern.maxswzone\n"); + if (atomic_cmpset_rel_int(&exhausted, 0, 1)) + printf("swap zone exhausted, " + "increase kern.maxswzone\n"); vm_pageout_oom(VM_OOM_SWAPZ); pause("swzonex", 10); } else @@ -1856,6 +1859,9 @@ retry: goto retry; } + if (atomic_cmpset_rel_int(&exhausted, 1, 0)) + printf("swap zone ok\n"); + swap->swb_hnext = NULL; swap->swb_object = object; swap->swb_index = pindex & ~(vm_pindex_t)SWAP_META_MASK; @@ -2112,6 +2118,31 @@ done: return (error); } +/* + * Check that the total amount of swap currently configured does not + * exceed half the theoretical maximum. If it does, print a warning + * message and return -1; otherwise, return 0. + */ +static int +swapon_check_swzone(unsigned long npages) +{ + unsigned long maxpages; + + /* absolute maximum we can handle assuming 100% efficiency */ + maxpages = uma_zone_get_max(swap_zone) * SWAP_META_PAGES; + + /* recommend using no more than half that amount */ + if (npages > maxpages / 2) { + printf("warning: total configured swap (%lu pages) " + "exceeds maximum recommended amount (%lu pages).\n", + npages, maxpages); + printf("warning: increase kern.maxswzone " + "or reduce amount of swap.\n"); + return (-1); + } + return (0); +} + static void swaponsomething(struct vnode *vp, void *id, u_long nblks, sw_strategy_t *strategy, sw_close_t *close, dev_t dev) { @@ -2175,6 +2206,7 @@ swaponsomething(struct vnode *vp, void * nswapdev++; swap_pager_avail += nblks; swap_total += (vm_ooffset_t)nblks * PAGE_SIZE; + swapon_check_swzone(swap_total / PAGE_SIZE); swp_sizecheck(); mtx_unlock(&sw_dev_mtx); } From owner-svn-src-stable-9@FreeBSD.ORG Fri Aug 24 10:09:35 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3266B106566B; Fri, 24 Aug 2012 10:09:35 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3BC8FC12; Fri, 24 Aug 2012 10:09:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7OA9YCc017318; Fri, 24 Aug 2012 10:09:34 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7OA9YO1017316; Fri, 24 Aug 2012 10:09:34 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201208241009.q7OA9YO1017316@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 24 Aug 2012 10:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239646 - stable/9/usr.bin/unzip X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2012 10:09:35 -0000 Author: des Date: Fri Aug 24 10:09:34 2012 New Revision: 239646 URL: http://svn.freebsd.org/changeset/base/239646 Log: MFH (r236226): pass filename to libarchive rather than descriptor Modified: stable/9/usr.bin/unzip/unzip.c Directory Properties: stable/9/usr.bin/unzip/ (props changed) Modified: stable/9/usr.bin/unzip/unzip.c ============================================================================== --- stable/9/usr.bin/unzip/unzip.c Fri Aug 24 09:58:14 2012 (r239645) +++ stable/9/usr.bin/unzip/unzip.c Fri Aug 24 10:09:34 2012 (r239646) @@ -865,19 +865,14 @@ unzip(const char *fn) { struct archive *a; struct archive_entry *e; - int fd, ret; + int ret; uintmax_t total_size, file_count, error_count; - if (strcmp(fn, "-") == 0) - fd = STDIN_FILENO; - else if ((fd = open(fn, O_RDONLY)) < 0) - error("%s", fn); - if ((a = archive_read_new()) == NULL) error("archive_read_new failed"); ac(archive_read_support_format_zip(a)); - ac(archive_read_open_fd(a, fd, 8192)); + ac(archive_read_open_filename(a, fn, 8192)); if (!zipinfo_mode) { if (!p_opt && !q_opt) @@ -933,9 +928,6 @@ unzip(const char *fn) ac(archive_read_close(a)); (void)archive_read_finish(a); - if (fd != STDIN_FILENO && close(fd) != 0) - error("%s", fn); - if (t_opt) { if (error_count > 0) { errorx("%d checksum error(s) found.", error_count); @@ -1061,6 +1053,9 @@ main(int argc, char *argv[]) usage(); zipfile = argv[nopts++]; + if (strcmp(zipfile, "-") == 0) + zipfile = NULL; /* STDIN */ + while (nopts < argc && *argv[nopts] != '-') add_pattern(&include, argv[nopts++]); From owner-svn-src-stable-9@FreeBSD.ORG Fri Aug 24 11:44:48 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 333EF106567E; Fri, 24 Aug 2012 11:44:48 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E8D38FC16; Fri, 24 Aug 2012 11:44:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7OBilev030577; Fri, 24 Aug 2012 11:44:47 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7OBiln3030575; Fri, 24 Aug 2012 11:44:47 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201208241144.q7OBiln3030575@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 24 Aug 2012 11:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239647 - stable/9/etc/rc.d X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2012 11:44:48 -0000 Author: des Date: Fri Aug 24 11:44:47 2012 New Revision: 239647 URL: http://svn.freebsd.org/changeset/base/239647 Log: MFH (r238102, r238605): automatically name jails. Modified: stable/9/etc/rc.d/jail Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/jail ============================================================================== --- stable/9/etc/rc.d/jail Fri Aug 24 10:09:34 2012 (r239646) +++ stable/9/etc/rc.d/jail Fri Aug 24 11:44:47 2012 (r239647) @@ -641,7 +641,7 @@ jail_start() i=$((i + 1)) done - eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \ + eval ${_setfib} jail -n ${_jail} ${_flags} -i ${_rootdir} ${_hostname} \ \"${_addrl}\" ${_exec_start} > ${_tmp_jail} 2>&1 \ Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CB65106566B; Fri, 24 Aug 2012 13:11:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB4AC8FC16; Fri, 24 Aug 2012 13:11:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7ODBU4W041938; Fri, 24 Aug 2012 13:11:30 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7ODBUnE041936; Fri, 24 Aug 2012 13:11:30 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201208241311.q7ODBUnE041936@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 24 Aug 2012 13:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239648 - stable/9/sbin/shutdown X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2012 13:11:31 -0000 Author: des Date: Fri Aug 24 13:11:30 2012 New Revision: 239648 URL: http://svn.freebsd.org/changeset/base/239648 Log: MFH (r238968): restore a piece of BSD history Modified: stable/9/sbin/shutdown/shutdown.c Directory Properties: stable/9/sbin/shutdown/ (props changed) Modified: stable/9/sbin/shutdown/shutdown.c ============================================================================== --- stable/9/sbin/shutdown/shutdown.c Fri Aug 24 11:44:47 2012 (r239647) +++ stable/9/sbin/shutdown/shutdown.c Fri Aug 24 13:11:30 2012 (r239648) @@ -93,7 +93,7 @@ static char mbuf[BUFSIZ]; static const char *nosync, *whom; static void badtime(void); -static void perform_shutdown(void); +static void die_you_gravy_sucking_pig_dog(void); static void finish(int); static void getoffset(char *); static void loop(void); @@ -282,7 +282,7 @@ loop(void) if (!tp->timeleft) break; } - perform_shutdown(); + die_you_gravy_sucking_pig_dog(); } static jmp_buf alarmbuf; @@ -349,7 +349,7 @@ timeout(int signo __unused) } static void -perform_shutdown(void) +die_you_gravy_sucking_pig_dog(void) { char *empty_environ[] = { NULL }; From owner-svn-src-stable-9@FreeBSD.ORG Fri Aug 24 14:11:54 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2AB2106566C; Fri, 24 Aug 2012 14:11:54 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BBD88FC12; Fri, 24 Aug 2012 14:11:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7OEBsPh049955; Fri, 24 Aug 2012 14:11:54 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7OEBs4M049952; Fri, 24 Aug 2012 14:11:54 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201208241411.q7OEBs4M049952@svn.freebsd.org> From: Bernhard Schmidt Date: Fri, 24 Aug 2012 14:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239650 - stable/9/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2012 14:11:54 -0000 Author: bschmidt Date: Fri Aug 24 14:11:54 2012 New Revision: 239650 URL: http://svn.freebsd.org/changeset/base/239650 Log: MFC r239649: Document update of 802.11s IE identifiers. Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Aug 24 13:55:22 2012 (r239649) +++ stable/9/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Aug 24 14:11:54 2012 (r239650) @@ -871,6 +871,14 @@ wpi0: wpi_rx_intr: bus_dmamap_load faile export9 hook has been added for NetFlow v9 data. Note that data export can be done simultaneously in both version 5 and version 9. + + The IEEE 802.11s element identifiers have + been updated to reflect the final version of the amendment. This + update breaks compatibility with older mesh setups but is necessary + as the previous IDs are used by another amendment leading to + unexpected results when trying to associate with an accesspoint + using the affected IDs. + From owner-svn-src-stable-9@FreeBSD.ORG Fri Aug 24 20:41:32 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0ADC1065670; Fri, 24 Aug 2012 20:41:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A39A8FC17; Fri, 24 Aug 2012 20:41:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7OKfWP7001722; Fri, 24 Aug 2012 20:41:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7OKfWnU001719; Fri, 24 Aug 2012 20:41:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201208242041.q7OKfWnU001719@svn.freebsd.org> From: John Baldwin Date: Fri, 24 Aug 2012 20:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239662 - in stable/9/sys: amd64/conf i386/conf X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2012 20:41:32 -0000 Author: jhb Date: Fri Aug 24 20:41:31 2012 New Revision: 239662 URL: http://svn.freebsd.org/changeset/base/239662 Log: MFC 233872: Add descriptions after the 'device' line for several NICs to match the existing style. Modified: stable/9/sys/amd64/conf/NOTES stable/9/sys/i386/conf/NOTES Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/amd64/conf/NOTES ============================================================================== --- stable/9/sys/amd64/conf/NOTES Fri Aug 24 17:48:55 2012 (r239661) +++ stable/9/sys/amd64/conf/NOTES Fri Aug 24 20:41:31 2012 (r239662) @@ -298,18 +298,18 @@ options DRM_DEBUG # Include debug print # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module -device ed +device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards options ED_3C503 options ED_HPP options ED_SIC -device ipw -device iwi -device iwn -device mwl -device nfe -device nve +device ipw # Intel 2100 wireless NICs. +device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwn # Intel 4965/1000/5000/6000 wireless NICs. +device mwl # Marvell 88W8363 802.11n wireless NICs. +device nfe # nVidia nForce MCP on-board Ethernet +device nve # nVidia nForce MCP on-board Ethernet Networking device sfxge -device wpi +device wpi # Intel 3945ABG wireless NICs. # IEEE 802.11 adapter firmware modules Modified: stable/9/sys/i386/conf/NOTES ============================================================================== --- stable/9/sys/i386/conf/NOTES Fri Aug 24 17:48:55 2012 (r239661) +++ stable/9/sys/i386/conf/NOTES Fri Aug 24 20:41:31 2012 (r239662) @@ -574,7 +574,7 @@ hint.mse.0.irq="5" device ce device cp -device cs +device cs # Crystal Semiconductor CS89x0 NIC hint.cs.0.at="isa" hint.cs.0.port="0x300" device ctau @@ -583,7 +583,7 @@ hint.ctau.0.port="0x240" hint.ctau.0.irq="15" hint.ctau.0.drq="7" #options NETGRAPH_CRONYX # Enable NETGRAPH support for Cronyx adapter(s) -device ed +device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards options ED_3C503 options ED_HPP options ED_SIC @@ -591,21 +591,22 @@ hint.ed.0.at="isa" hint.ed.0.port="0x280" hint.ed.0.irq="5" hint.ed.0.maddr="0xd8000" -device ie # Hints only required for Starlan +device ie # EtherExpress 8/16, 3C507, StarLAN 10 etc. +# Hints only required for Starlan hint.ie.2.at="isa" hint.ie.2.port="0x300" hint.ie.2.irq="5" hint.ie.2.maddr="0xd0000" -device ipw -device iwi -device iwn +device ipw # Intel 2100 wireless NICs. +device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. +device iwn # Intel 4965/1000/5000/6000 wireless NICs. # Hint for the i386-only ISA front-end of le(4). hint.le.0.at="isa" hint.le.0.port="0x280" hint.le.0.irq="10" hint.le.0.drq="0" -device mwl -device nfe # nVidia nForce MCP on-board Ethernet Networking +device mwl # Marvell 88W8363 802.11n wireless NICs. +device nfe # nVidia nForce MCP on-board Ethernet device nve # nVidia nForce MCP on-board Ethernet Networking device sbni hint.sbni.0.at="isa" @@ -617,7 +618,7 @@ hint.wl.0.at="isa" hint.wl.0.port="0x300" options WLCACHE # enables the signal-strength cache options WLDEBUG # enables verbose debugging output -device wpi +device wpi # Intel 3945ABG wireless NICs. # IEEE 802.11 adapter firmware modules