From owner-svn-src-stable-9@FreeBSD.ORG Sun Nov 20 17:05:26 2011 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 586D1106564A; Sun, 20 Nov 2011 17:05:26 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 467A08FC0C; Sun, 20 Nov 2011 17:05:26 +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 pAKH5QxF001614; Sun, 20 Nov 2011 17:05:26 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAKH5QqO001611; Sun, 20 Nov 2011 17:05:26 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201111201705.pAKH5QqO001611@svn.freebsd.org> From: Christian Brueffer Date: Sun, 20 Nov 2011 17:05:26 +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: r227761 - in stable/9/release/doc: en_US.ISO8859-1/hardware share/misc 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: Sun, 20 Nov 2011 17:05:26 -0000 Author: brueffer Date: Sun Nov 20 17:05:25 2011 New Revision: 227761 URL: http://svn.freebsd.org/changeset/base/227761 Log: MFC: r227275 Add qlxgb(4) to the hardware notes. Approved by: re (kib) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml stable/9/release/doc/share/misc/dev.archlist.txt Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Sun Nov 20 16:46:50 2011 (r227760) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Sun Nov 20 17:05:25 2011 (r227761) @@ -948,6 +948,8 @@ &hwlist.pcn; + &hwlist.qlxgb; + &hwlist.re; &hwlist.rl; Modified: stable/9/release/doc/share/misc/dev.archlist.txt ============================================================================== --- stable/9/release/doc/share/misc/dev.archlist.txt Sun Nov 20 16:46:50 2011 (r227760) +++ stable/9/release/doc/share/misc/dev.archlist.txt Sun Nov 20 17:05:25 2011 (r227761) @@ -100,6 +100,7 @@ ohci i386,pc98,ia64,amd64,powerpc oltr i386 pcn i386,pc98,ia64,amd64 pst i386 +qlxgb amd64 rc i386 ral i386,amd64 rue i386,pc98,amd64 From owner-svn-src-stable-9@FreeBSD.ORG Sun Nov 20 17:08:33 2011 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 096771065672; Sun, 20 Nov 2011 17:08:33 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC2148FC14; Sun, 20 Nov 2011 17:08: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 pAKH8Wpb001810; Sun, 20 Nov 2011 17:08:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAKH8WYn001808; Sun, 20 Nov 2011 17:08:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201111201708.pAKH8WYn001808@svn.freebsd.org> From: Christian Brueffer Date: Sun, 20 Nov 2011 17:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227763 - stable/9/release/doc/en_US.ISO8859-1/hardware 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: Sun, 20 Nov 2011 17:08:33 -0000 Author: brueffer Date: Sun Nov 20 17:08:32 2011 New Revision: 227763 URL: http://svn.freebsd.org/changeset/base/227763 Log: MFC: r227466, r227480, r227516 Add mps(4) and mvs(4) to the hardware notes. Approved by: re (kib) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Sun Nov 20 17:06:20 2011 (r227762) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Sun Nov 20 17:08:32 2011 (r227763) @@ -798,8 +798,12 @@ &hwlist.mly; + &hwlist.mps; + &hwlist.mpt; + &hwlist.mvs; + &hwlist.ncr; &hwlist.ncv; From owner-svn-src-stable-9@FreeBSD.ORG Sun Nov 20 17:11:12 2011 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 239AF1065670; Sun, 20 Nov 2011 17:11:12 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 125C18FC19; Sun, 20 Nov 2011 17:11:12 +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 pAKHBBPd002001; Sun, 20 Nov 2011 17:11:11 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAKHBBXT001999; Sun, 20 Nov 2011 17:11:11 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201111201711.pAKHBBXT001999@svn.freebsd.org> From: Christian Brueffer Date: Sun, 20 Nov 2011 17:11: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: r227765 - stable/9/release/doc/en_US.ISO8859-1/hardware 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: Sun, 20 Nov 2011 17:11:12 -0000 Author: brueffer Date: Sun Nov 20 17:11:11 2011 New Revision: 227765 URL: http://svn.freebsd.org/changeset/base/227765 Log: MFC: r227742 Add 2010 and 2011 copyrights. Approved by: re (kib) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml ============================================================================== --- stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Sun Nov 20 17:09:13 2011 (r227764) +++ stable/9/release/doc/en_US.ISO8859-1/hardware/article.sgml Sun Nov 20 17:11:11 2011 (r227765) @@ -30,6 +30,8 @@ 2007 2008 2009 + 2010 + 2011 The &os; Documentation Project From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 23 00:01:46 2011 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 266B0106564A; Wed, 23 Nov 2011 00:01:46 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 157948FC12; Wed, 23 Nov 2011 00:01: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 pAN01jgP016000; Wed, 23 Nov 2011 00:01:45 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAN01juv015998; Wed, 23 Nov 2011 00:01:45 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201111230001.pAN01juv015998@svn.freebsd.org> From: David Xu Date: Wed, 23 Nov 2011 00:01: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: r227853 - stable/9/lib/libthr/thread 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, 23 Nov 2011 00:01:46 -0000 Author: davidxu Date: Wed Nov 23 00:01:45 2011 New Revision: 227853 URL: http://svn.freebsd.org/changeset/base/227853 Log: MFC r227604: Pass CVWAIT flags to kernel, this should handle Timeout correctly for pthread_cond_timedwait when it uses kernel-based condition variable. Approved by: re (kib) Modified: stable/9/lib/libthr/thread/thr_umtx.c Directory Properties: stable/9/lib/libthr/ (props changed) Modified: stable/9/lib/libthr/thread/thr_umtx.c ============================================================================== --- stable/9/lib/libthr/thread/thr_umtx.c Tue Nov 22 23:46:56 2011 (r227852) +++ stable/9/lib/libthr/thread/thr_umtx.c Wed Nov 23 00:01:45 2011 (r227853) @@ -231,7 +231,7 @@ _thr_ucond_init(struct ucond *cv) int _thr_ucond_wait(struct ucond *cv, struct umutex *m, - const struct timespec *timeout, int check_unparking) + const struct timespec *timeout, int flags) { if (timeout && (timeout->tv_sec < 0 || (timeout->tv_sec == 0 && timeout->tv_nsec <= 0))) { @@ -239,8 +239,7 @@ _thr_ucond_wait(struct ucond *cv, struct _thr_umutex_unlock(m, TID(curthread)); return (ETIMEDOUT); } - return _umtx_op_err(cv, UMTX_OP_CV_WAIT, - check_unparking ? UMTX_CHECK_UNPARKING : 0, + return _umtx_op_err(cv, UMTX_OP_CV_WAIT, flags, m, __DECONST(void*, timeout)); } From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 23 12:23:33 2011 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 3392B1065676; Wed, 23 Nov 2011 12:23:33 +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 234778FC15; Wed, 23 Nov 2011 12:23:33 +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 pANCNWb0045435; Wed, 23 Nov 2011 12:23:32 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANCNWAs045433; Wed, 23 Nov 2011 12:23:32 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201111231223.pANCNWAs045433@svn.freebsd.org> From: Glen Barber Date: Wed, 23 Nov 2011 12:23: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: r227879 - 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: Wed, 23 Nov 2011 12:23:33 -0000 Author: gjb (doc committer) Date: Wed Nov 23 12:23:32 2011 New Revision: 227879 URL: http://svn.freebsd.org/changeset/base/227879 Log: MFC r227769, 227770, 227771: - Add a note to src/Makefile that explains that 'rm' runs twice because thesecond invocation only needs to operate on files with the immutable flag set. - Fix the note in r227769 to be less specific to the immutable flag. - Replace 'chflags' with 'file flags' in a comment, since 'chflags'is a command, not a flag itself. Approved by: re (kib) Modified: stable/9/Makefile (contents, props changed) Modified: stable/9/Makefile ============================================================================== --- stable/9/Makefile Wed Nov 23 12:05:39 2011 (r227878) +++ stable/9/Makefile Wed Nov 23 12:23:32 2011 (r227879) @@ -182,10 +182,12 @@ buildworld: upgrade_checks # # In the following, the first 'rm' in a series will usually remove all # files and directories. If it does not, then there are probably some -# files with chflags set, so this unsets them and tries the 'rm' a +# files with file flags set, so this unsets them and tries the 'rm' a # second time. There are situations where this target will be cleaning # some directories via more than one method, but that duplication is -# needed to correctly handle all the possible situations. +# needed to correctly handle all the possible situations. Removing all +# files without file flags set in the first 'rm' instance saves time, +# because 'chflags' will need to operate on fewer files afterwards. # BW_CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} cleanworld: From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 23 15:03:15 2011 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 E92CD1065670; Wed, 23 Nov 2011 15:03:15 +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 BF4448FC18; Wed, 23 Nov 2011 15:03: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 pANF3FjV050580; Wed, 23 Nov 2011 15:03:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANF3F5I050577; Wed, 23 Nov 2011 15:03:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111231503.pANF3F5I050577@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 23 Nov 2011 15:03: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: r227884 - in stable/9/sys: kern 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, 23 Nov 2011 15:03:16 -0000 Author: kib Date: Wed Nov 23 15:03:15 2011 New Revision: 227884 URL: http://svn.freebsd.org/changeset/base/227884 Log: MFC r227657: Consistently use process spin lock for protection of the p->p_boundary_count. Race could cause the execve(2) from the threaded process to hung since thread boundary counter was incorrect and single-threading never finished. Approved by: re (bz) Modified: stable/9/sys/kern/kern_thread.c stable/9/sys/sys/proc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_thread.c ============================================================================== --- stable/9/sys/kern/kern_thread.c Wed Nov 23 13:50:14 2011 (r227883) +++ stable/9/sys/kern/kern_thread.c Wed Nov 23 15:03:15 2011 (r227884) @@ -566,6 +566,8 @@ calc_remaining(struct proc *p, int mode) { int remaining; + PROC_LOCK_ASSERT(p, MA_OWNED); + PROC_SLOCK_ASSERT(p, MA_OWNED); if (mode == SINGLE_EXIT) remaining = p->p_numthreads; else if (mode == SINGLE_BOUNDARY) @@ -819,8 +821,11 @@ thread_suspend_check(int return_instead) td->td_flags &= ~TDF_BOUNDARY; thread_unlock(td); PROC_LOCK(p); - if (return_instead == 0) + if (return_instead == 0) { + PROC_SLOCK(p); p->p_boundary_count--; + PROC_SUNLOCK(p); + } } return (0); } Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Wed Nov 23 13:50:14 2011 (r227883) +++ stable/9/sys/sys/proc.h Wed Nov 23 15:03:15 2011 (r227884) @@ -532,7 +532,7 @@ struct proc { struct thread *p_singlethread;/* (c + j) If single threading this is it */ int p_suspcount; /* (j) Num threads in suspended mode. */ struct thread *p_xthread; /* (c) Trap thread */ - int p_boundary_count;/* (c) Num threads at user boundary */ + int p_boundary_count;/* (j) Num threads at user boundary */ int p_pendingcnt; /* how many signals are pending */ struct itimers *p_itimers; /* (c) POSIX interval timers. */ struct procdesc *p_procdesc; /* (e) Process descriptor, if any. */ From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 23 15:10:16 2011 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 436B81065672; Wed, 23 Nov 2011 15:10:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32F268FC0C; Wed, 23 Nov 2011 15:10:16 +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 pANFAGU3050855; Wed, 23 Nov 2011 15:10:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANFAGCA050853; Wed, 23 Nov 2011 15:10:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201111231510.pANFAGCA050853@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 23 Nov 2011 15:10:16 +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: r227885 - stable/9/sys/netinet6 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, 23 Nov 2011 15:10:16 -0000 Author: bz Date: Wed Nov 23 15:10:15 2011 New Revision: 227885 URL: http://svn.freebsd.org/changeset/base/227885 Log: MFC r227481: Return the correct value for the IPV6_MULTICAST_HOPS getsockopt() call. Submitted by: rpaulo Approved by: re (kib) Modified: stable/9/sys/netinet6/in6_mcast.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) Modified: stable/9/sys/netinet6/in6_mcast.c ============================================================================== --- stable/9/sys/netinet6/in6_mcast.c Wed Nov 23 15:03:15 2011 (r227884) +++ stable/9/sys/netinet6/in6_mcast.c Wed Nov 23 15:10:15 2011 (r227885) @@ -1713,7 +1713,7 @@ ip6_getmoptions(struct inpcb *inp, struc if (im6o == NULL) optval = V_ip6_defmcasthlim; else - optval = im6o->im6o_multicast_loop; + optval = im6o->im6o_multicast_hlim; INP_WUNLOCK(inp); error = sooptcopyout(sopt, &optval, sizeof(u_int)); break; From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 23 15:37:03 2011 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 C534A106564A; Wed, 23 Nov 2011 15:37:03 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B0C28FC13; Wed, 23 Nov 2011 15:37:03 +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 pANFb35L051806; Wed, 23 Nov 2011 15:37:03 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANFb3d1051804; Wed, 23 Nov 2011 15:37:03 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201111231537.pANFb3d1051804@svn.freebsd.org> From: Attilio Rao Date: Wed, 23 Nov 2011 15:37:03 +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: r227888 - 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, 23 Nov 2011 15:37:03 -0000 Author: attilio Date: Wed Nov 23 15:37:03 2011 New Revision: 227888 URL: http://svn.freebsd.org/changeset/base/227888 Log: MFC r227058: Disable interrupt and preemption for smp_rendezvous() also in the UP/!SMP case. Sponsored by: Sandvine Incorporated Approved by: re (kib) Modified: stable/9/sys/kern/subr_smp.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) Modified: stable/9/sys/kern/subr_smp.c ============================================================================== --- stable/9/sys/kern/subr_smp.c Wed Nov 23 15:18:16 2011 (r227887) +++ stable/9/sys/kern/subr_smp.c Wed Nov 23 15:37:03 2011 (r227888) @@ -415,13 +415,16 @@ smp_rendezvous_cpus(cpuset_t map, { int curcpumap, i, ncpus = 0; + /* Look comments in the !SMP case. */ if (!smp_started) { + spinlock_enter(); if (setup_func != NULL) setup_func(arg); if (action_func != NULL) action_func(arg); if (teardown_func != NULL) teardown_func(arg); + spinlock_exit(); return; } @@ -666,12 +669,18 @@ smp_rendezvous_cpus(cpuset_t map, void (*teardown_func)(void *), void *arg) { + /* + * In the !SMP case we just need to ensure the same initial conditions + * as the SMP case. + */ + spinlock_enter(); if (setup_func != NULL) setup_func(arg); if (action_func != NULL) action_func(arg); if (teardown_func != NULL) teardown_func(arg); + spinlock_exit(); } void @@ -681,12 +690,15 @@ smp_rendezvous(void (*setup_func)(void * void *arg) { + /* Look comments in the smp_rendezvous_cpus() case. */ + spinlock_enter(); if (setup_func != NULL) setup_func(arg); if (action_func != NULL) action_func(arg); if (teardown_func != NULL) teardown_func(arg); + spinlock_exit(); } /* From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 23 16:02:12 2011 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 D0D01106564A; Wed, 23 Nov 2011 16:02:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C05078FC0A; Wed, 23 Nov 2011 16:02:12 +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 pANG2CjX052706; Wed, 23 Nov 2011 16:02:12 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANG2CLu052704; Wed, 23 Nov 2011 16:02:12 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201111231602.pANG2CLu052704@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 23 Nov 2011 16:02: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: r227890 - stable/9/sys/dev/qlxgb 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, 23 Nov 2011 16:02:12 -0000 Author: bz Date: Wed Nov 23 16:02:12 2011 New Revision: 227890 URL: http://svn.freebsd.org/changeset/base/227890 Log: MFC r227547: The maximum TSO frame size should be: maximum IP datagram size (65535 bytes) + Ethernet header size (14 bytes) + 2 * VLAN tag size (4 bytes) [1]. [1] We need to multiply by 2 to account for the double VLAN tag provision added in IEEE 802.1ad. Submitted by: David Somayajulu (david.somayajulu qlogic.com) Approved by: re (kib) Modified: stable/9/sys/dev/qlxgb/qla_def.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) Modified: stable/9/sys/dev/qlxgb/qla_def.h ============================================================================== --- stable/9/sys/dev/qlxgb/qla_def.h Wed Nov 23 15:41:55 2011 (r227889) +++ stable/9/sys/dev/qlxgb/qla_def.h Wed Nov 23 16:02:12 2011 (r227890) @@ -86,7 +86,7 @@ typedef struct qla_tx_buf qla_tx_buf_t; #define QLA_MAX_SEGMENTS 63 /* maximum # of segs in a sg list */ #define QLA_MAX_FRAME_SIZE MJUM9BYTES #define QLA_STD_FRAME_SIZE 1514 -#define QLA_MAX_TSO_FRAME_SIZE (64 * 1024 - 1) +#define QLA_MAX_TSO_FRAME_SIZE ((64 * 1024 - 1) + 22) /* Number of MSIX/MSI Vectors required */ #define Q8_MSI_COUNT 4 From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 23 18:04:30 2011 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 E66CA106566B; Wed, 23 Nov 2011 18:04:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4E8B8FC0A; Wed, 23 Nov 2011 18:04: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 pANI4Uin056643; Wed, 23 Nov 2011 18:04:30 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANI4UK5056641; Wed, 23 Nov 2011 18:04:30 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201111231804.pANI4UK5056641@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 23 Nov 2011 18:04: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: r227894 - 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: Wed, 23 Nov 2011 18:04:31 -0000 Author: bz Date: Wed Nov 23 18:04:30 2011 New Revision: 227894 URL: http://svn.freebsd.org/changeset/base/227894 Log: MFC r227061 (by mlaier): Fix a use-after-free/redzone issue in the routing code. Approved by: re (kib) Modified: stable/9/sys/net/rtsock.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) Modified: stable/9/sys/net/rtsock.c ============================================================================== --- stable/9/sys/net/rtsock.c Wed Nov 23 17:02:27 2011 (r227893) +++ stable/9/sys/net/rtsock.c Wed Nov 23 18:04:30 2011 (r227894) @@ -166,7 +166,7 @@ static void rt_setmetrics(u_long which, struct rt_metrics_lite *out); static void rt_getmetrics(const struct rt_metrics_lite *in, struct rt_metrics *out); -static void rt_dispatch(struct mbuf *, const struct sockaddr *); +static void rt_dispatch(struct mbuf *, sa_family_t); static struct netisr_handler rtsock_nh = { .nh_name = "rtsock", @@ -545,6 +545,7 @@ route_output(struct mbuf *m, struct sock int len, error = 0; struct ifnet *ifp = NULL; union sockaddr_union saun; + sa_family_t saf = AF_UNSPEC; #define senderr(e) { error = e; goto flush;} if (m == NULL || ((m->m_len < sizeof(long)) && @@ -581,6 +582,7 @@ route_output(struct mbuf *m, struct sock (info.rti_info[RTAX_GATEWAY] != NULL && info.rti_info[RTAX_GATEWAY]->sa_family >= AF_MAX)) senderr(EINVAL); + saf = info.rti_info[RTAX_DST]->sa_family; /* * Verify that the caller has the appropriate privilege; RTM_GET * is the only operation the non-superuser is allowed. @@ -926,10 +928,10 @@ flush: */ unsigned short family = rp->rcb_proto.sp_family; rp->rcb_proto.sp_family = 0; - rt_dispatch(m, info.rti_info[RTAX_DST]); + rt_dispatch(m, saf); rp->rcb_proto.sp_family = family; } else - rt_dispatch(m, info.rti_info[RTAX_DST]); + rt_dispatch(m, saf); } /* info.rti_info[RTAX_DST] (used above) can point inside of rtm */ if (rtm) @@ -1185,7 +1187,7 @@ rt_missmsg_fib(int type, struct rt_addri rtm->rtm_flags = RTF_DONE | flags; rtm->rtm_errno = error; rtm->rtm_addrs = rtinfo->rti_addrs; - rt_dispatch(m, sa); + rt_dispatch(m, sa ? sa->sa_family : AF_UNSPEC); } void @@ -1217,7 +1219,7 @@ rt_ifmsg(struct ifnet *ifp) ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; ifm->ifm_data = ifp->if_data; ifm->ifm_addrs = 0; - rt_dispatch(m, NULL); + rt_dispatch(m, AF_UNSPEC); } /* @@ -1295,7 +1297,7 @@ rt_newaddrmsg_fib(int cmd, struct ifaddr M_SETFIB(m, fibnum); m->m_flags |= RTS_FILTER_FIB; } - rt_dispatch(m, sa); + rt_dispatch(m, sa ? sa->sa_family : AF_UNSPEC); } } @@ -1338,7 +1340,7 @@ rt_newmaddrmsg(int cmd, struct ifmultiad __func__)); ifmam->ifmam_index = ifp->if_index; ifmam->ifmam_addrs = info.rti_addrs; - rt_dispatch(m, ifma->ifma_addr); + rt_dispatch(m, ifma->ifma_addr ? ifma->ifma_addr->sa_family : AF_UNSPEC); } static struct mbuf * @@ -1398,7 +1400,7 @@ rt_ieee80211msg(struct ifnet *ifp, int w if (m->m_flags & M_PKTHDR) m->m_pkthdr.len += data_len; mtod(m, struct if_announcemsghdr *)->ifan_msglen += data_len; - rt_dispatch(m, NULL); + rt_dispatch(m, AF_UNSPEC); } } @@ -1414,11 +1416,11 @@ rt_ifannouncemsg(struct ifnet *ifp, int m = rt_makeifannouncemsg(ifp, RTM_IFANNOUNCE, what, &info); if (m != NULL) - rt_dispatch(m, NULL); + rt_dispatch(m, AF_UNSPEC); } static void -rt_dispatch(struct mbuf *m, const struct sockaddr *sa) +rt_dispatch(struct mbuf *m, sa_family_t saf) { struct m_tag *tag; @@ -1427,14 +1429,14 @@ rt_dispatch(struct mbuf *m, const struct * use when injecting the mbuf into the routing socket buffer from * the netisr. */ - if (sa != NULL) { + if (saf != AF_UNSPEC) { tag = m_tag_get(PACKET_TAG_RTSOCKFAM, sizeof(unsigned short), M_NOWAIT); if (tag == NULL) { m_freem(m); return; } - *(unsigned short *)(tag + 1) = sa->sa_family; + *(unsigned short *)(tag + 1) = saf; m_tag_prepend(m, tag); } #ifdef VIMAGE From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 23 18:10:48 2011 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 3B89D1065672; Wed, 23 Nov 2011 18:10:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A7968FC14; Wed, 23 Nov 2011 18:10: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 pANIAmiW057017; Wed, 23 Nov 2011 18:10:48 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANIAmX6057015; Wed, 23 Nov 2011 18:10:48 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201111231810.pANIAmX6057015@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 23 Nov 2011 18:10: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: r227898 - stable/9/sys/contrib/pf/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: Wed, 23 Nov 2011 18:10:48 -0000 Author: bz Date: Wed Nov 23 18:10:47 2011 New Revision: 227898 URL: http://svn.freebsd.org/changeset/base/227898 Log: MFC r226938 (by kevlo): Add missing PF_UNLOCK in pf_test Approved by: re (kib) Modified: stable/9/sys/contrib/pf/net/pf.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) Modified: stable/9/sys/contrib/pf/net/pf.c ============================================================================== --- stable/9/sys/contrib/pf/net/pf.c Wed Nov 23 18:06:50 2011 (r227897) +++ stable/9/sys/contrib/pf/net/pf.c Wed Nov 23 18:10:47 2011 (r227898) @@ -7176,11 +7176,15 @@ pf_test6(int dir, struct ifnet *ifp, str } #ifdef __FreeBSD__ - if (pd.pf_mtag->flags & PF_TAG_GENERATED) + if (pd.pf_mtag->flags & PF_TAG_GENERATED) { + PF_UNLOCK(); #else if (m->m_pkthdr.pf.flags & PF_TAG_GENERATED) #endif return (PF_PASS); +#ifdef __FreeBSD__ + } +#endif /* We do IP header normalization and packet reassembly here */ if (pf_normalize_ip6(m0, dir, kif, &reason, &pd) != PF_PASS) { From owner-svn-src-stable-9@FreeBSD.ORG Wed Nov 23 21:41:32 2011 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 1670D1065670; Wed, 23 Nov 2011 21:41:32 +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 058F58FC13; Wed, 23 Nov 2011 21: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 pANLfVLv064382; Wed, 23 Nov 2011 21:41:31 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANLfVbZ064380; Wed, 23 Nov 2011 21:41:31 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201111232141.pANLfVbZ064380@svn.freebsd.org> From: Xin LI Date: Wed, 23 Nov 2011 21:41:31 +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: r227910 - releng/9.0/etc stable/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: Wed, 23 Nov 2011 21:41:32 -0000 Author: delphij Date: Wed Nov 23 21:41:31 2011 New Revision: 227910 URL: http://svn.freebsd.org/changeset/base/227910 Log: MFC r225849: Test if the interface is afif in dhcpif() and syncdhcpif(), as done in ipv6_autoconfif. This fixes a regression that causes e.g. ifconfig_DEFAULT="DHCP" to run on non-afif interfaces like pfsync0, which in turn would cause excessive delay on system startup. Sponsored by: iXsystems, Inc. Reviewed by: hrs (freebsd-rc@) Approved by: re (bz) Modified: stable/9/etc/network.subr Directory Properties: stable/9/etc/ (props changed) Changes in other areas also in this revision: Modified: releng/9.0/etc/network.subr Directory Properties: releng/9.0/etc/ (props changed) Modified: stable/9/etc/network.subr ============================================================================== --- stable/9/etc/network.subr Wed Nov 23 21:19:38 2011 (r227909) +++ stable/9/etc/network.subr Wed Nov 23 21:41:31 2011 (r227910) @@ -297,6 +297,10 @@ dhcpif() local _tmpargs _arg _tmpargs=`_ifconfig_getargs $1` + if noafif $1; then + return 1 + fi + for _arg in $_tmpargs; do case $_arg in [Dd][Hh][Cc][Pp]) @@ -322,6 +326,10 @@ syncdhcpif() local _tmpargs _arg _tmpargs=`_ifconfig_getargs $1` + if noafif $1; then + return 1 + fi + for _arg in $_tmpargs; do case $_arg in [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) From owner-svn-src-stable-9@FreeBSD.ORG Thu Nov 24 07:25:44 2011 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 14B7F106566C; Thu, 24 Nov 2011 07:25:44 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DEBCE8FC13; Thu, 24 Nov 2011 07:25: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 pAO7PhTD083152; Thu, 24 Nov 2011 07:25:43 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAO7Ph7l083150; Thu, 24 Nov 2011 07:25:43 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201111240725.pAO7Ph7l083150@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 24 Nov 2011 07:25: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: r227923 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/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: Thu, 24 Nov 2011 07:25:44 -0000 Author: pjd Date: Thu Nov 24 07:25:43 2011 New Revision: 227923 URL: http://svn.freebsd.org/changeset/base/227923 Log: MFC r227110,r227111: r227110: In zvol_open() if the spa_namespace_lock is already held, it means that ZFS is trying to open and taste ZVOL as its VDEV. This is not supported, so return an error instead of panicing on spa_namespace_lock recursion. Reported by: Robert Millan PR: kern/162008 r227111: Correct typo in comment. Reported by: Fabian Keil Approved by: re (kib) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.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) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu Nov 24 06:27:47 2011 (r227922) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu Nov 24 07:25:43 2011 (r227923) @@ -875,6 +875,14 @@ zvol_open(struct g_provider *pp, int fla zvol_state_t *zv; int err = 0; + if (MUTEX_HELD(&spa_namespace_lock)) { + /* + * If the spa_namespace_lock is being held, it means that ZFS + * is trying to open ZVOL as its VDEV. This is not supported. + */ + return (EOPNOTSUPP); + } + mutex_enter(&spa_namespace_lock); zv = pp->private; From owner-svn-src-stable-9@FreeBSD.ORG Thu Nov 24 17:21:52 2011 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 B19F61065670; Thu, 24 Nov 2011 17:21:52 +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 87A6D8FC12; Thu, 24 Nov 2011 17:21: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 pAOHLqcH005197; Thu, 24 Nov 2011 17:21:52 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAOHLqk6005194; Thu, 24 Nov 2011 17:21:52 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201111241721.pAOHLqk6005194@svn.freebsd.org> From: Michael Tuexen Date: Thu, 24 Nov 2011 17:21: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: r227940 - 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: Thu, 24 Nov 2011 17:21:52 -0000 Author: tuexen Date: Thu Nov 24 17:21:52 2011 New Revision: 227940 URL: http://svn.freebsd.org/changeset/base/227940 Log: MFC r227486: Don't copy uninitialized memory. Also simplify the comparison of interface names. Approved by: re@ Modified: stable/9/sys/netinet/sctp_pcb.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) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Thu Nov 24 15:47:01 2011 (r227939) +++ stable/9/sys/netinet/sctp_pcb.c Thu Nov 24 17:21:52 2011 (r227940) @@ -559,9 +559,9 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, vo atomic_add_int(&vrf->refcount, 1); sctp_ifnp->ifn_mtu = SCTP_GATHER_MTU_FROM_IFN_INFO(ifn, ifn_index, addr->sa_family); if (if_name != NULL) { - memcpy(sctp_ifnp->ifn_name, if_name, SCTP_IFNAMSIZ); + snprintf(sctp_ifnp->ifn_name, SCTP_IFNAMSIZ, "%s", if_name); } else { - memcpy(sctp_ifnp->ifn_name, "unknown", min(7, SCTP_IFNAMSIZ)); + snprintf(sctp_ifnp->ifn_name, SCTP_IFNAMSIZ, "%s", "unknown"); } hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; LIST_INIT(&sctp_ifnp->ifalist); @@ -768,19 +768,9 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, * panda who might recycle indexes fast. */ if (if_name) { - int len1, len2; - - len1 = min(SCTP_IFNAMSIZ, strlen(if_name)); - len2 = min(SCTP_IFNAMSIZ, strlen(sctp_ifap->ifn_p->ifn_name)); - if (len1 && len2 && (len1 == len2)) { - /* we can compare them */ - if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, len1) == 0) { - /* - * They match its a correct - * delete - */ - valid = 1; - } + if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, SCTP_IFNAMSIZ) == 0) { + /* They match its a correct delete */ + valid = 1; } } if (!valid) { From owner-svn-src-stable-9@FreeBSD.ORG Thu Nov 24 17:54:03 2011 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 A4E0D1065672; Thu, 24 Nov 2011 17:54:03 +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 7ADED8FC21; Thu, 24 Nov 2011 17:54:03 +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 pAOHs3dP006226; Thu, 24 Nov 2011 17:54:03 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAOHs3Vo006224; Thu, 24 Nov 2011 17:54:03 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201111241754.pAOHs3Vo006224@svn.freebsd.org> From: Michael Tuexen Date: Thu, 24 Nov 2011 17:54:03 +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: r227942 - 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: Thu, 24 Nov 2011 17:54:03 -0000 Author: tuexen Date: Thu Nov 24 17:54:03 2011 New Revision: 227942 URL: http://svn.freebsd.org/changeset/base/227942 Log: MFC r227540: Set the MTU of an path to an approriate value if the interface MTU can't be determined. Approved by: re@ Modified: stable/9/sys/netinet/sctp_pcb.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) Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Thu Nov 24 17:25:43 2011 (r227941) +++ stable/9/sys/netinet/sctp_pcb.c Thu Nov 24 17:54:03 2011 (r227942) @@ -4064,13 +4064,8 @@ sctp_add_remote_addr(struct sctp_tcb *st /* Now get the interface MTU */ if (net->ro._s_addr && net->ro._s_addr->ifn_p) { net->mtu = SCTP_GATHER_MTU_FROM_INTFC(net->ro._s_addr->ifn_p); - } else { - net->mtu = 0; } - if (net->mtu == 0) { - /* Huh ?? */ - net->mtu = SCTP_DEFAULT_MTU; - } else { + if (net->mtu > 0) { uint32_t rmtu; rmtu = SCTP_GATHER_MTU_FROM_ROUTE(net->ro._s_addr, &net->ro._l_addr.sa, net->ro.ro_rt); @@ -4090,11 +4085,31 @@ sctp_add_remote_addr(struct sctp_tcb *st net->mtu = rmtu; } } - if (from == SCTP_ALLOC_ASOC) { - stcb->asoc.smallest_mtu = net->mtu; + } + if (net->mtu == 0) { + switch (newaddr->sa_family) { +#ifdef INET + case AF_INET: + net->mtu = SCTP_DEFAULT_MTU; + break; +#endif +#ifdef INET6 + case AF_INET6: + net->mtu = 1280; + break; +#endif + default: + break; } - } else { - net->mtu = stcb->asoc.smallest_mtu; + } + if (net->port) { + net->mtu -= (uint32_t) sizeof(struct udphdr); + } + if (from == SCTP_ALLOC_ASOC) { + stcb->asoc.smallest_mtu = net->mtu; + } + if (stcb->asoc.smallest_mtu > net->mtu) { + stcb->asoc.smallest_mtu = net->mtu; } #ifdef INET6 if (newaddr->sa_family == AF_INET6) { @@ -4104,12 +4119,7 @@ sctp_add_remote_addr(struct sctp_tcb *st (void)sa6_recoverscope(sin6); } #endif - if (net->port) { - net->mtu -= sizeof(struct udphdr); - } - if (stcb->asoc.smallest_mtu > net->mtu) { - stcb->asoc.smallest_mtu = net->mtu; - } + /* JRS - Use the congestion control given in the CC module */ if (stcb->asoc.cc_functions.sctp_set_initial_cc_param != NULL) (*stcb->asoc.cc_functions.sctp_set_initial_cc_param) (stcb, net); From owner-svn-src-stable-9@FreeBSD.ORG Thu Nov 24 18:44:09 2011 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 7C912106566B; Thu, 24 Nov 2011 18:44:09 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 69B098FC15; Thu, 24 Nov 2011 18:44:09 +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 pAOIi9JF007940; Thu, 24 Nov 2011 18:44:09 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAOIi9GI007932; Thu, 24 Nov 2011 18:44:09 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201111241844.pAOIi9GI007932@svn.freebsd.org> From: Ryan Stone Date: Thu, 24 Nov 2011 18:44:09 +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: r227945 - in stable/9/sys: amd64/amd64 amd64/include cddl/contrib/opensolaris/uts/intel/dtrace i386/i386 i386/include 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, 24 Nov 2011 18:44:09 -0000 Author: rstone Date: Thu Nov 24 18:44:09 2011 New Revision: 227945 URL: http://svn.freebsd.org/changeset/base/227945 Log: MFC r227290 and r227291: r227290: Fix the DTrace pid return trap interrupt vector. Previously we were using 31, but that vector is reserved. Without this fix, running dtrace -p would either cause the target process to crash or the kernel to page fault r227291: Replace fasttrap_copyout() with uwrite(). FreeBSD copyout() is not able to write to the .text section of a process. Approved by: re (kib) Modified: stable/9/sys/amd64/amd64/trap.c stable/9/sys/amd64/include/segments.h stable/9/sys/amd64/include/trap.h stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c stable/9/sys/i386/i386/trap.c stable/9/sys/i386/include/segments.h stable/9/sys/i386/include/trap.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) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Thu Nov 24 18:37:16 2011 (r227944) +++ stable/9/sys/amd64/amd64/trap.c Thu Nov 24 18:44:09 2011 (r227945) @@ -125,7 +125,7 @@ void dblfault_handler(struct trapframe * static int trap_pfault(struct trapframe *, int); static void trap_fatal(struct trapframe *, vm_offset_t); -#define MAX_TRAP_MSG 30 +#define MAX_TRAP_MSG 33 static char *trap_msg[] = { "", /* 0 unused */ "privileged instruction fault", /* 1 T_PRIVINFLT */ @@ -158,6 +158,9 @@ static char *trap_msg[] = { "machine check trap", /* 28 T_MCHK */ "SIMD floating-point exception", /* 29 T_XMMFLT */ "reserved (unknown) fault", /* 30 T_RESERVED */ + "", /* 31 unused (reserved) */ + "DTrace pid return trap", /* 32 T_DTRACE_RET */ + "DTrace fasttrap probe trap", /* 33 T_DTRACE_PROBE */ }; #ifdef KDB @@ -245,28 +248,26 @@ trap(struct trapframe *frame) * handled the trap and modified the trap frame so that this * function can return normally. */ - if (dtrace_trap_func != NULL) - if ((*dtrace_trap_func)(frame, type)) - goto out; if (type == T_DTRACE_PROBE || type == T_DTRACE_RET || type == T_BPTFLT) { struct reg regs; - + fill_frame_regs(frame, ®s); if (type == T_DTRACE_PROBE && dtrace_fasttrap_probe_ptr != NULL && dtrace_fasttrap_probe_ptr(®s) == 0) - goto out; - if (type == T_BPTFLT && + goto out; + else if (type == T_BPTFLT && dtrace_pid_probe_ptr != NULL && dtrace_pid_probe_ptr(®s) == 0) - goto out; - if (type == T_DTRACE_RET && + goto out; + else if (type == T_DTRACE_RET && dtrace_return_probe_ptr != NULL && dtrace_return_probe_ptr(®s) == 0) goto out; - } + if (dtrace_trap_func != NULL && (*dtrace_trap_func)(frame, type)) + goto out; #endif if ((frame->tf_rflags & PSL_I) == 0) { Modified: stable/9/sys/amd64/include/segments.h ============================================================================== --- stable/9/sys/amd64/include/segments.h Thu Nov 24 18:37:16 2011 (r227944) +++ stable/9/sys/amd64/include/segments.h Thu Nov 24 18:44:09 2011 (r227945) @@ -214,7 +214,7 @@ struct region_descriptor { #define IDT_XF 19 /* #XF: SIMD Floating-Point Exception */ #define IDT_IO_INTS NRSVIDT /* Base of IDT entries for I/O interrupts. */ #define IDT_SYSCALL 0x80 /* System Call Interrupt Vector */ -#define IDT_DTRACE_RET 0x92 /* DTrace pid provider Interrupt Vector */ +#define IDT_DTRACE_RET 0x20 /* DTrace pid provider Interrupt Vector */ /* * Entries in the Global Descriptor Table (GDT) Modified: stable/9/sys/amd64/include/trap.h ============================================================================== --- stable/9/sys/amd64/include/trap.h Thu Nov 24 18:37:16 2011 (r227944) +++ stable/9/sys/amd64/include/trap.h Thu Nov 24 18:44:09 2011 (r227945) @@ -62,8 +62,8 @@ #define T_MCHK 28 /* machine check trap */ #define T_XMMFLT 29 /* SIMD floating-point exception */ #define T_RESERVED 30 /* reserved (unknown) */ -#define T_DTRACE_RET 31 /* DTrace pid return */ -#define T_DTRACE_PROBE 32 /* DTrace fasttrap probe */ +#define T_DTRACE_RET 32 /* DTrace pid return */ +#define T_DTRACE_PROBE 33 /* DTrace fasttrap probe */ /* XXX most of the following codes aren't used, but could be. */ Modified: stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Thu Nov 24 18:37:16 2011 (r227944) +++ stable/9/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Thu Nov 24 18:44:09 2011 (r227945) @@ -97,7 +97,7 @@ uwrite(proc_t *p, void *kaddr, size_t le return (proc_ops(UIO_WRITE, p, kaddr, uaddr, len)); } -#endif +#endif /* sun */ #ifdef __i386__ #define r_rax r_eax #define r_rbx r_ebx @@ -1380,6 +1380,7 @@ fasttrap_pid_probe(struct reg *rp) { int ret = 0; uintptr_t addr = 0; + #ifdef __amd64 if (p->p_model == DATAMODEL_NATIVE) { addr = rp->r_rsp - sizeof (uintptr_t); @@ -1558,7 +1559,7 @@ fasttrap_pid_probe(struct reg *rp) * ------------------------ ----- * a: <= 15 * jmp ftt_size> 5 - * b: <= 15 + * b: <= 15 * int T_DTRACE_RET 2 * ----- * <= 37 @@ -1731,12 +1732,16 @@ fasttrap_pid_probe(struct reg *rp) ASSERT(i <= sizeof (scratch)); + +#if defined(sun) if (fasttrap_copyout(scratch, (char *)addr, i)) { +#else + if (uwrite(curproc, scratch, i, addr)) { +#endif fasttrap_sigtrap(p, curthread, pc); new_pc = pc; break; } - if (tp->ftt_retids != NULL) { curthread->t_dtrace_step = 1; curthread->t_dtrace_ret = 1; Modified: stable/9/sys/i386/i386/trap.c ============================================================================== --- stable/9/sys/i386/i386/trap.c Thu Nov 24 18:37:16 2011 (r227944) +++ stable/9/sys/i386/i386/trap.c Thu Nov 24 18:44:09 2011 (r227945) @@ -136,7 +136,7 @@ void dblfault_handler(void); extern inthand_t IDTVEC(lcall_syscall); -#define MAX_TRAP_MSG 30 +#define MAX_TRAP_MSG 33 static char *trap_msg[] = { "", /* 0 unused */ "privileged instruction fault", /* 1 T_PRIVINFLT */ @@ -169,6 +169,10 @@ static char *trap_msg[] = { "machine check trap", /* 28 T_MCHK */ "SIMD floating-point exception", /* 29 T_XMMFLT */ "reserved (unknown) fault", /* 30 T_RESERVED */ + "", /* 31 unused (reserved) */ + "DTrace pid return trap", /* 32 T_DTRACE_RET */ + "DTrace fasttrap probe trap", /* 33 T_DTRACE_PROBE */ + }; #if defined(I586_CPU) && !defined(NO_F00F_HACK) @@ -265,10 +269,6 @@ trap(struct trapframe *frame) * handled the trap and modified the trap frame so that this * function can return normally. */ - if ((type == T_PROTFLT || type == T_PAGEFLT) && - dtrace_trap_func != NULL) - if ((*dtrace_trap_func)(frame, type)) - goto out; if (type == T_DTRACE_PROBE || type == T_DTRACE_RET || type == T_BPTFLT) { struct reg regs; @@ -287,6 +287,9 @@ trap(struct trapframe *frame) dtrace_return_probe_ptr(®s) == 0) goto out; } + if ((type == T_PROTFLT || type == T_PAGEFLT) && + dtrace_trap_func != NULL && (*dtrace_trap_func)(frame, type)) + goto out; #endif if ((frame->tf_eflags & PSL_I) == 0) { Modified: stable/9/sys/i386/include/segments.h ============================================================================== --- stable/9/sys/i386/include/segments.h Thu Nov 24 18:37:16 2011 (r227944) +++ stable/9/sys/i386/include/segments.h Thu Nov 24 18:44:09 2011 (r227945) @@ -207,7 +207,7 @@ struct region_descriptor { #define IDT_XF 19 /* #XF: SIMD Floating-Point Exception */ #define IDT_IO_INTS NRSVIDT /* Base of IDT entries for I/O interrupts. */ #define IDT_SYSCALL 0x80 /* System Call Interrupt Vector */ -#define IDT_DTRACE_RET 0x92 /* DTrace pid provider Interrupt Vector */ +#define IDT_DTRACE_RET 0x20 /* DTrace pid provider Interrupt Vector */ /* * Entries in the Global Descriptor Table (GDT) Modified: stable/9/sys/i386/include/trap.h ============================================================================== --- stable/9/sys/i386/include/trap.h Thu Nov 24 18:37:16 2011 (r227944) +++ stable/9/sys/i386/include/trap.h Thu Nov 24 18:44:09 2011 (r227945) @@ -62,8 +62,8 @@ #define T_MCHK 28 /* machine check trap */ #define T_XMMFLT 29 /* SIMD floating-point exception */ #define T_RESERVED 30 /* reserved (unknown) */ -#define T_DTRACE_RET 31 /* DTrace pid return */ -#define T_DTRACE_PROBE 32 /* DTrace fasttrap probe */ +#define T_DTRACE_RET 32 /* DTrace pid return */ +#define T_DTRACE_PROBE 33 /* DTrace fasttrap probe */ /* XXX most of the following codes aren't used, but could be. */ From owner-svn-src-stable-9@FreeBSD.ORG Thu Nov 24 18:51:31 2011 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 B54A2106564A; Thu, 24 Nov 2011 18:51:31 +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 A49AD8FC12; Thu, 24 Nov 2011 18:51:31 +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 pAOIpVUU008300; Thu, 24 Nov 2011 18:51:31 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAOIpVk4008298; Thu, 24 Nov 2011 18:51:31 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201111241851.pAOIpVk4008298@svn.freebsd.org> From: Michael Tuexen Date: Thu, 24 Nov 2011 18:51:31 +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: r227948 - 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: Thu, 24 Nov 2011 18:51:31 -0000 Author: tuexen Date: Thu Nov 24 18:51:31 2011 New Revision: 227948 URL: http://svn.freebsd.org/changeset/base/227948 Log: MFC r227930: Move up the address to the top of the sctp_paddrthlds structure like in all other structures. This avoids alignment problems. Approved by: re@ Modified: stable/9/sys/netinet/sctp_uio.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) Modified: stable/9/sys/netinet/sctp_uio.h ============================================================================== --- stable/9/sys/netinet/sctp_uio.h Thu Nov 24 18:45:23 2011 (r227947) +++ stable/9/sys/netinet/sctp_uio.h Thu Nov 24 18:51:31 2011 (r227948) @@ -521,8 +521,8 @@ struct sctp_paddrparams { #define SPP_IPV4_TOS SPP_DSCP struct sctp_paddrthlds { - sctp_assoc_t spt_assoc_id; struct sockaddr_storage spt_address; + sctp_assoc_t spt_assoc_id; uint16_t spt_pathmaxrxt; uint16_t spt_pathpfthld; }; From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 25 10:29:22 2011 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 E21AA1065672; Fri, 25 Nov 2011 10:29:22 +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 D10588FC18; Fri, 25 Nov 2011 10:29: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 pAPATMEs038172; Fri, 25 Nov 2011 10:29:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAPATM8M038170; Fri, 25 Nov 2011 10:29:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111251029.pAPATM8M038170@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Nov 2011 10:29: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: r227965 - 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: Fri, 25 Nov 2011 10:29:23 -0000 Author: kib Date: Fri Nov 25 10:29:22 2011 New Revision: 227965 URL: http://svn.freebsd.org/changeset/base/227965 Log: MFC r227660: Fix fd leak. Approved by: re (bz) 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 Fri Nov 25 09:46:36 2011 (r227964) +++ stable/9/libexec/rtld-elf/rtld.c Fri Nov 25 10:29:22 2011 (r227965) @@ -1657,6 +1657,7 @@ load_object(const char *name, const Obj_ } if (flags & RTLD_LO_NOLOAD) { free(path); + close(fd); return (NULL); } From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 25 10:30:29 2011 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 84D131065673; Fri, 25 Nov 2011 10:30:29 +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 73E338FC13; Fri, 25 Nov 2011 10:30: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 pAPAUTYK038248; Fri, 25 Nov 2011 10:30:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAPAUTe7038246; Fri, 25 Nov 2011 10:30:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201111251030.pAPAUTe7038246@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 25 Nov 2011 10:30: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: r227966 - stable/9/lib/librt 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, 25 Nov 2011 10:30:29 -0000 Author: kib Date: Fri Nov 25 10:30:29 2011 New Revision: 227966 URL: http://svn.freebsd.org/changeset/base/227966 Log: MFC r227661: Free unused allocation on error. Approved by: re (bz) Modified: stable/9/lib/librt/timer.c Directory Properties: stable/9/lib/librt/ (props changed) Modified: stable/9/lib/librt/timer.c ============================================================================== --- stable/9/lib/librt/timer.c Fri Nov 25 10:29:22 2011 (r227965) +++ stable/9/lib/librt/timer.c Fri Nov 25 10:30:29 2011 (r227966) @@ -102,12 +102,14 @@ __timer_create(clockid_t clockid, struct } if (__sigev_check_init()) { + free(timer); errno = EINVAL; return (-1); } sn = __sigev_alloc(SI_TIMER, evp, NULL, 0); if (sn == NULL) { + free(timer); errno = EAGAIN; return (-1); } From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 25 12:19:13 2011 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 AD463106564A; Fri, 25 Nov 2011 12:19:13 +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 9271C8FC14; Fri, 25 Nov 2011 12:19: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 pAPCJDkh042893; Fri, 25 Nov 2011 12:19:13 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAPCJDow042890; Fri, 25 Nov 2011 12:19:13 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201111251219.pAPCJDow042890@svn.freebsd.org> From: Bernhard Schmidt Date: Fri, 25 Nov 2011 12:19:13 +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: r227967 - stable/9/sys/dev/iwn 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, 25 Nov 2011 12:19:13 -0000 Author: bschmidt Date: Fri Nov 25 12:19:13 2011 New Revision: 227967 URL: http://svn.freebsd.org/changeset/base/227967 Log: MFC r227805: The DC calibration result obtained during initialization can't be passed over to the runtime firmware on 6050 devices. Instead let the runtime firmware do the calibration itself. This fixes support for the 6050 series devices. Submitted by: kevlo Approved by: re (kib) Obtained from: OpenBSD Tested by: lx, Tz-Huan Huang(earlier version) Modified: stable/9/sys/dev/iwn/if_iwn.c stable/9/sys/dev/iwn/if_iwnreg.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/9/sys/dev/iwn/if_iwn.c Fri Nov 25 10:30:29 2011 (r227966) +++ stable/9/sys/dev/iwn/if_iwn.c Fri Nov 25 12:19:13 2011 (r227967) @@ -246,6 +246,7 @@ static int iwn_send_sensitivity(struct i static int iwn_set_pslevel(struct iwn_softc *, int, int, int); static int iwn_send_btcoex(struct iwn_softc *); static int iwn_send_advanced_btcoex(struct iwn_softc *); +static int iwn5000_runtime_calib(struct iwn_softc *); static int iwn_config(struct iwn_softc *); static uint8_t *ieee80211_add_ssid(uint8_t *, const uint8_t *, u_int); static int iwn_scan(struct iwn_softc *); @@ -2505,7 +2506,8 @@ iwn5000_rx_calib_results(struct iwn_soft case IWN5000_PHY_CALIB_DC: if ((sc->sc_flags & IWN_FLAG_INTERNAL_PA) == 0 && (sc->hw_type == IWN_HW_REV_TYPE_5150 || - sc->hw_type >= IWN_HW_REV_TYPE_6000)) + sc->hw_type >= IWN_HW_REV_TYPE_6000) && + sc->hw_type != IWN_HW_REV_TYPE_6050) idx = 0; break; case IWN5000_PHY_CALIB_LO: @@ -4996,6 +4998,19 @@ iwn_send_advanced_btcoex(struct iwn_soft } static int +iwn5000_runtime_calib(struct iwn_softc *sc) +{ + struct iwn5000_calib_config cmd; + + memset(&cmd, 0, sizeof cmd); + cmd.ucode.once.enable = 0xffffffff; + cmd.ucode.once.start = IWN5000_CALIB_DC; + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: configuring runtime calibration\n", __func__); + return iwn_cmd(sc, IWN5000_CMD_CALIB_CONFIG, &cmd, sizeof(cmd), 0); +} + +static int iwn_config(struct iwn_softc *sc) { struct iwn_ops *ops = &sc->ops; @@ -5015,6 +5030,17 @@ iwn_config(struct iwn_softc *sc) } } + if (sc->hw_type == IWN_HW_REV_TYPE_6050) { + /* Configure runtime DC calibration. */ + error = iwn5000_runtime_calib(sc); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not configure runtime calibration\n", + __func__); + return error; + } + } + /* Configure valid TX chains for >=5000 Series. */ if (sc->hw_type != IWN_HW_REV_TYPE_4965) { txmask = htole32(sc->txchainmask); Modified: stable/9/sys/dev/iwn/if_iwnreg.h ============================================================================== --- stable/9/sys/dev/iwn/if_iwnreg.h Fri Nov 25 10:30:29 2011 (r227966) +++ stable/9/sys/dev/iwn/if_iwnreg.h Fri Nov 25 12:19:13 2011 (r227967) @@ -739,6 +739,8 @@ struct iwn5000_wimax_coex { struct iwn5000_calib_elem { uint32_t enable; uint32_t start; +#define IWN5000_CALIB_DC (1 << 1) + uint32_t send; uint32_t apply; uint32_t reserved; From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 25 13:34:27 2011 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 A0AD51065676; Fri, 25 Nov 2011 13:34:27 +0000 (UTC) (envelope-from rstone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F9728FC1B; Fri, 25 Nov 2011 13:34:27 +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 pAPDYRtM045354; Fri, 25 Nov 2011 13:34:27 GMT (envelope-from rstone@svn.freebsd.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAPDYR20045352; Fri, 25 Nov 2011 13:34:27 GMT (envelope-from rstone@svn.freebsd.org) Message-Id: <201111251334.pAPDYR20045352@svn.freebsd.org> From: Ryan Stone Date: Fri, 25 Nov 2011 13:34:27 +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: r227971 - 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: Fri, 25 Nov 2011 13:34:27 -0000 Author: rstone Date: Fri Nov 25 13:34:27 2011 New Revision: 227971 URL: http://svn.freebsd.org/changeset/base/227971 Log: MFC r227342. Note that the original commit message, reproduced below, has error. The final sentence should read "*without* CTF data". The in-kernel CTF parser caches the result of its first attempt to parse CTF data from a module. On subsequent attempts to retrieve CTF data for a module, return an error if there no CTF data. This fixes a panic if you try to enable fbt probes on a module with CTF data twice. Approved by: re (kib) Modified: stable/9/sys/kern/kern_ctf.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) Modified: stable/9/sys/kern/kern_ctf.c ============================================================================== --- stable/9/sys/kern/kern_ctf.c Fri Nov 25 12:51:32 2011 (r227970) +++ stable/9/sys/kern/kern_ctf.c Fri Nov 25 13:34:27 2011 (r227971) @@ -90,7 +90,7 @@ link_elf_ctf_get(linker_file_t lf, linke * ctfcnt to -1. See below. */ if (ef->ctfcnt < 0) - return (0); + return (EFTYPE); /* Now check if we've already loaded the CTF data.. */ if (ef->ctfcnt > 0) { From owner-svn-src-stable-9@FreeBSD.ORG Fri Nov 25 17:06:32 2011 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 98959106564A; Fri, 25 Nov 2011 17:06:32 +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 7EA8D8FC08; Fri, 25 Nov 2011 17:06: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 pAPH6Wld052103; Fri, 25 Nov 2011 17:06:32 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAPH6WAr052099; Fri, 25 Nov 2011 17:06:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201111251706.pAPH6WAr052099@svn.freebsd.org> From: Marius Strobl Date: Fri, 25 Nov 2011 17:06: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: r227976 - in stable/9: share/examples/drivers share/man/man9 sys/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: Fri, 25 Nov 2011 17:06:32 -0000 Author: marius Date: Fri Nov 25 17:06:32 2011 New Revision: 227976 URL: http://svn.freebsd.org/changeset/base/227976 Log: MFC: r227829, r227844 - Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t' and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from device drivers. - Update the device driver examples to use DEVMETHOD_END. Submitted by: jhb Approved by: re (kib) Modified: stable/9/share/examples/drivers/make_device_driver.sh stable/9/share/man/man9/driver.9 stable/9/sys/sys/bus.h Directory Properties: stable/9/share/examples/ (props changed) stable/9/share/man/man9/ (props changed) 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) Modified: stable/9/share/examples/drivers/make_device_driver.sh ============================================================================== --- stable/9/share/examples/drivers/make_device_driver.sh Fri Nov 25 16:54:18 2011 (r227975) +++ stable/9/share/examples/drivers/make_device_driver.sh Fri Nov 25 17:06:32 2011 (r227976) @@ -261,7 +261,7 @@ static device_method_t ${1}_methods[] = DEVMETHOD(device_probe, ${1}_isa_probe), DEVMETHOD(device_attach, ${1}_isa_attach), DEVMETHOD(device_detach, ${1}_isa_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t ${1}_isa_driver = { Modified: stable/9/share/man/man9/driver.9 ============================================================================== --- stable/9/share/man/man9/driver.9 Fri Nov 25 16:54:18 2011 (r227975) +++ stable/9/share/man/man9/driver.9 Fri Nov 25 17:06:32 2011 (r227976) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 2010 +.Dd November 22, 2011 .Dt DRIVER 9 .Os .Sh NAME @@ -58,7 +58,7 @@ static device_method_t foo_methods[] = { DEVMETHOD(bogo_twiddle, foo_twiddle), /* Terminate method list */ - { 0, 0 } + DEVMETHOD_END }; static driver_t foo_driver = { Modified: stable/9/sys/sys/bus.h ============================================================================== --- stable/9/sys/sys/bus.h Fri Nov 25 16:54:18 2011 (r227975) +++ stable/9/sys/sys/bus.h Fri Nov 25 17:06:32 2011 (r227976) @@ -570,9 +570,10 @@ extern int bus_current_pass; void bus_set_pass(int pass); /** - * Shorthand for constructing method tables. + * Shorthands for constructing method tables. */ #define DEVMETHOD KOBJMETHOD +#define DEVMETHOD_END KOBJMETHOD_END /* * Some common device interfaces. From owner-svn-src-stable-9@FreeBSD.ORG Sat Nov 26 14:17:59 2011 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 3D456106564A; Sat, 26 Nov 2011 14:17:59 +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 2BAEB8FC0A; Sat, 26 Nov 2011 14:17:59 +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 pAQEHxj7094639; Sat, 26 Nov 2011 14:17:59 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAQEHwfK094637; Sat, 26 Nov 2011 14:17:58 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201111261417.pAQEHwfK094637@svn.freebsd.org> From: Warren Block Date: Sat, 26 Nov 2011 14:17:58 +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: r227994 - stable/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: Sat, 26 Nov 2011 14:17:59 -0000 Author: wblock (doc committer) Date: Sat Nov 26 14:17:58 2011 New Revision: 227994 URL: http://svn.freebsd.org/changeset/base/227994 Log: MFC 225861: Fix a confusing sentence. Other wording tweaks. Approved by: gjb (mentor) Approved by: re@ (kostikbel) Modified: stable/9/etc/devd.conf Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/devd.conf ============================================================================== --- stable/9/etc/devd.conf Sat Nov 26 13:54:55 2011 (r227993) +++ stable/9/etc/devd.conf Sat Nov 26 14:17:58 2011 (r227994) @@ -8,10 +8,10 @@ # NB: device-name is shorthand for 'match device-name' options { - # Each directory directive adds a directory the list of directories - # that we scan for files. Files are read-in in the order that they - # are returned from readdir(3). The rule-sets are combined to - # create a DFA that's used to match events to actions. + # Each "directory" directive adds a directory to the list of + # directories that we scan for files. Files are loaded in the order + # that they are returned from readdir(3). The rule-sets are combined + # to create a DFA that's used to match events to actions. directory "/etc/devd"; directory "/usr/local/etc/devd"; pid-file "/var/run/devd.pid"; @@ -32,8 +32,8 @@ options { # script is called pccard_ether. # # NB: DETACH events are ignored; the kernel should handle all cleanup -# (routes, arp cache) if you need to do something beware of races -# against immediate create of a device w/ the same name; e.g. +# (routes, arp cache). Beware of races against immediate create +# of a device with the same name; e.g. # ifconfig bridge0 destroy; ifconfig bridge0 create # notify 0 { @@ -43,7 +43,7 @@ notify 0 { }; # -# Try to start dhclient on Ethernet like interfaces when the link comes +# Try to start dhclient on Ethernet-like interfaces when the link comes # up. Only devices that are configured to support DHCP will actually # run it. No link down rule exists because dhclient automatically exits # when the link goes down. @@ -87,7 +87,7 @@ detach 100 { device-name "ed50"; }; -# When a USB Bluetooth dongle appears activate it +# When a USB Bluetooth dongle appears, activate it attach 100 { device-name "ubt[0-9]+"; action "/etc/rc.d/bluetooth quietstart $device-name"; @@ -125,7 +125,7 @@ detach 100 { }; # Firmware download into the ActiveWire board. After the firmware download is -# done the device detaches and reappears as something new and shiny +# done, the device detaches and reappears as something new and shiny # automatically. attach 100 { match "vendor" "0x0854"; @@ -265,12 +265,11 @@ notify 10 { /* EXAMPLES TO END OF FILE -# The following might be an example of something that a vendor might -# install if you were to add their device. This might reside in -# /usr/local/etc/devd/deqna.conf. A deqna is, in this hypothetical -# example, a pccard ethernet-like device. Students of history may -# know other devices by this name, and will get the in-jokes in this -# entry. +# An example of something that a vendor might install if you were to +# add their device. This might reside in /usr/local/etc/devd/deqna.conf. +# A deqna is, in this hypothetical example, a pccard ethernet-like device. +# Students of history may know other devices by this name, and will get +# the in-jokes in this entry. nomatch 10 { match "bus" "pccard[0-9]+"; match "manufacturer" "0x1234"; @@ -288,7 +287,7 @@ detach 10 { # Examples of notify hooks. A notify is a generic way for a kernel # subsystem to send event notification to userland. -# + # Here are some examples of ACPI notify handlers. ACPI subsystems that # generate notifies include the AC adapter, power/sleep buttons, # control method batteries, lid switch, and thermal zones. @@ -316,7 +315,7 @@ notify 10 { }; # This example works around a memory leak in PostgreSQL, restarting -# it when "user:pgsql:swap:devctl=1G" rctl(8) rule gets triggered. +# it when the "user:pgsql:swap:devctl=1G" rctl(8) rule gets triggered. notify 0 { match "system" "RCTL"; match "rule" "user:70:swap:.*";